Cisco Unity Connection Provisioning Interface (CUPI) API -- For End Users -- Enabling and Disabling Greetings

From DocWiki

Revision as of 10:54, 13 February 2012 by Anilve (Talk | contribs)
Jump to: navigation, search

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI for End Users Guide Contents
API Overview
Basics, Voice Name, Greetings
Unified Messaging Accounts
Alternate Devices
Enabling and Disabling Greetings
Private Lists
SMTP Proxy Addresses
System Configuration
Transfer Options


About Enabling and Disabling Greetings

Every user with a mailbox has an associated call handler, and thus a full compliment of greetings. The settings for each greeting can be read by the following GET request:

GET /vmrest/user/greetings/{greeting type}

The GET request would produce the following response:

<?xml version="1.0" encoding="UTF-8"?>
  <TimeExpires>1972-01-01 00:00:00.0</TimeExpires>
  <GreetingType>{greeting type}</GreetingType>

Greeting Types

The different types of greetings available for every user and call handler are:

  • Alternate
  • Busy
  • Error
  • Internal
  • Off Hours
  • Standard
  • Holiday

Accessing Greetings

Each greeting can be accessed through the following various GET requests:

GET /vmrest/user/greetings/Alternate
GET /vmrest/user/greetings/Busy
GET /vmrest/user/greetings/Error
GET /vmrest/user/greetings/Internal
GET /vmrest/user/greetings/Off%20Hours
GET /vmrest/user/greetings/Standard
GET /vmrest/user/greetings/Holiday

Enabling or Disabling Greetings

The TimeExpires field determines whether a greeting is enabled or disabled. To enable a greeting, TimeExpires needs to be set to a future date, which is the date on which the greeting will expire (be disabled). To disable a greeting, simply set TimeExpires to a date in the past. Also, if TimeExpires is set to null that means it is enabled indefinitely (currently CUPI offers no ability to set this field to null).

TimeExpires is always calculated as GMT. Any time zone conversion is the responsibility of the client.

To enable the Holiday greeting until March 9th 2020, you would use the following PUT request:

PUT /vmrest/user/greetings/Holiday

<?xml version="1.0" encoding="UTF-8"?>
  <TimeExpires>2020-03-09 00:00:00.0</TimeExpires>

To disable the Holiday greeting you would do a PUT request with the TimeExpires field set to a date in the past, as follows:

PUT /vmrest/user/greetings/Holiday

<?xml version="1.0" encoding="UTF-8"?>
  <TimeExpires>1972-01-01 00:00:00.0</TimeExpires>

Using the CUTI to record greetings via the Phone

Greetings can be updated using recorded wave files or by using the Phone interface via the CUTI.

The following example demonstrates how to achieve this task.

1. Record the greeting using CUTI, the details are available at: Cisco_Unity_Connection_Telephony_Interface_(CUTI)_API_--_Using_CUTI_for_Basic_Call_Operations

2. Update the user greeting with the recorded file:

   a) The record operation in Step-1 returns XML/JSON output containing the details of the recorded file. 
   b) Send a PUT request on the URL  
      /vmrest/user/greetings/{greeting type}/greetingstreamfiles/{language} 
      with the XML/JSON returned in the step above. 

The Put request will update the Greetings. The update of a Greetings wave file is similar whether a audio wave file is being used or the audio is a CallControl XML/JSON schema.

PUT /vmrest/user/greetings/Standard/greetingstreamfiles/1033
Input:    {"op":"RECORD","resourceType":"STREAM","resourceId":"cf1cb014-6394- 4279-ab5a-74a6d680e440.wav", "lastResult":"0","speed":"100","volume":"100","startPosition":"0"}

Rating: 0.0/5 (0 votes cast)

Personal tools