Dear,
All Viewers, I want to make extensions with IVR if press number then jump to another context
can anyone help me?
this is my current context
[ivr]
exten => _X.,1,Progress()
exten => _X.,n,Playback(welcome,noanswer)
exten => _X.,n,Hangup()
[next-Context]
I want if press 1 or 2 or any fixed number it will jump to [next-Context]
Read() and GotoIF, or WaitExten and Goto.
There is an example of the latter approach in the sample extensions.conf supplied with Asterisk.
[context1]
include => context2
exten => s,1,Answer()
same => n,Background(welcome)
same => n,WaitExten(8)
same => n,Hangup()
[context2]
exten => 1,1,Saydigits(1)
same => n,Hangup()
exten => 2,1,Playtones(beep)
same => n,Hangup()
exten => 3,1,Voicemail(1000)
same => n,Hangup()
The example with the include doesn’t change the context.
it’s not working sir
when I press any number its jump to next extension
but I want goto if I press correct number else hangup
currently is like this
[ivr]
exten => s,1,Answer()
same => n,Background(welcome)
same => n,WaitExten(8)
same => n,Hangup()
[ivr2]
exten => _X.,1,Progress()
exten => _X.,n,Playback(invalid,noanswer)
exten => _X.,n,Hangup()
Please look at the example that comes with Asterisk. This is not the place to copy out bits of documentation that you can access for yourself.
1 Like
This is Asterisk basic, anyone with a little interest and some minutes of reading, could do it, but most of the people prefer jump to the forum without even try the basic documentation.
exten=>s,1,Answer()
same=>n,Set(TIMEOUT(digit)=1)
same=>n,Background(demo-thanks)
same=>n,Waitexten(2)
exten=>1,1,Goto(JumpingContext,start,1)
exten=>i,1,playback(im-sorry)
same=>n,hangup
exten=>t,1,playback(goodbye)
same=>n,hangup