0
votes

In my asterisk extension I had wrote like this

[callback]
exten => Set(FROM=${CALLERID(num)})
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) ;here instead of 2000 I want to bring callerid number FROM
exten => 1222,n,Hangup()   

When I give SIP/2000 everything is working fine after I give miss call to 2020 I am able to get call.

But when I give like this SIP/$FROM its not working. CallerID number is coming blank.

Can anyone help me to solve this problem

1
Possible duplicate of Asterisk callback caller idmiken32

1 Answers

0
votes

On Asterisk 1.2 or higher, replace the 2nd line with:

exten => Set(FROM=${CALLERID(num)},g)

On Asterisk 1.0 or 1.1, replace the 2nd line with:

exten => SetGlobalVar(FROM=${CALLERID(num)})