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

From DocWiki

Jump to: navigation, search

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation


Contents


User Template Greetings APIs

The following URI can be used to view the user template object ID:

    GET https://<connection-server>/vmrest/usertemplates/<usertemplateobjectid>

From the above URI, get the call handler primary template object ID:

    GET https://<connection-
    server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId
    >

The following URI can be used to view the greetings:

    GET https://<connection- 
    server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId 
    >/usertemplategreetings

The following URI can be used to view the alternate greeting:

    GET https://<connection-
    server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId
    >/usertemplategreetings/Alternate

The following URI can be used to view the busy greeting:

    GET https://<connection-
    server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId
    >/usertemplategreetings/Busy

The following URI can be used to view the error greeting:

    GET https://<connection-
    server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId
    >/usertemplategreetings/Error

The following URI can be used to view the closed greeting:

    GET https://<connection-
    server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId
    >/usertemplategreetings/Off%20Hours

The following URI can be used to view the standard greeting:

    GET https://<connection-
    server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId
    >/usertemplategreetings/Standard

The following URI can be used to view the holiday greeting:

    GET https://<connection-
    server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId
    >/usertemplategreetings/Holiday


Updating Fields of Greeting

Request Body: enable greeting

<UserTemplateGreeting>
    <EnableTransfer>true</EnableTransfer>
</UserTemplateGreeting>

The following is the response from the *PUT* request to enable greeting and the actual response will depend upon the information given by you:

Response Code: 204

Request Body: enable with no end date

<UserTemplateGreeting>
    <EnableTransfer>true</EnableTransfer>
    <TimeExpires></TimeExpires>
</UserTemplateGreeting>

The following is the response from the *PUT* request to enable with no end date and the actual response will depend upon the information given by you:

Response Code: 204

Request Body: enable until

<UserTemplateGreeting>
    <EnableTransfer>true</EnableTransfer>
    <TimeExpires>2014-12-31 05:30:00.000</TimeExpires>
</UserTemplateGreeting>

The following is the response from the *PUT* request to enable until and the actual response will depend upon the information given by you:

Response Code: 204

Request Body: edit caller hears

<UserTemplateGreeting>
    <PlayWhat>2</PlayWhat>
    <PlayRecordMessagePrompt>true</PlayRecordMessagePrompt>  
</UserTemplateGreeting>

The following is the response from the *PUT* request to edit caller hears and the actual response will depend upon the information given by you:

Response Code: 204

Request Body: enable ignore caller inputs

<UserTemplateGreeting>
    <IgnoreDigits>true</IgnoreDigits>
</UserTemplateGreeting>

The following is the response from the *PUT* request to enable ignore caller inputs and the actual response will depend upon the information given by you:

Response Code: 204

Request Body: enable allow transfers to numbers not associated with users or call handlers

<UserTemplateGreeting>
    <IgnoreDigits>false</IgnoreDigits>
    <EnableTransfer>true</EnableTransfer>
</UserTemplateGreeting>

The following is the response from the *PUT* request to enable allow transfers to numbers not associated with users or call handlers and the actual response will depend upon the information given by you:

Response Code: 204

JSON Example

To enable allow transfers to numbers not associated with users or call handlers, do the following:

Request URI:
PUT https://<connection-server>/vmrest/callhandlerprimarytemplates/6bcd837d-f1cf-43c2-b199-85b457858a16/usertemplategreetings/Alternate
Accept: application/json
Content-type: application/json
Connection: keep-alive
Request Body:
{
    "EnableTransfer":"true","IgnoreDigits":"false"
}

The following is the response from the above *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204

NOTE: To enable transfer ignore digit must be false.

Changing after Greeting Actions

By default all the handlers must have tenant specific handlers

Example 1: Change Call Actions

Request Body:
<UserTemplateGreeting>
    <AfterGreetingAction>8</AfterGreetingAction>
</UserTemplateGreeting>

The following is the response from the *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204

JSON Example

To change call actions, do the following:

PUT https://<connection-server>/vmrest/callhandlerprimarytemplates/6bcd837d-f1cf-43c2-b199-85b457858a16/usertemplategreetings/Alternate
Accept: application/json
Content-type: application/json
Connection: keep-alive
Request Body:
{
    "AfterGreetingAction":"8"
}

The following is the response from the above *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204

NOTE: Values used for changing call actions are – 1,4,6,8

Example 2: Change Call Handler

Request Body:
<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>PHTransfer</AfterGreetingTargetConversation>
    <AfterGreetingTargetHandlerObjectId>ee065a6a-3f95-4b4d-bbbd-98cb2d4c0aa9</AfterGreetingTargetHandlerObjectId>
</UserTemplateGreeting>

The following is the response from the *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204

NOTE: For attempt transfer use PHTransfer and for go directly to greetings use PHGreeting and AfterGreetingTargetHandlerObjectId can be viewed from URI:

GET https://<connection-server>/vmrest/handlers/callhandlers

Example 3: Change Interview handler

Request Body:
<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>PHInterview</AfterGreetingTargetConversation>
    <AfterGreetingTargetHandlerObjectId>2f6a0058-7535-48ac-abcd-c4b41d13f47e</AfterGreetingTargetHandlerObjectId>
</UserTemplateGreeting>

The following is the response from the *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204

NOTE: AfterGreetingTargetHandlerObjectId can be viewed from URI:

GET https://<connection-server>/vmrest/handlers/interviewhandler

Example 4: Change Directory handler

Request Body:
<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>AD</AfterGreetingTargetConversation>
    <AfterGreetingTargetHandlerObjectId>1f1941a5-3bb7-47ee-96f9-78691cd8ad43</AfterGreetingTargetHandlerObjectId>
</UserTemplateGreeting>

The following is the response from the *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204

