Play command

The Play command plays an audio file (local or downloaded from URL) when an API extension call is in progress. It is also used to play sound to chosen parties of the conversation (caller, callee or all).

<Play> command example usage:

It is widely used in IVR-s playing pre-recorded sounds or when a client's call is transferred and the company plays music to the client till the phone is picked up by the support staff. It is also used to play a sound file during a conversation for example if one of the parties are low in telephone credits it could say: 'You have 1 dollar left in your phone account. Please recharge it as soon as possible!'

Parameters:

Note: CallId is only considered in case of third party call controlling. Party is only considered for third party call control, but in this case it is mandatory.

Parameter name Value Description Mandatory
Party string value
(caller, callee or all)
The destination party to play the sound to. No
CallId string value,
e.g. H2Wwb
The call ID of the call you want to run the Play command on. Defaultly it is known from the CallChanged notification. No
AudioFile string value
(URL or localhost addresse)
The destination of the audio file. When a relative path is provided, it will be relative to ContentStorage/Static directory in Ozeki Phone System install directory. It can be HTTP URL as well where it's downloaded from and cached (based on the webserver settings). This parameter can be provided between the command nodes. Yes
Repeat bool value
(true or false)
If you want to repeat the file set it to true else set it to false. It's default value is false. No

Examples of extension control

Simple example:

Plays repeatedly hello.wav from ContentStorage/Static directory in Ozeki Phone System install directory.
<?xml version="1.0"?>
<Response>
  <Play Repeat="true">hello.wav</Play>
</Response>

Detailed example:

Plays hello.wav from ContentStorage/Static directory in Ozeki Phone System install directory. After this 5 second passes and the phone is hanged up.
<?xml version="1.0"?>
<Response>
  <Play>hello.wav</Play>
  <Delay>5</Delay>
  <Hangup></Hangup>
</Response>

Play command is used in OzML responses to these Api Extension Control notifications:
GoTo, RecordCompleted, DtmfEntered, SMSDeliveryReport, IncomingSMS, IncomingCall, CallConnected

Examples of third party call control

Simple example:

Plays hello.wav from ContentStorage/Static directory in Ozeki Phone System install directory to all participants of the phone call.
<?xml version="1.0"?>
<Response>
  <Play Party="all">hello.wav</Play>
</Response>

Detailed example:

1st it plays hello.wav from ContentStorage/Static directory in Ozeki Phone System install directory to all participants of the phone call. Then says to all participants: "The callee will be transfered to number 1001." Then it transfers the callee to 1001.

<?xml version="1.0"?>
<Response>
  <Play Party="all">hello.wav</Play>
  <Speak Party="all">The callee will be transfered to number 1001.</Speak>
  <BlindTransfer TransferorParty="callee" Target="1001"></BlindTransfer>
</Response>
Play command is used in OzML responses to these notifications:
CallChanged, RecordCompleted

More things to know:

  • If the Play command is set to repeat mode then it will never step to the next command.
  • If you play the file from an URL link, the 1st attempt will be slow since Ozeki Phone System needs to download it to local before playing. After it's downloaded every other attempt will be smooth and fast.

More information