[asterisk-users] Pass Dialed number to a script

shawnl at up.net shawnl at up.net
Wed Jul 11 13:59:27 CDT 2007


I'm in the process of writing a simple autodialer to dial a list of numbers
and play a message.  One of the options I want to give them is a way to 

 "dial X to have a customer service representative call you"


Looking for a simple way to pass the number that I dialed to a script in 
extensions.conf... something like this:

[serviceinterruption]
exten => s,1,Set(TIMEOUT(response)=10)
exten => s,2,Answer
exten => s,3,Playback(outboundmsgs/serviceinterrupt)
exten => s,4,Playback(outboundmsgs/choice)
exten => s,5,wait(3)
exten => 1,1,Goto(s,3)  		 ; replay message
exten => 2,1,Goto(msgack,s,1)            ; acknowledge message
exten => 3,1,Goto(callback,s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup

[callback]
exten => s,1,Playback(outboundmsgs/customerrepwillcall)
--> exten => s,n,system(${SCRIPTS_DIR}/rep_callback.sh ${????????} )
exten => s,n,Playback(vm-goodbye)
exten => s,n,Hangup


how do I pass the number that was dialed (from the creation of a .call file) 
to the rep_callback.sh script ?


thanks

Shawn



More information about the asterisk-users mailing list