fix cause code passthrough

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4061 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-01-26 20:39:45 +00:00
parent 28807552d0
commit 00d7e70e2d
4 changed files with 15 additions and 15 deletions

View File

@@ -2881,8 +2881,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
}
done:
*cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
*cause = SWITCH_CAUSE_UNALLOCATED;
if (var_event) {
switch_event_destroy(&var_event);
}
@@ -2900,18 +2900,19 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
if (!peer_channels[i]) {
continue;
}
*cause = switch_channel_get_cause(peer_channels[i]);
*cause = switch_channel_get_cause(peer_channels[i]);
break;
}
}
if (reason != SWITCH_CAUSE_UNALLOCATED) {
*cause = reason;
} else if (caller_channel) {
*cause = switch_channel_get_cause(caller_channel);
} else {
*cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
if (!*cause) {
if (reason) {
*cause = reason;
} else if (caller_channel) {
*cause = switch_channel_get_cause(caller_channel);
} else {
*cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
}
if (idx == IDX_CANCEL) {