I am trying to make a dialplan in which it hangups without answering to the incoming call from PSTN number and call back to the same number by using .call file. Then I wrote following dialplam
;-------
[test]
exten =>s,1,NoOp()
same=>n,System(echo "Channel: DAHDI/1/${CALLERID(num)}\\nContext:from_out\\nExtension: 100" > /tmp/test.call)
same=>n,System(touch /tmp/test.call)
same=>n,System(mv /tmp/test.call /var/spool/asterisk/outgoing/)
same=>n,Hangup()
[from_out]
include => default_cont
exten => 100,1,Verbose(1, Caller ${CALLERID(all)} has entered the auto attendant)
same => n,Set(TIMEOUT(digit)=2)
same => n,Answer()
same => n,Wait(RING_TIME)
same => n,Playback(gud/welcome)
;---other dialplan
test .call is created in the /var/spool/asterisk/outgoing/ directory but can’t make callback because it can’t save caller number.
test.call file is look like …
Channel: DAHDI/1/
Context:from_out
Extension: 100
What is the problem with it ?