mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user