When using the Goto command I realize that I have a time lapse of about 5 seconds before the next extension is reached. Is there a way to reduce it?
[test]
...
exten => 1001,3,Background(chooseOption)
exten => 1001,4,WaitExten(3)
exten => 1,1,Goto(francais,s,1)
exten => 2,1,Goto(english,s,1)
exten => i,1,Goto(test,1001,3)
exten => t,1,Goto(test,1001,3)
[francais]
exten => s,1,Background(IVR2)
5 seconds are in between the time the caller presses 1 and the time IVR2 starts.
There is no timelapse in goto.
You have other issue. In your context you have 1-digit and 4 digits extensions(mixed). So it wait for (possible) input to match 4 digit.
For fast reaction you should create other context which have only 1 digit ext and do goto that context, after that use Background. So will be only 1 digits answer and it will NOT wait.
Or you can use application Read which support length of input.