Cisco Unity Connection Provisioning Interface (CUPI) API -- Assigning a Schedule to a Call Handler
Introduction
In order to assign a schedule to a call handler, such as the Opening Greeting Call Handler, an administrator should first create a ScheduleSet and its supporting objects, and then change the Call Handler to point to that new ScheduleSet.
Creating a Schedule
Schedules are relatively complicated objects in Cisco Unity Connection. They are comprised of 4 different types of objects, and the top level object is called a ScheduleSet. For a more detailed explanation of how the schedules work in Unity Connection, check Schedules Overview
When a schedule has been created, the administrator will need the ScheduleSet's ObjectId in order to associate it with a call handler.
Associating a ScheduleSet with a Call Handler
Retrieving the List of Call Handlers
In order to retrieve the list of call handlers, an administrator makes a GET request to the call handler resource:
|
This will return a list of all call handlers on the system. A portion of that list is shown here:
|
Selecting the Call Handler
From the list of call handlers obtained by doing the previous step, the administrator should choose one, usually based on DisplayName. In program code, this can be done by loading the returned XML document into an XML parser, and then finding the node with the requested DisplayName.
In this example, let's choose the Opening Greeting Call Handler, meaning the call handler with the DisplayName "Opening Greeting." The URI field tells the administrator which URI to use in order to retrieve, modify, or delete the call handler. In this example, the URI is /vmrest/handlers/callhandlers/03991ce8-0eaa-40cc-86a9-c0c88d9066ad.
Modifying the Call Handler
In order the change the schedule associated with a call handler, the administrator makes a PUT to the call handler resource, requesting a modification to the ScheduleSetObjectId field. Let's say that 9dd6c1d5-249e-4715-8953-396ce2f26314 is the ObjectId for the ScheduleSet that the administrator created earlier.
|
At this point, the call handler will now be active during the time periods described by the ScheduleSet. About Caller Input Keys
Finding Which Schedule Is Assigned to a Call Handler
In order to find out which schedule is currently assigned to a call handler, an administrator makes a GET request to the call handler resource, as described earlier. After selecting a call handler from the list, the ScheduleSetURI field provides a link to the ScheduleSet that is associated with the call handler. The administrator can then make a GET request to that URI to retrieve the ScheduleSet:
|
That will return the ScheduleSet. From that ScheduleSet object, the administrator can retrieve the ScheduleSetMembers, Schedules, and ScheduleDetails that comprise the entire Schedule.