星号13.14.1
我连接了LDAP。借助RealTime,我想从AD中提取属性。
与LDAP的连接:
CLI> realtime show ldap status
Connected to 'ldap://192.168.1.*:389', baseDN dc=mydomen,dc=local with username cn=user,ou=group,dc=mydomen for 16 hours, 5 minutes, 39 seconds.
试图加载功能:
CLI> module load func_realtime.so
Unable to load module func_realtime.so
Command 'module load func_realtime.so' failed.
[Feb 8 09:08:23] WARNING[56072]: loader.c:1077 load_resource: Module 'func_realtime.so' already exists.
在/etc/asterisk/modules.conf中注册:
[modules]
autoload=yes
这是我的extensions.conf /etc/asterisk/extensions.conf
[default]
switch => Realtime/ldap@extensions
exten => _1234,1,NoOp(=== Start LDAP =====)
exten => _1234,n,Realtime(extensions|nomerUser|333|aprefix_)
exten => _1234,n,NoOp(=== ${aprefix_nameUser} ===)
这是我的extconfig.conf /etc/asterisk/extconfig.conf
[ldap]
extensions => ldap,"ou=group,dc=mydomen,dc=local",extensions
这是我的res_ldap.conf /etc/asterisk/res_ldap.conf
[_general]
host=192.168.1.*
basedn=dc=mydomen,dc=local
user=cn=user,ou=group,dc=mydomen,dc=local
pass=*****
[extensions]
nomerUser = telephoneNumber
nameUser = cn
我希望RealTime函数返回AD属性(cn-全名)。 但是在执行脚本时,会出现错误:
Executing [1234@default:1] NoOp("SIP/603-00000018", "=== Start LDAP =====") in new stack
[Feb 8 09:34:35] WARNING[56342][C-0000000d]: pbx.c:2864 pbx_extension_helper: No application 'Realtime' for extension (default, 1234, 2)
答案 0 :(得分:0)
您的extconfig是错误的。 该文件用于进行一般映射。它应该只有一个“ [设置]”部分
此外,如果您要映射到扩展名,则意味着应该从指定的源中将整个扩展名文件作为文本文件加载。
星号中没有实时的应用程序。相反,您具有REALTIME函数。因此,不必担心如何设置它,消息将是相同的。此消息提示没有注册的申请。