From e5bdb11b8160bc8b03372514072036c42787bfdd Mon Sep 17 00:00:00 2001 From: Brian West Date: Wed, 23 Jul 2008 13:11:45 +0000 Subject: [PATCH] small tweak to make sure we don't make any devices mad git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9139 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index e4358a1427..2662c55386 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2071,7 +2071,7 @@ static void general_event_handler(switch_event_t *event) if (profile_name && ct && es && body && user && host && (profile = sofia_glue_find_profile(profile_name))) { char *id = NULL; - char *contact; + char *contact, *p; char buf[512] = ""; if (!sofia_reg_find_reg_url(profile, user, host, buf, sizeof(buf))) { @@ -2084,6 +2084,10 @@ static void general_event_handler(switch_event_t *event) switch_assert(id); contact = sofia_glue_get_url_from_contact(buf, 0); + if ((p = strstr(contact, ";fs_"))) { + *p = '\0'; + } + nh = nua_handle(profile->nua, NULL, NUTAG_URL(contact), @@ -2118,7 +2122,7 @@ static void general_event_handler(switch_event_t *event) if (profile_name && ct && body && user && host && (profile = sofia_glue_find_profile(profile_name))) { char *id = NULL; - char *contact; + char *contact, *p; char buf[512] = ""; if (!sofia_reg_find_reg_url(profile, user, host, buf, sizeof(buf))) { @@ -2130,6 +2134,10 @@ static void general_event_handler(switch_event_t *event) switch_assert(id); contact = sofia_glue_get_url_from_contact(buf, 0); + + if ((p = strstr(contact, ";fs_"))) { + *p = '\0'; + } nh = nua_handle(profile->nua, NULL,