FS-5997 --resolve

This commit is contained in:
Anthony Minessale 2013-12-04 17:46:02 -06:00
parent e127ca7d40
commit 70accd9f27

View File

@ -130,6 +130,7 @@ typedef struct {
typedef enum { typedef enum {
IDX_XFER = -5,
IDX_KEY_CANCEL = -4, IDX_KEY_CANCEL = -4,
IDX_TIMEOUT = -3, IDX_TIMEOUT = -3,
IDX_CANCEL = -2, IDX_CANCEL = -2,
@ -3358,7 +3359,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
switch_channel_set_flag(peer_channel, CF_LAZY_ATTENDED_TRANSFER); switch_channel_set_flag(peer_channel, CF_LAZY_ATTENDED_TRANSFER);
switch_ivr_uuid_bridge(holding, switch_core_session_get_uuid(peer_session)); switch_ivr_uuid_bridge(holding, switch_core_session_get_uuid(peer_session));
holding = NULL; holding = NULL;
oglobals.idx = IDX_NADA; oglobals.idx = IDX_XFER;
if (caller_channel && switch_channel_up_nosig(caller_channel) && !switch_channel_test_flag(caller_channel, CF_INTERCEPTED)) { if (caller_channel && switch_channel_up_nosig(caller_channel) && !switch_channel_test_flag(caller_channel, CF_INTERCEPTED)) {
switch_channel_hangup(caller_channel, SWITCH_CAUSE_ATTENDED_TRANSFER); switch_channel_hangup(caller_channel, SWITCH_CAUSE_ATTENDED_TRANSFER);
} }
@ -3668,8 +3669,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
} else if (oglobals.idx == IDX_TIMEOUT) { } else if (oglobals.idx == IDX_TIMEOUT) {
*cause = SWITCH_CAUSE_NO_ANSWER; *cause = SWITCH_CAUSE_NO_ANSWER;
} else { } else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(oglobals.session), SWITCH_LOG_DEBUG, if (oglobals.idx == IDX_XFER) {
"Originate Resulted in Error Cause: %d [%s]\n", *cause, switch_channel_cause2str(*cause)); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(oglobals.session), SWITCH_LOG_DEBUG,
"Originate Resulted in Attended Transfer Cause: %d [%s]\n", *cause, switch_channel_cause2str(*cause));
goto outer_for;
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(oglobals.session), SWITCH_LOG_DEBUG,
"Originate Resulted in Error Cause: %d [%s]\n", *cause, switch_channel_cause2str(*cause));
}
} }
} }