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

From DocWiki

Revision as of 16:53, 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


Directory Handler APIs

Directory handlers provide access to a corporate directory that callers can use to reach Cisco Unity Connection users with mailboxes. When a caller searches for a username or part of a name, a directory handler looks up the extension and routes the call to the appropriate user. Administrator can use this API to create/update/delete/fetch the directory handler. You can update various attributes of directory handler using this API.


Listing the Directory Handlers

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

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

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

<DirectoryHandlers total="1">
  <DirectoryHandler>
    <URI>/vmrest/handlers/directoryhandlers/16090424-1c38-4901-a465-3b76ffaf437a</URI>
    <CreationTime>2012-12-10T19:24:31Z</CreationTime>
    <Language>1033</Language>
    <DisplayName>System Directory Handler</DisplayName>
    <Undeletable>true</Undeletable>
    <VoiceName>b09bd14d-15ef-4100-b0f7-4ba2f0c15343.wav</VoiceName>
    <VoiceFileURI>/vmrest/voicefiles/b09bd14d-15ef-4100-b0f7-
    4ba2f0c15343.wav</VoiceFileURI>
    <VoiceNameURI>/vmrest/handlers/directoryhandlers/16090424-1c38-4901-a465-
    3b76ffaf437a/voicename</VoiceNameURI>
    <LocationObjectId>08b0402c-ba81-4f16-bcba-ca7883de0482</LocationObjectId>
    <LocationURI>/vmrest/locations/connectionlocations/08b0402c-ba81-4f16-bcba-
    ca7883de0482</LocationURI>
    <EndDialDelay>4</EndDialDelay>
    <MaxMatches>8</MaxMatches>
    <MenuStyle>true</MenuStyle>
    <SayExtension>true</SayExtension>
    <SearchByFirstName>false</SearchByFirstName>
    <StartDialDelay>5</StartDialDelay>
    <Tries>1</Tries>
    <UseStarToExit>true</UseStarToExit>
    <SearchScope>0</SearchScope>
    <SearchScopeObjectId>08b0402c-ba81-4f16-bcba-ca7883de0482</SearchScopeObjectId>
    <PlayAllNames>false</PlayAllNames>
    <ExitAction>2</ExitAction>
    <ExitTargetConversation>PHTransfer</ExitTargetConversation>
    <ExitTargetHandlerObjectId>04786933-dd71-45e1-b2fb-
    1a5dd99503f6</ExitTargetHandlerObjectId>
    <NoInputAction>2</NoInputAction>
    <NoInputTargetConversation>PHTransfer</NoInputTargetConversation>
    <NoInputTargetHandlerObjectId>f8bac9c4-62a2-4744-a9e6-74ac90fb87fd</NoInputTargetHandlerObjectId>
    <NoSelectionAction>2</NoSelectionAction>
    <NoSelectionTargetConversation>PHTransfer</NoSelectionTargetConversation>
    <NoSelectionTargetHandlerObjectId>f8bac9c4-62a2-4744-a9e6-
    74ac90fb87fd</NoSelectionTargetHandlerObjectId>
    <ZeroAction>2</ZeroAction>
    <ZeroTargetConversation>PHTransfer</ZeroTargetConversation>
    <ZeroTargetHandlerObjectId>b6cd5cfd-312c-4eb0-96ea-
    57531fa9058d</ZeroTargetHandlerObjectId>
    <AutoRoute>false</AutoRoute>
    <ObjectId>16090424-1c38-4901-a465-3b76ffaf437a</ObjectId>
    <DtmfAccessId>555</DtmfAccessId>
    <ScopeObjectLocationObjectId>08b0402c-ba81-4f16-bcba-
    ca7883de0482</ScopeObjectLocationObjectId>
    <ScopeObjectLocationURI>/vmrest/locations/connectionlocations/08b0402c-ba81-4f16-bcba-
    ca7883de0482</ScopeObjectLocationURI>
    <VoiceEnabled>false</VoiceEnabled>
    <UseCallLanguage>true</UseCallLanguage>
    <UseDefaultLanguage>true</UseDefaultLanguage>
    <PartitionObjectId>ff1c9ff2-6fcc-47e9-a4e0-a220c6e3ae4e</PartitionObjectId>
    <PartitionURI>/vmrest/partitions/ff1c9ff2-6fcc-47e9-a4e0-a220c6e3ae4e</PartitionURI>
    <SpeechConfidenceThreshold>10</SpeechConfidenceThreshold>
    <SayCity>false</SayCity>
    <SayDepartment>false</SayDepartment>
  </DirectoryHandler>
</DirectoryHandlers>
Response Code: 200

JSON Example

To list of directory handlers, do the following:

