Koozali.org: home of the SME Server

selintra and CID lookup from a local/ldap database

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
selintra and CID lookup from a local/ldap database
« Reply #15 on: July 11, 2007, 10:27:31 PM »
OK good,

Let's just check first that LDAP is working ...

Try this...  

Code: [Select]
exten=>s,1,LDAPget(MYCALLERID=cidname/${CALLERIDNUM})
exten=>s,2,GoTo(7000,1)
exten->s,102,GoTo(7000,1)

exten=>7000,1,NoOp(${MYCALLERID})
exten=>7000,2,Set (CALLERID(name)=${MYCALLERID})
exten=>7000,3,agi(selintra,Alias,SIP/nnnn SIP/nnnn SIP/nnnnn,${EXTEN})
exten=>7000,4,Hangup


This will show the LDAP returned caller id value on the console just before it hands control to the agi.


Best

S

Offline boobee

  • **
  • 32
  • +0/-0
selintra and CID lookup from a local/ldap database
« Reply #16 on: July 11, 2007, 11:07:56 PM »
Code: [Select]
exten=>7000,2,Set(CALLERID(name)=${MYCALLERID})
that was the missing bit! without the extra space after "Set" which was unintentional for sure.
you made my day, and my girlfriend's one too! it just works, name is now displayed instead of numbers on our home phones.
i suppose as it's working now it will just require some extra cosmetics for editing sme's ldap address book (i use phpldapadmin contrib) but you're quite ready for production..

big thanks to you/your team for the excellent support provided!

b.

Offline boobee

  • **
  • 32
  • +0/-0
selintra and CID lookup from a local/ldap database
« Reply #17 on: July 15, 2007, 02:43:42 PM »
as promised, a small howto on the wiki:

http://wiki.contribs.org/Sail_and_LDAP

please anyone feel free to comment/edit

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
selintra and CID lookup from a local/ldap database
« Reply #18 on: July 15, 2007, 03:11:48 PM »
Cool

:-)

thx

S

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Re: selintra and CID lookup from a local/ldap database
« Reply #19 on: September 24, 2007, 06:35:53 AM »
Hi guys,
I'm trying to get this working on a stabled version of SAIL, running asterisk 1.2.
I have compiled the App_ldap 1.0rc6 and it seems working.
I have the functionality working, but only getting numbers, seems like it's not reading  from LDAP.
How can I test the funcionality? AGI DEBUG shows me:
Code: [Select]
AGI Tx >> agi_request: selintra
AGI Tx >> agi_channel: Zap/3-1
AGI Tx >> agi_language: br
AGI Tx >> agi_type: Zap
AGI Tx >> agi_uniqueid: 1190607628.20
AGI Tx >> agi_callerid: 051841183XX
AGI Tx >> agi_calleridname: unknown
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: ldap
AGI Tx >> agi_extension: 2101
AGI Tx >> agi_priority: 3
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode: