Design a site like this with WordPress.com
Get started

The dreaded “Cannot find specified Gateway”

For everyone who has been doing Teams Direct Routing deployments, the famous “Cannot find specified Gateway” error would definitely be up there being one of the most dreaded errors to see.

Cannot find specified Gateway error in PowerShell

There are a couple of places you may see this error, depending on the format of Teams Direct Routing you have chosen to configure:

Single tenant

  1. Add the SBC FQDN as a domain in Microsofte 365 Admin Centre, and complete verification
  2. Put a user account in the newly added domain
  3. Assign a license to the user account to activate the domain (E.g. Business Basic or E1, or above)
  4. You wait… I have seen the domain finish being activated in about half an hour but this step can take up to 24 hours
  5. You come back to create the PSTN gatway by running New-CsOnlinePSTNGateway cmdlet
  6. BAM!! Cannot find specified Gateway

Multi-tenant

  1. Add the SBC FQDN as a domain in Microsoft 365 Admin Centre, and complete verification
  2. Put a user account in the newly added domain
  3. Assign a license to the user account to activate the domain (E.g. Business Basic or E1, or above)
  4. You wait… I have seen the domain finish being activated in about half an hour but this step can take up to 24 hours
  5. You skip the step to create the PSTN gatway if your provider use the derived trunk topology
  6. You create the Online Voice Routes by running New-CsOnlineVoiceRoute, which reference the Online PSTN Gateway
  7. BAM!! Cannot find specified Gateway

I have seen my fair share of the this dreaded error, and would like to summarise the scenarios to save some time and head scratching for you, my fellow Teams Direct Routing deployers.

Domain not activated

This could be one of the followings:

  • You, my friend, have forgotten or didn’t think of adding a licensed user account to the newly added domain to activate it. Solution: Add a licensed user to activate the newly added domain.
  • You, my friend, have made a typo in the domain name. E.g. Your carrier tenant SBC is “sbc1.contoso.com“. You were allocated an FQDN of “customer.sbc1.contoso.com“, but when you added the domain in your Microsoft 365 Admin Centre you actually typed in “customer.sbc.contoso.com“, which looked correct but it was not. The domain verification would have gone through without a hitch because ultimately the “contoso.com” domain belongs to the same service provider. You assign a licensed user account to the wrong domain and activates it. You will 100% see Cannot find specified Gateway when you create the Online PSTN Routes because your command would reference the correct FQDN. Similar error could also happen in the single tenant configuration. However, because the SBC FQDN is generally shorter, it is easier to spot. Solution: Delete your typo domain, and add it back in correctly, and activiate it with a licensed user account.

A Microsoft side issue

Although the occurrence is rather rare, I have actually encountered this scenario recently on a deployment.

I did everything by the book, but still hit the error after 48 hours of waiting.

Licensed user account to activate domain

In fact, I added multiple domains at the same time using the same method, but only 2 of them got “stuck”. So, I opened a support case with Microsoft. The support engineer went through everything with me on the phone, and checked the domains from his side, but he couldn’t see anything wrong. He then asked me to put additional licensed user accounts to the domains in question. I had my reservations but did what he asked.

Additional licensed accounts for activation

Guess what, the domains came to life after 30 mins. Very strange! I asked him what was the problem? His answer was “The accounts that were created could initiated a sync and resolved any errors.” I will update this blog if he comes back to me with a more detailed RCA.

Microsoft support case respond

So, there you go, if you have done EVERYTHING correctly but still seeing the error, try putting addtional licensed user accounts to the newly added domain for activation.

Microsoft documentation

If you Google this error you would also come across a Microsoft article (Link), specifically in the multi-tenant scenario.

Microsoft documentation on the “Cannot find specified gateway” error

As you can see in the screenshot above, Microsoft suggests EV enable the domain activation user account. The only issue I have with this is that most of the people and companies would use lower tier licenses for this purpose. E.g. Business Basic or E1. Which means, you’d also need to put the Phone System add-on to the activation account to enable Enterprise Voice. However, if you do have a bunch of spare E5s that can be used to do domain activation, or don’t mind adding Phone System to the activation account, this could be another fix for you if you are seeing this error. I haven’t tested it myself but I think it’d have the same effect as when they asked me to add additional licensed users to the domain in question – to initiate a sync and resolve any errors.

So there you go. I will update this blog if I come across any more scenarios or fixes. I hope I can save you some time and head scratching on your journey of Teams Direct Routing. Have fun!

Advertisement

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: