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

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 Message Settings

Administrator can use this API to create/update/delete/fetch the message settings. All the parameters of message settings are present in call handler primary template.

GET https://<connection server>/vmrestvmrest/usertemplates/<usertemplateobjectid>

From the above URI get the call handler primary template URI:

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


Updating Message Settings

The following is an example of the PUT request that updates message settings:

  PUT https://<connection-server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId>
<CallhandlerPrimaryTemplate>
    <EditMsg>true</EditMsg>
    <MaxMsgLen>1000</MaxMsgLen>
    <AfterMessageAction>1</AfterMessageAction>
    <SendUrgentMsg>2</SendUrgentMsg>
    <UseCallLanguage>false</UseCallLanguage>
    <SendSecureMsg>false</SendSecureMsg>
    <SendPrivateMsg>1</SendPrivateMsg>
    <PlayAfterMessage>2</PlayAfterMessage>
</CallhandlerPrimaryTemplate>

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

Updating after Message Actions

Example 1: Call Handler

<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetConversation>PHGreeting</AfterMessageTargetConversation>      
    <AfterMessageTargetHandlerObjectId>c1fc1029-55f4-40dc-a553-40b75664ed8a</AfterMessageTargetHandlerObjectId> 
</CallhandlerPrimaryTemplate>

The following is an example of the GET request that shows the call handler template object ID:

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

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

Response Code: 204

Example 2: Interview Handler

<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetHandlerObjectId>c1fc1029-55f4-40dc-a553-40b75664ed8a</AfterMessageTargetHandlerObjectId>   
</CallhandlerPrimaryTemplate>

The following is an example of the GET request that shows the interview handler template object ID:

  GET https://<connection server>/vmrest/handlers/interviewhandlers

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

Response Code: 204

Example 3: Directory Handler

<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetHandlerObjectId>c1fc1029-55f4-40dc-a553-40b75664ed8a</AfterMessageTargetHandlerObjectId>  
</CallhandlerPrimaryTemplate>

The following is an example of the GET request that shows the interview handler template object ID:

 
  GET https://<connection server>/vmrest/handlers/directoryhandlers

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

Response Code: 204

Example 4: Conversation

Request Body: for broadcast message administrator
<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetConversation>BroadcastMessageAdministrator</AfterMessageTargetConversation>
</CallhandlerPrimaryTemplate>

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
<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetConversation>SystemTransfer</AfterMessageTargetConversation>
</CallhandlerPrimaryTemplate>

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
<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetConversation>GreetingAdministrator</AfterMessageTargetConversation>
</CallhandlerPrimaryTemplate>

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
<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetConversation>SubSignIn</AfterMessageTargetConversation>
</CallhandlerPrimaryTemplate>

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
<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetConversation>SubSysTransfer</AfterMessageTargetConversation>
</CallhandlerPrimaryTemplate>

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

JSON Example

For conversations, do the following:

Request URI:
PUT https://<connection-server>/vmrest/callhandlerprimarytemplates/<CallhandlerprimarytemplatesObjectId>
Accept: application/json
Content-type: application/json
Connection: keep-alive
Request Body:
{
    "AfterMessageAction":"2",
    "AfterMessageTargetConversation":"SystemTransfer"
}

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

Example 5: Users with Mailbox

Request Body:
<CallhandlerPrimaryTemplate>
    <AfterMessageAction>2</AfterMessageAction>
    <AfterMessageTargetConversation>PHTransfer</AfterMessageTargetConversation>  
    <AfterMessageTargetHandlerObjectId>71cb381b-fd16-4ba8-8a1d-e71684e57b0e</AfterMessageTargetHandlerObjectId>
</CallhandlerPrimaryTemplate>

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

Response Code: 204

Explanation of Data Fields

Parameter Operations Data Type Comments
MaxMsgLen Integer Read/Write The maximum recording length (in seconds) for messages left by unidentified callers.

Default value : 300 Range: 1-3600

EditMsg Boolean Read/Write Allows callers to be prompted to listen to, add to, rerecord, or delete their messages.

Values can be:

  • False: Callers cannot edit messages
  • True: Callers can edit messages

Default value: True

UseDefaultLanguage Boolean Read/Write Values can be:
  • False: The language is the default language defined for the call handler template.
  • True: The language is derived from the location to which this call handler template belongs.

Default value: False

UseCallLanguage Boolean Read/Write This flag allows that language to be the language used by handlers in the system to play prompts for users.

Values can be:

  • False: Do not use the language specified by the system call routing rule to play prompts for users
  • True: Use the language specified by the system call routing rule to play prompts for users

Default value: False

SendUrgentMsg Integer Read/Write A flag indicating whether an unidentified caller can mark a message as "urgent."

Values can be:

  • 0: Never - messages left by unidentified calls are never marked urgent.
  • 1: Always - all messages left by unidentified callers are marked urgent.
  • 2: Ask - Cisco Unity Connection asks unidentified callers whether to mark their messages urgent.
SendPrivateMsg Integer Read/Write Determines if an outside caller can mark their message as private.

Values can be:

  • 0: Never - No messages are marked private.
  • 1: Always - All messages are marked private.
  • 2: Ask - Ask the outside caller if they wish to mark the message as private.
SendSecureMsg Boolean Read/Write A flag indicating whether an unidentified caller can mark a message as "secure."

Values can be:

  • 0: Never - messages left by unidentified calls are never marked secure.
  • 1: Always - all messages left by unidentified callers are marked secure.
PlayAfterMessage Integer Read/Write Indicates whether the Sent Message Prompt Recording referenced by Post Greeting

Values can be:

  • 0: Do not play recording
  • 1: System default recording
  • 2: Play recording
AfterMessageAction Integer Read/Write AfterMessageAction can only accept integer with value 1 or 8 or 2

Values can be:

  • 1: Hang up
  • 8: Route from next call routing rule.

Rating: 0.0/5 (0 votes cast)

Personal tools