<div dir="ltr">You should probably be using this instead of sleep:<div><action function="play-file" data="silence_stream://1000"/></div><div><br clear="all"><div dir="ltr"><font face="Verdana, Arial, Helvetica, sans-serif">This may be FUD, but I recall that sleep could have unintended side-effects because it doesn't provide an RTP stream... while this is playing silence.</font></div>
<div dir="ltr"><font face="Verdana, Arial, Helvetica, sans-serif"><br></font></div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-size:small">-Avi</span></span></div><br><div class="gmail_quote">
On Thu, Jun 21, 2012 at 11:12 AM, Alex <span dir="ltr"><<a href="mailto:alex@thewinelake.com" target="_blank">alex@thewinelake.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Having got to grips with phrases, I can now see that there is a cheating<br>
way to do this, which maybe should be put in the wiki?<br>
<br>
Essentially, the idea is to have file<br>
<freeswitch>/conf/lang/en/simple/simplesay.xml:<br>
<br>
<include><br>
<macro name="say"><br>
<input pattern="(.*)"><br>
<match><br>
<action function="execute" data="sleep(1000)"/><br>
<action function="speak-text" data="$1"/><br>
</match><br>
</input><br>
</macro><br>
<br>
<br>
Modify <freeswitch>/conf/lang/en/en.xml to include:<br>
<br>
<X-PRE-PROCESS cmd="include" data="simple/simplesay.xml"/><br>
<br>
If you don't use cepstral, edit the first line to be:<br>
<br>
<language name="en" say-module="en"<br>
sound-prefix="$${sounds_dir}/en/us/callie" tts-engine="flite"<br>
tts-voice="kal"><br>
<br>
<br>
Then in a lua script, you can do something like this:<br>
<br>
</div><div class="im">destnum = session:playAndGetDigits(3, 20, 3, 5000, "#*",<br>
</div>"phrase:sa:"..sayWhatFirst, "", "\\d+")<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<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>
</div></div></blockquote></div><br></div></div>