]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
just ok mwi notifies
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 1 Apr 2009 16:35:37 +0000 (16:35 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 1 Apr 2009 16:35:37 +0000 (16:35 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12865 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index 978157142b6543c5772877e85e8d4e428a6de27c..6ae6e579aedd4bb260c7e1baf674d14ecd0c245e 100644 (file)
@@ -92,7 +92,7 @@ void sofia_handle_sip_i_notify(switch_core_session_t *session, int status,
        int sub_state;
 
        tl_gets(tags, NUTAG_SUBSTATE_REF(sub_state), TAG_END());
-       
+
        /* make sure we have a proper event */
        if (!sip || !sip->sip_event) {
                goto error;
@@ -254,8 +254,14 @@ void sofia_handle_sip_i_notify(switch_core_session_t *session, int status,
 
   error:
 
-       nua_respond(nh, 481, "Subscription Does Not Exist", NUTAG_WITH_THIS(nua), TAG_END());
 
+       if (sip->sip_event && sip->sip_event->o_type && !strcasecmp(sip->sip_event->o_type, "message-summary")) {
+               /* unsolicited mwi, just say ok */
+               nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
+       } else {
+               nua_respond(nh, 481, "Subscription Does Not Exist", NUTAG_WITH_THIS(nua), TAG_END());
+       }
+       
  end:
        
        if (sub_state == nua_substate_terminated) {