From: Anthony Minessale Date: Tue, 13 Dec 2011 19:37:06 +0000 (-0600) Subject: only hangup inbound calls in progress if they have been answered X-Git-Tag: v1.2-rc1~27^2~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40f29b3886e524dadf68c5ef0849865bdf7ffd74;p=thirdparty%2Ffreeswitch.git only hangup inbound calls in progress if they have been answered --- diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_modem.c b/src/mod/applications/mod_spandsp/mod_spandsp_modem.c index e8d6320631..97c27cd48e 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_modem.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp_modem.c @@ -1068,7 +1068,8 @@ static int control_handler(modem_t *modem, const char *num, int op) if ((session = switch_core_session_force_locate(modem->uuid_str))) { switch_channel_t *channel = switch_core_session_get_channel(session); - if (switch_channel_up(channel)) { + if (switch_channel_up(channel) && + (switch_channel_test_flag(channel, CF_ANSWERED) || switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND)) { switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); set_state = 0; }