reverse data in dialog-info so the proto is in the params not in the user because polycom uses the target uri for what to dial and stips the params
This commit is contained in:
parent
db66f1d1f2
commit
cdb4b29a55
|
@ -1548,8 +1548,8 @@ static int sofia_dialog_probe_callback(void *pArg, int argc, char **argv, char *
|
||||||
|
|
||||||
local_host = to_host;
|
local_host = to_host;
|
||||||
if (proto && !strcasecmp(proto, "queue")) {
|
if (proto && !strcasecmp(proto, "queue")) {
|
||||||
local_user = "queue";
|
local_user = to_user;
|
||||||
local_user_param = switch_mprintf(";fifo=%s", to_user);
|
local_user_param = switch_mprintf(";proto=%s", proto);
|
||||||
event_status = "hold";
|
event_status = "hold";
|
||||||
if (skip_proto) {
|
if (skip_proto) {
|
||||||
buf_to_free = switch_mprintf("sip:%s", to_user);
|
buf_to_free = switch_mprintf("sip:%s", to_user);
|
||||||
|
@ -1562,8 +1562,8 @@ static int sofia_dialog_probe_callback(void *pArg, int argc, char **argv, char *
|
||||||
remote_host = local_host;
|
remote_host = local_host;
|
||||||
}
|
}
|
||||||
else if (proto && !strcasecmp(proto, "park")) {
|
else if (proto && !strcasecmp(proto, "park")) {
|
||||||
local_user = "park";
|
local_user = to_user;
|
||||||
local_user_param = switch_mprintf(";slot=%s", to_user);
|
local_user_param = switch_mprintf(";proto=%s", proto);
|
||||||
event_status = "hold";
|
event_status = "hold";
|
||||||
if (skip_proto) {
|
if (skip_proto) {
|
||||||
buf_to_free = switch_mprintf("sip:%s", to_user);
|
buf_to_free = switch_mprintf("sip:%s", to_user);
|
||||||
|
@ -1576,8 +1576,8 @@ static int sofia_dialog_probe_callback(void *pArg, int argc, char **argv, char *
|
||||||
remote_host = local_host;
|
remote_host = local_host;
|
||||||
}
|
}
|
||||||
else if (proto && !strcasecmp(proto, "conf")) {
|
else if (proto && !strcasecmp(proto, "conf")) {
|
||||||
local_user = "conference";
|
local_user = to_user;
|
||||||
local_user_param = switch_mprintf(";conference=%s", to_user);
|
local_user_param = switch_mprintf(";proto=%s", proto);
|
||||||
if (skip_proto) {
|
if (skip_proto) {
|
||||||
buf_to_free = switch_mprintf("sip:%s@%s", to_user, host);
|
buf_to_free = switch_mprintf("sip:%s@%s", to_user, host);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2268,9 +2268,9 @@ 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:queue@%s;fifo=%s</identity>\n",
|
stream.write_function(&stream, "<local>\n<identity display=\"queue\">sip:%s@%s;proto=queue</identity>\n",
|
||||||
host, !zstr(clean_to_user) ? clean_to_user : "unknown");
|
!zstr(clean_to_user) ? clean_to_user : "unknown", host);
|
||||||
stream.write_function(&stream, "<target uri=\"sip:queue@%s;fifo=%s\">\n", host, !zstr(clean_to_user) ? clean_to_user : "unknown");
|
stream.write_function(&stream, "<target uri=\"sip:%s@%s;proto=fifo\">\n", !zstr(clean_to_user) ? clean_to_user : "unknown", host);
|
||||||
stream.write_function(&stream, "<param pname=\"+sip.rendering\" pvalue=\"no\"/>\n</target>\n</local>\n");
|
stream.write_function(&stream, "<param pname=\"+sip.rendering\" pvalue=\"no\"/>\n</target>\n</local>\n");
|
||||||
stream.write_function(&stream, "<remote>\n<identity display=\"queue\">sip:%s</identity>\n", uuid);
|
stream.write_function(&stream, "<remote>\n<identity display=\"queue\">sip:%s</identity>\n", uuid);
|
||||||
if (skip_proto) {
|
if (skip_proto) {
|
||||||
|
@ -2281,9 +2281,9 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
||||||
|
|
||||||
stream.write_function(&stream, "</remote>\n");
|
stream.write_function(&stream, "</remote>\n");
|
||||||
} else if (!strcasecmp(proto, "park")) {
|
} else if (!strcasecmp(proto, "park")) {
|
||||||
stream.write_function(&stream, "<local>\n<identity display=\"park\">sip:park@%s;slot=%s</identity>\n",
|
stream.write_function(&stream, "<local>\n<identity display=\"park\">sip:%s@%s;proto=park</identity>\n",
|
||||||
host, !zstr(clean_to_user) ? clean_to_user : "unknown");
|
!zstr(clean_to_user) ? clean_to_user : "unknown", host);
|
||||||
stream.write_function(&stream, "<target uri=\"sip:park@%s;slot=%s\">\n", host, !zstr(clean_to_user) ? clean_to_user : "unknown");
|
stream.write_function(&stream, "<target uri=\"sip:%s@%s;proto=park\">\n", !zstr(clean_to_user) ? clean_to_user : "unknown", host);
|
||||||
stream.write_function(&stream, "<param pname=\"+sip.rendering\" pvalue=\"no\"/>\n</target>\n</local>\n");
|
stream.write_function(&stream, "<param pname=\"+sip.rendering\" pvalue=\"no\"/>\n</target>\n</local>\n");
|
||||||
stream.write_function(&stream, "<remote>\n<identity display=\"park\">sip:%s</identity>\n", uuid);
|
stream.write_function(&stream, "<remote>\n<identity display=\"park\">sip:%s</identity>\n", uuid);
|
||||||
if (skip_proto) {
|
if (skip_proto) {
|
||||||
|
@ -2293,10 +2293,10 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
|
||||||
}
|
}
|
||||||
stream.write_function(&stream, "</remote>\n");
|
stream.write_function(&stream, "</remote>\n");
|
||||||
} else if (!strcasecmp(proto, "conf")) {
|
} else if (!strcasecmp(proto, "conf")) {
|
||||||
stream.write_function(&stream, "<local>\n<identity display=\"conference\">sip:conference@%s;conference=%s</identity>\n",
|
stream.write_function(&stream, "<local>\n<identity display=\"conference\">sip:%s@%s;proto=conference</identity>\n",
|
||||||
host, !zstr(clean_to_user) ? clean_to_user : "unknown");
|
!zstr(clean_to_user) ? clean_to_user : "unknown", host);
|
||||||
stream.write_function(&stream, "<target uri=\"sip:conference@%s;conference=%s\">\n",
|
stream.write_function(&stream, "<target uri=\"sip:%s@%s;proto=conference\">\n",
|
||||||
host, !zstr(clean_to_user) ? clean_to_user : "unknown");
|
!zstr(clean_to_user) ? clean_to_user : "unknown", host);
|
||||||
stream.write_function(&stream, "<param pname=\"+sip.rendering\" pvalue=\"yes\"/>\n</target>\n</local>\n");
|
stream.write_function(&stream, "<param pname=\"+sip.rendering\" pvalue=\"yes\"/>\n</target>\n</local>\n");
|
||||||
stream.write_function(&stream, "<remote>\n<identity display=\"conference\">sip:%s@%s</identity>\n", uuid, host);
|
stream.write_function(&stream, "<remote>\n<identity display=\"conference\">sip:%s@%s</identity>\n", uuid, host);
|
||||||
if (skip_proto) {
|
if (skip_proto) {
|
||||||
|
|
Loading…
Reference in New Issue