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?&nbsp; 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">&lt;<a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a>&gt;</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&#39;ve got the following javascript:<br>
<br>
var endpoint_url = &#39;sofia/gateway/westhawk/0663&#39;;<br>
var recordfile = &quot;/usr/local/freeswitch/recordings/dispatcher.wav&quot;;<br>
<br>
setGlobalVariable(&quot;RECORD_ANSWER_REQ&quot;, false);<br>
var mSession = new Session(&quot;{ignore_early_media=false}&quot; + endpoint_url);<br>
console_log(&quot;info&quot;, &quot;mSession created, start recording\n&quot;);<br>
<br>
mSession.execute(&quot;record_session&quot;, recordfile);<br>
<br>
<br>
*** When I run it:<br>
freeswitch@apso&gt; jsrun record_rings.js<br>
API CALL [jsrun(record_rings.js)] output:<br>
OK<br>
<br>
freeswitch@apso&gt; 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, &#39;new Session&#39; does not return on the &#39;ring ready&#39; and<br>
therefore doesn&#39;t record the rings to/on this new channel (that is<br>
mSession).<br>
Having said that, I don&#39;t know if &#39;ring ready&#39; qualifies as &#39;early media&#39;.<br>
<br>
Cheers, Birgit<br>
<div class="Ih2E3d"><br>
<br>
<br>
<br>
On 25/11/08 14:13, Anthony Minessale wrote:<br>
&gt; The originate method does not return until either early media or answer<br>
&gt; has been received.<br>
&gt; in other words the very instant it returns is the soonest there is even<br>
&gt; any media to record.<br>
&gt;<br>
&gt; you can execute record_session app on the A leg before you call and<br>
&gt; that&#39;s the best you can do.<br>
&gt;<br>
&gt; session.execute(&quot;record_session&quot;);<br>
&gt; session.execute(&quot;bridge&quot;, LIST_OF_DESTINATIONS);<br>
&gt;<br>
&gt; if you are not doing much else in your script it may be better to set<br>
&gt; the dest as a variable then<br>
&gt; exit your script and execute bridge from the regular dialplan to avoid<br>
&gt; extra JS overhead during the call.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Nov 25, 2008 at 8:03 AM, Birgit Arkesteijn<br>
</div><div class="Ih2E3d">&gt; &lt;<a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a> &lt;mailto:<a href="mailto:birgit@westhawk.co.uk">birgit@westhawk.co.uk</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; Hi Michael,<br>
&gt;<br>
&gt; &nbsp; &nbsp; Sorry to nag you again.<br>
&gt; &nbsp; &nbsp; I&#39;m getting close to my deadline and I would like to give our customer<br>
&gt; &nbsp; &nbsp; some feedback on this issue.<br>
&gt;<br>
&gt; &nbsp; &nbsp; Would you be so kind to explain what the issue is with recording rings<br>
&gt; &nbsp; &nbsp; when doing &#39;new Session(originate_url)&#39;?<br>
&gt;<br>
&gt; &nbsp; &nbsp; As far as I&#39;ve been able to work out, this statement will only<br>
&gt; &nbsp; &nbsp; return after<br>
&gt; &nbsp; &nbsp; a) the (or some) timeout has expired or<br>
&gt; &nbsp; &nbsp; b) the user has picked up<br>
&gt;<br>
&gt; &nbsp; &nbsp; Only in case b) we&#39;ve got a originated session, that can be used to<br>
&gt; &nbsp; &nbsp; record. However, since the user has already answered, the rings are not<br>
&gt; &nbsp; &nbsp; recorded.<br>
&gt;<br>
&gt; &nbsp; &nbsp; Is that right?<br>
&gt;<br>
&gt; &nbsp; &nbsp; 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>
-- &lt;URL: <a href="http://www.westhawk.co.uk" target="_blank">http://www.westhawk.co.uk</a>&gt;<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>