Asterisk 1.8 how to get caller id

I am trying to create callback function for my application. I wrote like this, it is working fine.

exten => 2020,1,Answer()
exten => 2020,n,GotoIf(callback)
exten => 2020,n(callback),System(/etc/asterisk/scripts/callback)
exten => 2020,n,Hangup()
exten => 1111,1,Answer()
exten => 1222,1,Dial(SIP/2000)
exten => 1222,n,Hangup()

When I call like this

exten => 1222,1,Dial(SIP/$EXTEN)


exten => 1222,1,Dial(SIP/$CALLERID)

It is giving error. Can anyone help me to solve this issue.

The above it is not an Asterisk channel variable

You have missed out the curly brackets. You may also have missed out the parameters.

1 Like