GET https://<connection-server>/vmrest/handlers/directoryhandlers
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": "1",
  "DirectoryHandler": [
  {
    "URI": "/vmrest/handlers/directoryhandlers/36408c02-4b25-4549-b3a4-deafa5945339",
    "CreationTime": "2013-02-08T04:59:36Z",
    "Language": "1033",
    "DisplayName": "System Directory Handler",
    "Undeletable": "true",
    "VoiceName": "41a5ba0d-5267-40d8-aa2c-dd1f61046f7c.wav",
    "VoiceFileURI": "/vmrest/voicefiles/41a5ba0d-5267-40d8-aa2c-dd1f61046f7c.wav",
    "VoiceNameURI": "/vmrest/handlers/directoryhandlers/36408c02-4b25-4549-b3a4-
    deafa5945339/voicename",
    "LocationObjectId": "df46033e-0058-4f7e-b5fc-8346df0ffee1",
    "LocationURI": "/vmrest/locations/connectionlocations/df46033e-0058-4f7e-b5fc-
    8346df0ffee1",
    "EndDialDelay": "4",
    "MaxMatches": "8",
    "MenuStyle": "true",
    "SayExtension": "true",
    "SearchByFirstName": "false",
    "StartDialDelay": "5",
    "Tries": "1",
    "UseStarToExit": "true",
    "SearchScope": "0",
    "SearchScopeObjectId": "df46033e-0058-4f7e-b5fc-8346df0ffee1",
    "PlayAllNames": "false",
    "ExitAction": "2",
    "ExitTargetConversation": "PHTransfer",
    "ExitTargetHandlerObjectId": "e6fd6ae4-7bf5-4a46-b994-e9fd13d83c30",
    "NoInputAction": "2",
    "NoInputTargetConversation": "PHTransfer",
    "NoInputTargetHandlerObjectId": "d4d920f6-d7d4-4a3e-8876-21917480867f",
    "NoSelectionAction": "2",
    "NoSelectionTargetConversation": "PHTransfer",
    "NoSelectionTargetHandlerObjectId": "d4d920f6-d7d4-4a3e-8876-21917480867f",
    "ZeroAction": "2",
    "ZeroTargetConversation": "PHTransfer",
    "ZeroTargetHandlerObjectId": "b45f1e23-ce6d-4406-a9b2-48c647094a77",
    "AutoRoute": "false",
    "ObjectId": "36408c02-4b25-4549-b3a4-deafa5945339",
    "DtmfAccessId": "555",
    "ScopeObjectLocationObjectId": "df46033e-0058-4f7e-b5fc-8346df0ffee1",
    "ScopeObjectLocationURI": "/vmrest/locations/connectionlocations/df46033e-0058-
    4f7e-b5fc-8346df0ffee1",
    "VoiceEnabled": "false",
    "UseCallLanguage": "true",
    "UseDefaultLanguage": "true",
    "PartitionObjectId": "92ef3894-5bf0-430c-a1f1-4ef67925aecf",
    "PartitionURI": "/vmrest/partitions/92ef3894-5bf0-430c-a1f1-4ef67925aecf",
    "SpeechConfidenceThreshold": "10",
    "SayCity": "false",
    "SayDepartment": "false",
    "UseCustomGreeting": "false",
    "ExitConversationURI": 
    "/vmrest/conversations?query=(cnvdirectoryhandlerexit%20is%201)",
    "NoInputConversationURI":
    "/vmrest/conversations?query=(cnvdirectoryhandlernoinput%20is%201)",
    "NoSelectionConversationURI":
    "/vmrest/conversations?query=(cnvdirectoryhandlernoselection%20is%201)",
    "ZeroExitConversationURI": 
    "/vmrest/conversations?query=(cnvdirectoryhandlerzeroexit%20is%201)",
    "DirectoryHandlerStreamFileURI": 
    "/vmrest/handlers/directoryhandlers/36408c02-4b25-4549-b3a4-deafa5945339/directoryhandlerstreamfiles"
  }
  ]
}
Response Code: 200


Viewing the Specific Directory Handler

The following is an example of the GET request that lists the details of specific directory handler represented by the provided value of directory handler ID:

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

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

