Application "Background" and "WaitExten"

Asterisk 13
Centos 7

I’m not sure if its just me but it seems like my IVR takes a bit long to respond to client key press.
I notice other IVR in the business respond imminently the moment the client press a key
but my asterisk IVR takes a whole 7 seconds to respond and I only have 3 options which are 1, 5 and 0.
Am I doing something wrong or is there another method?

I’m using the following application in my dialplan…
same => n,Background(music)
or
same => n,WaitExten(10)

Let me break it down for you

the WaitExten() application is the number of seconds to wait for the caller to enter an extension. If you don’t supply the first parameter, Asterisk will use the built-in response timeout (which can be modified with the TIMEOUT() dialplan function).

You need to reduce the digit timeout usint the function TIMEOUT()

https://wiki.asterisk.org/wiki/display/AST/Function_TIMEOUT

digit: The maximum amount of time permitted between digits when the user is typing in an extension. When this timeout expires, after the user has started to type in an extension, the extension will be considered complete, and will be interpreted. Note that if an extension typed in is valid, it will not have to timeout to be tested, so typically at the expiry of this timeout, the extension will be considered invalid (and thus control would be passed to the i extension, or if it doesn’t exist the call would be terminated). The default timeout is 5 seconds.

https://wiki.asterisk.org/wiki/display/AST/Background+and+WaitExten+Applications

Here you have a mini IVR example with all functions above working

[mini-ivr]
exten=>000,1,Answer()
same=>n,Set(TIMEOUT(digit)=1)
same=>n,Background(demo-thanks)
same=>n,Waitexten(2)

exten=>1,1,Dial(SIP/101,30)
same=>n,hangup

exten=>2,1,Dial(SIP/103,30)
same=>n,hangup

exten=>i,1,playback(im-sorry)
same=>n,hangup

exten=>t,1,playback(goodbye)
same=>n,hangup()

2 Likes

You’re awesome!
You’re fast at responding I appreciated it.
This is exactly what I needed! THANKS!

1 Like