Call command

In this command, an API extension calls a number and once the phone is picked up, a CallConnected request will be sent to the specified URL. In response to this request a set of commands in OzML format can be provided regarding this call. There are OzML examples on the bottom half of the page.

Command example usage:

While using an IVR a client can order a call command. For example you could give your clients a method to give pre-recorded gift calls to their friends. For example your client could play a birthday or christmas song for his/her friend.

Parameters:

Parameter name Value Description Default value Mandatory
Dialled int value,
e.g. 2310
The phone number you want to call. Can be provided between the command nodes. (None) Yes
ApiExtension int value,
e.g. 9994
The phone number of the API extension which makes the call. (None) Yes
CallerId int value
e.g. 3000
The phone number the callee sees as the caller. ApiExtension parameter value No
CallerDisplayName string value,
e.g. John Smith
The displayed name of the caller. ApiExtension parameter value No
Url string value,
e.g. http://yourdomain.com/ozml_example/call_connected.php
The URL the OzML response is downloaded from. If it is empty or the URL can't be downloaded then the call will be hung up. (None) Yes
ErrorUrl string value,
e.g. http://yourdomain.com/ozml_example/error_occured.php
This URL is requested if any errors occur during the call. If it is empty then there will be no error notification sent to it. (None) No

Simple example:

It dials 2310 and shows caller ID 3000 to the callee. After the callee picks it up the OzML runs from this link: http://yourdomain.com/ozml_example/call_connected.php

<?xml version="1.0"?>
<Response>
  <Call Url="http://yourdomain.com/ozml_example/call_connected.php" CallerId="3000">2310</Call>
</Response>

Detailed example:

1st the speach engine says: "We will call your friend, Joe and play him the birthday song." It dials 2310 and shows caller ID 3000 to the callee. After the callee picks it up the OzML runs from this link: http://yourdomain.com/birthday.php. In the end the speach engine tells you: "We are playing Joe the birthday song."

<?xml version="1.0"?>
<Response>
  <Speak>We will call your friend, Joe and play him the birthday song.</Speak>
  <Call Url="http://yourdomain.com/birthday.php" CallerId="3000">2310</Call>
  <Speak>We are playing Joe the birthday song.</Speak>
</Response>

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

OzML examples

Basic speaking OzML:

After the target party picks the phone up it delays 1 second then says: "Congratulations, this is your first OzML Response command." Then it delays 1 more second and says: "Have a nice day!" Then it plays testsound.wav from the local C drive. Finally the call will be hung up.

<Response>
  
<Delay>1</Delay>
<Speak>Congratulations, this is your first OzML Response command.</Speak>
<Delay>1</Delay>
<Speak>Have a nice day!</Speak>
<Play>c:\testsound.wav</Play>
</Response>

Blind transfer OzML:

After the target party picks the phone up it delays 1 second then says: "Hello, you will be transferred to another extension. Goodbye!" Then it blind transfers the target party to extension 101. If it can't be blind transfered the next command will execute which says: "Sorry, but blind transfer failed. Please setup extension number 101 in the system." and the call will be hung up.

<Response>  
  <Delay>1</Delay>
  <Speak>Hello, you will be transferred to another extension. Goodbye! </Speak>
  <!-- The call will be blind transferred to another extension. To try it please configure
      an extension (e. g. SIP extension) in the system, register and set the extension ID
      for the command. -->
  <BlindTransfer>101</BlindTransfer>
  <!-- If blind transfer fails, the following commands will be executed -->
  <Speak>Sorry, but blind transfer failed. Please setup extension number 101 in the system. </Speak>
</Response>

SMS sending OzML:

After the target party picks the phone up it delays 1 second then says: "Hello, a test SMS will be sent." Then it tries to send an SMS to recipient 45026467 with this content: "Hello from Ozeki Phone System!" After that it delays 1 more second and the call will be hung up.

<Response>
  <Delay>1</Delay>
  <Speak>Hello, a test SMS will be sent.</Speak>
  <!-- To try out SMS sending, please set an SMS outside line and dialplan rules. -->
  <SendSms recipient="45026467">Hello from Ozeki Phone System! </SendSms>
  <Delay>1</Delay>
</Response>

Basic IVR OzML:

This speaks the 4 sentences between the <InitialCommands></InitialCommands> nodes repeatedly with a 10 second delay and scans the pressed numbers at the same time.
By pressing 1 an SMS will be sent to 45026467 containing: "Hello from Ozeki Phone System!"
By pressing 2 this sentence will be read by the speak engine: "You pressed button 2. You did nothing."
By pressing 3, you will be blind transferred to number 101. If the transfer was unsuccessfull it says: "Sorry, but blind transfer failed to extension 101."

<Response>
  <Delay>1</Delay>
  <!-- Defining a simple IVR. Messages will be repeated after 10 seconds. -->
  <UserInput timeout="10" repeat="true">
    <InitialCommands>
      <Speak>Welcome to the Ozeki Phone System IVR.</Speak>
      <Speak>To send an SMS, press 1.</Speak>
      <Speak>To do nothing, press 2.</Speak>
      <Speak>To transfer the call to 101, press 3.</Speak>
    </InitialCommands>
    <Inputs>
      <Input key="1">
        <Speak>A test SMS will be sent.</Speak>
        <SendSms recipient="45026467">Hello from Ozeki Phone System! </SendSms>
      </Input>
      <Input key="2">
        <Speak>You pressed button 2. You did nothing.</Speak>
      </Input>
      <Input key="3">
        <BlindTransfer>101</BlindTransfer>
        <Speak>Sorry, but blind transfer failed to extension 101. </Speak>
      </Input>
    </Inputs>
  </UserInput>
  <Speak>Good bye.</Speak>
</Response>

More information