From: Anthony Minessale Date: Fri, 23 Jan 2015 19:14:58 +0000 (-0600) Subject: FS-7186 #resolve X-Git-Tag: v1.4.16~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b37d0719087f1360b1b6d4aa3e0d7e3e8eb1ffba;p=thirdparty%2Ffreeswitch.git FS-7186 #resolve --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 506fc53bfd..9e25ba0aef 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -1655,13 +1655,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess for (i = 0; i < x_argc; i++) { - if (channel) { - switch_channel_handle_cause(channel, handles[i].cause); - } - if (hp == &handles[i]) { continue; } + + if (channel && handles[i].cause && handles[i].cause != SWITCH_CAUSE_SUCCESS) { + switch_channel_handle_cause(channel, handles[i].cause); + } + switch_mutex_unlock(handles[i].mutex); if (getcause && *cause != handles[i].cause && handles[i].cause != SWITCH_CAUSE_LOSE_RACE && handles[i].cause != SWITCH_CAUSE_NO_PICKUP) {