- 07 Sep 2021
- 3 Minutes to read
- Updated on 07 Sep 2021
- 3 Minutes to read
Recording to a file
When recording to a file, the PBX needs to know the location where to place the file. The WAV file itself contains only the recorded conversation; there is no ancillary information (caller-ID, IP-Addresses etc.) embedded in the WAV file. However, by using variables in the recording file name, you can include the following types of information:
$r The recording directory, which is "recordings". This directory is relative to the working directory of the PBX. This directory also contains other recordings, for example mailbox messages. If you use another directory, you must first create that directory before using it. The directory path must always be relative to the working directory of the PBX.
$p The remote party for the call (since version 5.3.3).
$i The direction of the call. The PBX substitutes an "i" for incoming calls, and a "o" for outgoing calls.
$u The canonical (primary) name of the extension. Depending on the direction of the call, this could be calling or called party number. Details explained below.
$n The calling party number. Depending on the direction of the call, this could be calling or called party number. Details explained below.
$o The domain name.
$a The user account number.
$d The date of the call in the format "20071220" (no spaces or dashes in between).
$t The time if the call in the format "134349" (no spaces or dashes in between).
$g The timestamp in GMT format "YYYY-MM-DDTHH:MM:SS".
$y The year in format "YYYY".
$m The month in format "MM".
$w The day in format "DD".
$h The hour in format "HH".
$b The minute in format "MM".
$e The second in format "SS".
$k The customer-ID from the domain recording settings.
$s The site-ID from the domain recording settings.
$x The account number from the connected agent.
$c Client matter code (CMC).
$l The Call-ID of the call.
$$ A single "$" symbol.
The default recording name is $r/$o/$a/$d-$t-$i-$n.wav. If the directory that results from the replacement does not exist, the PBX will automatically generate it. This makes it possible to sort the recordings into directories for every day. If you are running multiple domains, then you can use $r/$m/$d/$t-$i-$u-$n.wav as the recording name. This will create the recorded files under each domain name.
Recording to a SIP URI
When you specify a recording name with a sip scheme (e.g. sip:email@example.com), the PBX will initiate a call to that location. The other side of the call can either accept the call or it can send an error code if it does not wish to record this call. In this case, the associated resources for the recording call are released.
This feature is useful if you want to employ external equipment for recording calls or you want to monitor life calls e.g. with a softphone.
If the call connects, the PBX will encode the data in the selected codec type. Please be aware that in any case, the PBX must decode the monitored media streams, because otherwise it would not be able to mix the two streams together. This might mean a significant increase in CPU load that you should keep in mind.
Recording with CallCabinet
When using the hosted recording solution from CallCabinet you need to provide the "Customer ID" and "Site ID" in the domain settings. The compression should be turned off, as the cloud software takes care about compression. An example for a recording location would be /home/callcabinet/$p_$g_$a_0_$i.WAV; please not that the suffix must be in UPPER CASE with the version that we were using.
When using Linux, MacOS or FreeBSD, we recommend to use a different account for the CallCabinet upload daemon. That means that the PBX and the daemon must be in the same group and the recording directory needs to have write permission for that group.
For more information see Setting up Call Recording for Vodia on Atmos.