{"id":2654,"date":"2022-03-16T12:22:59","date_gmt":"2022-03-16T12:22:59","guid":{"rendered":"https:\/\/modern-workplace.uk\/?p=2654"},"modified":"2022-03-16T12:42:06","modified_gmt":"2022-03-16T12:42:06","slug":"teams-virtual-sbc-closing-azure-network-ports-warnings-for-azureloadbalancer-and-virtualnetwork-2-2-2-2-3-2-3-2-2-2-2-2-3-2-2-3-2-3-3-2-2","status":"publish","type":"post","link":"https:\/\/modern-workplace.uk\/?p=2654","title":{"rendered":"Microsoft Teams &#8211; Manipulate Phone Numbers in Your Tenant"},"content":{"rendered":"\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-medium-font-size\">When we talk about Direct Routing it is possible to<mark style=\"background-color:#00d084\" class=\"has-inline-color has-black-color\"> create manipulation rules to change the Phone Numbers (DDIs) inside the Teams tenant<\/mark> with no change to your SBCs.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">The supported scenarios are:<\/p>\n\n\n\n<ul class=\"has-medium-font-size wp-block-list\"><li>Modify an call incoming from the PSTN to Teams (<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\"><strong>InboundPstnNumberTranslationRules<\/strong><\/mark>)<\/li><li>Modify an outgoing call from Teams to the PSTN (<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\"><strong>OutboundTeamsNumberTranslationRules<\/strong><\/mark>)<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-medium-font-size\">As a side note, the commands to change a call incoming from Teams (InboundTeamsNumberTranslationRules) and a call outgoing from the PSTN (OutboundPstnNumberTranslationRules)  are available but I do not see any application for them<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-medium-font-size\">To be able to apply the number manipulations, <mark style=\"background-color:#cf2e2e\" class=\"has-inline-color\">P-Asserted-Identity (PAI) header must not be forwarded along with the call<\/mark> (so, it has to be disabled on the SBC for the incoming PSTN calls and in Teams for the calls outgoing from Teams)<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-medium-font-size\">Manipulation rules have to be defined in the tenant with the New-CsTeamsTranslationRule command. For example:<\/p>\n\n\n\n<p class=\"has-medium-font-size\">New-CsTeamsTranslationRule -Identity RedirectToAutoAttendant -Pattern &#8216;^usernumber$&#8217; -Translation &#8216;Auto Attendant number&#8217;<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-medium-font-size\">The manipulations are applied on a per-SBC base as a parameters in the SBC configuration InboundPstnNumberTranslationRules for incoming PSTN and -OutboundTeamsNumberTranslationRules for calls outgoing from Teams. For a example<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\"><strong>Set-CsOnlinePSTNGateway -Identity <\/strong><\/mark><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\">SBC.Modern-Workplace.UK<\/mark><\/strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\"><strong> -InboundPstnNumberTranslationRules <\/strong><\/mark><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\">RedirectToAutoAttendant<\/mark><\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\"><strong>Set-CsOnlinePSTNGateway -Identity<\/strong><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\"><strong> SBC.Modern-Workplace.UK <\/strong><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\"><strong>-OutboundTeamsNumberTranslationRules<\/strong><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-amber-color\"><strong> <\/strong><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-green-cyan-color\"><strong>ModifyCalledDDI<\/strong><\/mark><\/p>\n\n\n\n<p>Below you can see two diagrams to explain the different steps<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/IncomingPSTNCallModified.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"676\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/IncomingPSTNCallModified-1024x676.jpg\" alt=\"\" class=\"wp-image-2655\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/IncomingPSTNCallModified-1024x676.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/IncomingPSTNCallModified-300x198.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/IncomingPSTNCallModified-768x507.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/IncomingPSTNCallModified.jpg 1095w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/OutgoingTeamsCallModified-1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"504\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/OutgoingTeamsCallModified-1-1024x504.jpg\" alt=\"\" class=\"wp-image-2664\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/OutgoingTeamsCallModified-1-1024x504.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/OutgoingTeamsCallModified-1-300x148.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/OutgoingTeamsCallModified-1-768x378.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/03\/OutgoingTeamsCallModified-1.jpg 1517w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>When we talk about Direct Routing it is possible to create manipulation rules to change the Phone Numbers (DDIs) inside the Teams tenant<\/p>\n<p>The supported scenarios are:<br \/>\nModify an call incoming from the PSTN to Teams<br \/>\nModify an outgoing call from Teams to the PSTN<\/p>\n","protected":false},"author":1,"featured_media":2667,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","twitterCardType":"","cardImageID":0,"cardImage":"","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":"","footnotes":""},"categories":[806,753,752,757],"tags":[762,804,759,751,77,755,83],"class_list":["post-2654","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-806","category-microsoft365","category-microsoft-teams","category-office-365","tag-microsoftteams","tag-direct-routing","tag-microsoft-365","tag-microsoft-teams","tag-office-365","tag-teams","tag-voice"],"_links":{"self":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2654"}],"version-history":[{"count":5,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2654\/revisions"}],"predecessor-version":[{"id":2666,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2654\/revisions\/2666"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/media\/2667"}],"wp:attachment":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}