From: Anthony Minessale Date: Thu, 23 Feb 2012 02:17:51 +0000 (-0600) Subject: FS-3933 --resolve X-Git-Tag: v1.2-rc1~19^2^2~68^2~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2261f8a82ef32f8bf46b7b2989f62eda837299c4;p=thirdparty%2Ffreeswitch.git FS-3933 --resolve --- diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 43de002cd4..26ddaef10a 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -2324,21 +2324,25 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session) if (!switch_channel_get_variable(channel, "presence_id")) { char *from = switch_core_session_strdup(session, from_str); - + const char *s; + + if ((s = switch_stristr("<", from))) { + from = (char *)s + 1; + } + if (!strncasecmp(from, "sip:", 4)) { from += 4; } - if (!strncasecmp(from, "sips:", 4)) { + if (!strncasecmp(from, "sips:", 5)) { from += 5; } - if ((p = strchr(from, ':')) || (p = strchr(from, ';'))) { + if ((p = strchr(from, ':')) || (p = strchr(from, ';')) || (p = strchr(from, '>'))) { *p++ = '\0'; } switch_channel_set_variable(channel, "presence_id", from); - } if (!(tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL,