[Freeswitch-users] Javascript: stream, speak, stream - cepstral cut offs 2nd stream

Anthony Minessale anthony.minessale at gmail.com
Mon Nov 17 11:51:16 PST 2008


you never want to msleep during a js running on a call
you should use session.sleep(500);
msleep blocks the whole thread and thus the audio.


On Mon, Nov 17, 2008 at 1:05 PM, Birgit Arkesteijn <birgit at westhawk.co.uk>wrote:

> Hi,
>
> In javascript I doing the following:
>
> var consumer_name = "Birgit Arkesteijn";
> var endpoint_url = 'sofia/gateway/westhawk/0662';
> var mSession = new Session("{ignore_early_media=true,originate_timeout=8}"
>         + endpoint_url);
> var ready = mSession.ready();
> // log("merchant answered: " + ready);
> if (ready == true)
> {
>     mSession.streamFile("westhawk/lead_waiting.wav", dummy);
>     mSession.speak("cepstral", "Diane", "<break time='2s'/>" +
> consumer_name);
>     // msleep(500);
>     mSession.streamFile("westhawk/consumer_hungup.wav",
>                         dummy);
>     exit();
> }
> function dummy(session, type, data, arg){}
>
>
> No matter what I try, cepstral somehow cuts off the beginning two
> seconds of the second streamFile().
> Adding a msleep(500) in between 'speak' and 'streamFile' makes it only
> worse.
>
> I'm running
> FreeSWITCH Version 1.0.trunk (597:10325M) Started.
> and
> Cepstral_Diane_x86-64-linux_5.1.0/
> on Linux Suse 10.0 x86_64
>
> Any ideas?
>
> Thanks, Birgit
>
> --
> -- Birgit Arkesteijn, birgit at westhawk.co.uk,
> -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
> -- Company no: 1769350
> -- Registered Office:
> -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
> -- tel.: +44 (0)161 237 0660
> -- <URL: http://www.westhawk.co.uk>
>
> _______________________________________________
> Freeswitch-users mailing list
> 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
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081117/d3d5a0b6/attachment-0002.html 


More information about the FreeSWITCH-users mailing list