try this,<br><br>go to latest trunk,<br><br>set the terminators to both # and * "#*" then when it stops check the variable read_terminator_used to see if it was # or *<br>then you can continue in your loop <br><br>
i added the channel var read_terminator_used which should contain <br><br><div class="gmail_quote">On Mon, Mar 30, 2009 at 10:42 AM, Robert Clayton <span dir="ltr"><<a href="mailto:rjcajax@gmail.com">rjcajax@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Anthony,<br>
<br>
Yes and no. The original regex was a little more complex, it only got<br>
simplified in the thread while trying to discover what was going<br>
wrong.<br>
Where we got "\\*|\\d{6}" to match either a "*" or "123456" the<br>
original problem. It also allowed any entry if a single (or multiple)<br>
asterisk were entered at any position in the entry string. Which would<br>
be an incorrect action. <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Correct: * and 123456 and does not match 1234<br>
Incorrect: **, *123, 123 *, 12*24, 12**34, 1*2*3, etc.<br>
<br>
Regardless, this was an interim step. What I need is two actions, the<br>
first FS easily allows, the second the complicating factor.<br>
1) Enter either a numeric string (either a defined length or undefined<br>
length followed by a "#")<br>
2) Enter an asterisk at anytime to allow reentry from the beginning<br>
(returning without requiring a following terminator)<br>
<br>
I tried to use the callback and filter the input myself but since (I<br>
think) the callback only functions while the recording is playing that<br>
could not be done unless I was sure either the user responded during<br>
the recording or the recording was paused. Is there anyway for the the<br>
callback to delay and not return at the end of the recording?<br>
<br>
Bob<br>
<br>
2009/3/30 Anthony Minessale <<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>>:<br>
<div><div></div><div class="h5">> how about leave the regex blank if you can't figure one out and just collect<br>
> 6 digits and look for * yourself?<br>
> The one I told you saturday works for what you asked about. the one you<br>
> came back and asked about would require a | (or)<br>
> with 2 expressions.<br>
><br>
> On Mon, Mar 30, 2009 at 7:20 AM, Robert Clayton <<a href="mailto:rjcajax@gmail.com">rjcajax@gmail.com</a>> wrote:<br>
>><br>
>> Well, I hope that this thread has not died as it seems there has been<br>
>> no solution.<br>
>> Also, it seems there is not a solid understanding as to the<br>
>> interaction between Lua and FS.<br>
>><br>
>> Does this suggest that I should abandon Lua for another scripting<br>
>> implementation such as JavaScript?<br>
>><br>
>> 2009/3/28 Anthony Minessale <<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>>:<br>
>> > try<br>
>> ><br>
>> > /^([\d*]{6})$/<br>
>> ><br>
>> > \d is shorthand for 0-9 and anything in a [] is a set of chars so [\d*]<br>
>> > means 0-9 and *<br>
>> > [\d*]{6} means exactly 6 from the previous set and wrap the whole thing<br>
>> > in<br>
>> > ^$ means exact match<br>
>> > from beginning to end of the string.<br>
>> ><br>
>> ><br>
>> > 2009/3/28 Robert Clayton <<a href="mailto:rjcajax@gmail.com">rjcajax@gmail.com</a>><br>
>> >><br>
>> >> Michael,<br>
>> >><br>
>> >> Good start! We are getting warmer.<br>
>> >><br>
>> >> Where "(\\*|\\d{6})" will not match either * or 123456 or anything I<br>
>> >> can<br>
>> >> think of.<br>
>> >> "\\*|\\d{6}" does match * and 123456 and does not match 1234<br>
>> >> So far so good.<br>
>> >> BUT, if an asterisk(s) are entered in a combination with numbers<br>
>> >> anything<br>
>> >> goes **, *123, 123 *, 12*24, 12**34, 1*2*3, etc.<br>
>> >><br>
>> >> Bob<br>
>> >><br>
>> >><br>
>> >> On Fri, Mar 27, 2009 at 5:54 PM, Michael Collins <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>
>> >> wrote:<br>
>> >>><br>
>> >>> 2009/3/27 Robert Clayton <<a href="mailto:rjcajax@gmail.com">rjcajax@gmail.com</a>>:<br>
>> >>> > Michael,<br>
>> >>> ><br>
>> >>> > Also note the error message reprints the expression without the<br>
>> >>> > escape.<br>
>> >>> ><br>
>> >>> > Bob<br>
>> >>> ><br>
>> >>> > On Fri, Mar 27, 2009 at 2:29 PM, Michael Collins<br>
>> >>> > <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>
>> >>> > wrote:<br>
>> >>><br>
>> >>> That just hit me. Try "\\*" instead of "\*" to see if maybe the<br>
>> >>> backslash is getting dropped off between Lua and FreeSWITCH.<br>
>> >>><br>
>> >>> -MC<br>
>> >>><br>
>> >>> _______________________________________________<br>
>> >>> Freeswitch-dev mailing list<br>
>> >>> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
>> >>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> >>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> >>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> Freeswitch-dev mailing list<br>
>> >> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
>> >> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> >> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Anthony Minessale II<br>
>> ><br>
>> > FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
>> > ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
>> ><br>
>> > AIM: anthm<br>
>> > <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
>> > GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
>> > IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
>> ><br>
>> > FreeSWITCH Developer Conference<br>
>> > <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
>> > <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
>> > <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
>> > pstn:213-799-1400<br>
>> ><br>
>> > _______________________________________________<br>
>> > Freeswitch-dev mailing list<br>
>> > <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
>> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> ><br>
>> ><br>
>><br>
>> _______________________________________________<br>
>> Freeswitch-dev mailing list<br>
>> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
><br>
> --<br>
> Anthony Minessale II<br>
><br>
> FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
> ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
><br>
> AIM: anthm<br>
> <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
> GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
> IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
><br>
> FreeSWITCH Developer Conference<br>
> <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
> <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
> <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
> pstn:213-799-1400<br>
><br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>