[Freeswitch-svn] [commit] r10415 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN anthm at freeswitch.org
Fri Nov 14 18:38:40 PST 2008


Author: anthm
Date: Fri Nov 14 21:38:40 2008
New Revision: 10415

Log:
use the same call-id on all registers from the same gateway

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	Fri Nov 14 21:38:40 2008
@@ -299,6 +299,7 @@
 	switch_memory_pool_t *pool;
 	int deleted;
 	switch_event_t *vars;
+	char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
 	struct sofia_gateway *next;
 };
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Fri Nov 14 21:38:40 2008
@@ -799,9 +799,13 @@
 				*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;

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Fri Nov 14 21:38:40 2008
@@ -152,6 +152,7 @@
 			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()))) {



More information about the Freeswitch-svn mailing list