提交 fb1d45b4 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-4049 try this

上级 ce75bf5a
...@@ -96,6 +96,7 @@ typedef struct { ...@@ -96,6 +96,7 @@ typedef struct {
typedef struct { typedef struct {
switch_core_session_t *session; switch_core_session_t *session;
switch_core_session_t *osession;
int32_t idx; int32_t idx;
uint32_t hups; uint32_t hups;
char *file; char *file;
...@@ -1770,6 +1771,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -1770,6 +1771,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
oglobals.error_file = NULL; oglobals.error_file = NULL;
switch_core_new_memory_pool(&oglobals.pool); switch_core_new_memory_pool(&oglobals.pool);
if ((flags & SOF_ENTERPRISE)) {
if (session) {
oglobals.osession = session;
session = NULL;
}
}
if (caller_profile_override) { if (caller_profile_override) {
oglobals.caller_profile_override = switch_caller_profile_dup(oglobals.pool, caller_profile_override); oglobals.caller_profile_override = switch_caller_profile_dup(oglobals.pool, caller_profile_override);
} else if (session) { } else if (session) {
...@@ -1780,6 +1788,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -1780,6 +1788,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
} }
} }
if (session) { if (session) {
const char *to_var, *bypass_media = NULL, *proxy_media = NULL; const char *to_var, *bypass_media = NULL, *proxy_media = NULL;
caller_channel = switch_core_session_get_channel(session); caller_channel = switch_core_session_get_channel(session);
...@@ -2452,7 +2461,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -2452,7 +2461,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
} }
reason = switch_core_session_outgoing_channel(oglobals.session, originate_var_event, chan_type, reason = switch_core_session_outgoing_channel(oglobals.osession, originate_var_event, chan_type,
new_profile, &new_session, NULL, myflags, cancel_cause); new_profile, &new_session, NULL, myflags, cancel_cause);
switch_event_destroy(&originate_var_event); switch_event_destroy(&originate_var_event);
...@@ -2711,11 +2720,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -2711,11 +2720,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE); soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE);
} }
if ((flags & SOF_ENTERPRISE)) {
session = oglobals.session = NULL;
caller_channel = NULL;
}
while ((!caller_channel || switch_channel_ready(caller_channel) || switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) && while ((!caller_channel || switch_channel_ready(caller_channel) || switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) &&
check_channel_status(&oglobals, originate_status, and_argc)) { check_channel_status(&oglobals, originate_status, and_argc)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论