Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am working with asterisk (Asterisk 1.8.11.0), freepbx (2.x) and was building a dialplan (extension_custom.conf).

I wanted to get caller Name from database which i have stored for example.

CLI> database show cidname
/cidname/XXXXXXXXXX                             : Tikejhya

And i am able to get caller number, and also caller name but static way. [I am well aware that freepbx supports phonebook but my requirement is to get that before it hits context]

; This gives you Number of Caller exten=> _.,n,Log(NOTICE, "Incoming CallerID Number: ${CALLERID(num)}")

; This gives you Name of Caller
exten=> _.,n,Log(NOTICE, "Caller name:                  ${DB(cidname/XXXXXXXXXXX)}")`

And now my goal was to get that Caller name using 
`exten=> _.,n,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})

However this seems not to provide value that i would expect to get which is XXXXXXXXXXX

Am i doing anything wrong. (I am trying to do this because i need it before going to relevent context.)

share|improve this question
    
Please check output of : Noop(--${CALLERID(num)}---). Probably you will see your answer –  arheops Sep 8 '12 at 21:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.