[asterisk-users] delay in switching between contexts

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Wed May 2 09:17:43 MST 2007


On Wednesday 02 May 2007 11:49 am, Danish Samad wrote:
> [salesivr]
> exten => _X.,1,NoOp(Incoming call from user ${EXTEN} and caller id
> ${CALLERID})
> exten => _X.,2,Playback(emptyy)
> exten => _X.,3,Background(Main_Sales)
> exten => _X.,4,WaitExten(2)

> When I press a digit in _X,3 or _X,4 it takes some time before switching to
> the desired context. When switching context I see this on the cli

This is because you are telling asterisk to wait for one OR MORE digits, and 
it is waiting to see if you're going to dial any more digits before deciding 
that the entire extension has been entered.

Use the various timeout functions to set a more appropriate timeout, or code 
your dialplan to only look for one digit.  i.e. exten => _X  (no trailing . 
(period)).

> exten => _X.,5,Goto(_X.,3)

This works, but looks very odd to me.  Just specify the priority if you want 
to stay in the same extension... i.e. Goto(3).

-A.


More information about the asterisk-users mailing list