[svn-commits] oej: branch oej/bp-res_conf_ldap-1.4 r231185 - in /team/oej/bp-res_conf_ldap-...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Nov 25 04:52:31 CST 2009


Author: oej
Date: Wed Nov 25 04:52:29 2009
New Revision: 231185

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=231185
Log:
Adding configuration file with the new "usesasl" option

Added:
    team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample   (with props)
Modified:
    team/oej/bp-res_conf_ldap-1.4/res/res_config_ldap.c

Added: team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample?view=auto&rev=231185
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample (added)
+++ team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample Wed Nov 25 04:52:29 2009
@@ -1,0 +1,177 @@
+;
+; Configuration file for res_config_ldap
+;
+
+; Realtime configuration
+; ----------------------
+; In order to use this module, you start 
+; in extconfig.conf with a configuration like this:
+;
+; 	sipusers = ldap,"dc=myDomain,dc=myDomainExt",sip
+; 	sippeers = ldap,"dc=myDomain,dc=myDomainExt",sip
+; 	extensions = ldap,"dc=myDomain,dc=myDomainExt",extensions
+; 	sip.conf = ldap,"dc=myDomain,dc=myDomainExt",config
+;
+; In the case of LDAP the last keyword in each line above specifies
+; a section in this file.
+
+; TLS support
+; -----------
+; Note that you can configure an ldaps: url here to get TLS support.
+; Detailed configuration of certificates and supported CAs is done in your 
+; ldap.conf file for OpenLDAP clients on your system.
+; This requires that you have OpenLDAP libraries compiled with TLS support
+
+
+[_general]
+;
+; Specify one of either host and port OR url.  URL is preferred, as you can
+; use more options.
+;host=192.168.1.1                    ; LDAP host
+;port=389
+;url=ldap://ldap3.mydomain.com:3890
+;protocol=3                          ; Version of the LDAP protocol to use; default is 3.
+;basedn=MyRootDN                     ; Base DN
+;user=MyDN                           ; Bind DN
+;pass=MyPassword                     ; Bind password
+;usesasl=yes			     ; SASL or simple authentication
+
+; Configuration Table
+[config]
+;
+; additionalFilter - This specifies an additional set of criteria to be used
+; when querying the LDAP server.
+;
+additionalFilter=(objectClass=AstConfig)
+;
+; Attributes mapping (asterisk variable name = ldap attribute name)
+; When Asterisk requests the variable by the name of the value on the left,
+; this module will look up the attribute listed on the right.
+;
+filename = AstConfigFilename
+category = AstConfigCategory
+variable_name = AstConfigVariableName
+variable_value = AstConfigVariableValue
+cat_metric = AstConfigCategoryMetric
+commented = AstConfigCommented
+
+;
+; Extensions Table
+;
+[extensions]
+context  =  AstExtensionContext
+exten  =  AstExtensionExten
+priority = AstExtensionPriority
+app = AstExtensionApplication
+appdata = AstExtensionApplicationData
+additionalFilter=(objectClass=AstExtension)
+
+;
+; Sip Users Table
+;
+[sip]
+name = cn
+amaflags = AstAccountAMAFlags
+callgroup = AstAccountCallGroup
+callerid = AstAccountCallerID
+directmedia = AstAccountDirectMedia
+context = AstAccountContext
+dtmfmode = AstAccountDTMFMode
+fromuser = AstAccountFromUser
+fromdomain = AstAccountFromDomain
+fullcontact = AstAccountFullContact
+fullcontact = gecos
+host = AstAccountHost
+insecure = AstAccountInsecure
+mailbox = AstAccountMailbox
+md5secret = realmedPassword
+nat = AstAccountNAT
+deny = AstAccountDeny
+permit = AstAccountPermit
+pickupgroup = AstAccountPickupGroup
+port = AstAccountPort
+qualify = AstAccountQualify
+restrictcid = AstAccountRestrictCID
+rtptimeout = AstAccountRTPTimeout
+rtpholdtimeout = AstAccountRTPHoldTimeout
+type = AstAccountType
+disallow = AstAccountDisallowedCodec
+allow = AstAccountAllowedCodec
+MusicOnHold = AstAccountMusicOnHold
+regseconds = AstAccountExpirationTimestamp
+regcontext = AstAccountRegistrationContext
+regexten = AstAccountRegistrationExten
+CanCallForward = AstAccountCanCallForward
+ipaddr = AstAccountIPAddress
+defaultuser = AstAccountDefaultUser
+regserver = AstAccountRegistrationServer
+lastms = AstAccountLastQualifyMilliseconds
+additionalFilter=(objectClass=AsteriskSIPUser)
+
+;
+; IAX Users Table
+;
+[iax]
+amaflags = AstAccountAMAFlags
+callerid = AstAccountCallerID
+context = AstAccountContext
+fullcontact = AstAccountFullContact
+fullcontact = gecos
+host = AstAccountHost
+mailbox = AstAccountMailbox
+md5secret = realmedPassword
+deny = AstAccountDeny
+permit = AstAccountPermit
+port = AstAccountPort
+qualify = AstAccountQualify
+type = AstAccountType
+disallow = AstAccountDisallowedCodec
+allow = AstAccountAllowedCodec
+regseconds = AstAccountExpirationTimestamp
+regcontext = AstAccountRegistrationContext
+regexten = AstAccountRegistrationExten
+notransfer = AstAccountNoTransfer
+lastms = AstAccountLastQualifyMilliseconds
+additionalFilter=(objectClass=AstAccountIAX)
+
+;
+; A Test Family
+;
+[testfamily]
+MyUSERID = uid
+additionalFilter=(objectClass=*)
+
+[accounts]
+amaflags = AstAccountAMAFlags
+callgroup = AstAccountCallGroup
+callerid = AstAccountCallerID
+directmedia = AstAccountDirectMedia
+context = AstAccountContext
+dtmfmode = AstAccountDTMFMode
+fromuser = AstAccountFromUser
+fromdomain = AstAccountFromDomain
+fullcontact = AstAccountFullContact
+fullcontact = gecos
+host = AstAccountHost
+insecure = AstAccountInsecure
+mailbox = AstAccountMailbox
+md5secret = realmedPassword
+nat = AstAccountNAT
+deny = AstAccountDeny
+permit = AstAccountPermit
+pickupgroup = AstAccountPickupGroup
+port = AstAccountPort
+qualify = AstAccountQualify
+restrictcid = AstAccountRestrictCID
+rtptimeout = AstAccountRTPTimeout
+rtpholdtimeout = AstAccountRTPHoldTimeout
+type = AstAccountType
+disallow = AstAccountDisallowedCodec
+allow = AstAccountAllowedCodec
+MusicOnHold = AstAccountMusicOnHold
+regseconds = AstAccountExpirationTimestamp
+regcontext = AstAccountRegistrationContext
+regexten = AstAccountRegistrationExten
+CanCallForward = AstAccountCanCallForward
+additionalFilter=(objectClass=AstAccount)
+

