Video Conference Recording on FreeSWITCH

FreeSWITCH is a telephony platform which is capable of performing video conferencing, in an MCU like fashion.

Note: FreeSWITCH is not a CaféX Production and as such the contents of this document are not supported.  The directions given are intended to be a starting point for configuration and are not given as a recommendation for a Production System.

Installing freeSWITCH with recording

If Recording is required the mod_av module is required to be built.  This can be done on the Debian OS following instructions found here:

Below is a snapshot of the installation from the above page:

Install Dependencies:

apt-get install -y --force-yes freeswitch-video-deps-most

# because we're in a branch that will go through many rebases it's

# better to set this one, or you'll get CONFLICTS when pulling (update)

git config --global pull.rebase true

# then let's get the source

cd /usr/src/

git clone freeswitch.git

cd freeswitch.git

./ -j

Enable mod_av:
perl -i -pe 's/#applications\/mod_av/applications\/mod_av/g' modules.conf
make install
make cd-sounds-install
make cd-moh-install
make samples
Kernel Settings:
echo "net.core.rmem_max = 16777216" > /etc/sysctl.d/vid.conf
echo "net.core.wmem_max = 16777216" >> /etc/sysctl.d/vid.conf
echo "kernel.core_pattern = core.%p" >> /etc/sysctl.d/vid.conf

Conference Configuration:

The layout of the Conference can be altered by creating a definition.  Below is an example.

Edit:  /usr/local/freeswitch/autoload_configs/conference.conf.xml
    <profile name="video-mcu">
      <param name="domain" value="$${domain}"/>
      <param name="rate" value="48000"/>
      <param name="channels" value="2"/>
      <param name="interval" value="20"/>
      <param name="energy-level" value="200"/>
      <!-- <param name="tts-engine" value="flite"/> -->
      <!-- <param name="tts-voice" value="kal16"/> -->
      <param name="muted-sound" value="conference/conf-muted.wav"/>
      <param name="unmuted-sound" value="conference/conf-unmuted.wav"/>
      <param name="alone-sound" value="conference/conf-alone.wav"/>
      <param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
      <param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
      <param name="kicked-sound" value="conference/conf-kicked.wav"/>
      <param name="locked-sound" value="conference/conf-locked.wav"/>
      <param name="is-locked-sound" value="conference/conf-is-locked.wav"/>
      <param name="is-unlocked-sound" value="conference/conf-is-unlocked.wav"/>
      <param name="pin-sound" value="conference/conf-pin.wav"/>
      <param name="bad-pin-sound" value="conference/conf-bad-pin.wav"/>
      <param name="caller-id-name" value="$${outbound_caller_name}"/>
      <param name="caller-id-number" value="$${outbound_caller_id}"/>
      <param name="comfort-noise" value="false"/>
      <param name="conference-flags" value="video-floor-only|minimize-video-encoding|rfc-4579|livearray-sync|video-muxing-personal-canvas"/>
      <param name="video-mode" value="mux"/>
      <param name="video-layout-name" value="3x3"/>
      <param name="video-layout-name" value="group:g"/>
      <param name="video-canvas-count" value="3"/>
      <param name="video-super-canvas-label-layers" value="true"/>
      <param name="video-canvas-size" value="1920x1080"/>
      <param name="video-canvas-bgcolor" value="#333333"/>
      <param name="video-layout-bgcolor" value="#000000"/>
      <param name="video-codec-bandwidth" value="1mb"/>
      <param name="video-fps" value="15"/>

Editing the Dial Plan:

The following records the inbound Video Stream into the Conference into a file in the /tmp/ folder.

This is a mechanism for invoking mod_av.

    <extension name="cdquality_stereo_conferences">
      <condition field="destination_number" expression="^(35\d{2})$">
    <action application="export" data="nolocal:absolute_codec_string=OPUS,PCMU,PCMA,VP8"/>
    <action application="set" data="enable_file_write_buffering=false"/>
    <action application="export" data="execute_on_answer=record_session /tmp/${strftime(%Y%m%d_%H%M%S)}_${caller_id_number}_${destination_number}.mp4"/>
    <action application="answer"/>
        <action application="conference" data="test@video-stereo"/>

Access Control List

Calls originating from FCSDK will need the 'Outbound Gateway' configured to direct calls into freeSWITCH.  The ACL will need to be configured to allow access to the dialplan.


For further details on FreeSWITCH configuration refer to: FCSDK /FreeSWITCH Interop Guide.

Have more questions? Submit a request


Powered by Zendesk