提交 9b086c4b authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-3881 try this, i think the contact in the notify is causing the phone to…

FS-3881 try this, i think the contact in the notify is causing the phone to change the destination for future subs
上级 67676837
......@@ -1835,7 +1835,7 @@ static void _send_presence_notify(sofia_profile_t *profile,
sofia_destination_t *dst = NULL;
char *contact_str, *contact, *user_via = NULL;
char *route_uri = NULL, *o_contact_dup = NULL, *tmp;
char *route_uri = NULL, *o_contact_dup = NULL, *tmp, *to_uri, *dcs = NULL;
const char *tp;
tmp = (char *)o_contact;
......@@ -1882,6 +1882,27 @@ static void _send_presence_notify(sofia_profile_t *profile,
} else {
contact_str = our_contact;
}
if ((to_uri = sofia_glue_get_url_from_contact((char *)full_to, 1))) {
char *p;
if ((p = strstr(to_uri, "sip:"))) {
char *q;
p += 4;
if ((q = strchr(p, '@'))) {
*q++ = '\0';
if ((dcs = switch_string_replace(contact_str, "mod_sofia", p))) {
contact_str = dcs;
}
}
}
free(to_uri);
}
dst = sofia_glue_get_destination((char *) o_contact);
switch_assert(dst);
......@@ -1980,6 +2001,7 @@ static void _send_presence_notify(sofia_profile_t *profile,
switch_safe_free(route_uri);
switch_safe_free(dcs);
switch_safe_free(contact);
sofia_glue_free_destination(dst);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论