From 465329ea34d43d210231ba06bf5a291c0ba5f501 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 11 Aug 2008 16:09:39 +0000 Subject: [PATCH] tweak git-svn-id: http://svn.openzap.org/svn/openzap/trunk@509 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/mod_openzap/mod_openzap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/openzap/mod_openzap/mod_openzap.c b/libs/openzap/mod_openzap/mod_openzap.c index 10aa079f03..d28a754119 100644 --- a/libs/openzap/mod_openzap/mod_openzap.c +++ b/libs/openzap/mod_openzap/mod_openzap.c @@ -441,6 +441,9 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session) { if (tech_pvt->zchan->state != ZAP_CHANNEL_STATE_DOWN && tech_pvt->zchan->state != ZAP_CHANNEL_STATE_TERMINATING) { tech_pvt->zchan->caller_data.hangup_cause = switch_channel_get_cause(channel); + if (tech_pvt->zchan->caller_data.hangup_cause < 1 || tech_pvt->zchan->caller_data.hangup_cause > 127) { + tech_pvt->zchan->caller_data.hangup_cause = ZAP_CAUSE_DESTINATION_OUT_OF_ORDER; + } zap_set_state_locked(tech_pvt->zchan, ZAP_CHANNEL_STATE_HANGUP); } }