Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with asterisk (Asterisk, 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


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

Browse other questions tagged or ask your own question.