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

FreeSWITCH SVN mrene at freeswitch.org
Sat Feb 7 16:38:48 PST 2009


Author: mrene
Date: Sat Feb  7 18:38:48 2009
New Revision: 11683

Log:
MODENDP-183 Add disable-srv and disable-naptr params to sip profiles (default false)

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.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	Sat Feb  7 18:38:48 2009
@@ -441,6 +441,8 @@
 	uint32_t force_subscription_expires;
 	switch_rtp_bug_flag_t auto_rtp_bugs;
 	char manage_shared_appearance;  /* pflags was all full up - MTK */
+	char disable_srv;
+	char disable_naptr;
 };
 
 struct private_object {

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	Sat Feb  7 18:38:48 2009
@@ -728,6 +728,8 @@
 							  TAG_IF(sofia_test_pflag(profile, PFLAG_TLS), NUTAG_CERTIFICATE_DIR(profile->tls_cert_dir)), 
 							  TAG_IF(sofia_test_pflag(profile, PFLAG_TLS), TPTAG_TLS_VERSION(profile->tls_version)), 
 							  TAG_IF(!strchr(profile->sipip, ':'), NTATAG_UDP_MTU(65535)), 
+ 							  TAG_IF(profile->disable_srv, NTATAG_USE_SRV(0)),
+ 							  TAG_IF(profile->disable_naptr, NTATAG_USE_NAPTR(0)),
 							  NTATAG_SERVER_RPORT(profile->rport_level), 
 							  TAG_IF(tportlog, TPTAG_LOG(1)), 
 							  TAG_END());	/* Last tag should always finish the sequence */
@@ -1798,6 +1800,9 @@
 				profile->pflags |= PFLAG_STUN_ENABLED;
 				profile->pflags |= PFLAG_DISABLE_100REL;
 				profile->auto_restart = 1;
+				profile->manage_shared_appearance = 0; /* Initialize default */
+				profile->disable_srv = 0;
+				profile->disable_naptr = 0;
 
 				for (param = switch_xml_child(settings, "param"); param; param = param->next) {
 					char *var = (char *) switch_xml_attr_soft(param, "name");
@@ -2016,6 +2021,14 @@
 							profile->manage_shared_appearance = 1;
 							profile->sla_contact = switch_core_sprintf(profile->pool, "sip:sla-agent@%s", profile->sipip);
 						}
+					} else if (!strcasecmp(var, "disable-srv")) {
+						if (switch_true(val)) {
+							profile->disable_srv = 1;
+						}
+					} else if (!strcasecmp(var, "disable-naptr")) {
+						if (switch_true(val)) {
+							profile->disable_naptr = 1;
+						}
 					} else if (!strcasecmp(var, "unregister-on-options-fail")) {
 						if (switch_true(val)) {
 							profile->pflags |= PFLAG_UNREG_OPTIONS_FAIL;



More information about the Freeswitch-svn mailing list