Integrar Asterisk con LDAP.

602 views
Skip to first unread message

Ramses

unread,
Oct 22, 2013, 3:17:15 AM10/22/13
to aster...@googlegroups.com
Buenos días a todos,

Estoy tratando de integrar Asterisk con OpenLDAP. El LDAP está operativo porque tengo otros servicios integrados con él.

En principio, los tengo ya conectados, ya que hago en consola un "realtime show ldap" y me aparece que lleva conectado a LDAP X tiempo.

En OpenLDAP tengo añadido el schema de Asterisk.

En "extconfig.conf" también creo que lo tengo configurado "bien".

También tengo puesto el "rtcachefriends=yes" en el "sip.conf".

Bueno, el tema es que relleno la plantilla Asterisk de un usuario en LDAP y no se crea en Asterisk.

¿Hay alguna forma de testear a base de comando las búsquedas en LDAP desde el Asterisk?

¿Alguna cosa que os suene que tenga que revisar por sí está mal configurado?.


Saludos y gracias,

Ramses

Enviado desde mi Móvil

Elio Rojano

unread,
Oct 22, 2013, 4:05:43 AM10/22/13
to aster...@googlegroups.com
¿ qué tienes en extconfig.conf ?





--
Este email pertenece a la lista de Asterisk-ES (http://www.asterisk-es.org)
Normas de la lista Asterisk-ES: http://comunidad.asterisk-es.org/index.php?title=Lista:normas-asterisk-es
---
Has recibido este mensaje porque estás suscrito al grupo "asterisk-es" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a asterisk-es...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a aster...@googlegroups.com.
Visita este grupo en http://groups.google.com/group/asterisk-es.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.



--
Página web: http://www.sinologic.net/

Ramses II

unread,
Oct 22, 2013, 5:41:13 AM10/22/13
to aster...@googlegroups.com

Elio, buenos días,

 

Hablamos de un Asterisk 1.6.2.20.

 

Esto es lo que tengo:

 

**************** extconfig.conf ****************

[settings]

sipusers => ldap,"dc=dominio-ip,dc=es",sip

sippeers => ldap,"dc=dominio-ip,dc=es",sip

*******************************************

 

Y el contenido del fichero “res_ldap.conf”:

 

**************** res_ldap.conf ****************

[_general]

host=192.168.200.205                                                   ; LDAP host

port=389

;url=ldap://192.168.200.205:389

protocol=3                                                                        ; Version of the LDAP protocol to use; default is 3.

basedn=dc=dominio-ip,dc=es                                  ; Base DN

user=cn=admin,dc=dominio-ip,dc=es                  ; Bind DN

pass=laclave                                                                    ; Bind password

 

; Configuration Table

[config]

additionalFilter=(objectClass=AstConfig)

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          ; We use the "cn" as the default value for name on the line above

                               ; because objectClass=AsteriskSIPUser does not include a uid as an allowed field

                               ; If your entry combines other objectClasses and uid is available, you may

                ; prefer to change the line to be name = uid, especially if your LDAP entries

                               ; contain spaces in the cn field.

                ; You may also find it appropriate to use something completely different.

                               ; This is possible by changing the line above to name = AstAccountName (or whatever you

                ; prefer).

                               ;

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 = AstAccountRealmedPassword        ; Must be an MD5 hash. Field value can start with

                                                                                               ; {md5} but it is not required.

                                                                                               ; Generate the password via the md5sum command, e.g.

                                                ; echo "my_password" | md5sum

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)

 

*******************************************

 

Y por lo que creo que está conectado:

 

-pbx*CLI> realtime show ldap status

Connected to 'ldap://192.168.200.205:389', baseDN dc=dominio-ip,dc=es with username cn=admin,dc=dominio-ip,dc=es for 41 seconds.

pbx*CLI>

 

 

Saludos,

 

Ramses

Elio Rojano

unread,
Oct 22, 2013, 6:13:51 AM10/22/13
to aster...@googlegroups.com
Solo se me ocurre que habilites el parámetro 'debug' en el logger.conf, reinicies Asterisk y entres en él con 
asterisk -rvvvvvdddddddddddd
Así podrás ver los parámetros de 'debug' y te dirá porqué no te está funcionando...
Reply all
Reply to author
Forward
0 new messages