Hi Everyone,
Currently I’m working on a script for a custom destination.
This script uses the users input from an incomming call and a PHP Agi script to retrieve an external redirect number from a database and should forward the incomming call to the external number.
This all works without any problems, but I’m now stuck on forwarding the incomming call with an time-out. I need a time-out on the forwarde so I can redirect the call if the external number is not available.
Here is my code, forwarder variable is holding the external number the call should be forwarded to.
[ivr-bkt]
exten => s,1,Answer
exten => s,n,AGI(getforward.php)
exten => s,n,Goto(from-internal,${forwarder},1)
exten => s,n,Hangup()
This example works, but if the call is not answered the script stops.
What is the best way to transfer te call to a external number with an time-out of 15 seconds and the redirect the call to another number?
Thank you