Playing a File

Introduction

You use the Play File Start and Play File Stop messages to control Playback of files.

Play File API Messages

Play File Start 0x011B

Use this message to start playing a file.

Play File Stop 0x011D

Use this message to stop playing a file.

Play File Modify 0x011C

Use this message to modify (gain or speed), pause, resume, skip forward, or skip backward in a file that is currently playing.

Recorded Announcement Connect 0x0055

If you have DSP-ONE cards in your system, you can use this message to connect to a recorded announcement on the DSP Series 2 card (only RAN IDs below 4096), however, the enhanced functionality of the DSP Series 2 card will not be available. Announcements must be accessible via NFS.

File Barge-in Mode

Transmission of a file in barge-in mode is supported. You must use the Play File Start message with the Barge In TLV (0x05E5).

Specifying Offset and Length

You can specify the Offset and Length in one of two ways:

in two fields within the Vocabulary Index File

in the File Offset and Length TLV (0x0614) used in the Play File Start message. You can use the File Offset and Length TLV when queueing files, but you cannot use it when chaining files within a single message.

If the Length plus the Offset is greater then the actual file size, the file plays until the end. If the Offset is greater then the actual file size, a File Open error occurs.

Queuing Files

You can send multiple Play File Start messages and the files will be queued so that when one ends, the next one starts. This functionality works for all files, cached or un-cached, and with or without using the VIF file. There is no limit to the number of files you can queue, except for the limits imposed by memory.

You can also queue a chain of files using the Play File Start message by entering the number of files in the Number of Files field, and using the Play File Queue TLV.

When the first file in the queue is started, a Call Processing Event 0x002E message of File Started is generated, and when the last file in the queue has been played, a File Complete event is generated.

Failure Conditions

If a Play File request has more than one file descriptor, the request is NACKed.

If a queued file cannot be opened, a CPE of Play File Queue Failure (0x33) is returned. All current requests in the queue are cleared and the DSP resource is freed.

If queueing causes memory to be used up, a File Queue Failed alarm is returned.

Playing a .wav File

You indicate the WAV format in the File Format TLV (0x05E1) in the following API messages:

Play File Start 0x011B

DSP Cache Modify 0x011A

Alarm

If there is an error reading a .wav file, the switch will not NACK the API message, but will send an informational Card Alarm of 0x4E in the Alarm 0x00B9 message:

 

 

Example 1: No RIFF Chunk Found (Alarm Subtype 0x00)

X->H
[00 19 00 b9 00 0c ff 01 02 4e 10 00 01 01 01 04 00 01 00 00 17 70 00 42 41 44 20]

 

Example 2: RIFF type .wav not found (Alarm Subtype 0x01)

X->H
[00 19 00 b9 00 0e ff 01 02 4e 10 00 01 01 01 04 00 01 00 00 17 71 01 42 41 44 20]