About Notifications
CUMI supports Comet notifications for message operations on the Inbox and Deleted folders.
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
CUMI supports Comet notifications for message operations on the Inbox and Deleted folders.
These are the basic steps to get up and running with Comet:
Start Jetty: Activate the Connection Jetty service by browsing to the Cisco Unity Connection Serviceability page and selecting Services. Find Connection Jetty in the list and select the Activate button.
Request Notifications: Clients need to request notifications so that the Connection server knows it should start publishing Comet events for the current authenticated user:
|
This returns a subscriptionId that must be used to get Comet notifications for this user (rather than the userID, for security reasons).
Subscribe for events: This is just standard Comet now, but there are a few details to know such as the port and URL to use. Jetty runs on port 7080 for non SSL and port 7443 over SSL, and cometd is running at /vmevents/cometd. Here's sample code to initialize and subscribe (in JQuery):
|
Each Comet event has the following attributes:
DisplayName |
Display Name of Mailbox |
SubscriptionId |
Subscription ID |
USN |
Message USN |
EventTime |
Time of event |
EventType |
Type of event |
MailboxId |
Mailbox ID |
MessageInfo |
Array of message info objects(see below) |
MessageInfo is an array of one or more objects with the following attributes:
MessageId
CallerAni
MsgType
Priority
ReceiveTime
Sender
EventType will be one of the following:
EventType |
Description |
NEW_MESSAGE |
This event is sent when a new message arrives in the inbox folder. |
SAVED_MESSAGE |
This message is sent when a message is marked as read in the inbox folder. |
UNREAD_MESSAGE |
This event is sent when a message is marked as unread in the inbox folder. |
DELETED_MESSAGE |
This event is sent when a message is deleted from the inbox folder. |
DELETED_MESSAGE_CREATE |
This event is sent when a new message arrives in the deleted folder. |
DELETED_MESSAGE_READ |
This event is sent when a message is marked as read in the deleted folder. |
DELETED_MESSAGE_UNREAD |
The event is sent when a message is marked as unread in the deleted folder. |
DELETED_MESSAGE_DELETE |
The event is sent when a message is hard deleted from the deleted folder or from the Inbox folder |
DELETED_MESSAGE_UNDELETE |
This event is sent when a message is marked as undeleted from the Deleted folder. |
Example 1: When a message is deleted from inbox folder or when a new message arrives in the deleted folder, the following events take place:
DELETED_MESSAGE
DELETED_MESSAGE_CREATE
Note |
The USN remains the same for both the notification events. |
Example 2: When a message is marked as undeleted from deleted folder, the following events take place:
SAVED_MESSAGE or UNREAD_MESSAGE
DELETED_MESSAGE_UNDELETE
Note |
The USN remains the same for both the notification events. |
Example 3:
When a message is marked as hard deleted from the inbox folder, the following events take place:
DELETED_MESSAGE
DELETED_MESSAGE_CREATE
DELETED_MESSAGE_DELETE
Note |
The USN remains the same for the first two notification events. |
Apart from the above examples, the USN is not the same for any of the other notification scenarios.
Note: During the time Notifier service is down or inactive, if there is any action taken on a message that is either in the Inbox or Deleted folder, the notification for the latest status of that message is sent when the service is back to its active state.
Example Comet Event
|