<DirectoryHandler>
    <URI>/vmrest/handlers/directoryhandlers/16090424-1c38-4901-a465-3b76ffaf437a</URI>
    <CreationTime>2012-12-10T19:24:31Z</CreationTime>
    <Language>1033</Language>
    <DisplayName>System Directory Handler</DisplayName>
    <Undeletable>true</Undeletable>
    <VoiceName>b09bd14d-15ef-4100-b0f7-4ba2f0c15343.wav</VoiceName>
    <VoiceFileURI>/vmrest/voicefiles/b09bd14d-15ef-4100-b0f7-4ba2f0c15343.wav</VoiceFileURI>
    <VoiceNameURI>/vmrest/handlers/directoryhandlers/16090424-1c38-4901-a465-
    3b76ffaf437a/voicename</VoiceNameURI>
    <LocationObjectId>08b0402c-ba81-4f16-bcba-ca7883de0482</LocationObjectId>
    <LocationURI>/vmrest/locations/connectionlocations/08b0402c-ba81-4f16-bcba-
    ca7883de0482</LocationURI>
    <EndDialDelay>4</EndDialDelay>
    <MaxMatches>8</MaxMatches>
    <MenuStyle>true</MenuStyle>
    <SayExtension>true</SayExtension>
    <SearchByFirstName>false</SearchByFirstName>
    <StartDialDelay>5</StartDialDelay>
    <Tries>1</Tries>
    <UseStarToExit>true</UseStarToExit>
    <SearchScope>0</SearchScope>
    <SearchScopeObjectId>08b0402c-ba81-4f16-bcba-ca7883de0482</SearchScopeObjectId>
    <PlayAllNames>false</PlayAllNames>
    <ExitAction>2</ExitAction>
    <ExitTargetConversation>PHTransfer</ExitTargetConversation>
    <ExitTargetHandlerObjectId>04786933-dd71-45e1-b2fb-
    1a5dd99503f6</ExitTargetHandlerObjectId>
    <NoInputAction>2</NoInputAction>
    <NoInputTargetConversation>PHTransfer</NoInputTargetConversation>
    <NoInputTargetHandlerObjectId>f8bac9c4-62a2-4744-a9e6-74ac90fb87fd</NoInputTargetHandlerObjectId>
    <NoSelectionAction>2</NoSelectionAction>
    <NoSelectionTargetConversation>PHTransfer</NoSelectionTargetConversation>
    <NoSelectionTargetHandlerObjectId>f8bac9c4-62a2-4744-a9e6-
    74ac90fb87fd</NoSelectionTargetHandlerObjectId>
    <ZeroAction>2</ZeroAction>
    <ZeroTargetConversation>PHTransfer</ZeroTargetConversation>
    <ZeroTargetHandlerObjectId>b6cd5cfd-312c-4eb0-96ea-
    57531fa9058d</ZeroTargetHandlerObjectId>
    <AutoRoute>false</AutoRoute>
    <ObjectId>16090424-1c38-4901-a465-3b76ffaf437a</ObjectId>
    <DtmfAccessId>555</DtmfAccessId>
    <ScopeObjectLocationObjectId>08b0402c-ba81-4f16-bcba-ca7883de0482</ScopeObjectLocationObjectId>
    <ScopeObjectLocationURI>/vmrest/locations/connectionlocations/08b0402c-ba81-4f16-bcba-
    ca7883de0482</ScopeObjectLocationURI>
    <VoiceEnabled>false</VoiceEnabled>
    <UseCallLanguage>true</UseCallLanguage>
    <UseDefaultLanguage>true</UseDefaultLanguage>
    <PartitionObjectId>ff1c9ff2-6fcc-47e9-a4e0-a220c6e3ae4e</PartitionObjectId>
    <PartitionURI>/vmrest/partitions/ff1c9ff2-6fcc-47e9-a4e0-a220c6e3ae4e</PartitionURI>
    <SpeechConfidenceThreshold>10</SpeechConfidenceThreshold>
    <SayCity>false</SayCity>
    <SayDepartment>false</SayDepartment>
</DirectoryHandler> 
Response Code: 200

JSON Example

To list details of a particular directory handler, do the following:

