3

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.)

tike
  • 633
  • 1
  • 5
  • 18

0 Answers0