Direct Routing Hosting Model

Occasional Contributor


Can someone tell me when I create a voice route with new-csonlinevoiceroute does the -OnlinePSTNGateway parameter need to match the name of the subdomain created that was based on the carrier domain?


For example I have a subdomain of in the customer tenant environment that has been validated and activated and we have in the carrier tenant for the base domain which has also been activated and validated.


In the carrier tenant we have run the New-CsOnlinePSTNGateway -Fqdn -SipSignallingPort 5061 -MaxConcurrentSessions 2000 -MediaBypass $true -Enabled $true 

and I can see those SBCs in the carrier tenant.


However when we run the new-csonlinevoiceroute using the fqdn of in the customer tenant we get an error stating cannot find the specified gateway. My question is do we need to run the new-csonlinevoiceroute and use the fqdn of which will resolve to the IP address of the SBC.  If that is correct that FQDN doesn't match the SBC name we configured of but will it still work?


Confused! and the documentation is not clear. Could anyone please point me in the right direction?


Thank you.

7 Replies

Hi @ASharpie 


In your example, you wouldn't use when doing new-csonlinevoiceroute.

This is the carrier domain CsOnlinePSTNGateway.


In fact, if possible I would simplify it if you can. Just use in the carrier domain.


Then, in the customer tenant, new-csonlinevoiceroute would be It will take the derived trunk from


You will need public A DNS records for to point to the public IP of


Of course, you'll need a user in the customer tenant assigned to the domain with an E1\E3 or E5 license in order to be able to run the new-csonlinevoiceroute cmdlet.


I think taking away 1 of the sub domains if you can might simplify it if possible. if not, then your customer domain will need be, not as it won't get the derived settings from the OnlineGateway as that's


Hope that helps.




Hi @fowler_23


Hi @fowler_23 


Thanks for your reply. much appreciated.

I think my confusion here is around the OnlinePSTNGateway fqdn so you are basically saying that needs to match the carrier base domain? I was under the impression you could call this anything you liked provided it was a subdomain of the carrier base domain, so

The Voice route in the customer 1 tenant would point to as the PSTN Gateway List and the trunk would be derived from







Let me give you my setup which might help


Carrier Domain:

Carrier Sub Domain:

Carrier OnlinePSTNGateway:


Customer Domain:

Customer Sub Domain:

CSOnlineVoiceRoute: > Public A Record > Pointing to IP of


Customer VoiceRoute picks up derived trunk from





Hi @fowler_23


Thanks and this is basically what I have however I do not have a carrier subdomain defined do I need that? I hadn't read anywhere you needed that, I understood just a carrier base domain and tenant subdomains.


So when I create the carrier OnlinePSTNGateway I use the base domain as the FQDN .


When I define the voice route in the customer tenant do I still have to add the  -OnlinePSTNGatewayList  parameter and add the FQDN of the OnlinePSTNGateway or is this derived some how auto-magically?


Thanks again for your continued assistance! 






If you refer to

 and under the section Register a Base Domain and subdomains. Their example has the carrier base domain as and then an additional domain so my example follows Microsoft's logic.


No - you don't need to add PSTNOnlineGateway parameter to the customer tenant. That same document again. Search for Create a trunk and provision user. That gives some information there about derived trunks.

Hi @fowler_23 


OK thanks. I've had to change and create new domains now, I also have the complexity of load balancing between two sites which has driven the need to create new carrier subdomains, one for each SBC pair and also new customer domains based on the carrier subdomain. What an ache! 


It's clear to me that documentation needs updating and full explanations of how you achieve fail-over etc is required, that part is especially not clear.   


Thanks for your help!



Hi @fowler_23


I got all this working in the end but I didn't need to create subdomains as per the MS example and you do need to have the PSTN Gateway List populated when creating the carrier trunk. If you dont do this there is no way to tell the voice route where it should route to so I believe the MS document to be misleading. Their documentation states you need to use the FQDN of the SBC in the voice route but the command doesn't show this and you cannot add it in any other way apart from that parameter. I have reviewed other posts on this and found the same. I just thought I'd update this post and feedback my findings.