From 5e5bc23f47d85e5951474fa0341d00c5a0b7c2f8 Mon Sep 17 00:00:00 2001 From: Davide Colombo Date: Thu, 10 Mar 2016 14:46:05 +0100 Subject: [PATCH] OPENZAP-241: set always STATE_HANGUP_COMPLETE --- libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c b/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c index e1fbc40fb6..03f2fc3c8b 100644 --- a/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c +++ b/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c @@ -1242,18 +1242,7 @@ static ftdm_status_t state_advance(ftdm_channel_t *chan) pri_hangup(isdn_data->spri.pri, call, caller_data->hangup_cause); if (chan_priv->peerhangup) { - /* Call is inbound and hangup has been initiated by peer */ - if (!ftdm_test_flag(chan, FTDM_CHANNEL_OUTBOUND)) { - ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE); - } else if (caller_data->hangup_cause == PRI_CAUSE_NO_USER_RESPONSE) { - /* Can happen when we have a DL link expire or some timer expired */ - ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE); - } else if (caller_data->hangup_cause == PRI_CAUSE_DESTINATION_OUT_OF_ORDER) { - /* Can happen when we have a DL link expire or some timer expired */ - ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE); - } else if (caller_data->hangup_cause == PRI_CAUSE_INVALID_NUMBER_FORMAT) { - ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE); - } + ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE); } } }