Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Teams Direct Routing 410 "IceConnectivityChecksFailed" (531004) and "MediaConnectivityFailure" (531005)

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

Direct Routing is the Microsoft Teams Phone feature that connects Teams to an organisation's own telephone system through a customer-provided session border controller (SBC). Two paths carry a call: the signalling path that sets it up, and the media path that carries the voice. Microsoft's SIP 410 page says that with response code 531004 the media path can't be established, and that with 531005 the media path is broken. Our own reading: callers may hear silence or the call may end soon after it starts.

The sections below show how to tell the codes apart, how to use the time the call lasts to find which path failed, how to check the media ports and address ranges, how to correct the path with a record to undo from, and how to confirm the result. Nothing before the Fix section changes anything.

What the error means

Microsoft's SIP 410 page lists three rows. Two are about the media path and one is about the offer itself.

Row on Microsoft's page Suggested action on the page
531004 410 IceConnectivityChecksFailed "This error indicates that the media path can't be established." The page adds that it is "usually caused by incorrect network configurations" and says to "Verify your network configuration to make sure that required IP addresses and ports aren't blocked."
531005 410 MediaConnectivityFailure "This error indicates that the media path is broken." The page adds that it is "usually caused by incorrect network configurations" and says to "Verify your network configuration."
531000 410 SdpParsingFailure The offers and answers "might be malformed or unsupported". The page says to work with the SBC vendor to confirm they comply with RFC standards.

ICE, Interactive Connectivity Establishment, is the exchange in which the two ends send test messages to each other to find an address pair that works for media. IceConnectivityChecksFailed means those tests did not get through. MediaConnectivityFailure means a media path that existed is broken.

The page applies to Direct Routing PSTN calls only. It does not apply to Microsoft Calling Plan or Operator Connect deployments. A one-way audio fault on a 3CX phone system is a different product and a different cause, covered in 3CX one-way audio and symmetric NAT. A call refused before it starts, with SIP 488, is covered in Teams Direct Routing 488 / 531000 and Teams Direct Routing 488 / 531027.

Likely causes

Microsoft's 410 rows name network configuration and ports. Microsoft's plan, media bypass and inbound calls pages say which ports, which ranges and which SBC behaviour are involved, so the table lists them.

Cause to check Where Microsoft's pages describe it
The firewall blocks UDP media between the SBC and Microsoft's Media Processors The plan page: UDP/SRTP on 3478-3481 and 49152 to 53247, ranges 52.112.0.0/14 and 52.120.0.0/14
With media bypass, the path between clients and the SBC is blocked The media bypass planning page: UDP 50000-50019 on the SBC's public address
With media bypass and a client that cannot reach the SBC's public address, the relay path is blocked The media bypass planning page: Transport Relay ports 50000-59999 and 3478-3481
A device translates the client's source ports and the translated ports are not allowed The media bypass planning page: translated ports "opened between the network equipment and the SBC"
The SBC does not answer the connectivity checks it receives, or sends checks of its own The media protocols page, ICE Lite requirements
The SDP from the SBC does not carry the correct ICE candidates The inbound calls page: calls drop after about 10 to 20 seconds
The SBC has too few media ports for its concurrent calls The plan page: at least two media ports per concurrent call

Prove the cause before changing anything

All of these steps only read.

  1. Read the exact text from the SBC log or its SIP trace and confirm which row it is. Microsoft's monitoring page says Direct Routing sends a detailed description of each issue to the SBC, and that these issues can be read from the SBC logs. If the row is 531000 SdpParsingFailure, the fault is the offer, and the vendor route on Microsoft's page applies.

  2. Measure how long the failing calls last before they end. Microsoft's inbound calls page separates three cases for incoming calls:

Time before the call drops Microsoft's explanation
About four seconds Poor connectivity between the SBC and the SIP proxy: the SBC may not receive the SIP 100 Trying message because a firewall blocks it, or receives it and does not acknowledge it with a SIP ACK
About 10 to 20 seconds with no audio No media information was received in that time, or the ICE connectivity checks failed, and Teams drops the call
Between 10 and 60 minutes A fault in the session timer or session refresh, set in the SESSION-EXPIRES header

For incoming calls, a drop at 10 to 20 seconds with no audio is the case Microsoft ties to missing media information or failed ICE connectivity checks. The other two cases are different faults from this one.

  1. Find out whether the trunk uses media bypass, because the ports differ. Microsoft's Get-CsOnlinePSTNGateway reference says the cmdlet shows each SBC's configuration, including whether media bypass is enabled. Run this read-only command in a Teams PowerShell session, with your own SBC name in place of the example:
