mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-21 10:44:16 +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:
1 parent
3cb83d21d8
commit
cb2da2328a
6 files changed
+25
-7
No files matched your search
@@ -1390,6 +1390,7 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
{
|
||||
switch_memory_pool_t *pool = NULL;
|
||||
if (argc > 1) {
|
||||
switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
|
||||
struct js_session *jss = NULL;
|
||||
JSObject *session_obj;
|
||||
switch_core_session_t *session = NULL, *peer_session = NULL;
|
||||
@@ -1471,7 +1472,7 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
context,
|
||||
dest);
|
||||
|
||||
if (switch_ivr_originate(session, &peer_session, dest, to ? atoi(to) : 60, NULL, NULL, NULL, caller_profile) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_ivr_originate(session, &peer_session, &cause, dest, to ? atoi(to) : 60, NULL, NULL, NULL, caller_profile) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot Create Outgoing Channel! [%s]\n", dest);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user