I am trying to implement a menu navigation functionality based on the DTMF input digits. That is, user has to enter specific DTMF input digit to navigate through the Menu Tree. Following is how the Menu tree would be structured.
Main Menu
--SubMenu1(assign DTMF 1)
--SubSubMenu1(Assign DTMF 1)
--SubSubMenu2(Assign DTMF 2)
--SubSubMenu3(Assign DTMF 3)
I am clueless as to how to implement the menu functionality this way. The same DTMF input is assigned both in the Sub Menu context and Sub Sub Menu context. This could possibly raise a functionality issue because the application will have no idea as to which option to go next unless we hack around someway. That is, for example, when you press 1, how to decide where to go--Sub Menu option or Sub Sub Menu option. If you're in the Main Menu screen, you should be taken to Sub Menu option. On the other hand, if you are already in the Sub Menu screen, you should be taken to the Sub Sub Menu option.
If you setup each menu in its own context, then the DTMF digits used in the IVR navigation should be private to the context that they are in, so duplicates should not be a problem.
If you want, I can work up a short example based off of a portion of one of my Asterisk IVR's.
"If you setup each menu in its own context, then the DTMF digits used in the IVR navigation should be private to the context that they are in, so duplicates should not be a problem.
If you want, I can work up a short example based off of a portion of one of my Asterisk IVR's."
Yes that's exactly how i want to setup the menu. The navigation should be private to the context they are in and we should be able to use the same DTMF digit at different level/depth of the menu tree. As cited in my earlier post, if you are in the main menu context, pressing DTMF digit 1 should take you to the SubMenu screen. While if you're in SubMenu context, then pressing DTMF digit 1 should take you to SubSub Menu option.
It would be of great help if you could work out a short code example based on your Asterisk IVR's and post it here for my reference.
This is the syntax used in the asterisk extensions.conf file. This can be scripted using Perl, which is called an AGI (Asterisk Gateway Interface) script.
Code:
[incoming_sip]
; caller dialed 408 555-5555
exten => 4085555555,1,Goto(main_menu,s,1)
[main_menu]
exten => s,1,Answer
exten => s,n,Background(main_menu) ; play the main_menu IVR recording and allow caller to press a menu option dtmf digit (1, 2, or 3) during the recording
exten => s,n,WaitExten(1.5) ; allow upto 1.5.seconds beyond the completion of the IVR recording for the caller to dial a menu option
exten => s,n,Playback(thank_you_for_calling)
exten => s,n,Playback(goodbye)
exten => s,n,Hangup
exten => 1,1,Goto(Sales,s,1)
exten => 2,1,Goto(Marketing,s,1)
exten => 3,1,Goto(Support,s,1)
exten => i,1,Playback(invalid) ; recording that informs the caller that they pressed an invailid option number
exten => i,n,Goto(2) ; goes back to priority #2, which is the main_menu IVR recording
[Sales]
exten => s,1,Background(sales_menu)
exten => s,n,WaitExten(1.5)
exten => 1,1,Goto(corporate)
exten => 2,1,Goto(consumer)
exten => 3,1,Goto(main_nemu,s,2)
exten => i,1,Playback(invalid)
exten => i,n,Goto(1)
[Marketing]
exten => s,1,Background(marketing_menu)
exten => s,n,WaitExten(1.5)
exten => 1,1,Dial(SIP/sue,30,t) ; dials sue's phone and if unanswered or is busy, allows the caller to leave a voicemail
exten => 1,n,Voicemail(sue)
exten => 1,n,Hangup
exten => 2,1,Dial(SIP/bob,30,t)
exten => 2,n,Voicemail(bob)
exten => 2,n,Hangup
exten => 3,1,Dial(SIP/1234,30,t) ; dials internal extension number 1234
exten => 3,n,Busy
exten => 3,n,Hangup
[Support]
exten => s,1,Background(support_menu)
exten => s,n,WaitExten(1.5)
; you get the idea
Well, I am not developing any GUI. I am working on an IVVR system in PHP.
Anyway, thank you so much for your help and references. Will get back to you if i need any further assistance.
Cheers