From: Anthony Minessale Date: Wed, 6 Dec 2006 21:37:29 +0000 (+0000) Subject: let calls live on when nobody answers in mod_bridgecall X-Git-Tag: v1.0-beta1~1620 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d48e3bafa8fd6bf60a138d5366e6345d74317dc9;p=thirdparty%2Ffreeswitch.git let calls live on when nobody answers in mod_bridgecall git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3560 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_bridgecall/mod_bridgecall.c b/src/mod/applications/mod_bridgecall/mod_bridgecall.c index 87039ff408..30b2577082 100644 --- a/src/mod/applications/mod_bridgecall/mod_bridgecall.c +++ b/src/mod/applications/mod_bridgecall/mod_bridgecall.c @@ -66,9 +66,12 @@ static void audio_bridge_function(switch_core_session_t *session, char *data) } if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n"); - /* Hangup the channel with the cause code from the failed originate.*/ - switch_channel_hangup(caller_channel, cause); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Originate Failed. Cause: %s\n", switch_channel_cause2str(cause)); + if (cause != SWITCH_CAUSE_NO_ANSWER) { + /* All Causes besides NO_ANSWER terminate the originating session. We will pass that cause on when we hangup.*/ + switch_channel_hangup(caller_channel, cause); + } + /* Otherwise.. nobody answered. Go back to the dialplan instructions in case there was more to do. */ return; } else { if (no_media_bridge) {