FS-3634 the call is not bridged yet so we need to take more action, try this patch

This commit is contained in:
Anthony Minessale 2011-11-02 08:54:03 -05:00
parent 0c702ef06c
commit 43ca3ee81a
3 changed files with 9 additions and 0 deletions

View File

@ -1190,6 +1190,7 @@ typedef enum {
CF_SIMPLIFY,
CF_ZOMBIE_EXEC,
CF_INTERCEPT,
CF_INTERCEPTED,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
CF_FLAG_MAX

View File

@ -1640,6 +1640,7 @@ SWITCH_DECLARE(void) switch_ivr_intercept_session(switch_core_session_t *session
switch_channel_set_state(bchannel, CS_PARK);
}
switch_channel_set_flag(channel, CF_INTERCEPTED);
switch_ivr_uuid_bridge(switch_core_session_get_uuid(session), uuid);
switch_core_session_rwunlock(rsession);

View File

@ -3310,6 +3310,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
switch_channel_set_variable(caller_channel, buf, buf2);
}
if (caller_channel && switch_channel_test_flag(caller_channel, CF_INTERCEPTED)) {
*cause = SWITCH_CAUSE_PICKED_OFF;
}
if (!*cause) {
if (reason) {
*cause = reason;
@ -3419,6 +3423,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
if (!(state == CS_RESET || switch_channel_test_flag(originate_status[i].peer_channel, CF_TRANSFER) ||
switch_channel_test_flag(originate_status[i].peer_channel, CF_REDIRECT) ||
switch_channel_test_flag(originate_status[i].peer_channel, CF_BRIDGED))) {
if (caller_channel && switch_channel_test_flag(caller_channel, CF_INTERCEPTED)) {
switch_channel_set_flag(originate_status[i].peer_channel, CF_INTERCEPT);
}
switch_channel_hangup(originate_status[i].peer_channel, *cause);
}
}