GET https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
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/handlers/directoryhandlers/36408c02-4b25-4549-b3a4-deafa5945339",
    "CreationTime": "2013-02-08T04:59:36Z",
    "Language": "1033",
    "DisplayName": "System Directory Handler",
    "Undeletable": "true",
    "VoiceName": "41a5ba0d-5267-40d8-aa2c-dd1f61046f7c.wav",
    "VoiceFileURI": "/vmrest/voicefiles/41a5ba0d-5267-40d8-aa2c-dd1f61046f7c.wav",
    "VoiceNameURI": "/vmrest/handlers/directoryhandlers/36408c02-4b25-4549-b3a4-
    deafa5945339/voicename",
    "LocationObjectId": "df46033e-0058-4f7e-b5fc-8346df0ffee1",
    "LocationURI": "/vmrest/locations/connectionlocations/df46033e-0058-4f7e-b5fc-
    8346df0ffee1",
    "EndDialDelay": "4",
    "MaxMatches": "8",
    "MenuStyle": "true",
    "SayExtension": "true",
    "SearchByFirstName": "false",
    "StartDialDelay": "5",
    "Tries": "1",
    "UseStarToExit": "true",
    "SearchScope": "0",
    "SearchScopeObjectId": "df46033e-0058-4f7e-b5fc-8346df0ffee1",
    "PlayAllNames": "false",
    "ExitAction": "2",
    "ExitTargetConversation": "PHTransfer",
    "ExitTargetHandlerObjectId": "e6fd6ae4-7bf5-4a46-b994-e9fd13d83c30",
    "NoInputAction": "2",
    "NoInputTargetConversation": "PHTransfer",
    "NoInputTargetHandlerObjectId": "d4d920f6-d7d4-4a3e-8876-21917480867f",
    "NoSelectionAction": "2",
    "NoSelectionTargetConversation": "PHTransfer",
    "NoSelectionTargetHandlerObjectId": "d4d920f6-d7d4-4a3e-8876-21917480867f",
    "ZeroAction": "2",
    "ZeroTargetConversation": "PHTransfer",
    "ZeroTargetHandlerObjectId": "b45f1e23-ce6d-4406-a9b2-48c647094a77",
    "AutoRoute": "false",
    "ObjectId": "36408c02-4b25-4549-b3a4-deafa5945339",
    "DtmfAccessId": "555",
    "ScopeObjectLocationObjectId": "df46033e-0058-4f7e-b5fc-8346df0ffee1",
    "ScopeObjectLocationURI": "/vmrest/locations/connectionlocations/df46033e-0058-
    4f7e-b5fc-8346df0ffee1",
    "VoiceEnabled": "false",
    "UseCallLanguage": "true",
    "UseDefaultLanguage": "true",
    "PartitionObjectId": "92ef3894-5bf0-430c-a1f1-4ef67925aecf",
    "PartitionURI": "/vmrest/partitions/92ef3894-5bf0-430c-a1f1-4ef67925aecf",
    "SpeechConfidenceThreshold": "10",
    "SayCity": "false",
    "SayDepartment": "false",
    "UseCustomGreeting": "false",
    "ExitConversationURI": 
    "/vmrest/conversations?query=(cnvdirectoryhandlerexit%20is%201)",
    "NoInputConversationURI": 
    "/vmrest/conversations?query=(cnvdirectoryhandlernoinput%20is%201)",
    "NoSelectionConversationURI": 
    "/vmrest/conversations?query=(cnvdirectoryhandlernoselection%20is%201)",
    "ZeroExitConversationURI": "/vmrest/conversations?query=(cnvdirectoryhandlerzeroexit%20is%201)",
    "DirectoryHandlerStreamFileURI": 
    "/vmrest/handlers/directoryhandlers/36408c02-4b25-4549-b3a4-deafa5945339/directoryhandlerstreamfiles"
}
Response Code: 200


Creating a Directory Handler

The following is an example of the POST request that creates a new directory handler:

  POST https://<connection-server>/vmrest/handlers/directoryhandlers

Request Body:
<DirectoryHandler>
    <DisplayName>Taxoma_Directory Handler</DisplayName>
</DirectoryHandler>

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

Response Code: 201
/vmrest/handlers/directoryhandlers/16090424-1c38-4901-a465-3b76ffaf437a

JSON Example

To create a new directory handler, do the following:

POST https://<connection-server>/vmrest/handlers/directoryhandlers
Accept: application/json
Content-Type: application/json
Connection: keep-alive

Request Body:
{
    "DisplayName": "Texoma123_Directory Handler"
}

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

Response Code: 201
/vmrest/handlers/directoryhandlers/16090424-1c38-4901-a465-3b76ffaf437a


Delete the Directory Handler

This request can be used to delete a directory handler.

DELETE https://<connection-server>/vmrest/directory handler/<directoryHandlerObjectId>

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

Response Code: 204

JSON Example

To delete the directory handler, do the following:

DELETE https://<connection-server>/vmrest/directory handler/<directoryHandlerObjectId>
Accept: application/json
Connection: keep-alive

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

Response Code: 204


Updating the Search Scope of the Directory Handler

The following is an example of the PUT request that can be used to modify the search scope of the directory handler. In the request body, the search scope value corresponds to the type of search scope and search scope object ID represents the objectid corresponding to the search scope value. For Example Value for COS as search scope is 5 and search scope object ID should be COS.

  PUT https://<connection-server>/vmrest/directory handler /<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <SearchScope>5</SearchScope>
    <SearchScopeObjectId>03815b4e-3b88-48b3-918d-91a9d1673880</SearchScopeObjectId>
</DirectoryHandler>

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

The table given below lists the possible values of the search scope:

Name Value Description
VMS 0 VMS - directory handler search restricted to the local VMS.
DialingDomain 1 Dialing domain - directory handler search restricted to a dialing domain.
Global 2 Global - directory handler search expanded to the entire Unity organization (global).
Location 3 Location - directory handler search restricted to a Unity location.
DistributionList 4 Distribution list - directory handler search is restricted to a distribution list.
COS 5 COS - directory handler search restricted to a class of service.
SearchSpace 6 SearchSpace - directory handler search restricted to a search space.
Inherit 7 Inherit - directory handler search is restricted to the search space of the call.
Invalid 8 Invalid - directory handler search scope is no longer valid; used by the replicator.

You can set the search scope of a directory handler by defining only search scope and search scope object ID. The search scope object Id can have these references, COS object Id, location object Id, distribution list, and search space object ID.

Example 1: Update the Search Scope of a Directory Handler to a Class of Service

To update the search scope of a directory handler to a class of service, you must obtain the COS object ID.

GET https://<connection-server>/vmrest/coses

The following is an example of the PUT request to update the directory handler to COS object ID:

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <SearchScope>5</SearchScope>
    <SearchScopeObjectId>03815b4e-3b88-48b3-918d-91a9d1673880</SearchScopeObjectId>
</DirectoryHandler>
Response Code: 204

Example 2: Update the Search Scope of a Directory Handler to Entire Server

To update the search scope of a directory handler to entire server, you must obtain the location of the object id of the connection server:

GET https://<connection-server>/vmrest/locations/connectionlocations

The following is an example of the PUT request to update the directory handler to entire server:

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <SearchScope>0</SearchScope>
    <SearchScopeObjectId>08b0402c-ba81-4f16-bcba-ca7883de0482</SearchScopeObjectId>
</DirectoryHandler>
Response Code: 204

Example 3: Update the Search Scope of a Directory Handler to Inherit Search Scope from Call

The following is an example of the PUT request to update the search scope of directory handler to inherit search scope from call:

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <SearchScope>7</SearchScope>
</DirectoryHandler>
Response Code: 204

Example 4: Update the Search Scope of a Directory Handler to a Distribution List

The following is an example of the PUT request to update the search scope of directory handler to a distribution list:

PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <SearchScope>4</SearchScope>
    <SearchScopeObjectId>0995fc34-6791-4d9a-b20f-52c8dadd65b5</SearchScopeObjectId>
</DirectoryHandler>
Response Code: 204

Example 5: Update the Search Scope of a Directory Handler to a Search Space

To update the search scope of a directory handler to a search space, you must obtain the object ID of the search scope using the following URL:

GET https://<connection-server>/vmrest/searchspaces

The following is an example of the PUT request to update the search scope of directory handler to a search space:

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <SearchScope>6</SearchScope>
    <SearchScopeObjectId>1cdaa964-0514-4364-ad74-e55364efb4b4</SearchScopeObjectId>
</DirectoryHandler>
Response Code: 204

JSON Example

To update the search scope of a directory handler to a search space, do the following:

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
    "SearchScope":"6",
    "SearchScopeObjectId":"1cdaa964-0514-4364-ad74-e55364efb4b4"
}

The following is an example of the PUT request to update the search scope of directory handler to a search space:

Response Code: 204


Updating the Exit Action on a directory handler

You can update the exit action, no input action, no selection action and action when caller presses zero on a directory handler. To specify the destination when a caller exits the directory handler using the * key/ or # key, the following fields are used to specify the destination:

  • ExitAction
  • ExitTargetConversation
  • ExitTargetHandlerObjectId

In a scenario where caller does not respond to the name entry prompt, the following fields are used to specify the destination the fields:

  • NoInputAction
  • NoInputTargetConversation
  • NoInputTargethandlerObjectId

In another scenario where caller does not respond to the name entry prompt the fields, the following fields are used to specify the destination the fields:

  • NoSelectionAction
  • NoSelectionTargetConversation
  • NoSelectionTargetHandlerObjectId

If callers press the zero key, the following fields are used to specify the destination the fields:

  • ZeroAction
  • ZeroTargetConversation
  • ZeroTargetHandlerObjectId

The following are the URLs to fetch the call handlers, directory handlers, and interview handlers:

  • Call Handlers: /vmrest/handlers/callhandlers
  • Directory Handlers: /vmrest/handlers/directoryhandlers
  • InterviewHandler : /vmrest/handlers/interviewhandlers

The following sections give some examples of how to specify different types of destinations by using these fields when caller exits the directory handler.

Example 1: Call should hang up on exit action.

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <ExitAction>1</ExitAction>
</DirectoryHandler>
Response Code: 204

Example 2: Call should be sent to a call handler or a user greeting

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <ExitAction>2</ExitAction>
    <ExitTargetConversation>PHGreeting</ExitTargetConversation>
    <ExitTargetHandlerObjectId>5f8b4a28-8042-4cce-a11c-
    0222f106f79f</ExitTargetHandlerObjectId>
</DirectoryHandler>
Response Code: 204

JSON Example

To update the directory handler, do the following:

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
    "ExitAction": "2",
    "ExitTargetConversation": "PHGreeting",
    "ExitTargetHandlerObjectId": "e6fd6ae4-7bf5-4a46-b994-e9fd13d83c30"
}

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 3: Call should be transferred to a call handler or user

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <ExitAction>2</ExitAction>
    <ExitTargetConversation>PHTransfer</ExitTargetConversation>
    <ExitTargetHandlerObjectId>5f8b4a28-8042-4cce-a11c-
    0222f106f79f</ExitTargetHandlerObjectId>
</DirectoryHandler>
Response Code: 204

Example 4: Call should be sent to a conversation

Request URI: 
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <ExitAction>2</ExitAction>
    <ExitTargetConversation>SystemTransfer</ExitTargetConversation>
</DirectoryHandler>
Response Code: 204

Note: The fields for that needs to be sent as input are Exit Action and ExitTargetConversation.

