...
The first step we need to take on freeswitch is to download the record script "api_record.lua" from the repo https://gitlab.expertflow.com/voice-recording-solution/freeswitch-scripts.git.
Make sure to get the latest Script.
Now connect to the VM where freesiwtch free switch is installed.
Now 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.Edit the recording script .
Now 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>
No edit/open the recording script (record.lua) and assign the correct paths to the "recording_dir" and "mixedRecordingdirmixedRecordingDir
" variables.
The correct path can be found via "pwd".pwd” command after checking into each directory, the “pwd” command will print the working direcotry path.
Code Block |
---|
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.
...
2 - Dialplan Configuration
Now switch to the dialplan direcotry inside the freeswitch,
Add the following lines of code in the public dialplan .xml file of both freeswitches.
Code Block |
---|
<extension name="outside_call" continue="true">
<condition>
<action application="set" data="outside_call=true"/>
<action application="log" data="INFO PP-----${sip_from_host}--------------Starting Record Dialplan --------------12124"/>
<action application="export" data="RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}"/>
</condition>
</extension>
<extension name="CUCM Recording Profile">
<action application="log" data="INFO Entering Call from CUCM"/>
<condition field="${sip_from_host}" expression="192.168.1.26">
<action application="lua" data="api_record.lua"/>
</condition>
</extension> |
3 - SIP Profiles
Now 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.
...
We also need to add one more line to the internal profile .xml file if it doesn't already exist.
...