Play

The Play verb is used to play an audio or video* file to the remote party.

* Video files are supported only when Restcomm is configured to use Dialogic’s PowerMedia XMS media server.

Play Attributes

Name Allowed Values Default Value

loop

integer > 1

1

  • loop. The 'loop' attribute specifies how many times you’d like the audio file to be repeated. Specifying '0' will cause the the <Play> verb to loop until the call is hung up.

Supported Audio Formats

MIME type Description

audio/wav

wav format audio

audio/wave

wav format audio

audio/x-wav

wav format audio

Media Server Audio File Format

Technical Specification and Capacity

The Restcomm Media Server is capable of

  • Media and Codecs :

    G711 (a-Law, u-Law)
    GSM
    Linear PCM(L16)
    G729
    DTMF(RFC 2833, INBAND)
  • Media Files :

    *Wav (Sample rate of 8000Hz, bit rate of 8, Mono)*
    GSM
  • Signaling and control :

    MGCP
    Java Media Control API(JSR-309)
  • Capacity : Typical media sessions per server

    G.711 , L16 @20ms – 500+ per cpu core
    GSM @ 20ms – 95 GSM mixed with 380 G.711 , L16 , 475 overall per cpu core
    G.729 @20ms – 45 GSM mixed with 180 G.711 , L16 , 225 overall per cpu core
    All benchmark tests where done on Amazon EC2 cloud instances.

Supported Video* Formats

* Video files are supported only when Restcomm is configured to use Dialogic’s PowerMedia XMS media server.
MIME type Description

video/mp4

mp4 format audio/video

Media Server Video File Format

Technical Specification and Capacity

Restcomm Connect along with Dialogic’s PowerMedia XMS is capable of

  • Video Codecs :

    H.264
  • Audio Codecs :

    AMR-NB
    AMR-WB
  • Multimedia File Formats :

    MP4 Container
  • Signaling and control :

    Java Media Control API(JSR-309)

Find more information about Dialogic’s PowerMedia XMS here.

How to Convert a Wav File to the Correct Bitrate

You can use a software call ffmpeg as follows:

ffmpeg -i source_file.wav -acodec pcm_s16le -ac 1 -ar 8000 result_file.wav

Nesting

The <Play> verb can not have any other verbs or nouns nested. Only a URL.

Basic examples

For examples of how to use the <Play> verb see below.

<Response>
<Play>http://foobar.com/demo.wav</Play>
</Response>
<Response>
<Play>http://foobar.com/demo.mp4</Play>
</Response>