Example 5: Call should be sent to an Interview Handler

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <ExitAction>2</ExitAction>
    <ExitTargetConversation>PHInterview</ExitTargetConversation>
    <ExitTargetHandlerObjectId>1ff9ef5e-1b97-4f3f-a30d-
    48aef7733d7f</ExitTargetHandlerObjectId>
</DirectoryHandler>
Response Code: 204

Example 6: Call should be sent to a Directory Handler.

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body: 
<DirectoryHandler>
    <ExitAction>2</ExitAction>
    <ExitTargetConversation>AD</ExitTargetConversation>
    <ExitTargetHandlerObjectId>249056ed-5954-493d-9d87-
    aec9cedafe25</ExitTargetHandlerObjectId>
</DirectoryHandler>
Response Code: 204


Setting Voice Enable to true for a Directory Handler

Voice enabled directory handlers cannot use a class of service or a distribution list as per their search scope. Only entire server, a specific search space, or Inherit search space from call are allowed.

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Request Body:
<DirectoryHandler>
    <VoiceEnabled>true</VoiceEnabled>
</DirectoryHandler>
Response Code: 204

JSON Example

To update the voice enable, do the following:

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
{
    "VoiceEnabled":"true"
 }

The following is an example of the PUT request to update the search scope of directory handler to a search space:

Response Code: 204

NOTE:

  • If a request is sent to enable the voiceenabled field and set the search scope to a COS or distribution list, the search scope is set to entire server.
  • If the search scope of a directory handler is already a COS or a distribution list and request is sent to set the voiceenabled to true, the search scope is set to entire server.


Updating the Language of Directory Handler

This request can be used to update a language for a directory handler. It can be used to set a particular language for a directory handler, set the system default language as the language of directory handler or set the language of directory handler as inherit from call.

URI to get Language code: https://<connection-server>/vmrest/languagemap
URI to Get Language code for installed languages: https://<connection-server>/vmrest/installedlanguages

The below table specify the details of value for each field:

UseCallLanguage UseDefaultLanguage Language Description
false true Null/Language Code This will select the default language.
true true/false Null/Language Code This will inherit the language from user.
false false Language Code This will select the particular language as per the code.
Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectid>

Example 1: Updating the Inherit Language field and not the Language field

Request Body:
<Directoryhandler>
    <UseCallLanguage>true</UseCallLanguage>
    <UseDefaultLanguage>false</UseDefaultLanguage>
</Directoryhandler>
Response Code: 204

The Inherit Language field from the call is selected but the UseDefaultLanguage field will not get updated in the database as the Language field is missing. If the Language field is NULL, the UseDefaultLanguage field is by default set to TRUE.

Example 2: Updating the Inherit Language field and the Language field

Request Body:
<Directoryhandler>
    <UseCallLanguage>true</UseCallLanguage>
    <UseDefaultLanguage>false</UseDefaultLanguage>
<Language>1033</Language>
</Directoryhandler>
Response Code: 204

The Inherit Language field from the call is selected but the UseDefaultLanguage field is updated in the database as the Language field is specified.

JSON Example

To change language, do the following:

Request URI:
PUT https://<connection-server>/vmrest/handlers/directoryhandlers/<directoryHandlerObjectId>
Accept: application/json
Content-Type: application/json
Connection: keep-alive
Request Body:
{
    "UseCallLanguage":"true",
    "UseDefaultLanguage":"false",
    "Language":"1033"
}

The following is an example of the PUT request to update the search scope of directory handler to a search space:

Response Code: 204


Explanation of Data Fields

Parameter Operations Data Type Comments
Language Read/Write Integer Specifies the language code.

All possible language code values can be fetched using https://<connection server>/vmrest/languagemap.

Display Name Read/Write String(64) The display name of Directory Handler
Undeletable Read/Write Boolean Shows whether the Directory Handler can be deleted or not.

Values:

  • false: The handler can be deleted by an administrator.
  • true: The handler cannot be deleted by an administrator.

Default value: false

VoiceName Read/Write String(40) Specifies the .wav file which is the recorded name.
VoiceFileURI Read Only String Specifies the URI of the voice file.
VoiceNameURI Read Only String Specifies the URI of voice names.
LocationObjectId Read Only String(36) The unique identifier of the location object to which this handler belongs. Location, e.g. "Seattle Office."
LocationURI Read Only String Specifies the URI of location.
LocationURI Read Only String Specifies the URI of location.
EndDialDelay Read/Write Integer The amount of time (in seconds) that Cisco Unity Connection waits after caller input before performing the action indicated by the input.

Value can be in the range 1-10. Default Value: 4.

MaxMatches Read/Write Integer The number of matches that if exceeded, will result in Cisco Unity Connection prompting the caller to dial more letters.

Value can be in the range 1-30. Default value: 8.

MenuStyle Read/Write Boolean A flag indicating how Cisco Unity Connection presents directory matches to callers - either in "menu choice" or "extension list" format.

