Highlight a phrase and click this icon to search it on Swyx-Forum    Highlight a phrase and click this icon to search it within the Swyx Knowledgebase    Highlight a phrase and click this icon to search it using Goolge    Highlight a phrase and click this icon to search it using Wikipedia

Highlight a phrase and click this icon to search it on Swyx-Forum    Highlight a phrase and click this icon to search it within the Swyx Knowledgebase    Highlight a phrase and click this icon to search it using Goolge    Highlight a phrase and click this icon to search it using Wikipedia

List of Blogs
Search Blogs

Blog Archive

Most recent blog entries

 

Most recent blog entries

 

Aug28

Written by:Martin
28.08.2007 10:34 

Out of the box, SwyxWare delivers voicemails as wav-files, encoded as PCM 16bit mono, G.711 or GSM. That is configurable globally or per user via SwyxWare Administration. It's possible to instruct SwyxServer to use other file formats, too, by providing an encoder which converts from wav to the format you like. The encoder has to be a Win32 executable callable from the command-line. You configure the encoder by writing a configuration file called RecordingCodecs.xml and place it into

%allusersprofile%\application data\swyx\data\system

SwyxWare ships with a sample file located in the same folder. It has this content:

 

    1 xml version="1.0" encoding="utf-8" ?>
    2 <rl:recordingcodecslist xmlns:rl="http://www.lanphone.de/RecordingCodecsList">
    3   <recordingcodec>
    4     <id>128id>
    5     <codecname>Ogg Vorbis (.ogg)codecname>
    6     <extension>oggextension>
    7     <encodercommandline>oggenc.exe -q6 -t %t -a %a -c %c -d %w -o %d %sencodercommandline>
    8     <decodercommandline>oggdec.exe %s -o %d decodercommandline>
    9     <mimetype>application/oggmimetype>
   10   recordingcodec>
   11   <recordingcodec>
   12     <id>129id>
   13     <codecname>Speex (.spx)codecname>
   14     <extension>spxextension>
   15     <encodercommandline>speexenc.exe -n --title %t --author %a --comment %c %s %dencodercommandline>
   16     <decodercommandline>speexdec.exe %s %d decodercommandline>
   17     <mimetype>application/oggmimetype>
   18   recordingcodec>
   19 rl:recordingcodecslist>

 

 (I've added the line number for easy referencing here, they are not part of the file). Each additional codec you want to use is defined in the file by a <recordingcodec> element. The child elements define

  • A unique id (<id>), which has to be between 128 and 255.
  • The codec name (<codecname>) as shown in SwyxWare Administration
  • The file extension of the encoded file (<extension>) without the dot (.)
  • The command line (<encodercommandline>) to use to encode from wav
  • The command line (<decodercommandline>) to use to decode a file to wav format
  • The mime type (<mimetype>) to use for the email attachment

The sample file defines two codecs ogg vorbis (line 3 to 10) and speex (line 11 to 18). In the commandline several place holders can be used:

%s source file (with full path)
%d destination file (with full path)
%a caller number and name
%c SwyxServer exe name and version
%w date and time of the call
%t "Voicemail"

Once you have created the xml file, SwyxServer shows your additional codecs in the server and user properties, e.g.

 SwyxServer expects the encoder and decoder executables to be located in

%allusersprofile%\application data\swyx\share\data\system\bin

Specifying not only an encoder but a decoder, too, as I've shown above allows remote inquiry to handle voicemails with such attachements. RI decodes the file back to wav before playing it. Furthermore: The configured file formats are usable in PlayMessage commands in any call routing script.

Unfortunately neither SwyxIt!, nor Call Routing Manager, nor the Graphical Script Editor recognize these formats and always try to convert them to wav immediately when you specify them in a PlaySound action. As a workaround for GSE you can define the file names via variables and use the variables in the PlaySound block.

The configuration and encoder/decoder executables are retrievable from SwyxServer via API, so that they could be used for call recordings in SwyxIt, SwyxGate or LinkManager, too. However, neither of these components use that information and always store recordings as wav.

The encoding with such a custom encoder takes place just before the email is queued for delivery. It is done asynchronously on a low priority thread, i.e. it does not block the call routing script which sends the email.

The decoding is synchronously whenever a call routing script wants to play such a file. However, the decoded wavs are cached on disk for 10 minutes. If you access a file more than once, e.g. listen to a voicemail a second time, the decoded file is already present.

[Update 2.4.08] In SwyxWare v6.10 or later the reording_codecs.xml has to be placed into the SwyxWare program folder. The command-line encoder/decoder executables referenced in this file need to be stored into the SwyxWare database, file scope "Global", file category "other"

 

 

Tags:

 

5 comment(s) so far...

Re: Little known SwyxWare features, part 2

This one has to be updated for SwyxWare 6.11 due to the changed file path.

By FlorianNM on  02.04.2008 12:13

Re: Little known SwyxWare features, part 2

I've added a note about the changed locations in SwyxWare v6.10 or later. Thanks for the reminder.

By Martin on  02.04.2008 13:02

Re: Little known SwyxWare features, part 2

Hallo Martin ,

brauche ich für die Nutzung von Lame (Swyxanlagen) eine Lizenz und wenn ja wo kann ich diese erwerben.

Vorab vielen Dank

mfg

Lothar Pfingsten

By lpfingsten on  02.08.2010 10:31

Re: Little known SwyxWare features, part 2

Um überhaupt Voicemail in der SwyxWare nutzen zu können, brauchst Du das OptionsPaket SwyxVoicemail oder SwyxProfessional.

Wenn Du andere Codecs, wie hier beschrieben, einbindest, bist Du selbst für deren Lizensierung verantwortlich. SwyxWare selbst enthält keine mp3-Lizenz. Hier gibt es ein paar Infos:
de.wikipedia.org/wiki/LAME#Lizenzen_und_Patente
http://lame.sourceforge.net/about.php
http://www.mp3-tech.org
/


By Martin on  02.08.2010 11:33

Re: Little known SwyxWare features, part 2

Hallo Martin ,

Brauche ich zur kommerziellen Nutzung(Swyx Anlagen) von Lame eine Lizenz , wenn ja, wo erhalte ich diese!

Vielen Dank vorab..

mit freundlichen Grüssen

Lothar Pfingsten

By L. Pfingsten on  02.08.2010 11:34

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment  Cancel 
Blog Help
Sponsors