Get-CsOnlinePSTNGateway -Identity sbc.contoso.com
  1. Compare the firewall rules between the SBC and the Internet with Microsoft's table for media without bypass:
Traffic From To Source port Destination port
UDP/SRTP Media Processor SBC 3478-3481 and 49152 to 53247 Defined on the SBC
UDP/SRTP SBC Media Processor Defined on the SBC 3478-3481 and 49152 to 53247

Microsoft's plan page gives the ranges for this traffic as 52.112.0.0/14 and 52.120.0.0/14, and for IPv6 2603:1063:400::/40 and 2603:1063:100::/40. With media bypass, the media bypass planning page adds UDP 50000-50019 between clients and the SBC, and 50000-59999 plus 3478-3481 for Transport Relays.

  1. Compare the SBC's media port range with the number of concurrent calls it carries. Microsoft's plan page says "Microsoft recommends allocating at least two media ports per concurrent call on the SBC."

  2. Capture the traffic on the SBC's Internet-facing interface for a failing call and look for the connectivity checks that Microsoft's side sends to the SBC. Microsoft's media protocols page says the ICE Lite SBC must respond to every connectivity check it receives and must not send checks of its own.

  3. Read the Network parameters in the health dashboard for Direct Routing in the Teams admin center (Voice, Direct Routing): jitter, packet loss and latency measured from the Direct Routing interface to the SBC.

Fix

Choose the route that matches the proof. Route 1 covers the firewall and Route 2 covers the SBC's ICE answer.

Route 1: allow the media ports and ranges through the firewall

Write down the current rules that apply to traffic between the SBC and the Microsoft ranges, with the order they are evaluated in, and the time.

Risk: the next step changes the firewall in front of the SBC by allowing UDP ranges to the SBC.

Microsoft's instruction on the 410 page is to "Verify your network configuration to make sure that required IP addresses and ports aren't blocked." Allow the UDP/SRTP traffic in the table above, in both directions, between the SBC and the Microsoft ranges. If the trunk uses media bypass, allow the bypass ports from the media bypass planning page as well, and if a device translates the clients' source ports, allow the translated ports between that device and the SBC.

To undo it: remove the rules you added and put the rule list back in the order you wrote down.

Route 2: correct the ICE answer from the SBC

Write down the SBC's current ICE settings for the profile that faces Teams, and the time.

Risk: the next step changes how the SBC negotiates media for every call on that profile.

Microsoft's inbound calls page says "make sure that the correct ICE candidates are included in the SDP message from the SBC." On the SBC, make the Teams profile answer every connectivity check, send none of its own, and keep the same candidates, password and ufrag between the 183 and the 200 OK, which are the ICE Lite rules on Microsoft's media protocols page.

To undo it: set the SBC's ICE settings back to the values you wrote down.

Confirm the fix

  • Place a test call that failed before and let it run past 30 seconds. The call runs on with audio in both directions.
  • The SBC log no longer shows 531004 or 531005 for the new call.
  • A capture on the SBC's Internet-facing interface shows connectivity checks from Microsoft arriving and answers leaving.
  • Jitter, packet loss and latency in the health dashboard have values for the SBC. Microsoft's page says "If the number of calls is less than 100, the network effectiveness ratio might be low, but still be normal", so judge the ratio on a larger number of calls.

What to watch afterwards

  • Average call duration. Microsoft's health dashboard page says "If you start seeing extremely low average call duration, for example 15 seconds, callers might be hanging up because your service isn't performing reliably."
  • Calls that drop at about four seconds or after many minutes. They are the other two rows in the drop-time table, with their own fixes.
  • Firewalls that see only one direction of a flow: asymmetric routing and stateful firewalls.
  • Any change to the firewall, the NAT device or the SBC's media port range.
  • Media that does not follow a changed address mid-call. Microsoft's plan page says media re-targeting is not supported: if an SBC re-INVITE offers a new media IP address, port or transport, "media isn't sent from PSTN Hub to the new target."

Risks and limits

These steps come from Microsoft's pages and have not been run or lab-tested. They apply to Direct Routing PSTN calls only.

Microsoft's 410 page points to network configuration, and the address ranges, ports and SBC behaviour in the checks above come from its plan, media bypass and inbound calls pages. Routes 1 and 2 describe what must be true; the settings that produce it are in the firewall's and the SBC's own interfaces. Microsoft supports Direct Routing only with certified devices and says to contact the SBC vendor's customer support first.

Sources