[asterisk-gui] VoiceMenu code and orders
Alan Worstell
aworstell at a-1networks.com
Tue Aug 5 17:19:25 CDT 2008
Hi Brandon,
It's 3562.
Alan Worstell
http://a-1networks.com/
bkruse wrote:
> What GUI Svn Revision?
>
> -Brandon
>
> Trevor Benson wrote:
>
>> I seem to have issues with building voicemenu's. I have not updated from the repo in the last few days, but will double check to make sure no additions were made to trunk that could effect this.
>>
>> What ends up happening is that I have a 3-4 step voicemenu with a few key presses. The exact scenario is
>>
>> [voicemenu-custom-1]
>> Exten => s,1,Answer
>> Exten => s,2,Background(audio)
>> Exten => s,3,Goto(SomeExtension)
>>
>> Exten => 1,Goto(FirstExtension)
>> Exten => 3,Goto(NextExtension)
>>
>>
>> What happens is that after saving the menu I end up with the system extension priorities being out of sync. They change to this:
>>
>> [voicemenu-custom-1]
>> Exten => s,1,Answer
>> Exten => 1,1,Goto(FirstExtension)
>> Exten => 3,1,Goto(NextExtension)
>> Exten => s,3,Background(audio)
>> Exten => s,4,Goto(SomeExtension)
>>
>> I loose priority 2 and the menu ends up failing with unknown status on the sip channel. Not sure if this is related to me skipping priority 2 in the key press menu, but I am already skipping zero as well. I also have deleted certain menu items, and this seems to cause it as well by not moving the lower priorities up to replace the missing one. Also the dialplan mixes the keypresses with the system extensions and it looks a bit confusing in the text, but clean in the 'dialplan show voicemenu-custom-1'.
>>
>> From my experience dialplan is much simpler to maintain or adjust as you go if you number the first priority, and then use N for each additional one. This way even if the priority is missed then it just autoincrements. Thus the dialplan would end up being:
>>
>> [voicemenu-custom-1]
>> Exten => s,1,Answer
>> Exten => s,n,Background(audio)
>> Exten => s,n,Goto(SomeExtension)
>>
>> Exten => 1,1,Goto(FirstExtension)
>> Exten => 3,1,Goto(NextExtension)
>>
>> And this way it's the order of the file that chooses the priority of the extension, which is what the gui is trying to do anyway with numbering the priorities and moving them in the conf. This way just reordering the layout of the file guarantee's you get the next priority you want, plus you don't need to code any logic to calculate the priority number for each line, just the first one. This is how I end up writing my speech recognition applications as numbering each priority and changing logic becomes a nightmare in complex applications. I think maybe the GUI could benefit from this approach as reordering menu's I think should could be simpler if you use this method.
>>
>> Again I could easily be wrong, I have not delved into the code to see how its doing this, but seemed like maybe a simple way to avoid issues and more complex logic in the code.
>>
>> Thanks,
>> Trevor
>>
>> _______________________________________________
>> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>>
>> asterisk-gui mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-gui
>>
>>
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-gui mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-gui
> .
>
>
More information about the asterisk-gui
mailing list