提交 80b18bb2 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-4049

上级 fb1d45b4
...@@ -2460,8 +2460,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -2460,8 +2460,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "sip_h_X-FS-Channel-Name", new_name); switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "sip_h_X-FS-Channel-Name", new_name);
} }
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);
...@@ -2502,6 +2501,32 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess ...@@ -2502,6 +2501,32 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
originate_status[i].peer_session = new_session; originate_status[i].peer_session = new_session;
switch_channel_set_flag(originate_status[i].peer_channel, CF_ORIGINATING); switch_channel_set_flag(originate_status[i].peer_channel, CF_ORIGINATING);
if (oglobals.osession) {
switch_channel_t *ochannel;
switch_caller_profile_t *profile, *cloned_profile;
ochannel = switch_core_session_get_channel(oglobals.osession);
profile = switch_channel_get_caller_profile(ochannel);
switch_assert(profile);
if ((cloned_profile = switch_caller_profile_clone(originate_status[i].peer_session, profile)) != 0) {
switch_channel_set_originator_caller_profile(originate_status[i].peer_channel, cloned_profile);
}
if ((profile = switch_channel_get_caller_profile(originate_status[i].peer_channel))) {
if ((cloned_profile = switch_caller_profile_clone(oglobals.osession, profile)) != 0) {
switch_channel_set_origination_caller_profile(ochannel, cloned_profile);
}
}
}
if (caller_channel) { if (caller_channel) {
switch_channel_set_variable(originate_status[i].peer_channel, "call_uuid", switch_channel_get_variable(caller_channel, "call_uuid")); switch_channel_set_variable(originate_status[i].peer_channel, "call_uuid", switch_channel_get_variable(caller_channel, "call_uuid"));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论