]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't put @ in from string if there is no user part.
authorMichael Jerris <mike@jerris.com>
Fri, 27 Apr 2007 20:36:34 +0000 (20:36 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 27 Apr 2007 20:36:34 +0000 (20:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5029 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index e668071a245f35cdc1f4bb1ebb9a5e1e421e8361..b3ac38f463cd5012ce4d90fe90630422d70920d3 100644 (file)
@@ -474,9 +474,11 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
        sofia_glue_tech_prepare_codecs(tech_pvt);
 
        if (!tech_pvt->from_str) {
-               tech_pvt->from_str = switch_core_session_sprintf(tech_pvt->session, "\"%s\" <sip:%s@%s>",
+               tech_pvt->from_str = switch_core_session_sprintf(tech_pvt->session, "\"%s\" <sip:%s%s%s>",
                                                                                                                 cid_name,
-                                                                                                                cid_num, tech_pvt->profile->extsipip ? tech_pvt->profile->extsipip : tech_pvt->profile->sipip);
+                                                                                                                cid_num,
+                                                                                                                !switch_strlen_zero(cid_num) ? "@" : "",
+                                                                                                                tech_pvt->profile->extsipip ? tech_pvt->profile->extsipip : tech_pvt->profile->sipip);
 
        }