]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
wild guess
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 8 Sep 2006 03:28:49 +0000 (03:28 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 8 Sep 2006 03:28:49 +0000 (03:28 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2570 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 383a248a8aba37cf3ef2c67e28fe44488e919a05..769f958ae75d08e4a7b7a85cc25d166f4fb6743a 100644 (file)
@@ -550,7 +550,11 @@ static switch_status_t sofia_on_hangup(switch_core_session_t *session)
 
        if (tech_pvt->nh) {
                if (!switch_test_flag(tech_pvt, TFLAG_BYE)) {
-                       nua_bye(tech_pvt->nh, TAG_END());
+                       if (switch_test_flag(tech_pvt, TFLAG_ANS)) {
+                               nua_bye(tech_pvt->nh, TAG_END());
+                       } else {
+                               nua_cancel(tech_pvt->nh, TAG_END());
+                       }
                }
                nua_handle_bind(tech_pvt->nh, NULL);
                nua_handle_destroy(tech_pvt->nh);