From: Anthony Minessale Date: Fri, 21 Nov 2008 19:41:11 +0000 (+0000) Subject: update X-Git-Tag: v1.0.2~431 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd4e114d2f6d74c59ed7f440839b7d969cfed76b;p=thirdparty%2Ffreeswitch.git update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10503 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index ec13e8a6c5..6b060501e1 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -106,7 +106,15 @@ void sofia_handle_sip_i_notify(switch_core_session_t *session, int status, if (!strcasecmp(sip->sip_event->o_type, "refer")) { if (session && channel && tech_pvt) { if (sip->sip_payload && sip->sip_payload->pl_data) { - if (!switch_stristr("100", sip->sip_payload->pl_data)) { + char *p; + int status; + if ((p = strchr(sip->sip_payload->pl_data, ' '))) { + p++; + if (p) { + status = atoi(p); + } + } + if (!status || status >= 200) { switch_channel_set_variable(channel, "sip_refer_reply", sip->sip_payload->pl_data); if (tech_pvt->want_event == 9999) { tech_pvt->want_event = 0;