OzML reference book
OzML (Ozeki XML) is an XML language which uses predefined commands. These commands are used in responses to the notifications
coming from the phone system.
To write an OzML command this is the standard form:
<command parameter1="..." parameter2="..."> 'a parameter
between the command nodes' </command>
An OzML response is always between <response> nodes:
<response> 'commands and their parameters between the nodes' </response>
Command | Description |
Response to Api Extension Control notifications: | |
Array | A data structure, which can store a fixed-size sequential collection of elements. |
BlindTransfer | Transfers the call during the conversation, and leaves the conversation. |
Call | Calls a number with a programmable API extension to make operations on the call later on. |
Delay | Delays the next command in the response command OzML with the specified time. |
DeleteFile | Deletes the source files which are not needed anymore, from a specified directory. |
ForEach | Loop command, which is for going through on the elements and items of a specified array. |
GoTo | Requests the specified URLs and executes the OzML commands received from the URL. |
Hangup | Terminates a call in progress by ID. |
MoveFile | Moves source files into specified target directories. |
Play | Plays an audio file (local or downloaded from URL) in an existing call for the parties respectively. |
ReceiveAlarmNotification | Receive an alarm notification from an alarm system using Ademco Contact ID protocol. |
Record | Records the voice of the current call. |
Reject | Rejects an incoming call to an API extension. It can be used only as first command in a response. |
SendAlarmNotification | This command can be used to send an alarm notification with Ademco Contact ID protocol. |
SendEmail | This command can be used for sending out e-mails to e-mail addresses. |
SendSms | This command can be used for sending SMS messages to mobile phones. |
Speak | Reads a text using the text to speech engine into a call in progress. |
Userinput | Executes commands between <InitialCommands></InitialCommands> nodes, than waits for the user to press DTMF keys. |
Var | An implicit type variable, means the compiler determines the variable's type. |
Response to Third Party Call Control notification: | |
AttendedTransfer | If getting a call, you can put it on hold and call a 2nd number, then connect the call with the 2nd number using AttendedTransfer. |
BlindTransfer | Transfers the call during the conversation, and leave the conversation. |
Forward | Forward a call by ID to another number if it can't be answered. |
Hangup | Terminates a call in progress by ID. |
Hold | Puts both legs of the call from InCall state to Hold state by ID. |
Play | Plays an audio file (local or downloaded from URL) in an existing call for the parties respectively. |
Record | Records a chosen call. |
SendDTMF | Sends a DTMF message to a participant |
Speak | Reads a text using the text to speech engine into a call in progress. |
Unhold | Puts both legs of the call to InCall state by ID. |
Response to Call Routing notification: | |
Route | Routes a call in response to call interception notification. |
Example - How to use Call command
The Call command can be used to initiate a voice call. It makes an API extension call a number and do tasks with the call. The tasks are declared in an OzML response document as seen below.
Step 1: Create a call using a HTTP request, for example:
http://ozekixepbx.ip:7780/?command=Call&Dialed=100&ApiExtension=9997&Url=
http://yourapp.com/callconnected.php
Step 2: Accept the CallConnected request from the Ozeki Phone System on your webserver and return an XML to handle the call. Example request sent by the Ozeki Phone System PBX to your webserver: http://yourapp.com/callconnected.php
OzML example response returned by callconnected.php:
<Response> <Delay>1</Delay> <Speak>Congratulations, this is your first OzML Response command.</Speak> <Delay>2</Delay> <Speak>Have a nice day!</Speak> </Response>
To send a test response to a call connected request in a simple manner using the tester, fill out the Response OzML field. You can choose from Example OzMLs or write your own one.
You can learn more about OZML from the OZML Documentations.