From Yate Documentation
Revision as of 16:31, 15 April 2014 by Paulc (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This module can be used either to play or record wave files.


Play a wave file

From a routing module you can play a wave file like this:


If you want to play a wave file without answering a call, add parameter autoprogress to the message like this:


Record a wave file

To record a wave file you can use this:


Audio formats supported

The extension is important to both the play and record commands.

If the audio is being played, the extension indicates what format the file is in.

If audio is being recorded, the module will record in the specified format.

Currently the supported formats are:

  • .slin (raw 16-bit signed linear)
  • .alaw or .A (raw G.711a)
  • .mulaw or .u (raw G.711u)
  • .2slin .2alaw .2mulaw (stereo versions of the above, interlaced, left channel first)
  • .gsm (raw GSM 06.10)
  • .ilbc20 or .ilbc30 (raw ILBC with 20ms or 30ms sampling)
  • .g729 (raw G.729)
  • .au (G.711x or 16 bit signed linear with header)
  • .lbc (iLBC 20 or 30 with specific header)

Configuration file

This module has no configuration file. All parameters are taken from the call message.

This module can also be attached to existing channels as described in the Dumbchan documentation.

Getting files into the right format

As noted above, this module plays a number of formats. ConvertingAudio has some examples which make help you get you source audio in a suitable format.

How to play the recorded files

You can use the "play" wrapper that is part of the SoX package. Command line parameters are required to provide data format information.

  • .slin: play -t raw -r 8000 -s w -f s FILENAME
  • .alaw or .al or .A: play -t raw -r 8000 -A -b 8 -c 1 FILENAME
  • .mulaw or .ul or .u: play -t raw -r 8000 -s b -f U FILENAME
  • .gsm: play -f g FILENAME


To record to a wave file from an external module do this:


To stop the recording specified in the example above above do this:


To play the wave file recorded above do this:


See also

Personal tools