NOTE: AfterGreetingTargetHandlerObjectId can be viewed from URI:

GET https://<connection-server>/vmrest/handlers/directoryhandler

Example 5: Change Conversation

Request Body: for broadcast message administrator
<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>BroadcastMessageAdministrator</AfterGreetingTargetConversation>
</UserTemplateGreeting>

The following is the response from the *PUT* request for broadcast message administrator and the actual response will depend upon the information given by you:

Response Code: 204
Request Body: for caller system transfer
<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>SystemTransfer</AfterGreetingTargetConversation>
</UserTemplateGreeting>

The following is the response from the *PUT* request for caller system transfer and the actual response will depend upon the information given by you:

Response Code: 204
Request Body: for greeting administrator
<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>GreetingsAdministrator</AfterGreetingTargetConversation>
</UserTemplateGreeting>

The following is the response from the *PUT* request for greeting administrator and the actual response will depend upon the information given by you:

Response Code: 204
Request Body: for sign in
<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>SubSignIn</AfterGreetingTargetConversation>
</UserTemplateGreeting>

The following is the response from the *PUT* request for sign in and the actual response will depend upon the information given by you:

Response Code: 204
Request Body: for user system transfer
<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>SubSysTransfer</AfterGreetingTargetConversation>
</UserTemplateGreeting>

The following is the response from the *PUT* request for user system transfer and the actual response will depend upon the information given by you:

Response Code: 204

Example 6: Change user with Mailbox

<UserTemplateGreeting>
    <AfterGreetingAction>2</AfterGreetingAction>
    <AfterGreetingTargetConversation>PHTransfer</AfterGreetingTargetConversation>
    <AfterGreetingTargetHandlerObjectId>92a9008d-9e18-4cd1-8e3c-10df32295cd8</AfterGreetingTargetHandlerObjectId>
</UserTemplateGreeting>

The following is the response from the *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204

Changing Caller Option

<UserTemplateGreeting>
    <EnAltGreetDontRingPhone>true</EnAltGreetDontRingPhone>
    <EnAltGreetPreventSkip>true</EnAltGreetPreventSkip>
    <EnAltGreetPreventMsg>true</EnAltGreetPreventMsg>
</UserTemplateGreeting>

The following is the response from the *PUT* request and the actual response will depend upon the information given by you:

Response Code: 204

Creating Greeting

The following URI can be used to add greetings:

POST https://<connection-
server>/vmrest/callhandlerprimarytemplates/<Callhandlerprimarytempl
atesObjectId>/usertemplategreetings/Alternate/greetingstreamfiles

The following is the response from the *POST* request and the actual response will depend upon the information given by you:

Response Code: 201

Explanation of Data Fields

Parameter Operations Data Type Comments
CallHandlerObjectId String(36) Read Only The unique identifier of the call handler object to which this greeting rule belongs.
IgnoreDigits Boolean Read/Write A flag indicating whether Cisco Unity Connection takes action in response to touchtone keys pressed by callers during the greeting.

Values can be:

  • False: Caller input enabled during greeting
  • True: Caller input ignored during greeting

Default Value: False

PlayWhat Integer(2) Read/Write The source for the greeting when this greeting is active.

Default Value: 0 Default Values can be:

  • Call handler - 1 (recording)
  • Subscriber - 0 (system)
RepromptDelay Integer(2) Read/Write The amount of time (in seconds) that Cisco Unity Connection waits without receiving any input from a caller before Cisco Unity Connection prompts the caller again.

Default Value:2 Values can be:

  • 0: Do wait without receiving caller input and do not replay greeting.
  • 1 or greater: Wait this number of seconds without receiving any input from the caller before playing the greeting again.
Reprompts Integer(2) Read/Write The number of times to reprompt a caller. After the number of times indicated here, Cisco Unity Connection performs the after-greeting action.

Default Value: 0 Values can be:

  • 0: Do not reprompt - Cisco Unity Connection will play the greeting once and then the after-greeting action is taken.
  • 1 or greater: Number of times to reprompt.
TimeExpires DateTime(8) Read/Write The date and time when the greeting rule expires. The greeting rule is considered not expired (enabled), if the value is NULL or a future date. The greeting rule is considered expired (disabled), the value is in the past.
GreetingType String(12) Read Only The type of greeting, e.g. "Standard," "Off Hours," "Busy," etc.
AfterGreetingAction Integer(2) Read/Write AfterMessageAction can only accept integer with value 1, 2, 4, 6, 8

Values can be:

  • 1: Hang up
  • 2. for other actions with object id (call handler, interview handler, directory handler)
  • 4. Take Message
  • 6. Restart greeting
  • 8: Route from next call routing rule.
AfterGreetingActionObjectId String(36) Read/Write The unique identifier of the CallAction object that determines what action Cisco Unity Connection will take on the call after the greeting is played.
PlayRecordMessagePromp Integer(2) Read/Write A flag indicating whether the “Record your message at the tone…” prompt prior to recording a message.

Values can be:

  • 0: System will not play the “Record your message at the tone…” prompt prior to recording a message.
  • 1: System will play the “Record your message at the tone…” prompt prior to recording a message.

Default Value: 1

EnableTransfer Boolean Read/Write A flag indicating when an extension is dialed at the greeting and the extension is not available whether to transfer to another extension.

Default value: 0 Values can be:

  • 0: User cannot be transferred to another extension.
  • 1: User can "be transferred to another extension."
EnAltGreetDontRingPhone Boolean Read/Write Transfer Callers to Greeting without Ringing User's Phone
EnAltGreetPreventSkip Boolean Read/Write Prevent Callers from Skipping the User's Greeting
EnAltGreetPreventMsg Boolean Read/Write Prevent Callers from Leaving Messages

Rating: 0.0/5 (0 votes cast)

Personal tools