Voicemail Compression User-Defined Voicemail Compression
 
User-Defined Voicemail Compression
In addition to the provided compression described above, Voicemail attachments can also be compressed using other compression procedures. The respective encoder and decoder must therefore be added to the SwyxWare database. In the dialog window "Add file to database", select the option "Global" in the "Area:" list field, and the option "Others" in the "Category" list field. (For further information please refer to chapter The “Files” Tab.)
Call parameters must additionally be defined in a configuration file with the name “RecordingCodecs.xml”.
The following provides an example of the Speex encoder in which is shown what this configuration file looks like:
<?xml version="1.0" encoding="utf-8" ?>
<rl:recordingcodecslist xmlns:rl="C:\Documents and Settings\All Users\Application Data\Swyx\IpPbxServer\Data\System\RecordingCodecsList">
<recordingcodec>
<id>128</id>
<codecname>Speex (.spx)</codecname>
<extension>spx</extension>
<encodercommandline>speexenc.exe -n --title
%t --author %a --comment %c %s
%d</encodercommandline>
<decodercommandline>speexdec.exe %s
%d /decodercommandline
<mimetype>application/ogg</mimetype>
</recordingcodec>
</rl:recordingcodecslist>
The file contains a list of codecs, coded as a <rl:recordingcodecslist> element. This can contain one or more <recordingcodec> elements, which define the name and the command line to be started by SwyxServer for each codec. The example above contains exactly one element, which defines the Open-Source Speex-Codec. The <recordingcodec> element contains the following sub-elements:
Name
Explanation
<id>
Unique Codec ID
Must be a value between 128 and 255. SwyxServer uses this ID to save the selected codec in the SwyxServer or in the user configuration.
<codecname>
Name of the codec, as shown in the SwyxWare administration.
<Extension>
Data extension for file compressed using this codec.
<encodercommandline>
Command line for compressing a standard WAV file (16Bit, 8kHz, PCM, mono) into the compressed format. SwyxServer replaces the wildcards in the command line with the appropriate values before starting. The following placeholders are possible:
%s Source File
Contains the path and file name of the uncompressed WAV file.
%d Target File
Path and file name of the compressed file
%t
Number and name of the caller
%a
Always "Voicemail"
%c
Name and version of the SwyxServer process
%d
Date and time, formatted, defined such as in the user settings of SwyxServer.
<decodercommandline>
Command line for decompressing a compressed file according to standard WAV (8kHz PCM mono). SwyxServer replaces the wildcards in the command line with the appropriate values before starting.
The following placeholders are possible:
%s Source File
Contains the path and file name of the uncompressed WAV file.
%d Target File
Path and file name of the compressed file.
<mimetype>
Mime type, with which the attachment is labeled. SwyxServer uses this string as a “content type” parameter in the Voicemail.
SwyxServer reads this configuration file when starting. As a result, the SwyxServer-service must be restarted after changes have been made. The complete XML scheme for this file is located in the SwyxServer program directory and is called “RecordingCodecs.xsd”. The example above is installed in the same directory under the name “RecordingCodecs_Sample.xml”. You can use this sample as a template.
* 
When using Remote Inquiry to check voice mails, it is important that the decoder is also correctly configured. SwyxServer uses this in order to decompress the Voicemail attachments during Remote Inquiry. If the voice mails are very long, this may result in minimal delay while they are played. SwyxServer can directly play the three standard variations and therefore there will be absolutely no delay.