Cisco Unity Connection Provisioning Interface (CUPI) API -- Call Handler Greetings APIs

From DocWiki

Revision as of 14:42, 16 October 2013 by Suniaror (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Links to Other API pages: Cisco_Unity_Connection_APIs

CUPI Guide Contents
API Overview
Index of All CUPI Documentation


Contents


Call Handler Greetings APIs

Administrator can use this API to fetch the greetings. It can be used to fetch the list of greetings and also a single instance of greetings.

Listing the Greetings

The following is an example of the GET request that fetch the list of greetings:

GET https://<connection-server>/vmrest/callhandlertemplates/<callhandlertemplate-objectid>/templategreetings

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

<TemplateGreetings total="2">
  <TemplateGreeting>
    <URI>/vmrest/callhandlertemplates/5f6e1043-5edf-4646-90ac-
    836910ac1a4c/templategreetings/Alternate</URI>
    <CallHandlerObjectId>5f6e1043-5edf-4646-90ac-836910ac1a4c</CallHandlerObjectId>
    <CallhandlerURI>/vmrest/handlers/callhandlers/5f6e1043-5edf-4646-90ac-
    836910ac1a4c</CallhandlerURI>
    <IgnoreDigits>false</IgnoreDigits>
    <PlayWhat>0</PlayWhat>
    <RepromptDelay>2</RepromptDelay>
    <Reprompts>0</Reprompts>
    <TimeExpires>1972-01-01 00:00:00.0</TimeExpires>
    <GreetingType>Alternate</GreetingType>
    <AfterGreetingAction>4</AfterGreetingAction>
    <PlayRecordMessagePrompt>true</PlayRecordMessagePrompt>
    <EnableTransfer>false</EnableTransfer>
  </TemplateGreeting>
  <TemplateGreeting>
    <URI>/vmrest/callhandlertemplates/5f6e1043-5edf-4646-90ac-
    836910ac1a4c/templategreetings/Busy</URI>
    <CallHandlerObjectId>5f6e1043-5edf-4646-90ac-836910ac1a4c</CallHandlerObjectId>
    <CallhandlerURI>/vmrest/handlers/callhandlers/5f6e1043-5edf-4646-90ac-
    836910ac1a4c</CallhandlerURI>
    <IgnoreDigits>false</IgnoreDigits>
    <PlayWhat>0</PlayWhat>
    <RepromptDelay>2</RepromptDelay>
    <Reprompts>0</Reprompts>
    <TimeExpires>1972-01-01 00:00:00.0</TimeExpires>
    <GreetingType>Busy</GreetingType>
    <AfterGreetingAction>4</AfterGreetingAction>
    <PlayRecordMessagePrompt>true</PlayRecordMessagePrompt>
    <EnableTransfer>false</EnableTransfer>
  </TemplateGreeting>
  </TemplateGreetings>
Response Code: 200

JSON Example

To view the list of greetings, do the following:

GET https://<connection-server>/vmrest/callhandlertemplates/<callhandlertemplate-objectid>/templategreetings
Accept: appliaction/json
Conenction: keep_alive

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

{
  "@total":"2"
  "TemplateGreeting": [
  {
    "URI":"/vmrest/callhandlertemplates/a2f8fb8f-68ee-4a17-90a0-
    bff0308b5b1a/templategreetings/Alternate"
    "CallHandlerObjectId":"a2f8fb8f-68ee-4a17-90a0-bff0308b5b1a"
    "CallhandlerURI":"/vmrest/handlers/callhandlers/a2f8fb8f-68ee-4a17-90a0-
    bff0308b5b1a"
    "IgnoreDigits":"false"
    "PlayWhat":"0"
    "RepromptDelay":"2"
    "Reprompts":"0"
    "TimeExpires":"1972-01-01 00:00:00.0"
    "GreetingType":"Alternate"
    "AfterGreetingAction":"4"
    "PlayRecordMessagePrompt":"true"
    "EnableTransfer":"false"
  },
  {
    "URI":"/vmrest/callhandlertemplates/a2f8fb8f-68ee-4a17-90a0-
    bff0308b5b1a/templategreetings/Busy"
    "CallHandlerObjectId":"a2f8fb8f-68ee-4a17-90a0-bff0308b5b1a"
    "CallhandlerURI":"/vmrest/handlers/callhandlers/a2f8fb8f-68ee-4a17-90a0-
    bff0308b5b1a"
    "IgnoreDigits":"false"
    "PlayWhat":"0"
    "RepromptDelay":"2"
    "Reprompts":"0"
    "TimeExpires":"1972-01-01 00:00:00.0"
    "GreetingType":"Busy"
    "AfterGreetingAction":"4"
    "PlayRecordMessagePrompt":"true"
    "EnableTransfer":"false"
  },
  ]
}
Response Code: 200

Viewing the Details of Specific Greeting

The following is an example of the GET request that lists the details of specific greeting:

  GET https://<connection-server>/vmrest/callhandlertemplates/<callhandlertemplate-
  objectid>/templategreetings/<Greetingname>

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

<TemplateGreeting>
    <URI>/vmrest/callhandlertemplates/5f6e1043-5edf-4646-90ac-
  836910ac1a4c/templategreetings/Alternate</URI>
    <CallHandlerObjectId>5f6e1043-5edf-4646-90ac-836910ac1a4c</CallHandlerObjectId>
    <CallhandlerURI>/vmrest/handlers/callhandlers/5f6e1043-5edf-4646-90ac-
  836910ac1a4c</CallhandlerURI>
    <IgnoreDigits>false</IgnoreDigits>
    <PlayWhat>0</PlayWhat>
    <RepromptDelay>2</RepromptDelay>
    <Reprompts>0</Reprompts>
    <TimeExpires>1972-01-01 00:00:00.0</TimeExpires>
    <GreetingType>Alternate</GreetingType>
    <AfterGreetingAction>4</AfterGreetingAction>
    <PlayRecordMessagePrompt>true</PlayRecordMessagePrompt>
    <EnableTransfer>false</EnableTransfer>
</TemplateGreeting>
Response Code: 200

JSON Example

To view a specific greeting, do the following:

GET https://<connection-server>/vmrest/callhandlertemplates/<Callhandlertemplate-
objectid>/templategreetings/<Greetingname>
Accept: application/json
Connection: keep_alive

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

{
    "URI":"/vmrest/callhandlertemplates/a2f8fb8f-68ee-4a17-90a0-
    bff0308b5b1a/templategreetings/Alternate"
    "CallHandlerObjectId":"a2f8fb8f-68ee-4a17-90a0-bff0308b5b1a"
    "CallhandlerURI":"/vmrest/handlers/callhandlers/a2f8fb8f-68ee-4a17-90a0-bff0308b5b1a"
    "IgnoreDigits":"false"
    "PlayWhat":"0"
    "RepromptDelay":"2"
    "Reprompts":"0"
    "TimeExpires":"1972-01-01 00:00:00.0"
    "GreetingType":"Alternate"
    "AfterGreetingAction":"4"
    "PlayRecordMessagePrompt":"true"
    "EnableTransfer":"false"
}
Response Code: 200

Updating a Greeting

The following is an example of the GET request that updates the details of specific greeting:

PUT https://<connection-server>/vmrest/callhandlertemplates/<callhandlertemplate-objectid>/templategreetings/<Greetingname>
Request Body:
<TemplateGreeting>
    <PlayWhat>1</PlayWhat>
    <PlayRecordMessagePrompt>true</PlayRecordMessagePrompt>
</TemplateGreeting>

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

JSON Example

To update a particular greeting, do the following:

PUT https://<connection-server>/vmrest/callhandlertemplates/<Callhandlertemplate-objectid>/templategreetings/<Greetingname>
Accept: application/json
Content_type: application/json
Connection: keep_alive
Request Body:
{
    "PlayWhat":"1",
    "PlayRecordMessagePrompt":"true"
}

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

Explanation of Data Fields

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

This column overrides all the Menu Entry settings when this greeting is active. This has the same effect as setting all the menu entry keys for this handler to "locked". It is a shorthand way of locking callers into the greeting so they cannot get out until it completes. Values can be:

  • false: Caller input enabled during greeting
  • true: Caller input ignored during greeting

Default Value: false

PlayWhat Read/Write Integer Specifies if the system default greeting, personal recording, or nothing should be played.

Default Value: 0 For more information, refer to the Enumeration Type section.

RepromptDelay Read/Write Integer 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. The range of this field can vary from 0 to 100.

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.

Default Value: 2

Reprompts Read/Write Integer The number of times to reprompt a caller. After the number of times indicated here, Cisco Unity Connection performs the after-greeting action.

This column is typically used when an audio text application is expecting input from a caller. The range of this field can vary from 0 to 100. Values can be:

  • 0: Do not re-prompt - Cisco Unity Connection will play the greeting once and then the after-greeting action is taken.
  • 1 or greater: Number of times to re-prompt.

The "RepromptDelay" value determines how many seconds to wait in between replays. Default Value: 0

GreetingType Read Only String Specifies the greeting type. There are 7 greeting types available.
AfterGreetingAction Read/Write Integer The type of call action to take, e.g., hang-up, goto another object, etc.

The values that are allowed are:

  • Hangup
  • Goto
  • Restart greeting
  • Route from next call routing rule
  • Take message
  • Custom Type: Call Action
AfterGreetingTargetConversation Read/Write String Specifies the conversation to go to after the greeting is played.

For more information, refer to the Enumeration Type section.

AfterGreetingTargetHandlerObjectId Read/Write String (36) The unique identifier of the call action object that Cisco Unity Connection performs after the greeting is played.
TimeExpires Read/Write datetime 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.

The "Enhanced Alternate Greeting" feature uses this column to specify how long the subscriber wants their alternate greeting enabled. The standard greeting rule should never be disabled. The field is not displayed when the Greeting field is enabled with no end date and end time.

PlayRecordMessagePrompt Read/Write Boolean A flag indicating whether the “Record your message at the tone…” prompt prior to recording a message.

Values:

  • true – Play Record Message prompt is enabled.
  • false – Play Record prompt is disabled.

Default Value: true

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

Values:

  • true: Allows transfer
  • false: Does not allow

Default Value: false

Rating: 0.0/5 (0 votes cast)

Personal tools