When Microsoft launched Direct Routing for Microsoft Teams in June 2018, they knew they would have to solve two challenges.
1. Ability to keep media local between customers Teams and SBC. This is commonly referred to as "Media Bypass".
The Media Bypass is critical to reducing call setup time, providing a higher level of reliability by eliminating the need for media to flow to Microsoft's Cloud and back, and thus ensuring the best possible call quality. This was resolved in mid-2019 when Microsoft released the Media Bypass feature that we briefly explain in our previous article.
However, Media Bypass requires that the public IP of SBC be available to clients Teams. What happens if the client Teams is in the internal network (has a private IP address)? It is not always possible to access the public IP of SBC from the internal company network.
2. To solve the problem when the public IP of SBC is not available for clients Teams, Microsoft has worked on a technology called "Local Media Optimization (patent pending)".
Local media optimisation is useful in two cases.
Case 1.
The client resides in an internal network and wants to use media bypass but cannot access the public IP of SBC. The desired result is that the client uses the private IP of SBC instead of the public one (192.168.5.5 in the image below)
Local Media Optimization selects the optimal IP address from SBC, based on the location of the client Teams and provides it to the client in the Session Descriptoin Protocol (SDP).
Note: You must ensure that SBC supports Local Media Optimization technology. A list of SBC that support the technology with instructions can be found on this page https://docs.microsoft.com/en-us/MicrosoftTeams/direct-routing-media-optimization-configure#configure-sbcs-for-local-media- optimisation according to the specifications of the sbc
What is "optimal IP"?
If the client is within the internal network, Local Media Optimization detects the client's location and provides the internal IP of SBC. If the client is outside the corporate network, the technology also detects this and provides the external or public IP address of SBC.
To understand whether the user is in the internal network or not, the system uses external addresses Trusted IP addresses of each registered branch office.
What is "Trusted IP"?
These IPs are the IP addresses used by Microsoft Teams clients when they connect to Microsoft 365. When the Teams client connects to Microsoft 365, its IP is checked against the list of trusted IPs. If a match is found, the user's location is marked as internal. You should add these external IP addresses for each site where you have users using Local Media Optimization. Please read our detailed documentation ( https://docs.microsoft.com/en-us/MicrosoftTeams/direct-routing-media-optimization ) to see how this works.
Case 2.
An enterprise must use a SBC that is inaccessible through the Microsoft interface Direct Routing. Common case - it is not possible to provide a publicly routable IP address for SBC in selected enterprise locations.
In the image below, the SBC in Vietnam cannot have a public IP for direct interaction with the Microsoft interface Direct Routing. But the SBC in Singapore (which is also available via the internal network of SBC in Vietnam) can.
In this case, with the help of Local Media Optimization, we can still pair the Vietnam SBC "virtually". This means that even if Microsoft does not have direct access to it, the tenant administrator can pair it and specify that to send a call to SBC in Vietnam, we must go through the Singapore gateway SBC from the Direct Routing interface.
With local media optimisation, we can detect where the client is located and provide the IP of SBC based on the user's location. There are two modes for this scenario.
Ways of optimising local media
Always bypass mode
This mode is intended for situations where the internal network is fully routable.
In this case, if the user is in an internal location, Local Media Optimization always provides the internal IP of SBC. See the image below for reference, a user may be on a German site or travelling in France.
Local users only" mode
By setting this mode, the tenant administrator signals to Local Media Optimization that the network is not fully routable.
In the photo below, a customer Teams in Indonesia does not have direct access to the network segment in Vietnam. The customer's traffic will be routed through SBC in Singapore, which has access to both sites.
We agree, Microsoft makes a very good point for companies wishing to migrate their telephony on Microsoft Teams Direct Routing !