From 20ea922f733a3e0e8d07afa9dd3c45980e22760e Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 29 Apr 2009 23:27:24 +0000 Subject: [PATCH] add experimental NDLB-connectile-dysfunction-2.0 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13201 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_reg.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index fae7bf2ee8..79544c4bd9 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -885,19 +885,14 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand if ((v_contact_str = switch_event_get_header(*v_event, "sip-force-contact"))) { if (!strcasecmp(v_contact_str, "NDLB-connectile-dysfunction-2.0")) { char *path_encoded; - size_t path_encoded_len = (strlen(contact_str) * 3) + 1; + size_t path_encoded_len; char my_contact_str[1024]; - if (contact->m_url->url_params) { - switch_snprintf(my_contact_str, sizeof(my_contact_str), "%s ", - display, contact->m_url->url_user, url_ip, network_port, contact->m_url->url_params, received_data); - } else { - switch_snprintf(my_contact_str, sizeof(my_contact_str), "%s ", display, contact->m_url->url_user, url_ip, - network_port, received_data); - } + 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); - switch_copy_string(path_encoded, ";fs_nat=yes;fs_path=", 20); + switch_copy_string(path_encoded, ";fs_nat=yes;fs_path=", 21); switch_url_encode(my_contact_str, path_encoded + 20, path_encoded_len - 20); reg_desc = "Registered(AUTO-NAT-2.0)"; exptime = 20;