Cisco Unity Connection Provisioning Interface (CUPI) API -- Transfer Rule APIs

From DocWiki

Revision as of 09:28, 1 November 2013 by Deeptija (Talk | contribs)
(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


TransferRulesAPIs

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


Listing the Transfer Rules

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

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

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

<TemplateTransferOptions total="2">
  <TemplateTransferOption>
    <URI>/vmrest/callhandlertemplates/5f6e1043-5edf-4646-90ac-
    836910ac1a4c/templatetransferoptions/Alternate</URI>
    <CallHandlerObjectId>5f6e1043-5edf-4646-90ac-836910ac1a4c</CallHandlerObjectId>
    <CallhandlerURI>/vmrest/handlers/callhandlers/5f6e1043-5edf-4646-90ac-
    836910ac1a4c</CallhandlerURI>
    <TransferOptionType>Alternate</TransferOptionType>
    <Action>0</Action>
    <RnaAction>1</RnaAction>
    <TransferAnnounce>false</TransferAnnounce>
    <TransferConfirm>false</TransferConfirm>
    <TransferDtDetect>false</TransferDtDetect>
    <TransferHoldingMode>0</TransferHoldingMode>
    <TransferIntroduce>false</TransferIntroduce>
    <TransferRings>4</TransferRings>
    <TransferScreening>false</TransferScreening>
    <TransferType>0</TransferType>
    <MediaSwitchObjectId>abf4b7d1-89d5-45c2-bdc8-
    d3b13f5040f5</MediaSwitchObjectId>
    <PhoneSystemURI>/vmrest/phonesystems/abf4b7d1-89d5-45c2-bdc8-
    d3b13f5040f5</PhoneSystemURI>
    <UsePrimaryExtension>true</UsePrimaryExtension>
    <PlayTransferPrompt>true</PlayTransferPrompt>
    <PersonalCallTransfer>false</PersonalCallTransfer>
    <Enabled>true</Enabled>
  </TemplateTransferOption>
  <TemplateTransferOption>
    <URI>/vmrest/callhandlertemplates/5f6e1043-5edf-4646-90ac-
    836910ac1a4c/templatetransferoptions/Off Hours</URI>
    <CallHandlerObjectId>5f6e1043-5edf-4646-90ac-836910ac1a4c</CallHandlerObjectId>
    <CallhandlerURI>/vmrest/handlers/callhandlers/5f6e1043-5edf-4646-90ac-
    836910ac1a4c</CallhandlerURI>
    <TransferOptionType>Off Hours</TransferOptionType>
    <Action>0</Action>
    <RnaAction>1</RnaAction>
    <TransferAnnounce>false</TransferAnnounce>
    <TransferConfirm>false</TransferConfirm>
    <TransferDtDetect>false</TransferDtDetect>
    <TransferHoldingMode>0</TransferHoldingMode>
    <TransferIntroduce>false</TransferIntroduce>
    <TransferRings>4</TransferRings>
    <TransferScreening>false</TransferScreening>
    <TransferType>0</TransferType>
    <MediaSwitchObjectId>abf4b7d1-89d5-45c2-bdc8-
    d3b13f5040f5</MediaSwitchObjectId>
    <PhoneSystemURI>/vmrest/phonesystems/abf4b7d1-89d5-45c2-bdc8-
    d3b13f5040f5</PhoneSystemURI>
    <UsePrimaryExtension>true</UsePrimaryExtension>
    <PlayTransferPrompt>true</PlayTransferPrompt>
    <PersonalCallTransfer>false</PersonalCallTransfer>
    <Enabled>true</Enabled>
  </TemplateTransferOption>
</TemplateTransferOptions>
Response Code: 200

JSON Example

To list the transfer rules, do the following:

Request URI:
GET: https://<connection-server>/vmrest/callhandlertemplates/<callhandlertemplate-objectid>/templatetransferoptions
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:
{
  "@total":"2"
  "TemplateTransferOption":   [
  {
    "URI":"/vmrest/callhandlertemplates/e07ee639-bf8a-4c37-9d6a-
    0b51beee65c7/templatetransferoptions/Alternate"
    "CallHandlerObjectId":"e07ee639-bf8a-4c37-9d6a-0b51beee65c7"
    "CallhandlerURI":"/vmrest/handlers/callhandlers/e07ee639-bf8a-4c37-9d6a-
    0b51beee65c7"
    "TransferOptionType":"Alternate"
    "Action":"0"
    "RnaAction":"1"
    "TransferAnnounce":"false"
    "TransferConfirm":"false"
    "TransferDtDetect":"false"
    "TransferHoldingMode":"0"
    "TransferIntroduce":"false"
    "TransferRings":"4"
    "TransferScreening":"false"
    "TransferType":"1"
    "MediaSwitchObjectId":"f92e948f-6bd4-4891-ab8b-a3d930688305"
    "PhoneSystemURI":"/vmrest/phonesystems/f92e948f-6bd4-4891-ab8b-a3d930688305"
    "UsePrimaryExtension":"true"
    "PlayTransferPrompt":"true"
    "PersonalCallTransfer":"false"
    "Enabled":"true"
  },
  {
    "URI":"/vmrest/callhandlertemplates/e07ee639-bf8a-4c37-9d6a-
    0b51beee65c7/templatetransferoptions/Off Hours"
    "CallHandlerObjectId":"e07ee639-bf8a-4c37-9d6a-0b51beee65c7"
    "CallhandlerURI":"/vmrest/handlers/callhandlers/e07ee639-bf8a-4c37-9d6a-
    0b51beee65c7"
    "TransferOptionType":"Off Hours"
    "Action":"0"
    "RnaAction":"1"
    "TransferAnnounce":"false"
    "TransferConfirm":"false"
    "TransferDtDetect":"false"
    "TransferHoldingMode":"0"
    "TransferIntroduce":"false"
    "TransferRings":"4"
    "TransferScreening":"false"
    "TransferType":"0"
    "MediaSwitchObjectId":"f92e948f-6bd4-4891-ab8b-a3d930688305"
    "PhoneSystemURI":"/vmrest/phonesystems/f92e948f-6bd4-4891-ab8b-a3d930688305"
    "UsePrimaryExtension":"true"
    "PlayTransferPrompt":"true"
    "PersonalCallTransfer":"false"
    "Enabled":"true"
  }
  ]
}
Response Code: 200


Viewing the Details of Specific Transfer Rule

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

  GET https://<connection-server>/vmrest/callhandlertemplates/<callhandlertemplate-
  objectId>/templatetransferoptions/<TransferOptionType>
The following is the response from the above *GET* request and the actual response will depend upon the information given by you:
<TemplateTransferOption>
    <URI>/vmrest/callhandlertemplates/5f6e1043-5edf-4646-90ac-
836910ac1a4c/templatetransferoptions/Alternate</URI>
    <CallHandlerObjectId>5f6e1043-5edf-4646-90ac-836910ac1a4c</CallHandlerObjectId>
    <CallhandlerURI>/vmrest/handlers/callhandlers/5f6e1043-5edf-4646-90ac-
836910ac1a4c</CallhandlerURI>
    <TransferOptionType>Alternate</TransferOptionType>
    <Action>0</Action>
    <RnaAction>1</RnaAction>
    <TransferAnnounce>false</TransferAnnounce>
    <TransferConfirm>false</TransferConfirm>
    <TransferDtDetect>false</TransferDtDetect>
    <TransferHoldingMode>0</TransferHoldingMode>
    <TransferIntroduce>false</TransferIntroduce>
    <TransferRings>4</TransferRings>
    <TransferScreening>false</TransferScreening>
    <TransferType>0</TransferType>
    <MediaSwitchObjectId>abf4b7d1-89d5-45c2-bdc8-d3b13f5040f5</MediaSwitchObjectId>
    <PhoneSystemURI>/vmrest/phonesystems/abf4b7d1-89d5-45c2-bdc8-
d3b13f5040f5</PhoneSystemURI>
    <UsePrimaryExtension>true</UsePrimaryExtension>
    <PlayTransferPrompt>true</PlayTransferPrompt>
    <PersonalCallTransfer>false</PersonalCallTransfer>
    <Enabled>true</Enabled>
</TemplateTransferOption>
Response Code: 200

JSON Example

To view the details of a specific transfer rule, do the following:

Request URI:
GET: https://<connection-server>/vmrest/callhandlertemplates/<Callhandlertemplate-
objectid>/templatetransferoptions/<TransferOptionType>
Accept: applciation/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/e07ee639-bf8a-4c37-9d6a-
    0b51beee65c7/templatetransferoptions/Alternate"
    "CallHandlerObjectId":"e07ee639-bf8a-4c37-9d6a-0b51beee65c7"
    "CallhandlerURI":"/vmrest/handlers/callhandlers/e07ee639-bf8a-4c37-9d6a-
    0b51beee65c7"
    "TransferOptionType":"Alternate"
    "Action":"0"
    "RnaAction":"1"
    "TransferAnnounce":"false"
    "TransferConfirm":"false"
    "TransferDtDetect":"false"
    "TransferHoldingMode":"0"
    "TransferIntroduce":"false"
    "TransferRings":"4"
    "TransferScreening":"false"
    "TransferType":"1"
    "MediaSwitchObjectId":"f92e948f-6bd4-4891-ab8b-a3d930688305"
    "PhoneSystemURI":"/vmrest/phonesystems/f92e948f-6bd4-4891-ab8b-a3d930688305"
    "UsePrimaryExtension":"true"
    "PlayTransferPrompt":"true"
    "PersonalCallTransfer":"false"
    "Enabled":"true"
}
Response Code: 200


