提交 175b6b22 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-4049 working

上级 a856d81a
...@@ -2453,15 +2453,15 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * ...@@ -2453,15 +2453,15 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Destination-Number")); from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Destination-Number"));
} else { } else {
from_id = switch_str_nil(switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Number")); from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Caller-ID-Number"));
from_name = switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Name"); from_name = switch_event_get_header(helper->event, "Caller-Caller-ID-Name");
if (zstr(from_id)) { if (zstr(from_id)) {
from_id = switch_str_nil(switch_event_get_header(helper->event, "Caller-Caller-ID-Number")); from_id = switch_str_nil(switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Number"));
} }
if (zstr(from_name)) { if (zstr(from_name)) {
from_name = switch_event_get_header(helper->event, "Caller-Caller-ID-Name"); from_name = switch_event_get_header(helper->event, "Other-Leg-Caller-ID-Name");
} }
} }
...@@ -2583,6 +2583,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * ...@@ -2583,6 +2583,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
} }
stream.write_function(&stream, "<target uri=\"sip:**%s@%s\"/>\n", clean_to_user, host); stream.write_function(&stream, "<target uri=\"sip:**%s@%s\"/>\n", clean_to_user, host);
stream.write_function(&stream, "</remote>\n"); stream.write_function(&stream, "</remote>\n");
} else if (!strcasecmp(proto, "queue")) { } else if (!strcasecmp(proto, "queue")) {
stream.write_function(&stream, "<local>\n<identity display=\"queue\">sip:%s@%s;proto=queue</identity>\n", stream.write_function(&stream, "<local>\n<identity display=\"queue\">sip:%s@%s;proto=queue</identity>\n",
!zstr(clean_to_user) ? clean_to_user : "unknown", host); !zstr(clean_to_user) ? clean_to_user : "unknown", host);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论