]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 21 Nov 2008 19:41:11 +0000 (19:41 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 21 Nov 2008 19:41:11 +0000 (19:41 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10503 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index ec13e8a6c5ad454ef5b121bf042c4b146127699c..6b060501e189182f30143f1fc2af5d9329beb4df 100644 (file)
@@ -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;