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

FS-5621

上级 5660f905
...@@ -8095,13 +8095,19 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia ...@@ -8095,13 +8095,19 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
switch_channel_set_caller_profile(channel, tech_pvt->caller_profile); switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
if (x_user) { if (x_user) {
const char *user = NULL, *domain = NULL; const char *ruser = NULL, *rdomain = NULL, *user = switch_xml_attr(x_user, "id"), *domain = switch_xml_attr(x_user, "domain-name");
if (v_event) { if (v_event) {
user = switch_event_get_header(v_event, "username"); ruser = switch_event_get_header(v_event, "username");
domain = switch_event_get_header(v_event, "domain_name"); rdomain = switch_event_get_header(v_event, "domain_name");
switch_channel_set_variable(channel, "requested_user_name", ruser);
switch_channel_set_variable(channel, "requested_domain_name", rdomain);
} }
if (!user) user = ruser;
if (!domain) domain = rdomain;
switch_ivr_set_user_xml(session, NULL, user, domain, x_user); switch_ivr_set_user_xml(session, NULL, user, domain, x_user);
switch_xml_free(x_user); switch_xml_free(x_user);
x_user = NULL; x_user = NULL;
......
...@@ -1916,6 +1916,7 @@ static void do_merge(switch_xml_t in, switch_xml_t src, const char *container, c ...@@ -1916,6 +1916,7 @@ static void do_merge(switch_xml_t in, switch_xml_t src, const char *container, c
SWITCH_DECLARE(void) switch_xml_merge_user(switch_xml_t user, switch_xml_t domain, switch_xml_t group) SWITCH_DECLARE(void) switch_xml_merge_user(switch_xml_t user, switch_xml_t domain, switch_xml_t group)
{ {
const char *domain_name = switch_xml_attr(domain, "name");
do_merge(user, group, "params", "param"); do_merge(user, group, "params", "param");
do_merge(user, group, "variables", "variable"); do_merge(user, group, "variables", "variable");
...@@ -1923,6 +1924,10 @@ SWITCH_DECLARE(void) switch_xml_merge_user(switch_xml_t user, switch_xml_t domai ...@@ -1923,6 +1924,10 @@ SWITCH_DECLARE(void) switch_xml_merge_user(switch_xml_t user, switch_xml_t domai
do_merge(user, domain, "params", "param"); do_merge(user, domain, "params", "param");
do_merge(user, domain, "variables", "variable"); do_merge(user, domain, "variables", "variable");
do_merge(user, domain, "profile-variables", "variable"); do_merge(user, domain, "profile-variables", "variable");
if (!zstr(domain_name)) {
switch_xml_set_attr_d(user, "domain-name", domain_name);
}
} }
SWITCH_DECLARE(uint32_t) switch_xml_clear_user_cache(const char *key, const char *user_name, const char *domain_name) SWITCH_DECLARE(uint32_t) switch_xml_clear_user_cache(const char *key, const char *user_name, const char *domain_name)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论