]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3487 gonna guess, try this...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 4 Aug 2011 21:34:01 +0000 (16:34 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 4 Aug 2011 21:34:01 +0000 (16:34 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index 316c23d36996a09dd73bce890964c71068bcdcae..7a5fe8fc748b0a947c13c903b33a0ccd57821aec 100644 (file)
@@ -952,9 +952,8 @@ static void our_sofia_event_callback(nua_event_t event,
                        }
                }
        case nua_r_ack:
-               if (channel) {
+               if (channel)
                        switch_channel_set_flag(channel, CF_MEDIA_ACK);
-               }
                break;
        case nua_r_shutdown:
                if (status >= 200) {
@@ -4969,12 +4968,6 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                        sofia_clear_flag(tech_pvt, TFLAG_RECOVERING);
                }
 
-               if ((status == 180 || status == 183) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
-                       const 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());
-                       }
-               }
        }
 
   end:
@@ -5165,6 +5158,14 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                status = 183;
        }
 
+       if (channel && (status == 180 || status == 183) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
+               const 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());
+               }
+       }
+
+
 
   state_process: