An organization needed assistance with generating comprehensive reports for Cisco Unity Connection to analyze mailbox usage patterns and user activity. The specific requirements included:
Identify user last login information.
Identify users with less voicemail activity.
Identify last voicemail received by the user.
The organization needed more detailed reporting to identify truly inactive mailboxes that could be safely removed to optimize system resources. Unity reporting tool does not provide this specific information. In this case, the option is CLI queries.
Cisco Unity Connection version 15.0.1.12900-43
CLI access to Unity Connection servers
The resolution involves using a combination of Unity Connection Serviceability reports and CLI database queries to gather comprehensive mailbox usage data. This approach provides detailed visibility into user activity patterns:
Access Unity Connection Serviceability and utilize the reporting functionality:
Navigate to Tools > Reports in Unity Connection Serviceability to access the reporting options, which serves as the primary inventory for voicemail activity and message usage patterns.
Execute these database queries on the Unity Connection CLI to retrieve detailed user activity information.
Step 1: Retrieve Last Voicemail Activity for Each User
This query provides comprehensive information about the last voicemail received, days since last voicemail, and total voicemail count for each user:
run cuc dbquery unitymbxdb1 SELECT u.Alias, u.DisplayName, u.DtmfAccessId, MAX(fi.ArrivalTime) AS LastVm, CASE WHEN MAX(fi.ArrivalTime) IS NULL THEN NULL WHEN (TODAY-DATE(MAX(fi.ArrivalTime)))<0 THEN 0 ELSE (TODAY-DATE(MAX(fi.ArrivalTime))) END AS DaysSince, COUNT(fi.MessageObjectId) AS VmCount FROM UnityDirDb:vw_User u LEFT JOIN UnityDirDb:vw_MailboxMap mm ON mm.UserObjectId=u.ObjectId AND mm.IsPrimary=1 LEFT JOIN UnityMbxDb1:tbl_FolderItem fi ON fi.MailboxObjectId=mm.MailboxId AND fi.Deleted=0 LEFT JOIN UnityMbxDb1:tbl_Message m ON m.MessageObjectId=fi.MessageObjectId AND m.Type=1 WHERE u.Undeletable=0 GROUP BY u.Alias, u.DisplayName, u.DtmfAccessId ORDER BY LastVm DESC
Step 2: Obtain Last User Login Information
This query retrieves authentication and login activity data that complements voicemail activity information:
run cuc dbquery unitydirdb select tbl_globaluser.alias,tbl_globaluser.dtmfaccessid, tbl_credential.credentialtype, tbl_credential.timechanged, tbl_credential.timelastsuccessfullogin,tbl_credential.doesntexpire from tbl_credential inner join tbl_globaluser on tbl_credential.userobjectid=tbl_globaluser.objectid where tbl_globaluser.dtmfaccessid IS NOT null
Step 3: List Users with Mailbox Size and Activity
This query provides mailbox utilization data including size and send/receive activity:
run cuc dbquery unitydirdb select alias as UserID,bytesize,send,receive,warning from vw_user,unitymbxdb1:vw_mailbox where vw_user.objectid in (select userobjectid from vw_usermailboxmap where vw_usermailboxmap.mailboxid=unitymbxdb1:vw_mailbox.mailboxobjectid) order by bytesize desc
The standard Unity Connection Serviceability reports do not provide sufficient granular detail to distinguish between truly inactive mailboxes and those where users can be receiving voicemail through alternative delivery methods such as Single Inbox email integration. The "Unused Voice Mail Accounts Report" primarily identifies mailboxes pending self-enrollment rather than actual usage patterns, leading to incomplete visibility into mailbox utilization.
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
01-Dec-2026
|
Initial Release |