git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8760 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-06-05 00:23:58 +00:00
parent 3d136b268f
commit 7c9ffb4214

View File

@ -1195,7 +1195,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
peer_channel = peer_channels[idx];
} else {
status = SWITCH_STATUS_FALSE;
if (caller_channel) {
if (caller_channel && peer_channel) {
process_import(session, peer_channel);
}
peer_channel = NULL;
@ -1238,7 +1238,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
if (status == SWITCH_STATUS_SUCCESS) {
if (caller_channel) {
switch_channel_set_variable(caller_channel, "originate_disposition", "call accepted");
process_import(session, peer_channel);
if (peer_channel) {
process_import(session, peer_channel);
}
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Originate Resulted in Success: [%s]\n", switch_channel_get_name(peer_channel));
*cause = SWITCH_CAUSE_SUCCESS;