Have you tried:<br>session.streamFile("<a href="http://127.0.0.1/tts/getWav.aspx?text=please%20enter%20your%204%20digit%20pin" target="_blank">http://127.0.0.1/tts/getWav.aspx?text=please%20enter%20your%204%20digit%20pin</a>")<br>
<br><br><br><br><div class="gmail_quote">On 24 May 2011 19:58, Yungwei Chen <span dir="ltr"><<a href="mailto:yungwei@resolvity.com">yungwei@resolvity.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I am currently using the following javascript snippet to play a wav file on a remote web server.<br>
I'm wondering if there's another way to do it without involving a local file, just like mod_shout.<br>
Thanks.<br>
<br>
function on_dtmf(session, type, digits, arg)<br>
{<br>
dtmf_digits += digits.digit;<br>
console_log("dtmf_digits=" + dtmf_digits + "\n");<br>
return(true);<br>
}<br>
<br>
var ttsUrl = "<a href="http://127.0.0.1/tts/getWav.aspx?text=please%20enter%20your%204%20digit%20pin" target="_blank">http://127.0.0.1/tts/getWav.aspx?text=please%20enter%20your%204%20digit%20pin</a>";<br>
var file = "/tmp/tts.wav";<br>
fetchURLFile(ttsUrl,file);<br>
session.streamFile(file, on_dtmf);<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>
</blockquote></div><br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>