[Freeswitch-users] Playing a wav file on a remote web server
Yungwei Chen
yungwei at resolvity.com
Tue May 24 22:58:43 MSD 2011
Hi,
I am currently using the following javascript snippet to play a wav file on a remote web server.
I'm wondering if there's another way to do it without involving a local file, just like mod_shout.
Thanks.
function on_dtmf(session, type, digits, arg)
{
dtmf_digits += digits.digit;
console_log("dtmf_digits=" + dtmf_digits + "\n");
return(true);
}
var ttsUrl = "http://127.0.0.1/tts/getWav.aspx?text=please%20enter%20your%204%20digit%20pin";
var file = "/tmp/tts.wav";
fetchURLFile(ttsUrl,file);
session.streamFile(file, on_dtmf);
More information about the FreeSWITCH-users
mailing list