Propchange: team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: team/oej/bp-res_conf_ldap-1.4/configs/res_ldap.conf.sample
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/oej/bp-res_conf_ldap-1.4/res/res_config_ldap.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/res/res_config_ldap.c?view=diff&rev=231185&r1=231184&r2=231185
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/res/res_config_ldap.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/res/res_config_ldap.c Wed Nov 25 04:52:29 2009
@@ -1546,18 +1546,19 @@
 
 	if (global_usesasl) {
 		if (!ast_strlen_zero(user)) {
-			ast_debug(2, "bind to '%s' as user '%s'\n", url, user);
+			ast_debug(2, "SASL bind to '%s' as user '%s'\n", url, user);
 			cred.bv_val = (char *) pass;
 			cred.bv_len = strlen(pass);
 			bind_result = ldap_sasl_bind_s(ldapConn, user, LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL);
 		} else {
-			ast_debug(2, "bind %s anonymously\n", url);
+			ast_debug(2, "SASL bind %s anonymously\n", url);
 			cred.bv_val = NULL;
 			cred.bv_len = 0;
 			bind_result = ldap_sasl_bind_s(ldapConn, NULL, LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL);
 		} 
 	} else {
 		/* Use simple binding to ldap */
+		ast_debug(2, "simple bind %s anonymously\n", url);
 		bind_result = ldap_simple_bind_s(ldapConn, user, pass);
 	}
 




More information about the svn-commits mailing list