From 05da6d928a6d5950188f69ae4e7e8129a99bb3fc Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 4 Feb 2010 19:21:22 +0000 Subject: [PATCH] added valid state from TERMINATING to HANGUP for outbound calls fixed state changes when remote side hangs up git-svn-id: http://svn.openzap.org/svn/openzap/trunk@1023 a93c3328-9c30-0410-af19-c9cd2b2d52af --- .../src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/openzap/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c b/libs/openzap/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c index 9b97c93803..b9d3460988 100644 --- a/libs/openzap/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c +++ b/libs/openzap/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c @@ -1095,7 +1095,7 @@ static __inline__ void state_advance(zap_channel_t *zchan) { zap_set_sflag_locked(zchan, SFLAG_HANGUP); - if (zap_test_sflag(zchan, SFLAG_SENT_FINAL_MSG)) { + if (zap_test_sflag(zchan, SFLAG_SENT_FINAL_MSG) || zap_test_sflag(zchan, SFLAG_TERMINATING)) { zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_HANGUP_COMPLETE); } else { zap_set_sflag_locked(zchan, SFLAG_SENT_FINAL_MSG); @@ -1126,7 +1126,6 @@ static __inline__ void state_advance(zap_channel_t *zchan) zap_set_sflag_locked(zchan, SFLAG_TERMINATING); sig.event_id = ZAP_SIGEVENT_STOP; status = zap_span_send_signal(zchan->span, &sig); - zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_HANGUP_COMPLETE); } break; default: @@ -1468,7 +1467,7 @@ static zap_state_map_t boost_state_map = { ZSD_OUTBOUND, ZSM_UNACCEPTABLE, {ZAP_CHANNEL_STATE_HANGUP, ZAP_CHANNEL_STATE_TERMINATING, ZAP_END}, - {ZAP_CHANNEL_STATE_HANGUP_COMPLETE, ZAP_END} + {ZAP_CHANNEL_STATE_HANGUP_COMPLETE, ZAP_CHANNEL_STATE_HANGUP, ZAP_END} }, { ZSD_OUTBOUND,