]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4014 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 10 Apr 2012 20:34:50 +0000 (15:34 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 10 Apr 2012 20:34:50 +0000 (15:34 -0500)
src/mod/endpoints/mod_sofia/sofia_glue.c

index 5786ec8f14726f8d0fee63e1adbb31a4da544851..80dfff8835adbf5d70501a2650b27523e52512c6 100644 (file)
@@ -7042,14 +7042,17 @@ char *sofia_glue_gen_contact_str(sofia_profile_t *profile, sip_t const *sip, nua
                
 
                if (contact->m_url->url_params) {
-                       contact_str = switch_mprintf("%s <sip:%s@%s%s%s%s;%s>%s",
+                       contact_str = switch_mprintf("%s <sip:%s%s%s%s%s%s;%s>%s",
                                                                                 display, contact->m_url->url_user,
+                                                                                contact->m_url->url_user ? "@" : "",
                                                                                 ipv6 ? "[" : "",
                                                                                 contact_host, ipv6 ? "]" : "", new_port, contact->m_url->url_params, np->is_nat ? ";fs_nat=yes" : "");
                } else {
-                       contact_str = switch_mprintf("%s <sip:%s@%s%s%s%s>%s",
+                       contact_str = switch_mprintf("%s <sip:%s%s%s%s%s%s>%s",
                                                                                 display,
-                                                                                contact->m_url->url_user, ipv6 ? "[" : "", contact_host, ipv6 ? "]" : "", new_port, np->is_nat ? ";fs_nat=yes" : "");
+                                                                                contact->m_url->url_user,
+                                                                                contact->m_url->url_user ? "@" : "",
+                                                                                ipv6 ? "[" : "", contact_host, ipv6 ? "]" : "", new_port, np->is_nat ? ";fs_nat=yes" : "");
                }
        }