]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] remove blank display name that can show up in from uri
authorMike Jerris <mike@signalwire.com>
Thu, 30 Apr 2020 17:03:34 +0000 (11:03 -0600)
committerAndrey Volk <andywolk@gmail.com>
Wed, 6 May 2020 23:18:16 +0000 (03:18 +0400)
src/mod/endpoints/mod_sofia/sofia_glue.c

index 72c654fe460e21d55644cd35cc883e8b2bacb4be..a412f25cd3670b3abc954d8109c65891b15c5ff2 100644 (file)
@@ -1309,7 +1309,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                        use_from_str = switch_core_session_sprintf(session, "sip:%s", use_from_str);
                }
 
-               if (!from_display && !strcasecmp(tech_pvt->caller_profile->caller_id_name, "_undef_")) {
+               if (!from_display && (!strcasecmp(tech_pvt->caller_profile->caller_id_name, "_undef_") || zstr(tech_pvt->caller_profile->caller_id_name))) {
                        from_str = switch_core_session_sprintf(session, "<%s>", use_from_str);
                } else {
                        char *name = switch_core_session_strdup(session, from_display ? from_display : tech_pvt->caller_profile->caller_id_name);