]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 5 Oct 2007 16:49:15 +0000 (16:49 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 5 Oct 2007 16:49:15 +0000 (16:49 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5816 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index e8f0f9bff69975824bede8ad152eb4fd520f8077..e15f86aef1b68884201b2dc221f5ee09e72479a5 100644 (file)
@@ -134,8 +134,18 @@ void sofia_event_callback(nua_event_t event,
                        
                }
                break;
-       case nua_r_get_params:
+
        case nua_r_invite:
+               {
+                       if (channel) {
+                               char *val;
+                               if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
+                                       nua_notify(nh, NUTAG_NEWSUB(1), NUTAG_SUBSTATE(nua_substate_active), SIPTAG_EVENT_STR("talk"), TAG_END());
+                               }
+                       }
+               }
+               break;
+       case nua_r_get_params:
        case nua_r_unregister:
        case nua_r_options:
        case nua_i_fork:
@@ -305,14 +315,17 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
 
        nua_set_params(profile->nua,
                                   NUTAG_APPL_METHOD("OPTIONS"),
+                                  NUTAG_APPL_METHOD("NOTIFY"),
                                   //NUTAG_EARLY_MEDIA(1),                 
                                   NUTAG_AUTOANSWER(0),
                                   NUTAG_AUTOALERT(0),
                                   NUTAG_ALLOW("REGISTER"),
                                   NUTAG_ALLOW("REFER"),
                                   NUTAG_ALLOW("INFO"),
+                                  NUTAG_ALLOW("NOTIFY"),
+                                  NUTAG_ALLOW_EVENTS("talk"),
                                   TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("PUBLISH")),
-                                  TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("NOTIFY")),
+                                  //TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("NOTIFY")),
                                   TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("SUBSCRIBE")),
                                   TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ENABLEMESSAGE(1)),
                                   TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")),
index c202a4b44fa216fc90b69f06125d6fa39a7c30e9..ab97e34f6769efc43c9373b1a43dfd2c74d745ea 100644 (file)
@@ -598,6 +598,8 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                           SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
                           SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END());
 
+
+
        switch_safe_free(stream.data);
 
        return SWITCH_STATUS_SUCCESS;