Simultaneously call routing between Cisco Unified Communications Manager and Microsoft Teams using SNR
Recently in our last post, we worked on integrating CUCM with Microsoft Teams (Direct Routing). In case you missed to read that article, follow the link here:
In this article, we will see how to simultaneously route the calls between MS teams and CUCM using Single Number Reach (SNR). If you look at the call flow below, we have same number range assigned in Teams and Call Manager for Avinash & Nikita as per the below example. Now, if User A calls Avinash or Nikita, the call should ring on Teams extension as well as Cisco IP Phone extension simultaneously. The user can answer the call from either Teams or Cisco IP Phone as per their availability.
What is needed?
- SNR Configuration on CUCM
- Call Answering Rules on Teams
- Manipulation in Audiocodes
SNR Configuration on CUCM
In case you are not familiar with SNR Configuration, please follow the below link to understand about the SNR.
The reason why we need Single Number Reach configuration is because SNR will help to route the call simultaneously from CUCM to Teams. Let’s say if User A calls Nikita’s extension on CUCM, we will create SNR config for Nikita in such a way that the call will be routed to Teams. In order to do that, you would need to create is Remote Destination Profile and Remote Destination.
Let’s understand more deeper on the config part. As we know that Nikita’s extension number in CUCM is +91801010004 and the same number is assigned to Nikita on Teams. Now, if someone is calling Nikita’s CUCM DID, the call also needs to be routed to Teams. So, we will be creating a Remote Destination Profile with the same DID.
Remote Destination Profile for Nikita
- Navigate to Device > Device Settings > Remote Destination Profile > Add New
Remote Destination for Nikita
Next is we need to configure a Remote Destination for Nikita.
- Navigate to Device > Remote Destination > Add New
With the above configuration, when the call comes to Nikita’s extension, we are sending the calls to MS Teams as *+91801010004 (we are prefixing an asterisk). Now, we need to remove the asterisk either in CUCM or Audiocodes and send the call to Teams as +91801010004. In order to do that, we have created a Route Pattern in CUCM as *.\+91801010XXX and we are doing a Pre dot which will send the calls to Teams as +91801010004.
Configuration in Teams
Now as we know that calls from CUCM to Teams can be take care by SNR, now it’s time to do changes on Team’s settings so that when the call comes to Nikita’s extension on Teams, it sends the call to CUCM. We are going to set a “Calls ring me > Also ring” settings on MS Teams call forwarding setting and set the call forward to “+*91801010004” where we are adding an asterisk (*) after (+). So, when the call comes to Nikita’s Teams number, it will also start ringing on +*91801010004. As we are adding an asterisk in Teams, we will be removing this Asterisk on Audiocodes when the call arrives from Teams.
In order to do the Also ring configuration, you can use powershell script and modify the call answering rules. Below is the command.
Configuration in Audiocodes
Now, as the simultaneous calls are arriving from Teams to Audiocodes is prefixing a * in the called party number i.e., +*91801010004, we will treat this configuration in Audiocodes to remove asterisk and the called party will become +91801010004. In order to achieve this configuration, we will create a Manipulation Rule and apply that rule. Here is the manipulation rule.
Navigate to Signaling & Media > Message Manipulation > Message Manipulation > Add New
- Name > Remove * from Call Forwarding
- Condition > Header.Request-URI regex (INVITE sip:\+)(\*)(.*)(@)
- Action Subject > Header.Request-URI.URL.user
- Action Type > Modify
- Action Value > ‘+’+$3
By doing the above, we can now simultaneously route the calls between MS Teams and CUCM but there is a catch. If you notice that when someone place a call from let’s say “User A” to “Nikita’s Cisco IP Phone”, the call is obviously routed to Nikita’s IP Phone and Teams extension but it also does create some loops when you look at the call flow and the reason for this is we are doing a simultaneous call routing on CUCM and Team’s end. See below as an example – (The reason it stopped at the 4th occurrence is i had only 3 sessions available in my SBC).
At this moment, i am not sure how NOT to create a loop at all but i have a workaround to stop the loop after 2nd try where CUCM will send a 486 BUSY HERE. See below as an example.
The way I have achieved this is changing the Busy Trigger settings on CUCM for Device/RDP to 1.
If you would like to watch the demo video, please click on the below link.
I am working in an IT company and having 10+ years of experience into Cisco IP Telephony and Contact Center. I have worked on products like CUCM, CUC, UCCX, CME/CUE, IM&P, Voice Gateways, VG224, Gatekeepers, Attendant Console, Expressway, Mediasense, Asterisk, Microsoft Teams, Zoom etc. I am not an expert but i keep exploring whenever and wherever i can and share whatever i know. You can visit my LinkedIn profile by clicking on the icon below.
“Everyone you will ever meet knows something you don’t.” ― Bill Nye
great information!!!
Hi Avinash,
Thanks for this. Can I ask a few questions please:
What software are you using to examine the SIP traffic above (monkey icon) ?
Do you have a Cisco CUBE version of this instead of AudioCodes?
Is SNR really needed here?
Keep up the good work!
Hi Richard,
Audiocodes syslog viewer is the tool – Here is the link for reference.
http://redirect.audiocodes.com/install/syslogViewer/syslogViewer-setup.exe