[Freeswitch-svn] [commit] r7780 - in freeswitch/trunk: conf/sip_profiles src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Mon Mar 3 20:23:55 EST 2008


Author: anthm
Date: Mon Mar  3 20:23:55 2008
New Revision: 7780

Modified:
   freeswitch/trunk/conf/sip_profiles/default.xml
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Log:
add accept-blind-auth

Modified: freeswitch/trunk/conf/sip_profiles/default.xml
==============================================================================
--- freeswitch/trunk/conf/sip_profiles/default.xml	(original)
+++ freeswitch/trunk/conf/sip_profiles/default.xml	Mon Mar  3 20:23:55 2008
@@ -71,6 +71,9 @@
     <!-- this lets anything register -->
     <!--  comment the next line and uncomment one or both of the other 2 lines for call authentication -->
     <!-- <param name="accept-blind-reg" value="true"/> -->
+
+    <!-- accept any authentication without actually checking (not a good feature for most people) -->
+    <!-- <param name="accept-blind-auth" value="true"/> -->
     
     <!--TTL for nonce in sip auth-->
     <param name="nonce-ttl" value="60"/>

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	Mon Mar  3 20:23:55 2008
@@ -129,7 +129,8 @@
 	PFLAG_SUPRESS_CNG = (1 << 12),
 	PFLAG_TLS = (1 << 13),
 	PFLAG_CHECKUSER = (1 << 14),
-	PFLAG_SECURE = (1 << 15)
+	PFLAG_SECURE = (1 << 15),
+	PFLAG_BLIND_AUTH = (1 << 16)
 } PFLAGS;
 
 typedef enum {

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	Mon Mar  3 20:23:55 2008
@@ -1099,6 +1099,10 @@
 						if (switch_true(val)) {
 							profile->pflags |= PFLAG_BLIND_REG;
 						}
+					} else if (!strcasecmp(var, "accept-blind-auth")) {
+						if (switch_true(val)) {
+							profile->pflags |= PFLAG_BLIND_AUTH;
+						}
 					} else if (!strcasecmp(var, "auth-all-packets")) {
 						if (switch_true(val)) {
 							profile->pflags |= PFLAG_AUTH_ALL;
@@ -2374,7 +2378,7 @@
 	
 	get_addr(network_ip, sizeof(network_ip), &((struct sockaddr_in *) my_addrinfo->ai_addr)->sin_addr);
 
-	if ((profile->pflags & PFLAG_AUTH_CALLS) || sip->sip_proxy_authorization || sip->sip_authorization) {
+	if ((profile->pflags & PFLAG_AUTH_CALLS) || (!(profile->pflags & PFLAG_BLIND_AUTH) && (sip->sip_proxy_authorization || sip->sip_authorization))) {
 		if (strcmp(network_ip, profile->sipip)) {
 			if (sofia_reg_handle_register(nua, profile, nh, sip, REG_INVITE, key, sizeof(key), &v_event)) {
 				if (v_event) {



More information about the Freeswitch-svn mailing list