Thanks Michael.

However I have to admit I'm a little out of my depth here. I know what works but I don't completely know the detail of why. Can you give me a syntax of what you think I should try?

Thank you.


Clive Lansink
Email: Clive@Lansink.Co.NZ
Phone: +64 9 520-4242
Mobile: +64 21 663-999
Fax: +64 21 789-150

-----Original message-----
From: Michael Collins <msc@freeswitch.org>
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>
Subject: Re: [Freeswitch-users] Recording incoming calls
Reply-to: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>
Date: Mon, 1 Apr 2013 12:57:02 -0700

Clive,

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.

-MC

On Sun, Mar 31, 2013 at 2:06 PM, Clive Lansink <clive@lansink.co.nz> wrote:

> Hello everyone
>
> 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'm trying to set
> things up so record_session works but without interfeering with the ringing
> sound heard by the incoming caller.
>
> 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't have voice mail on each
> extension. The definition of this extension is as follows:
> <extension name="group_dial_IncomingCall">
>         <condition field="destination_number" expression="^2000$">
>         <action application="set" data="hangup_after_bridge=true"/>
>         <action application="set" data="continue_on_fail=true"/>
>         <action application="hash"
> data="insert/${domain_name}-last_dial_ext/global/${uuid}"/>
>         <action application="bridge"
> data="{leg_timeout=18,ignore_early_media=true}${group_call(IncomingCall@
> ${domain_name})}"/>
>         <action application="transfer" data="1999 xml default"/>
>               </condition>
>     </extension>
>
> My first attempt to add record_session was as follows:
>         <action application="set" data="RECORD_TITLE=Recording
> ${destination_number} ${caller_id_number} ${strftime(%Y-%m-%d %H:%M)}"/>
>         <action application="set"
> data="RECORD_DATE=${strftime(%Y-%m-%d %H:%M)}"/>
>         <action application="set" data="RECORD_STEREO=true"/>
>         <action application="set" data="recording_follow_transfer=true"/>
>         <action application="record_session"
> data="p:/media/phonecalls/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>
> This works except that the incoming caller hears no ringing sound while
> our phones are ringing. In the log I see something like "Pre-Answer
> sofia/external/021663999@27.111.14.67!" 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't actually
> answered it.
>
> Then I added
>         <action application="set" data="media_bug_answer_req=true"/>
> 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.
>
> So then instead of executing record_session then and there as an
> application, I tried
>         <action application="set" data="execute_on_answer record_session
> p:/media/phonecalls/${strftime(%Y-%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>
> I thought this might execute the record_session application when we answer
> the call but it hasn't worked.
>
> Does anyone have any suggestions?
>
>
> Clive Lansink
> Email: Clive@Lansink.Co.NZ
> Phone: +64 9 520-4242
> Mobile: +64 21 663-999
> Fax: +64 21 789-150
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting@freeswitch.org
> http://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
> http://www.cudatel.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
>
>


-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

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

