From 1050a93c0f85957ec90c96e1ceccb063bc908b1d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 8 Sep 2006 03:28:49 +0000 Subject: [PATCH] wild guess git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2570 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 383a248a8a..769f958ae7 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -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);