0

Intro : I am brand new to Asterisk. I followed some tutorials in order to set my own basic responder. Though, I don't know how to do the following :

Problem : When someone calls, the IVR will start, but since there are lots of options to choose from, I'd like to find a way to specify the following: if the user presses 2 then stop the IVR and directly jump to the appropriate extension rather than having to listen to the whole message.

example of my current extension.conv :

exten => 1000,1,Answer()
exten => 1000,2,agi(googletts.agi,"If you want a banana press 1, an apple press 2, a kiwi press 3, a pineapple press 4, an orange press 5, a strawberry press 6, a raspberry press 7, a melon press 8, a cucumber press 9",en)
exten => 1,1,Goto(banana,1,1)
exten => 2,1,Goto(apple,2,1)
exten => 3,1,Goto(kiwi,1,1)
exten => 4,1,Goto(pineapple,2,1)
exten => 5,1,Goto(orange,1,1)
exten => 6,1,Goto(strawberry,2,1)
exten => 7,1,Goto(raspberry,1,1)
exten => 8,1,Goto(melon,2,1)
exten => 9,1,Goto(cucumber,2,1)

So if someone wants a banana and presses 1 right from the start, is there a way to spare him from listening to the whole ivr and directly jump to the next exten ?

Seb
  • 508
  • 8
  • 25

1 Answers1

1

You should change goolgetts script to return back file(not play it)

i.e replace STREAM with SET VARIABLE

After that you should use Background+ extension select like described in any book for asterisk.

arheops
  • 15,544
  • 1
  • 21
  • 27