[Freeswitch-users] ivr menu matching and execution problem

Antonio asilva at wirelessmundi.com
Wed Aug 25 01:26:20 PDT 2010


Michael thanks for the reply.

I try the same digit, "9", to see what was happen. You are right, in a
normal and conventional menu, i will never had two actions for the same
single key.

Actually i found the problem when i add rules that overlap, when i had
something like, "105" => "action 1", "1\d+" => "action 2", so i need
that the rules to be execute in the right prio. 

The behavior that i would like to expect is the same like for the
dialplan, tow different states, matching and executing, for the ivr you
have only one state, that is matching and executing a the same time.
For the IVR we could have more problems, in my case the action transfer
is done twice, because of the duplicate match.


Thanks,
António







On Tue, 2010-08-24 at 10:47 -0700, Michael Collins wrote:
> Sounds to me like a possible solution would be adding a "break" option
> for "entry" so that the user could decide whether or not to break
> after the first match. However, I wonder if that's even necessary.
> 
> My question to you is why would you have two different actions for
> keypress "9" and yet not want the second action ever to be executed?
> If the menu only ever executed the first occurrence of a given digit
> then what would be the value of having another occurrence of that same
> digit? In your example, under what conditions would pressing "9"
> execute "transfer 8 XML ..." ?
> 
> There might be a less intrusive solution we could suggest if we knew
> more about why you have multiple different actions for a single
> keypress.
> 
> -MC
> 
> 
> On Tue, Aug 24, 2010 at 8:41 AM, Antonio <asilva at wirelessmundi.com>
> wrote:
>         During the configuration of an ivr menu and test i just
>         realized that if
>         you have multiple actions with the same "digits" it executes
>         the both
>         actions.
>         
>         The execution of the multiple actions is normal?
>         
>         The normal behavior should executed only the action that is
>         match first,
>         reading the priority of the entries in the menu.
>         I look at the code, and in the function,
>         switch_ivr_menu_execute, looks
>         like the loop that searches for the match/action should need a
>         break
>         after a success match, to avoid the continues search for other
>         matches.
>         
>         Thanks,
>         António
>         
>         
>         /* configuration */
>         
>         <menu name="ivr"
>         greet-long="/home/system/telephony/sounds/buraka.mp3"
>         exit-sound="/home/system/telephony/sounds/prompt/en/conf-invalid.gsm"
>         timeout ="2000"
>         inter-digit-timeout="2000"
>         max-failures="10"
>         digit-len="4"
>         >
>         <entry action="menu-exec-app" digits="/^(10[0-9])$/"
>         param="transfer $1
>         XML local"/>
>         <entry action="menu-exec-app" digits="9" param="transfer 9 XML
>         ivr-[1]"/>
>         <entry action="menu-exec-app" digits="9" param="transfer 8 XML
>         ivr-[1]"/>
>         </menu> 
> 
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-- 

Un cordial saludo / Best regards, 

 _________________________

António Silva

E-mail:asilva at wirelessmundi.com




More information about the FreeSWITCH-users mailing list