Call Routing Logic in Unity Connection & MWI Tshooting
Call Routing Logic in Unity Connection & MWI Tshooting
This document is to help you understand the call routing logic used by Unity Connection.
Flow diagram
Step 1:
As soon as unity connection gets the call from CUCM, it checks whether the call contains a redirecting ID
or not. If the call contains a redirecting ID then unity connection treats it as a forwarded call and if not
then it is a direct call for unity.
Step 2:
Based on whether the call is forwarded or direct call, CUC will apply the appropriate routing rule.
==> Direct routing rules handle calls from users and unidentified callers, which are dialed directly to
Unity Connection. The default rules for direct calls are:
(a) Attempt Sign-In—Calls from users are routed to the user sign-in conversation.
(b) Opening Greeting—Calls from unidentified callers are routed to the Opening Greeting.
==> Forwarded routing rules handle calls that are forwarded to Unity Connection either from a user
extension or from an extension that is not associated with a user account (such as a conference room).
The default rules created by CUC for forwarded calls are:
(a) Attempt forward—All calls forwarded from a user extension are routed to the user greeting.
(b) Opening Greeting—Calls forwarded from an extension that is not associated with a user account is
routed to the Opening Greeting. Opening greeting routing rule just routes the call to the default system
call handler "Opening greeting".
Step 3:
Unity connection then checks the redirecting ID or the calling ID into its database to see whether it
recognizes the number or not and based on that it will apply the routing rule. If for a forwarded call the
unity connection does not recognize the caller ID it selects the routing rule "opening greeting" and
similarly if a user presses the message button on the phone, the call would come to CUC as a direct call
with no redirecting ID and if the caller ID exists in the unity database CUC will select the routing rule
"Attempt SignIn".
Note: Please do not confuse "opening greeting" routing rule with the Opening greeting call handler.
They both are different but used together to answer calls from unidentified callers.
In our environment, you can find Remote port status monitor on the Tool server 171.194.9.88/8.88
Below are some of the lab examples explaining the port status monitor output for different types of
calls:
(a). Direct call:
1. Direct call from an identified caller when he presses the message button on the phone:
06:22:18, New Call, CallerId=1000, CalledId=7777, RedirectingId=, AltRedirectingId=, Origin=16,
Reason=1, CallGuid=8247897155A44071929903606F086C82, CallerName=, LastRedirectingId=,
AltLastRedirectingId=, LastRedirectingReason=1, PortDisplayName=CUCMSIP-1-001,[Origin=Unknown],
[Reason=Direct]
In the above output, you can see that the call has no redirecting ID so unity treats it as a direct call. The
port, which answered the call, is "CUCMSIP-1-001".
06:22:18, Changed the current search by extension search space from <No scope> to 'cuc Search Space'
({30c32fdd-7b96-4bd3-ab23-699d7bc745eb})
06:22:18, AttemptSignIn
06:22:18, State - AttemptSignIn.cde!Dummy
06:22:18, Event is [NULL]
06:22:18, SubSignIn
06:22:18, Subscriber Sign-In
06:22:18, State - SubSignIn.cde!AnswerPhone
06:22:18, Event is [TrueEvent]
06:22:18, State - SubSignIn.cde!AuthenticateUser
06:22:18, -->SubAuthenticate
2. Direct call from a user who exists on CUCM but does not exist in Unity connection:
Call, CallerId=1002, CalledId=7777, RedirectingId=, AltRedirectingId=, Origin=16, Reason=1,
CallGuid=E42E8E826A89434887A5F74B7F372D3E, CallerName=, LastRedirectingId=,
AltLastRedirectingId=, LastRedirectingReason=1, PortDisplayName=CUCMSIP-1-004,[Origin=Unknown],
[Reason=Direct]
In the above output you can see that the call has no redirecting ID so unity treats it as a direct call. The
port which answered the call is "CUCMSIP-1-004".
06:26:51, Changed the current search by extension search space from <No scope> to 'cuc Search Space'
({30c32fdd-7b96-4bd3-ab23-699d7bc745eb})
06:26:51, Changed the current search by name search space from <No scope> to 'cuc Search Space'
({30c32fdd-7b96-4bd3-ab23-699d7bc745eb})
06:26:51, AttemptSignIn
#### Attempt Signin here is not the Attempt signin forward routing rule but is referring to the
conversation defined by default under the Attempt Sign in routing rule####
06:26:51, State - AttemptSignIn.cde!Dummy
06:26:51, Event is [NULL]
06:26:51, PHTransfer
06:26:51, State - PHTransfer.cde!LoadInfo
06:26:51, Event is [TrueEvent]
06:26:51, PHGreeting
06:26:51, State - PHGreeting.cde!PlayGreeting
06:26:51, Call answered if needed
06:26:51, playing greeting for Call Handler: Opening Greeting
Since the user does not exist in CUC, call gets transfered to opening greeting default system call handler
Forward Routing Rule remote port monitor sample for Known User in CUC.
01:21:30, New Call, CalledId=1519040000, RedirectingId=61292265745, AltRedirectingId=,
Origin=16, Reason=4, CallGuid=094F006C1C7643B2888D80FFED4D8E86, CallerName=,
LastRedirectingId=, AltLastRedirectingId=, LastRedirectingReason=4,
PortDisplayName=IPTUC94U2-SGE1-048,[Origin=Unknown],[Reason=Forward No Answer]
01:21:30, AttemptForward
01:21:30, State - AttemptForward.cde!Dummy
01:21:30, Event is [NULL]
01:21:30, PHTransfer
01:21:30, State - PHTransfer.cde!LoadInfo
01:21:30, Event is [TrueEvent]
01:21:30, PHGreeting
01:21:30, State - PHGreeting.cde!PlayGreeting
01:21:30, Call answered if needed
01:21:30, Playing greeting for Subscriber: Girish Nair
01:21:33, Event is [HangupEvent]
01:21:34, State - PHGreeting.cde!DoHangup
01:21:34, Event is [HangupEvent]
01:21:34, Idle
1. Call comes to IP phone and since user does not answer/busy, it goes to Voice mail.
2. When the call reaches CUC and user has to leave a voice mail, conversation
manager answers the call. Caller leaves a message for the user.
3. NotifyQ is informed about the new message.
4. Connection Notifier's main function is to keep a check on the NotifyQ . When an
event is placed in it, connection Notifier will check the user's mailbox to determine
whether their MWI should be on or off. It then compares that with what state we
currently think the light is in and, if it needs to change, queues the task.
5. In case of new message, the NotifyQ gets filled. Since the NotifyQ is actively being
monitored by connection notifier service it instructs the Conversation manager to notify
the phone system about the new message by sending a SIP NOTIFY message with
Request URI header of user’s CUC extension & a skinny notification in case of Skinny
integration.
6. When the subscriber listens to the message, Cisco Unity connection notifies the
phone system to deactivate the MWI on the phone
Traces:
SIP integration:
>>>> Conversation manager on CUC initiates the SIP stack to send out a SIP notify to
CUCM:
Messages-Waiting: yes
Voice-Message: 4/0 (0/0)
Fax-Message: 0/0 (0/0)
>>>> Message waiting manager creates a message waiting process for that extension:
>>>> Message waiting process asks the DB layer to update the MWI status:
2. On CUC port group, make sure that the port group has check “register with SIP
server” and “Enable message waiting indicator”.
3. Choose Telephony Integrations > Ports in Cisco Unity Connection Administration
page and Confirm that there are voice−messaging ports for the phone system
integration that are assigned to send MWI requests.
4. If you are having a CUC PUB/SUB setup, then make sure you have ports created for
SUB as well on CUC.
5. Make sure that the order of CUCM servers is correct in port group on CUC. Browse
to:
Telephony integration >>>> Port group >>>> Edit >>> Servers
It should be in accordance with the CM group assigned to the device pool associated
with the SIP trunk/Voice Mail ports.
If the server list on CUC is not in accordance with the CCM group defined on the trunk
then CUCM will send out a 503 service unavailable in response to the Notify from CUC.
Here is a snippet from the traces:
>>>> CUC sends out a Notify to CUCM:
NOTIFY sip:[email protected] SIP/2.0
From: sip:10.106.117.133:5060;tag=03d2231777d0465aa329d31db6e02e16
To: sip: [email protected]
Via: SIP/2.0/TCP
10.106.117.133:5060;branch=z9hG4bKa8092e71a93d41f68862e887250d29a2
Max-Forwards: 70
Contact: sip: 10.106.117.133:5060
Call-ID: [email protected]
CSeq: 300 NOTIFY
Event: message-summary
Content-Length: 73
Content-Type: application/simple-message-summary
Messages-Waiting: yes
Voice-Message: 1/1 (0/0)
Fax-Message: 0/0 (0/0)
>>>>>> CUCM will response with a 503 service unavailable error:
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/TCP
10.106.117.132:5060;branch=z9hG4bK76d6868527bc46c9814f2b52390d0325
From: sip:10.106.117.133:5060;tag=8979f8a2d55640cf8e710118dbe4dda3
To: sip:[email protected];tag= 1877519591
Date: Mon, 03 Feb 2016 15:42:31 GMT
Call-ID: [email protected]
CSeq: 300 NOTIFY
Warning: 399 LODKSCUCMUCSPUB01 "Unable to find a device handler for the
request received on port 35410 from 10.106.117.133"
Content-Length: 0
7. If the issue is specific to certain users then make sure that the user is associated with
the correct phone system on CUC.
8. You can try doing a resync of MWI if MWI is not working for any of the users:
9. Make sure that the MWI numbers defined on CUC are same as to what you have defined on
CUCM.
Telephony integration >>>> Port Group >>>> MWI on & off extension
Note: In case of SIP integration MWI numbers are not created as CUC uses Notify message.
(b). Things to check on CUCM:
Skinny Integration:
1. If SCCP integration is there, then make sure the voice mail ports should have the
CSS which has the partition of the phones.
2. Dial the MWI on extension then dial MWI off extension, if the phone led become red
after dialling MWI on, then the disappear after dial MWI off that means MWI on & off
configured properly on you cucm.
3. Make sure that the MWI on and off numbers are unique and should verify it by
checking in from route plan report on CUCM.
SIP integration:
1. Check the following on the SIP trunk security profile:
- Accept Out-of-Dialog REFER
- Accept Unsolicited Notification
- Accept Replaces Header
In case of SIP integration, CUC sends SIP notify messages to the phone system to turn
the MWI on or OFF so “Accept unsolicited notification” should be checked under SIP
profile assigned to the trunk.
2. The calling search on the trunk should have the partition assigned to the directory
number of user.
(c). Things to check on CUC for Platform issues:
1. Make sure the connection notifier service is activated on the primary server.
2. Cluster health check: Make sure the cluster is in healthy status with the output of
the command "show cuc cluster status"
In unity connection cluster, while both servers can answer the calls and take messages
but the connection notifier service responsible for MWI is activated only on the primary
server and not on the secondary.
A good status would look something like:
Step 1 In Cisco Unity Connection Serviceability, on the Tools menu, click Reports.
Step 2 On the Serviceability Reports page, click Port Activity Report.
Step 3 On the Port Activity Report page, select the applicable options for the report.
Step 4 Click Generate Report.
5. In case of any delay in MWI, make sure that the CUC server is synched with an NTP
stratum at a value less than 3 using the output of the command "Utils ntp status".
Thank you