FS-4049 try this

This commit is contained in:
Anthony Minessale 2012-03-28 12:43:13 -05:00
parent ce75bf5aaa
commit fb1d45b4bb
1 changed files with 10 additions and 6 deletions

View File

@ -96,6 +96,7 @@ typedef struct {
typedef struct {
switch_core_session_t *session;
switch_core_session_t *osession;
int32_t idx;
uint32_t hups;
char *file;
@ -1770,6 +1771,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
oglobals.error_file = NULL;
switch_core_new_memory_pool(&oglobals.pool);
if ((flags & SOF_ENTERPRISE)) {
if (session) {
oglobals.osession = session;
session = NULL;
}
}
if (caller_profile_override) {
oglobals.caller_profile_override = switch_caller_profile_dup(oglobals.pool, caller_profile_override);
} else if (session) {
@ -1780,6 +1788,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
}
}
if (session) {
const char *to_var, *bypass_media = NULL, *proxy_media = NULL;
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
}
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);
switch_event_destroy(&originate_var_event);
@ -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);
}
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)) &&
check_channel_status(&oglobals, originate_status, and_argc)) {