Accepting extensions numbers in a reception IVR

From sailpbx
Jump to: navigation, search


This is to handle setting up an IVR which allows key presses for functions (1 for sales, 2 for accounts etc) but also can allow the caller to enter an extension number directly.

To do this in SAIL we can set up a an app to do the work of listening for the key-presses. SAIL will use two stages for this so you will need to set up an IVR greeting which say something like "press 1 for blah, 2 for blah blah.... or press the star key to enter an extension number directly".

Set up a custom app (let's call it ddial) and give it a span of "none". The custom app will look like this...

exten => s,1,Playback(vm-enter-num-to-call)
exten => s,n(start),Gotoif($[ "${LEN(${extensao})}" < "4"]?collect:dialexten) ; ==> set to 3 for 3 digit extensions
exten => s,n,NoOp(Executing - ${extensao} - )
exten => s,n(collect),Read(digito,,1)
exten => s,n,Set(extensao=${extensao}${digito})
exten => s,n,GoTo(start)
exten => s,n(dialexten),SayDigits(${extensao}) ; ==> NoOp the SayDigits if you don't want the digits to be echoed back
exten => s,n,GoTo(extensions,${extensao},1)
exten => h,1,hangup()

Now point the star key in your IVR to this app and you are done.