]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODENDP-217
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 4 May 2009 14:36:11 +0000 (14:36 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 4 May 2009 14:36:11 +0000 (14:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13226 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index cb192ff69f390b70f8f6e56a0bb3fdc039eb12e5..644926e8d0d25bcffd7435f1a020140900124a24 100644 (file)
@@ -819,7 +819,13 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                        switch_url_encode(path_val, path_encoded + 9, path_encoded_len - 9);
                } else if (is_nat) {
                        char my_contact_str[1024];
-                       switch_snprintf(my_contact_str, sizeof(my_contact_str), "sip:%s@%s:%d", contact->m_url->url_user, url_ip, network_port);
+                       if (sip->sip_contact->m_url->url_params) {
+                               switch_snprintf(my_contact_str, sizeof(my_contact_str), "sip:%s@%s:%d;%s", 
+                                                               contact->m_url->url_user, url_ip, network_port, sip->sip_contact->m_url->url_params);
+                       } else {
+                               switch_snprintf(my_contact_str, sizeof(my_contact_str), "sip:%s@%s:%d", contact->m_url->url_user, url_ip, network_port);
+                       }
+
                        path_encoded_len = (strlen(my_contact_str) * 3) + 1;
 
                        switch_zmalloc(path_encoded, path_encoded_len);