Cisco Unity Connection Provisioning Interface (CUPI) API -- Greetings

From DocWiki

(Difference between revisions)
Jump to: navigation, search
m (1 revision)
 

Latest revision as of 00:05, 14 December 2010

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation

Contents


About Greetings

Modifying greetings involves a fairly long hierarchy in the URI, as follows:

/vmrest/handlers/callhandlers/<call handler object id>/greetings/<greeting type>/
greetingstreamfiles/<language id>

The greeting types are:

  • Standard
  • Alternate
  • Busy
  • Closed
  • Holiday
  • Error
  • Internal

For Connection versions 7.x and 8.0.x the greetings are accessed by using the greeting stream file URI. Modifying the greeting requires a three step process as detailed below.

For Connection versions 8.5 and later the greeting audio access has been simplified so that it can be modified in a single step. This new URI is a standard sub-resource of the greeting stream file resource URI. The old greeting stream file modification still works in the later versions, but use of the new URI is easier.


Listing and Viewing

Greeting Audio GET for 8.5 and Later

Use the standard greeting audio URI to get the file:

GET http://<connection-server>/vmrest/handlers/callhandlers/<call handler object id>/greetings
/<greeting type>/greetingstreamfiles/<language id>/audio

The response will return the audio/wav data for the greeting of the specified type and language.

Voice Name GET for 7.x and 8.0.x

First get the greeting stream file object for the greeting type and language, then use the voice files URI to get the greeting audio contents:

GET http://<connection-server>/vmrest/handlers/callhandlers/<call handler object id>/greetings
/<greeting type>/greetingstreamfiles/<language id>
GET http://<connection-server>/vmrest/voicefiles/<stream file>

The response will return the audio/wav data for the greeting.


Setting Greetings

Setting a Greeting in 8.5 and Later

PUT the audio data directly to the standard greeting stream file URI:

PUT http://<connection-server>/vmrest/handlers/callhandlers/<call handler object id>/greetings
/<greeting type>/greetingstreamfiles/<language id>/audio content is audio/wav data

The response is a 204 indicating that the content has been accepted and copied into the temporary file.


Setting a Greeting in 7.x and 8.0.x

To create a greeting for a resource is a three step process.

Step 1: A place-holder for the WAV file must be created with a POST. This is a temporary file place-holder that can be used for up to 30 minutes. If it is not used within 30 minutes (assigned to a resource), the file is assumed to be abandoned and gets automatically cleaned.

POST /vmrest/voicefiles

The response code is 201 and the content is the name of the newly created temporary file.

Step 2: Use the temporary file name to PUT the new audio data. The HTTP content type is "audio/wav" and the payload content is the audio data.

PUT /vmrest/voicefiles/<temporary file name>

The response is a 204 indicating that the content has been accepted and copied into the temporary file.

Step 3: Set the greeting stream file of the target resource to the temporary file name.

See the following example:

PUT http://<connection-server>/vmrest/handlers/callhandlers/<call handler object id>/greetings
/<greeting type>/greetingstreamfiles/<language id>

Only the stream file field needs to be filled out for PUT. All the other greeting stream file fields are derived from the URI:

<?xml version="1.0" encoding="UTF-8"?>
<GreetingStreamFile>
<StreamFile>temporary file name</StreamFile>
</GreetingStreamFile>

Rating: 0.0/5 (0 votes cast)

Personal tools