Document toolboxDocument toolbox

FreeSwitch VRS Configurations

 

Before doing anything, make sure mod_lua and dkjson is enabled/installed in the freeswitch of both machines. 

1- Recording Script

  • The first step we need to take on freeswitch is to download file.

  • Connect to the VM where free switch is installed.

  • Place it in the "scripts" directory of freeswitch. It can be found under "/usr/local/freeswitch/scripts/" or "/usr/share/freeswitch/scripts/" depending on whether you installed freeswitch from source or package, respectively.

  • Create a direcotry/folder in the path /usr/share/freeswitch with the name cucmRecording. now enter to this cucmRecording folder and create two more folders/directories with names “streams“ and “sessions”.
    The directory/folder can be created with

mkdir <directry or folder name>
  • Edit/open the recording script (record.lua) and assign the correct paths to the "recording_dir" and "mixedRecordingDir" variables.

  • The correct path can be found via "pwd” command after checking into each directory, the “pwd” command will print the working direcotry path.

local recording_dir = '/usr/share/freeswitch/cucmRecording/streams' local mixedRecordingDir = '/usr/share/freeswitch/cucmRecording/sessions'
  • Make sure to assign all user permissions to both directories used in these variables.

#chmod 777 -R "full/address/of/directory"

2 - Dialplan Configuration

  • Switch to the dialplan direcotry inside the freeswitch.

  • Add the following lines of code in the public .xml file of both freeswitches.

3 - SIP Profiles

  • Switch to the sip_profiles directory.

  • Edit the internal.xml and external.xml SIP profiles and enable or uncomment the Third Party Call Control option in both of them.

  • Change the value flag to "true" if it is set to "false" or "proxy".

  • We also need to add one more line to the internal.xml file if it doesn't already exist.