Updating a Transfer Rule

The following is an example of the PUT request that updates a transfer rule:

PUT https://<connection-server>/vmrest/callhandlertemplates/<callhandlertemplate-
objectid>/templatetransferoptions/<TransferOptionType>
Request Body: 
<TemplateTransferOption>
    <Action>1</Action>
    <Extension>1000</Extension>
    <TimeExpires>2012-12-31 12:00:00.0</TimeExpires>
    <Enabled>true</Enabled>
    <PlayTransferPrompt>true</PlayTransferPrompt>
    <TransferAnnounce>true</TransferAnnounce>
    <TransferConfirm>true</TransferConfirm>
    <TransferIntroduce>true</TransferIntroduce>
    <TransferScreening>true</TransferScreening>
    <TransferType>1</TransferType>
</TemplateTransferOption>

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 transfer rule, do the following:

GET: https://<connection-server>/vmrest/callhandlertemplates/<callhandlertemplate-
objectid>/templatetransferoptions/<TransferOptionType>
Accept: applciation/json
Content_type: application/json
Connection: keep_alive
Request Body:
{
    "Action":"1",
    "TimeExpires":"2012-12-31 12:00:00.0",
    "Extension":"1002",
    "PlayTransferPrompt":"true",
    "TransferAnnounce":"true",
    "TransferConfirm":"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 the call handler transfer options.
CallHandlerTemplateObjectId Read Only String Specifies the call handler object ID.
CallHandlerTemplateURI Read Only String URI of the call handler being referenced.
TransferOptionType Read Only String Specifies the transfer option type. There are 3 transfer option type available:
  • Alternate - in effect at all times, overrides standard and offhours.
  • OffHours - off or closed hours based on specified schedule.
  • Standard - standard hours based on specified schedule.
Action Read/Write Integer Specifies the transfer rule action. Custom type is Transfer Rule Action.

Refer to the section Enumeration Type.<<Link will be mentioned later>> Default value: 0

RnaAction Read/Write Integer Action to take on Ring-No-Answer (RNA) condition.

Refer to the section Enumeration Type.<<Link will be mentioned later>>

TimeExpires Read/Write datetime Rather than use a simple on and off scheme for enabling transfer options and greetings, Cisco Unity Connection employs a date scheme. If the value is NULL or a date is in the future then the transfer option is considered enabled. If the date is sometime in the past, then the transfer option is considered disabled.

The "Standard" transfer option should never be disabled. For primary call handlers associated with subscribers, the "Alternate" transfer option should always be enabled since subscribers have only one transfer option used currently.

TransferAnnounce Read/Write Boolean A flag indicating whether Cisco Unity Connection plays "transferring call" when the subscriber answers the phone. This field requires a "TransferType" of supervised (1).

Values can be:

  • false: Do not say "Transferring call" when the subscriber answers the phone
  • true: Say "Transferring call" when the subscriber answers the phone

Default value: false

TransferConfirm Read/Write Boolean The type of call transfer Cisco Unity Connection will perform - supervised or unsupervised (also referred to as "Release to Switch" transfer).

Requires a "TransferType" of supervised.

  • Unsupervised transfer (also referred to as "Release to Switch" transfer) - Cisco Unity Connection puts the caller on hold, dials the extension, and releases the call to the phone system. When the line is busy or is not answered, the phone system (not Cisco Unity Connection) forwards the call to the subscriber or handler greeting. To use "Unsupervised" transfer, call forwarding must be enabled on the phone system
  • Supervised transfer - Cisco Unity Connection acts as a receptionist, handling the transfer. If the line is busy or the call is not answered, Cisco Unity Connection (not the phone system) forwards the call to the subscriber or handler greeting. Supervised transfer can be used regardless if the phone system forwards calls or not.

Typically TransferConfirm is used in conjunction with the call screening option ("TransferScreening" column) enabled. This combination enables the subscriber to hear the name of the caller and then decide if they want to take the call or not. Default Value: false. Values can be:

  • false: Transfer confirm disabled
  • true: Transfer confirm enabled

Default value: false

TransferDtDetect Read/Write Boolean A flag indicating whether Cisco Unity Connection will check for dial tone before attempting to transfer the call. Requires a "TransferType" of supervised (1).

This is usually used for phone systems that do not have "positive disconnect" capabilities to avoid sending terminated calls to the operator console, for instance. Possible values can be:

  • false: Do not check for dial tone prior to transferring a call
  • true: Check for dial tone prior to transferring a call

Default value:false

TransferHoldingMode Read/Write Integer The action Cisco Unity Connection will take when the extension is busy.

Requires a TransferType column value = "Supervised" (1). Default Value: 0

TransferIntroduce Read/Write Boolean A flag indicating whether Cisco Unity Connection will say "call for <recorded name of the call handler>" when the subscriber answers the phone.

Requires a "TransferType" of supervised (1). This functionality is normally used when a single extension number is being shared by multiple subscribers or a scenario where the subscriber who is the message recipient takes calls for more than one dialed extension. The introduction alerts the subscriber who answers that the call is for the call handler. Default Value: false.

TransferRings Read/Write Integer The number of times the extension rings before Cisco Unity Connection considers it a "ring no answer" and plays the subscriber or handler greeting.

Requires a "TransferType" of supervised (1). The value of this column should never be less than 2 for a supervised transfer. The range can vary from 2 to 20. Default Value: 4

TransferScreening Read/Write Boolean A flag indicating whether Cisco Unity Connection will prompt callers to say their names. When the phone is answered, the subscriber hears "Call from…" before Cisco Unity Connection transfers the call.

Requires a "TransferType" of supervised (1). Normally this column is used along with "TransferConfirm" to allow the subscriber to screen calls. Values can be:

  • false: Call screening disabled
  • true: Ask and record caller name

Default Value: false

TransferType Read/Write Integer The type of call transfer Cisco Unity Connection will perform - supervised or unsupervised (also referred to as "Release to Switch" transfer).
  • Unsupervised transfer (also referred to as "Release to Switch" transfer) - Cisco Unity Connection puts the caller on hold, dials the extension, and releases the call to the phone system. When the line is busy or is not answered, the phone system (not Cisco Unity Connection) forwards the call to the subscriber or handler greeting. To use "Unsupervised" transfer, call forwarding must be enabled on the phone system.
  • Supervised transfer - Cisco Unity Connection acts as a receptionist, handling the transfer. If the line is busy or the call is not answered, Cisco Unity Connection (not the phone system) forwards the call to the subscriber or handler greeting. Supervised transfer can be used regardless if the phone system forwards calls or not.

Default value: 0

MediaSwitchObjectId Read Only String The unique identifier of the MediaSwitch object that Cisco Unity Connection uses for transferring the call to the subscriber phone.
PhoneSystemURI Read Only String Specifies the URI of the phone systems.
UsePrimaryExtension Read/Write Boolean If extension is null this will be set to 1 (true) to indicate we are using instead the DtmfAccessId for the owning handler or subscriber.

Possible Values:

  • false
  • true

Default value: true

Extension Read/Write Integer If an administrator using Cisco Unity Connection Administration chooses to transfer to the extension of a subscriber or call handler, Cisco Unity Connection will automatically enter the DtmfAccessId value pulled from the DtmfAccessId table for the call handler into this column.

Note- Digits, hash, comma, asterisk, plus are allowed.

PlayTransferprompt Read/Write Boolean A flag indicating whether the "Wait while I transfer your call" prompt should be played prior to transferring a call.

Values can be:

  • true – Play Transfer prompt is enabled.
  • false – Play transfer prompt is disabled.

Default Value: true

PersonalCallTransfer Read/Write Boolean A flag indicating whether or not Personal Call Transfer Rules are used for the specific Transfer Option.

Values can be:

  • false: Not enabled
  • true: Enabled

Default value: false

Enabled Read/Write Boolean Indicate whether the transfer option is enabled or not.To enable rule till particular end date TimeExpires should also be specified and to enable transfer rule with no end date, the TimeExpires field should be empty.

Possible value:

  • true: enabled
  • false: disabled

Default value: true This means transfer rules are enabled with no end date by default.

Rating: 0.0/5 (0 votes cast)

Personal tools