Speak Dialed Number In Dial Plan

Asterisk: 13.7.2


Is there a way in the dial plan to have the system speak the number that it has dialed as part of a callback (in the example below, as part of announcement 900)?

exten => s,1,Answer
exten => s,n,Wait(1)
exten => s,n,Playback(PleaseEnterYourCallBackNumber)
exten => s,n,Read(CALLBACK_ALT,10)
exten => s,n,SayDigits(${CALLBACK_ALT})
exten => s,n,Set(CALL=${CALLBACK_ALT})
exten => s,n,Set(DESTINATION=app-announcement-900.s.1)
exten => s,n,Set(SLEEP=5)
exten => s,n,System(/var/lib/asterisk/bin/callback ${CALL} ${DESTINATION} ${SLEEP} &)
exten => s,n,Playback(custom/callbacksoon)
exten => s,n,Hangup

User puts in a callback number>System hangs up, calls the user back in 5 seconds, and routes them to announcement 900> Announcement 900 speaks the number that asterisk called to get a hold of the user.

Thanks in advance for any help or insight you may be able to provide.

Modify your callback script to accept another argument of ${CALLBACK_ALT} and have it play it after it dials.

1 Like