Contents

About Basic Call Operations

The basic call operations are making a call, checking call-connected status, and hanging up. The call object is used to convey information about a call (see API XSD's).

When making a call, the following fields are used:

number: the only field that does not have a default value. Users with the system administrator role can call any number, but end users can call only those numbers that do not violate their associated restriction table, based on their class of service.

maximumRings: defaults to 4.

mediaSwitchObjectId: for end users, defaults to the phone system that is associated with the user. For users who do not have an associated phone system (for example, administrators), the phone system that is marked as the default TRAP phone system is used.

When a call has been placed, a client can get server information about the call, most importantly the connected status.

The following are HTTP commands for basic call operations:

POST http://<server>/calls:
Create a call (make a phone call) by using the information in a call object.
Returns a URI for the new call.
GET http://<server>/calls/<call id>: Get basic call information. Returns a call object.
DELETE http://<server>/calls/<call id>: Hangs up a call.

Playing and Recording by Using a Call

Files on the server can be played and recorded by phone (using the call control operations) by using the CallControl object (see API XSD's). The fields of the CallControl object are described below:

opType: PLAY, RECORD or STOP

resourceType: MESSAGE, BROADCASTMESSAGE or STREAM. STREAM is generally a temporary resource created by a record operation.

resourceID: Can be a message identifier, a broadcast message identifier or a stream identifier depending on the resource type.

Speed, volume and startPosition are all optional parameters. Speed and volume are a percentage and default to 100. The start position indicates a time in milliseconds and defaults to 0.

lastResult: The result of the last call control operation.

folderType: Reserved. Only messages in the inbox can be played.

A call control object is passed to a call by using a POST to the resource URI of the call:

POST http://<server>/vmrest/calls/<call id>

Examples

The examples below show how to: make a call, check call status, record by phone, play the recording, hang up, and send the recording as a message. Each step is shown as the HTTP request and response.