[Freeswitch-users] Stereo recording of conference - audio on the two channels is out of sync

Dave Horton daveh at beachdognet.com
Mon Dec 17 19:26:04 MSK 2012


I am trying to make a stereo recording of a two-party bridged conference -- i.e. caller calls in, we create a bridged conference and outdial, and then get a stereo recording with caller and called party on different channels.  My dialplan is shown below.  The problem is that the two channels on the resulting recording are completely out of sync with each other.  Does anyone have an idea about why this might be happening?

(In case anyone is wondering why I am recording a 2 party conference, rather than just a bridged outdial, the reason is that I need to play an audio clip to both parties that the call is being recording, and I need that clip to also be captured in the recording, and I can't figure out a way to do that other than to create a conference and play the clip into the conference.  I'm open to other suggestions though if anyone has an alternative approach).

(Note: the lua script in the dialplan below just collects a number to outdial)

<include>
    <extension name="617xxxxxxx" continue="false">
      <condition field="source" expression="mod_sofia"/>
      <condition field="destination_number" expression="617xxxxx">
                <action application="ring_ready"/>
                <action application="answer"/>
                <action application="start_dtmf"/>
                <action application="set" data="call_id=${strftime(%Y%m%d_%H%M%S)}_${sip_from_tag}"/> 
                <action application="export" data="outfile=$${base_dir}/tmp/${call_id}.wav"/> 
                <action application="lua" data="demo_call2.lua"/>
                <action application="export" data="RECORD_STEREO=true"/>
                <action application="export" data="execute_on_media=record_session ${outfile}"/>
                <action application="export" data="api_on_answer=conference ${call_id} play misc/this-call-may-be-recorded.wav async"/>
                <action application="conference" data="bridge: ${call_id}@simple:{origination_caller_id_number=${caller_id_number}}sofia/normal_customer/${outdial}@${egress_gateway}"/>
        </condition>
    </extension>
</include>


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list