From: Michael Jerris Date: Mon, 7 Dec 2009 03:32:56 +0000 (+0000) Subject: mod_sofia: send bye instead of cancel after invalid 200 OK (MODENDP-270) X-Git-Tag: v1.0.6~1147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcbc54f9977f47e3882e8727be4249072f748ca2;p=thirdparty%2Ffreeswitch.git mod_sofia: send bye instead of cancel after invalid 200 OK (MODENDP-270) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15808 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index ca15700faf..643b55abca 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -389,7 +389,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session) switch_channel_cause2str(cause)); } - if (switch_channel_test_flag(channel, CF_ANSWERED)) { + if (switch_channel_test_flag(channel, CF_ANSWERED) || sofia_test_flag(tech_pvt, TFLAG_ANS)) { if (!tech_pvt->got_bye) { switch_channel_set_variable(channel, "sip_hangup_disposition", "send_bye"); } diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 4304b43b68..a8b61d3e3f 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -4264,8 +4264,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, } } + sofia_set_flag_locked(tech_pvt, TFLAG_ANS); + if (match) { - sofia_set_flag_locked(tech_pvt, TFLAG_ANS); if (sofia_glue_tech_choose_port(tech_pvt, 0) == SWITCH_STATUS_SUCCESS) { if (sofia_glue_activate_rtp(tech_pvt, 0) == SWITCH_STATUS_SUCCESS) { switch_channel_mark_answered(channel);