Merge pull request #1472 in FS/freeswitch from ~STEPHALNET/freeswitch:FS-6816-sofia_send_callee_id-should-not-always to master

* commit '159c4ce95d1314bde9f747b0a0857c46fbf25a4f':
  FS-6816 [mod_sofia] Set empty callee id if `_undef_`
This commit is contained in:
Mike Jerris 2018-03-05 17:36:09 +00:00
commit dd0bb0e331
1 changed files with 8 additions and 0 deletions

View File

@ -1173,6 +1173,10 @@ void sofia_send_callee_id(switch_core_session_t *session, const char *name, cons
if (zstr(number)) { if (zstr(number)) {
name = number = "UNKNOWN"; name = number = "UNKNOWN";
} }
if (!zstr(name) && !strcmp(name,"_undef_")) {
name = "";
}
} else { } else {
if (zstr(name)) { if (zstr(name)) {
name = caller_profile->callee_id_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)) { if (zstr(number)) {
number = caller_profile->destination_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))) { if ((uuid = switch_channel_get_partner_uuid(channel)) && (session_b = switch_core_session_locate(uuid))) {