提交 b42f0341 authored 作者: Stephane Alnet's avatar Stephane Alnet 提交者: Mike Jerris

FS-6816 [mod_sofia] Set empty callee id if `_undef_`

In some scenarios (e.g. MetaSwitch interop) the `display` field of callee-id should be left empty instead of being overwritten with the number.
As is done in other places, we allow for `_undef_` to mean "leave the field empty".
上级 6d3a802b
......@@ -1173,6 +1173,10 @@ void sofia_send_callee_id(switch_core_session_t *session, const char *name, cons
if (zstr(number)) {
name = number = "UNKNOWN";
}
if (!zstr(name) && !strcmp(name,"_undef_")) {
name = "";
}
} else {
if (zstr(name)) {
name = caller_profile->callee_id_name;
......@@ -1189,6 +1193,10 @@ void sofia_send_callee_id(switch_core_session_t *session, const char *name, cons
if (zstr(number)) {
number = caller_profile->destination_number;
}
if (!zstr(name) && !strcmp(name,"_undef_")) {
name = "";
}
}
if ((uuid = switch_channel_get_partner_uuid(channel)) && (session_b = switch_core_session_locate(uuid))) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论