Clive,<br><br>I think the execute_on_answer is the way to go. However I believe you need to set that on the b-leg, so either include it as part of the bridge data or use the export app instead of set. Let us know how it goes.<br>
<br>-MC<br><br><div class="gmail_quote">On Sun, Mar 31, 2013 at 2:06 PM, Clive Lansink <span dir="ltr">&lt;<a href="mailto:clive@lansink.co.nz" target="_blank">clive@lansink.co.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everyone<br>
<br>
I want to be able to record incoming calls. I had this all working using record_session, until someone told me that when they phone in they no longer hear any ringing before the phone is answered. Now I&#39;m trying to set things up so record_session works but without interfeering with the ringing sound heard by the incoming caller.<br>

<br>
Incoming calls are received in the public context and then transferred to extension 2000 in the default xml context. Then we have a local extension in the default.xml dial plan that bridges to the incoming call group. If the call is not answered within a certain timeframe, it transfers to extension 1999 for voice mail - ie we don&#39;t have voice mail on each extension. The definition of this extension is as follows:<br>

&lt;extension name=&quot;group_dial_IncomingCall&quot;&gt;<br>
        &lt;condition field=&quot;destination_number&quot; expression=&quot;^2000$&quot;&gt;<br>
        &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;<br>
        &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>
        &lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-last_dial_ext/global/${uuid}&quot;/&gt;<br>
        &lt;action application=&quot;bridge&quot; data=&quot;{leg_timeout=18,ignore_early_media=true}${group_call(IncomingCall@${domain_name})}&quot;/&gt;<br>
        &lt;action application=&quot;transfer&quot; data=&quot;1999 xml default&quot;/&gt;<br>
              &lt;/condition&gt;<br>
    &lt;/extension&gt;<br>
<br>
My first attempt to add record_session was as follows:<br>
        &lt;action application=&quot;set&quot; data=&quot;RECORD_TITLE=Recording ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}&quot;/&gt;<br>
        &lt;action application=&quot;set&quot; data=&quot;RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}&quot;/&gt;<br>
        &lt;action application=&quot;set&quot; data=&quot;RECORD_STEREO=true&quot;/&gt;<br>
        &lt;action application=&quot;set&quot; data=&quot;recording_follow_transfer=true&quot;/&gt;<br>
        &lt;action application=&quot;record_session&quot; data=&quot;p:/media/phonecalls/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav&quot;/&gt;<br>
This works except that the incoming caller hears no ringing sound while our phones are ringing. In the log I see something like &quot;Pre-Answer sofia/external/<a href="mailto:021663999@27.111.14.67">021663999@27.111.14.67</a>!&quot; That is only there when the record_session stuff is included so I presume the problem is that record_session is somehow engaging with the call and the incoming caller gets what amounts to an answered call, even though we haven&#39;t actually answered it.<br>

<br>
Then I added<br>
        &lt;action application=&quot;set&quot; data=&quot;media_bug_answer_req=true&quot;/&gt;<br>
but although the recording now starts at the time we answer the call, the pre-answer thing is stil there and the incoming caller hears no ringing sound.<br>
<br>
So then instead of executing record_session then and there as an application, I tried<br>
        &lt;action application=&quot;set&quot; data=&quot;execute_on_answer record_session p:/media/phonecalls/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav&quot;/&gt;<br>
I thought this might execute the record_session application when we answer the call but it hasn&#39;t worked.<br>
<br>
Does anyone have any suggestions?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Clive Lansink<br>
Email: <a href="mailto:Clive@Lansink.Co.NZ">Clive@Lansink.Co.NZ</a><br>
Phone: <a href="tel:%2B64%209%20520-4242" value="+6495204242">+64 9 520-4242</a><br>
Mobile: <a href="tel:%2B64%2021%20663-999" value="+6421663999">+64 21 663-999</a><br>
Fax: <a href="tel:%2B64%2021%20789-150" value="+6421789150">+64 21 789-150</a><br>
<br>
</font></span><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br><br>