[Freeswitch-users] Playing a wav file on a remote web server

Yungwei Chen yungwei at resolvity.com
Thu May 26 00:42:01 MSD 2011


Yes, and I got the following error.
[ERR] switch_core_file.c:122 Invalid file format [http] for [127.0.0.1/tts/getWav.aspx?text=please%20enter%20your%204%20digit%20pin]!

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Steven Ayre
Sent: Wednesday, May 25, 2011 2:40 PM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Playing a wav file on a remote web server

Have you tried:
session.streamFile("http://127.0.0.1/tts/getWav.aspx?text=please%20enter%20your%204%20digit%20pin")



On 24 May 2011 19:58, Yungwei Chen <yungwei at resolvity.com<mailto:yungwei at resolvity.com>> wrote:
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);

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110525/26606685/attachment.html 


More information about the FreeSWITCH-users mailing list