pass cause from originate

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2647 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-09-12 01:32:04 +00:00
parent 3cb83d21d8
commit cb2da2328a
6 changed files with 25 additions and 7 deletions

View File

@@ -217,7 +217,7 @@ static switch_status_t originate_function(char *cmd, switch_core_session_t *ises
int x, argc = 0;
char *aleg, *exten, *dp, *context, *cid_name, *cid_num;
uint32_t timeout = 60;
switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
if (isession) {
stream->write_function(stream, "Illegal Usage\n");
return SWITCH_STATUS_SUCCESS;
@@ -260,7 +260,7 @@ static switch_status_t originate_function(char *cmd, switch_core_session_t *ises
return SWITCH_STATUS_SUCCESS;
}
if (switch_ivr_originate(NULL, &caller_session, aleg, timeout, &noop_state_handler, cid_name, cid_num, NULL) != SWITCH_STATUS_SUCCESS) {
if (switch_ivr_originate(NULL, &caller_session, &cause, aleg, timeout, &noop_state_handler, cid_name, cid_num, NULL) != SWITCH_STATUS_SUCCESS) {
stream->write_function(stream, "Cannot Create Outgoing Channel! [%s]\n", aleg);
return SWITCH_STATUS_SUCCESS;
}