[Freeswitch-users] Problem menuselection not working with Play_and_get_digits Menuselection
Michael Collins
msc at freeswitch.org
Thu May 12 19:30:26 MSD 2011
This is a classic case of dialplan parsing vs. executing. I'll let you read
chapters 5 and 8 of the FreeSWITCH book to get a better understanding of the
difference between those two. In the meantime I would like to suggest that
you choose an alternate method of building your IVR. There are better tools
available to you. Look at chapter 6 of the book to get an idea of how to use
the XML IVR building system in FreeSWITCH. Look at chapter 7 to see how to
do it in Lua.
That being said, you *can* do this in the dialplan, but it will be ugly.
First off, I recommend that you put all your ivr "menus" into separate
extensions instead of just separate conditions. Second, put all those
extensions into their own dialplan context. Lastly, use the transfer app
after you collect a digit with PAGD:
<action application="play_and_get_digits"
data="0 1 1 5000 #
$${base_dir}/sounds/callback/confirm-callback-press1.alaw
$${base_dir}/sounds/callback/invalid.alaw nr1 [1-2]"/>
<action application="transfer" data="${nr1} XML your_new_context"/>
Since you're already using the XML IVR for "callback only" I think you
should probably just use XML for the whole thing. That's my $0.02...
-MC
On Wed, May 11, 2011 at 2:31 PM, Thomas Hoellriegel <admin at blindi.net>wrote:
> Hi all,
> i have create a menuselection via play_and_get_digits.
> Problem, this application ignore the digits 1 and 2.
> This is my dialplanextestnion:
>
> <extension name="callback_only_menuselection">
> <condition field="destination_number" expression="^callback_only_sel$"/>
> <condition field="${ivrlevel}" expression="^$" break="never">
> <action application="play_and_get_digits"
> data="0 1 1 5000 #
> $${base_dir}/sounds/callback/confirm-callback-press1.alaw
> $${base_dir}/sounds/callback/invalid.alaw nr1 [1-2]"/>
>
> </condition>
> <condition field="${ivrlevel}-${nr1}" expression="^1$" >
> <action application="playback"
> data="$${base_dir}/sounds/callback/callback-send.alaw"/>
> <action application="system" data="$${base_dir}/scripts/callback.sh"/>
> </condition>
> <condition field="${ivrlevel}-${nr1}" expression="^2$">
> <action application="ivr" data="callback_only_ivr"/>
> </condition>
> </extension>
>
> I press 1 and 2 play_and_get_digits don.t execute these actions.
> What is wrong?
> Thanks.
>
> ---------------
> Du kannst mich jederzeit kostenlos per Festnetz erreichen unter:
> http://www.blindi.net/callback
> homepage: http://www.blindi.net
> blinde-misc mailingliste für blinde. anmeldung unter:
> http://www.blindi.net/mailman/listinfo/blinde-misc
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110512/4b607390/attachment.html
More information about the FreeSWITCH-users
mailing list