]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use the same call-id on all registers from the same gateway
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 15 Nov 2008 02:38:40 +0000 (02:38 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 15 Nov 2008 02:38:40 +0000 (02:38 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10415 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_reg.c

index 8b4863cae085442120a479af49cd280c2e3bdff6..a83ab6b04802924fada2e0955ab7cbc577202ce4 100644 (file)
@@ -299,6 +299,7 @@ struct sofia_gateway {
        switch_memory_pool_t *pool;
        int deleted;
        switch_event_t *vars;
+       char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
        struct sofia_gateway *next;
 };
 
index a721ab9d4e429e9b42cc94ef561639b027d3958b..425161b771d61e71a751531b429bf372a71d05dd 100644 (file)
@@ -799,9 +799,13 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
                                *expire_seconds = "3600",
                                *retry_seconds = "30",
                                *from_user = "", *from_domain = "", *register_proxy = NULL, *contact_params = NULL, *params = NULL, *register_transport = NULL;
-
+                       
                        uint32_t ping_freq = 0;
-
+                       switch_uuid_t uuid;
+                       
+                       switch_uuid_get(&uuid);
+                       switch_uuid_format(gateway->uuid_str, &uuid);
+                       
                        gateway->register_transport = SOFIA_TRANSPORT_UDP;
                        gateway->pool = profile->pool;
                        gateway->profile = profile;
index b53db99f7d53c3ba5a290ce3993c7669e4d99dc6..ea8979fe19146ab38ed74bb45a3c003360a842e5 100644 (file)
@@ -152,6 +152,7 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now)
                        sofia_reg_kill_reg(gateway_ptr, 0);
 
                        if ((gateway_ptr->nh = nua_handle(gateway_ptr->profile->nua, NULL,
+                                                                                         SIPTAG_CALL_ID_STR(gateway_ptr->uuid_str),
                                                                                          NUTAG_URL(gateway_ptr->register_proxy),
                                                                                          SIPTAG_TO_STR(gateway_ptr->register_to),
                                                                                          NUTAG_CALLSTATE_REF(ss_state), SIPTAG_FROM_STR(gateway_ptr->register_from), TAG_END()))) {