Note: MenuStyle cannot be set to false for the System Default Directory Handler. Possible values can be:

  • true : menu choice
  • false : extension list.

Default value: true.

SayExtension Read/Write Boolean A flag indicating whether Cisco Unity Connection provides a menu of subscriber names including extensions, or just subscriber names.

Possible values can be:

  • false: Play only subscriber names in menu list.
  • true: Play subscriber names and extensions in menu list.

Default value : true

SearchByFirstName Read/Write Boolean A flag indicating whether a directory handler searches for subscribers by using first name first, or last name first.

Values:

  • false: Search by last name, then first name.
  • true: Search by first name, then last name.

Default value: false.

StartDialDelay Read/Write Integer The amount of time (in seconds) that Cisco Unity Connection waits for the caller to start dialing.

Default value: 5. Value can be in the range 1-10.

Tries Read/Write Integer The number of times Cisco Unity Connection will reprompt the caller for input, e.g. dial name.

Default value : 1. Value can be in the range 0-10.

UseStarToExit Read/Write Boolean A flag indicating the key on the phone to use for "exit the directory."

Values:

  • true: Use star ("*") key to exit directory handler.
  • false: Use pound/hash ("#") key to exit directory handler.

Default value: true.

SearchScope Read/Write Integer The scope of the directory that Cisco Unity Connection will search.

Default value: 0( search scope set as entire server). Possible values : Refer to the SearchScope section under the Enumeration Type as given at the end of the document

SearchScopeObjectId Read/Write String(36) ObjectId of the Search Scope type set. For example : For Class of Service it will be Class Of Service Object ID.
ScopeObjectCosObjectId Read Only String(36) Represents a Class of Service(COS) .Only users with this COS will be included in the directory handler.
ScopeObjectDistributionListObjectId Read Only String(36) Represents a Distribution List. Only users who are members of this distribution list will be included in the directory handler.
ScopeObjectLocationObjectId Read Only String(36) Represents a Cisco Unity Connection Location .Only those users assigned to this location will be included in the directory handler.
ScopeObjectSearchSpaceObjectId Read Only String(36) Represents a Search Space .The unique identifier of the search space which can act as filter for the directory handler.
PlayAllNames Read/Write Boolean A flag indicating whether Cisco Unity Connection plays the names of subscribers in the directory for caller selection, rather than requiring the caller to search by spelled name.

Default value: false.

ExitAction Read/Write Integer Specifies the exit action. Default Value is 2.

Possible Values: Refer to the section Enumeration Type at the end of the document.

ExitTargetConversation Read/Write String(64) Specifies the conversation to go to upon exit. Default value is "PHTransfer". Possible Values:

Refer to the section Enumeration Type at the end of the document.

ExitTargetHandlerObjectId Read/Write String(36) The Unique Identifier of the call action object that Cisco Unity Connection performs if the caller exits the directory handler.
NoInputAction Read/Write Integer Specifies the action to be performed if there is no caller Input.

Default Value: 2. Possible Values: Refer to the section Enumeration Type at the end of the document.

NoInputTargetConversation Read/Write String(64) Specifies the conversation to go when caller gives no Input. Default value is "PHTransfer".

Refer to the section Enumeration Type at the end of the document.

NoInputTargetHandlerObjectId Read/Write String(36) The unique identifier of the CallAction object that Cisco Unity Connection performs (or the destination to which calls are sent) if the caller does not enter a name or by not responding to prompts.
NoSelectionAction Read/Write Integer Specifies the action to be performed when caller does not select anything. Default Value: 2.

Possible Values: Refer to the section Enumeration Type at the end of the document.

NoSelectionTargetConversation Read/Write String(64) Specifies the conversation to go when caller does not select anything.Default value is "PHTransfer" .

Refer to the section Enumeration Type at the end of the document.

NoSelectionTargetHandlerObjectId Read/Write String(36) The unique identifier of the CallAction object that Cisco Unity Connection performs (or the destination to which the caller is sent to) if the caller makes no selection from a list of matches.
ZeroAction Read/Write Integer Specifies the action to be performed for caller input ‘0’.

Default Value: 2 Possible Values: Refer to the section Enumeration Type at the end of the document.

ZeroTargetConversation Read/Write String(64) Specifies the conversation when caller presses 0. Default value is "PHTransfer".

Refer to the section Enumeration Type at the end of the document.

ZeroTargetHandlerObjectId Read/Write String(36) The unique identifier of the CallAction object that Cisco Unity Connection performs if caller presses zero ("0") key during menu style list of names.
AutoRoute Read/Write Boolean Represents how the call should be routed once the matches are found in the Directory.

Default value: false. Values:

  • false: Presents a list of matches, even if only one, and prompts the user to verify the match.
  • true: Automatically routes a call to the extension assigned to the subscriber on a unique match without prompting the caller to verify the match.
