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.<div>
<br></div><div>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:</div>
<div><br><div><meta charset="utf-8"><action application="play_and_get_digits"<br> data="0 1 1 5000 #<br> $${base_dir}/sounds/callback/confirm-callback-press1.alaw<br> $${base_dir}/sounds/callback/invalid.alaw nr1 [1-2]"/></div>
<div><font class="Apple-style-span" color="#3333ff"><action application="transfer" data="${nr1} XML your_new_context"/></font></div><div><br></div><div>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...</div>
<div><br></div><div>-MC<br><br><div class="gmail_quote">On Wed, May 11, 2011 at 2:31 PM, Thomas Hoellriegel <span dir="ltr"><<a href="mailto:admin@blindi.net">admin@blindi.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<br>
i have create a menuselection via play_and_get_digits.<br>
Problem, this application ignore the digits 1 and 2.<br>
This is my dialplanextestnion:<br>
<br>
<extension name="callback_only_menuselection"><br>
<condition field="destination_number" expression="^callback_only_sel$"/><br>
<condition field="${ivrlevel}" expression="^$" break="never"><br>
<action application="play_and_get_digits"<br>
data="0 1 1 5000 #<br>
$${base_dir}/sounds/callback/confirm-callback-press1.alaw<br>
$${base_dir}/sounds/callback/invalid.alaw nr1 [1-2]"/><br>
<br>
</condition><br>
<condition field="${ivrlevel}-${nr1}" expression="^1$" ><br>
<action application="playback"<br>
data="$${base_dir}/sounds/callback/callback-send.alaw"/><br>
<action application="system" data="$${base_dir}/scripts/callback.sh"/><br>
</condition><br>
<condition field="${ivrlevel}-${nr1}" expression="^2$"><br>
<action application="ivr" data="callback_only_ivr"/><br>
</condition><br>
</extension><br>
<br>
I press 1 and 2 play_and_get_digits don.t execute these actions.<br>
What is wrong?<br>
Thanks.<br>
<br>
---------------<br>
Du kannst mich jederzeit kostenlos per Festnetz erreichen unter:<br>
<a href="http://www.blindi.net/callback" target="_blank">http://www.blindi.net/callback</a><br>
homepage: <a href="http://www.blindi.net" target="_blank">http://www.blindi.net</a><br>
blinde-misc mailingliste für blinde. anmeldung unter:<br>
<a href="http://www.blindi.net/mailman/listinfo/blinde-misc" target="_blank">http://www.blindi.net/mailman/listinfo/blinde-misc</a><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div>