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

pop ::<profile_name> off the domain name in mwi events to hint at the profile

上级 07a79752
...@@ -364,6 +364,7 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event) ...@@ -364,6 +364,7 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event)
const char *call_id; const char *call_id;
const char *sub_call_id; const char *sub_call_id;
int for_everyone = 0; int for_everyone = 0;
char *tmp_pname;
switch_assert(event != NULL); switch_assert(event != NULL);
...@@ -389,8 +390,15 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event) ...@@ -389,8 +390,15 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event)
switch_assert(dup_account != NULL); switch_assert(dup_account != NULL);
switch_split_user_domain(dup_account, &user, &host); switch_split_user_domain(dup_account, &user, &host);
if (host && (tmp_pname = strstr(host, "::"))) {
*tmp_pname = '\0';
tmp_pname += 2;
pname = tmp_pname;
profile = sofia_glue_find_profile(pname);
}
if ((pname = switch_event_get_header(event, "sofia-profile"))) { if (!profile && (pname = switch_event_get_header(event, "sofia-profile"))) {
profile = sofia_glue_find_profile(pname); profile = sofia_glue_find_profile(pname);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论