ObjectId Read Only String(36) Object Id of the directory handler
DtmfAccessId Read/Write String(40) Extension of the Directory handler
VoiceEnabled Read/Write Boolean A flag indicating whether the directory handler will use voice based addressing rather than touchtones.

Default value: false. Values:

  • false: Use touchtones
  • true: Use voice commands
UseCallLanguage Read/Write Boolean Specifies if the language as inherited from the call is to be used. Default value is true.
UseDefaultLanguage Read/Write Boolean Specifies if the system default language has to be used. Default value is true.
PartitionObjectId Read/Write String(36) Object Id of the partition the directory handler belongs to
PartitionURI Read Only String URI of partitions
SpeechConfidenceThreshold Read/Write Integer When the engine matches a spoken phrase, it associates a confidence level with that conclusion. This parameter determines what confidence level should be considered a successful match.

Default Value is 10. Range of Value is 0 -100

SayCity Read/Write Boolean A flag indicating if the user's city is voiced when a match is voiced.

Default value is false.

SayDepartment Read/Write Boolean A flag indicating if the user's department is voiced when a match is voiced.

Default value is false.

UseCustomGreeting Read/Write Boolean Indicates whether to use the directory handler's custom greeting or the system prompt.

Default value is false.

CreationTime Read Only datetime Specifies the creation time of the directory handlers.
ExitConversationURI Read Only String Specifies the URI to fetch the conversation values which can be used as the ExitConversation.
NoInputConversationURI Read Only String Specifies the URI to fetch the conversation values which can be used as the NoInputConversation.
NoSelectionConversationURI Read Only String Specifies the URI to fetch the conversation values which can be used as the NoSelectionConversation.
ZeroExitConversationURI Read Only String Specifies the URI to fetch the conversation values which can be used as the ZeroExitConversation
DirectoryHandlerStreamFileURI Read Only String Specifies the URI for the Directory Handler Stream files which are used as the greeting for the Directory Handler.

Enumeration Types

Call Actions

The table given below lists the possible values of the call actions:

Name Value Description
Ignore 0 Ignore - no action taken.
Hangup 1 Hangup - the call is immediately terminated.
Goto 2 Goto - go to an object such as a call handler, directory handler or interview handler.
Error 3 Error - play the error greeting.
TakeMsg 4 Take a message.
SkipGreeting 5 Skip greeting.
RestartGreeting 6 RestartGreeting - restart greeting on current handler
TransferAltContact 7 Transfer to Alternate Contact Number
RouteFromNextRule 8 Route From Next Call Routing Rule

SearchScope

The table given below lists the possible values of the searchscope:

Name Value Description
VMS 0 VMS - directory handler search restricted to the local VMS.
DialingDomain 1 Dialing domain - directory handler search restricted to a dialing domain.
Global 2 Global - directory handler search expanded to the entire Unity organization (global).
Location 3 Location - directory handler search restricted to a Unity location.
DistributionList 4 Distribution list - directory handler search is restricted to a distribution list.
COS 5 COS - directory handler search restricted to a class of service.
SearchSpace 6 SearchSpace - directory handler search restricted to a search space.
Inherit 7 Inherit - directory handler search is restricted to the search space of the call.
Invalid 8 Invalid - directory handler search scope is no longer valid; used by the replicator.


ExitConversation/ NoInputConversation/ NoSelectionConversation/ ZeroConversation

They are Read/Write, and can take the following values. Although it is not an enumeration type, only certain string values are valid Conversation names. For some Conversations, it is required to specify their respective TargetHandlerObjectIds as well (ExitTargetHandlerObjectid, NoInputTargetHandlerObjectId, NoSelectionTargethandlerObjectId, ZeroTargetHandlerObjectId).

Value Target Handler Description
AD Directory Handler Directory Conversation
PHTransfer User or Call Handler Transfer to a User or Call Handler
PHGreeting User or Call Handler Play Greeting of a User or Call Handler
PHInterview Interview Handler Interview Conversation
Attempt Forward NA Forwards the call to the User's Greeting if the Forwarding Number matches a User
Attempt SignIn NA Sends the call to a User's Sign-in if the Calling Number matches a User
BroadcastMessageAdministrator NA Sends the call to a Conversation for Sending Broadcast Messages
SystemTransfer NA Sends the call to a Conversation allowing the caller to transfer to a number they specify (assuming the restriction table allows it)
CheckedOutGuest NA Sends the call to a Conversation for checked-out hotel guests
GreetingsAdministrator NA Sends the call to a Conversation allowing changing greetings by phone
ReverseTrapConv NA Connects to Visual Voicemail
SubSignIn NA Sends the call to the Sign-In Conversation, which prompts the user to enter their ID
ConvUtilsLiveRecord NA Sends the call to the Live-Record pilot number configured on CUCM
SubSysTransfer NA Similar to SystemTransfer, but requires users sign-in first (so unknown callers cannot use it)

Rating: 0.0/5 (0 votes cast)

Personal tools