ring_ready does not have audio so there is nothing to record.<br>ring_ready is a 180 ringing which is just a packet telling your phone to play a ringing sound<br>on your end.<br><br>Remember what i said? originate returns the exact instant there is any audio.<br>
<br><br><br><div class="gmail_quote">On Tue, Nov 25, 2008 at 8:29 AM, Birgit Arkesteijn <span dir="ltr"><<a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Anthony,<br>
<br>
Thanks for your feedback.<br>
I still cannot get it to work, maybe the snippet and the output will<br>
give you an idea?<br>
<br>
<br>
*** I've got the following javascript:<br>
<br>
var endpoint_url = 'sofia/gateway/westhawk/0663';<br>
var recordfile = "/usr/local/freeswitch/recordings/dispatcher.wav";<br>
<br>
setGlobalVariable("RECORD_ANSWER_REQ", false);<br>
var mSession = new Session("{ignore_early_media=false}" + endpoint_url);<br>
console_log("info", "mSession created, start recording\n");<br>
<br>
mSession.execute("record_session", recordfile);<br>
<br>
<br>
*** When I run it:<br>
freeswitch@apso> jsrun record_rings.js<br>
API CALL [jsrun(record_rings.js)] output:<br>
OK<br>
<br>
freeswitch@apso> 2008-11-25 14:22:10 [NOTICE] switch_channel.c:551<br>
switch_channel_set_name() New Channel sofia/external/0663<br>
[7225b30a-bafc-11dd-be4c-05a0d8dd6ae1]<br>
2008-11-25 14:22:10 [NOTICE] sofia.c:2327 sofia_handle_sip_i_state()<br>
Ring-Ready sofia/external/0663!<br>
2008-11-25 14:22:22 [NOTICE] sofia.c:2723 sofia_handle_sip_i_state()<br>
Channel [sofia/external/0663] has been answered<br>
2008-11-25 14:22:22 [INFO] record_rings.js:1 console_log() mSession<br>
created, start recording<br>
2008-11-25 14:22:22 [NOTICE] mod_spidermonkey.c:2959 session_destroy()<br>
Hangup sofia/external/0663 [CS_SOFT_EXECUTE] [NORMAL_CLEARING]<br>
2008-11-25 14:22:22 [NOTICE] switch_core_session.c:927<br>
switch_core_session_thread() Session 3 (sofia/external/0663) Ended<br>
2008-11-25 14:22:22 [NOTICE] switch_core_session.c:929<br>
switch_core_session_thread() Close Channel sofia/external/0663 [CS_HANGUP]<br>
<br>
<br>
<br>
As you can see, 'new Session' does not return on the 'ring ready' and<br>
therefore doesn't record the rings to/on this new channel (that is<br>
mSession).<br>
Having said that, I don't know if 'ring ready' qualifies as 'early media'.<br>
<br>
Cheers, Birgit<br>
<div class="Ih2E3d"><br>
<br>
<br>
<br>
On 25/11/08 14:13, Anthony Minessale wrote:<br>
> The originate method does not return until either early media or answer<br>
> has been received.<br>
> in other words the very instant it returns is the soonest there is even<br>
> any media to record.<br>
><br>
> you can execute record_session app on the A leg before you call and<br>
> that's the best you can do.<br>
><br>
> session.execute("record_session");<br>
> session.execute("bridge", LIST_OF_DESTINATIONS);<br>
><br>
> if you are not doing much else in your script it may be better to set<br>
> the dest as a variable then<br>
> exit your script and execute bridge from the regular dialplan to avoid<br>
> extra JS overhead during the call.<br>
><br>
><br>
><br>
><br>
><br>
> On Tue, Nov 25, 2008 at 8:03 AM, Birgit Arkesteijn<br>
</div><div class="Ih2E3d">> <<a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a> <mailto:<a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a>>> wrote:<br>
><br>
> Hi Michael,<br>
><br>
> Sorry to nag you again.<br>
> I'm getting close to my deadline and I would like to give our customer<br>
> some feedback on this issue.<br>
><br>
> Would you be so kind to explain what the issue is with recording rings<br>
> when doing 'new Session(originate_url)'?<br>
><br>
> As far as I've been able to work out, this statement will only<br>
> return after<br>
> a) the (or some) timeout has expired or<br>
> b) the user has picked up<br>
><br>
> Only in case b) we've got a originated session, that can be used to<br>
> record. However, since the user has already answered, the rings are not<br>
> recorded.<br>
><br>
> Is that right?<br>
><br>
> Cheers, Birgit<br>
<br>
<br>
</div>--<br>
<div><div></div><div class="Wj3C7c">-- Birgit Arkesteijn, <a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a>,<br>
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK<br>
-- Company no: 1769350<br>
-- Registered Office:<br>
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.<br>
-- tel.: +44 (0)161 237 0660<br>
-- <URL: <a href="http://www.westhawk.co.uk" target="_blank">http://www.westhawk.co.uk</a>><br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>