Connect with us

Tech

Introduction to OzML: The XML Language of Ozeki

Published

on

XML Language OZML is the new era of coding

OzML is a markup language that allows you to create voice and video applications using Ozeki Phone System XE. Ozeki Phone System XE is a software-based PBX that supports SIP and WebRTC protocols. With OzML, you can design interactive voice response (IVR) systems, call routing, voice mail, conferencing, and more.

OzML Syntax and Structure

OzML is based on XML, which means that it follows the same rules and conventions as XML. An OzML document consists of a root element, called <ozml>, and one or more child elements, called <action>.

Each action element represents a command or instruction for the phone system to execute. For example, the following OzML document plays a welcome message and then hangs up the call:

XML Code

<ozml>
  <action application="play" data="welcome.wav"/>
  <action application="hangup"/>
</ozml>

Each action element has an application attribute that specifies the name of the application to run, and a data attribute that provides the input or parameter for the application. Some applications may have additional attributes or sub-elements to configure their behavior. For example, the dial application can have a callerid attribute to set the caller ID of the outgoing call, and a timeout attribute to set the maximum duration of the call. The dial application can also have a <number> sub-element to specify the destination number of the call. For example, the following OzML document dials the number 1234567890 with a caller ID of 1111111111 and a timeout of 30 seconds:

XML Code

<ozml>
  <action application="dial" callerid="1111111111" timeout="30">
    <number>1234567890</number>
  </action>
</ozml>

OzML Applications

OzML supports a variety of applications that can perform different tasks on the phone system. Some of the most common applications are:

  • answer: Answers an incoming call.
  • hangup: Hangs up the current call.
  • play: Plays an audio file or a text-to-speech message.
  • record: Records the audio of the current call to a file.
  • dial: Dials an outgoing call to a number or a SIP URI.
  • bridge: Bridges two calls together.
  • conference: Creates or joins a conference room.
  • menu: Presents a menu of options to the caller and collects the input.
  • transfer: Transfers the current call to another destination.
  • sendemail: Sends an email with an attachment.
  • sendhttp: Sends an HTTP request to a URL.
  • senddtmf: Sends DTMF tones to the current call.
  • exec: Executes an external program or script.

You can find the full list and documentation of OzML applications on the Ozeki website.

OzML Examples

Here are some examples of OzML documents that demonstrate the capabilities of Ozeki Phone System XE.

Example 1: Simple IVR System

This OzML document creates a simple IVR system that greets the caller, asks them to press 1 for sales or 2 for support, and transfers the call accordingly. If the caller presses an invalid option or does not press anything, the call is hung up.

XML
<ozml>
  <action application="answer"/>
  <action application="play" data="Welcome to Ozeki. Please press 1 for sales or 2 for support."/>
  <action application="menu" timeout="10" maxdigits="1">
    <option digits="1" destination="1000"/>
    <option digits="2" destination="2000"/>
    <invalid destination="hangup"/>
    <timeout destination="hangup"/>
  </action>
</ozml>

Example 2: Voice Mail System

This OzML document creates a voice mail system that records the caller’s message and sends it as an email attachment to the recipient. The caller can press # to end the recording.

XML

<ozml>
  <action application="answer"/>
  <action application="play" data="The person you are trying to reach is not available. Please leave a message after the beep. Press # to end the recording."/>
  <action application="record" data="voicemail.wav" terminator="#"/>
  <action application="play" data="Thank you for your message. Goodbye."/>
  <action application="sendemail" from="ozeki@ozeki.com" to="recipient@ozeki.com" subject="New voice mail" body="You have a new voice mail from ${CALLERID}. Please check the attachment." attachment="voicemail.wav"/>
  <action application="hangup"/>
</ozml>

Example 3: Video Conference System

This OzML document creates a video conference system that allows the caller to join a conference room with a PIN code. The caller can see and hear the other participants in the conference.

XML
<ozml>
  <action application="answer"/>
  <action application="play" data="Welcome to the video conference system. Please enter your PIN code followed by the # sign."/>
  <action application="menu" timeout="10" maxdigits="4" terminator="#">
    <option digits="1234" destination="conference1"/>
    <option digits="5678" destination="conference2"/>
    <invalid destination="hangup"/>
    <timeout destination="hangup"/>
  </action>
  <action application="conference" data="${DESTINATION}" video="true"/>
</ozml>

Conclusion

OzML is a powerful and easy-to-use language for creating voice and video applications using Ozeki Phone System XE. It allows you to control the phone system with simple XML tags and attributes.

You can create various applications such as IVR, call routing, voice mail, conferencing, and more. You can also integrate OzML with external systems and services using HTTP, email, or exec applications. To learn more about OzML and Ozeki Phone System XE, please visit the Ozeki website.

Related Posts:

5 Easy Ways To Run Windows Software On A Mac

 

Continue Reading

Copyright © 2018-23 offcce - Offcce Team