From cdb4b29a55ca5a2137fc0ba959de3981a2f650c4 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 4 Jan 2012 12:10:53 -0600 Subject: [PATCH] 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 --- src/mod/endpoints/mod_sofia/sofia_presence.c | 32 ++++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 94dd8622e5..347595fe9a 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -1548,8 +1548,8 @@ static int sofia_dialog_probe_callback(void *pArg, int argc, char **argv, char * local_host = to_host; if (proto && !strcasecmp(proto, "queue")) { - local_user = "queue"; - local_user_param = switch_mprintf(";fifo=%s", to_user); + local_user = to_user; + local_user_param = switch_mprintf(";proto=%s", proto); event_status = "hold"; if (skip_proto) { 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; } else if (proto && !strcasecmp(proto, "park")) { - local_user = "park"; - local_user_param = switch_mprintf(";slot=%s", to_user); + local_user = to_user; + local_user_param = switch_mprintf(";proto=%s", proto); event_status = "hold"; if (skip_proto) { 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; } else if (proto && !strcasecmp(proto, "conf")) { - local_user = "conference"; - local_user_param = switch_mprintf(";conference=%s", to_user); + local_user = to_user; + local_user_param = switch_mprintf(";proto=%s", proto); if (skip_proto) { buf_to_free = switch_mprintf("sip:%s@%s", to_user, host); } else { @@ -2268,9 +2268,9 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * stream.write_function(&stream, "\n", clean_to_user, host); stream.write_function(&stream, "\n"); } else if (!strcasecmp(proto, "queue")) { - stream.write_function(&stream, "\nsip:queue@%s;fifo=%s\n", - host, !zstr(clean_to_user) ? clean_to_user : "unknown"); - stream.write_function(&stream, "\n", host, !zstr(clean_to_user) ? clean_to_user : "unknown"); + stream.write_function(&stream, "\nsip:%s@%s;proto=queue\n", + !zstr(clean_to_user) ? clean_to_user : "unknown", host); + stream.write_function(&stream, "\n", !zstr(clean_to_user) ? clean_to_user : "unknown", host); stream.write_function(&stream, "\n\n\n"); stream.write_function(&stream, "\nsip:%s\n", uuid); if (skip_proto) { @@ -2281,9 +2281,9 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * stream.write_function(&stream, "\n"); } else if (!strcasecmp(proto, "park")) { - stream.write_function(&stream, "\nsip:park@%s;slot=%s\n", - host, !zstr(clean_to_user) ? clean_to_user : "unknown"); - stream.write_function(&stream, "\n", host, !zstr(clean_to_user) ? clean_to_user : "unknown"); + stream.write_function(&stream, "\nsip:%s@%s;proto=park\n", + !zstr(clean_to_user) ? clean_to_user : "unknown", host); + stream.write_function(&stream, "\n", !zstr(clean_to_user) ? clean_to_user : "unknown", host); stream.write_function(&stream, "\n\n\n"); stream.write_function(&stream, "\nsip:%s\n", uuid); if (skip_proto) { @@ -2293,10 +2293,10 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char * } stream.write_function(&stream, "\n"); } else if (!strcasecmp(proto, "conf")) { - stream.write_function(&stream, "\nsip:conference@%s;conference=%s\n", - host, !zstr(clean_to_user) ? clean_to_user : "unknown"); - stream.write_function(&stream, "\n", - host, !zstr(clean_to_user) ? clean_to_user : "unknown"); + stream.write_function(&stream, "\nsip:%s@%s;proto=conference\n", + !zstr(clean_to_user) ? clean_to_user : "unknown", host); + stream.write_function(&stream, "\n", + !zstr(clean_to_user) ? clean_to_user : "unknown", host); stream.write_function(&stream, "\n\n\n"); stream.write_function(&stream, "\nsip:%s@%s\n", uuid, host); if (skip_proto) {