[Freeswitch-users] Javascript: record ringing of session

Michael S Collins msc at freeswitch.org
Tue Nov 18 10:10:21 PST 2008


Birgit,

I'm almost to my office. I will give you more info soon. I have not  
used js in this capacity so we will have to do some experimenting.

-MC

Sent from my iPhone

On Nov 18, 2008, at 9:51 AM, Birgit Arkesteijn <birgit at westhawk.co.uk>  
wrote:

> Hi Michael,
>
> Thanks for your reply.
>
> I tried a variety of options:
> var mSession = new Session(endpoint_url);
> var mSession = new Session("{ignore_early_media=false}" +   
> endpoint_url);
>
> both only return after the session is answered (originated?).
>
> The customer wants
> "the number of seconds we wait for each user to pick up"
> configurable, hence I use "originate_timeout". I noticed (by try and
> error) that this is the timeout that does the trick. The other timeout
> variables behaved differently.
>
> I'm currently trying to see how I can do recording of the rings. If  
> that
> clashes with this neat "originate_timeout" variable, I'll have to see
> what my options are.
>
> I did read the http://wiki.freeswitch.org/wiki/Channel_Variables page,
> but to be honest, even with descriptions I don't really understand the
> implications of using these variables, sorry.
>
>
> Thanks, Birgit
>
> On 18/11/08 17:03, Michael S Collins wrote:
>> Birgit,
>>
>> I'm pretty sure that ringing is early media and you've got
>> ignore_early_media set to true. If you can work without ignoring  
>> early
>> media then you'll get rings. However, there's probably a reason  
>> you're
>> ignoring early media so be sure to test thoroughly without ignoring
>> early media just to make sure something else doesn't break.  
>> Actually I
>> just noticed the call timeout you have. IIRC that does require you to
>> ignore early media. Is there a way you can work without that call
>> timeout? Let me know. Also, I might have an alternate solution but I
>> can't give you more info until I get to my desk in an hour or so.
>>
>> -MC
>>
>> Sent from my iPhone
>>
>> On Nov 18, 2008, at 7:40 AM, Birgit Arkesteijn  
>> <birgit at westhawk.co.uk>
>> wrote:
>>
>>> Hi,
>>>
>>> In Javascript, I do the following:
>>>
>>> var mSession = new
>>> Session("{ignore_early_media=true,originate_timeout=8}" +
>>> endpoint_url);
>>> mSession.execute("record_session", recordfile);
>>>
>>> This works very well, however, the client would like the rings to be
>>> recorded as well.
>>>
>>> I've tried using various channel variables, but 'new Session' only
>>> returns after the call is answered.
>>>
>>> I tried calling
>>> apiExecute("record", <file_path>);
>>> before 'new Session', but that returns an error.
>>>
>>> Is is possible to record the rings (in javascript)?
>>> And if so, how would I do that?
>>>
>>> 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




More information about the FreeSWITCH-users mailing list