Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Javascript: stream, speak, stream - cepst


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
birgit at westhawk.co.uk
Guest





PostPosted: Mon Nov 17, 2008 2:07 pm    Post subject: [Freeswitch-users] Javascript: stream, speak, stream - cepst Reply with quote

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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
anthony.minessale at g...
Guest





PostPosted: Mon Nov 17, 2008 3:01 pm    Post subject: [Freeswitch-users] Javascript: stream, speak, stream - cepst Reply with quote

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@westhawk.co.uk (birgit@westhawk.co.uk)> wrote:
Quote:
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@westhawk.co.uk (birgit@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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
birgit at westhawk.co.uk
Guest





PostPosted: Tue Nov 18, 2008 10:37 am    Post subject: [Freeswitch-users] Javascript: stream, speak, stream - cepst Reply with quote

Hi,

Thanks, Anthony, for your reply.
mSession.sleep(100);
does indeed do the trick!

Cheers, Birgit

On 17/11/08 19:51, Anthony Minessale wrote:
Quote:
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@westhawk.co.uk>wrote:

Quote:
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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services