From 714195b8f26ed325ac0100dfd02befb6cdbdcbb8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 4 Aug 2011 16:34:01 -0500 Subject: [PATCH] FS-3487 gonna guess, try this... --- src/mod/endpoints/mod_sofia/sofia.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 316c23d369..7a5fe8fc74 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -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: