{"id":5330,"date":"2023-07-26T10:04:01","date_gmt":"2023-07-26T08:04:01","guid":{"rendered":"https:\/\/www.msb365.blog\/?p=5330"},"modified":"2023-07-26T15:15:34","modified_gmt":"2023-07-26T13:15:34","slug":"block-inbound-calls","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=5330","title":{"rendered":"Block inbound calls"},"content":{"rendered":"<p>As Microsoft Teams continues to replace conventional telephony systems, there are more and more tasks to be done in this area that we are normally used to doing in a conventional telephony system.<br \/>\nIn this article we will deal with a smaller topic, which is nevertheless very important.<\/p>\n<p>From a user perspective, we can block incoming numbers in our teams client. But is this also possible tenant wide? Short answer: <strong>YES<\/strong>!<br \/>\nMicrosoft Calling Plans, Direct Routing, and Operator Connect all support blocking inbound calls from the Public Switched Telephone Network (PSTN). This feature allows an administrator to define a list of number patterns and exceptions at the tenant global level so that the caller ID of every incoming PSTN call to the tenant can be checked against the list for a match. If a match is made, an incoming call is rejected.<br \/>\nThis inbound call blocking feature only works on inbound calls that originate from the PSTN and only works on a tenant global level. Individual Teams users can\u2019t manipulate this list. The Teams client does allow individual users to block PSTN calls.<\/p>\n<p>\u00a0<\/p>\n<h3>Blocking numbers from the user\u2019s point of view<\/h3>\n<p>\u00a0<\/p>\n<p>To view and manage the numbers you have blocked, select <strong>settings and more<\/strong> next to your profile picture at the top of Teams, then select <strong>Settings<\/strong> > <strong>Privacy<\/strong>.<br \/>\nUnder <strong>Blocked contacts<\/strong>, select <strong>Edit blocked contacts<\/strong> to view and remove all the numbers you have blocked from the list.<br \/>\nSelect <strong>Block calls without caller ID<\/strong> to block anonymous calls.<\/p>\n<p>\u00a0<\/p>\n<h3>Blocking numbers at tenant level<\/h3>\n<p>\u00a0<\/p>\n<h4>Activate the call blocking feature<\/h4>\n<p>To view and activate the call blocking feature, use the Get- and Set-CsTenantBlockingCallingNumbers Teams PowerShell Module cmdlets.<\/p>\n<ul>\n<li>Get-CsTenantBlockedCallingNumbers returns the inbound block number patterns and the inbound exempt number patterns parameters for the global blocked number list. This cmdlet also returns whether blocking has been Enabled (True or False).<\/li>\n<li>Set-CsTenantBlockedCallingNumbers allows you to specify whether the global tenant blocked calls are turned on or off at the tenant level.<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<h4>Manage block number patterns<\/h4>\n<p>You manage number patterns by using the New-, Get-, Set-, Test-, and Remove-CsInboundBlockedNumberPattern Teams PowerShell Module cmdlets.<\/p>\n<ul>\n<li><strong>Get-CsInboundBlockedNumberPattern<\/strong> returns a list of all blocked number patterns added to the tenant list including Name, Description, Enabled (True\/False), and Pattern.<\/li>\n<li><strong>New-CsInboundBlockedNumberPattern<\/strong> adds a blocked number pattern to the tenant list.<\/li>\n<li><strong>Remove-CsInboundBlockedNumberPattern<\/strong> removes a blocked number pattern from the tenant list.<\/li>\n<li><strong>Set-CsInboundBlockedNumberPattern<\/strong> modifies one or more parameters of a blocked number pattern in the tenant list.<\/li>\n<li><strong>Test-CsInboundBlockedNumberPattern<\/strong> tests whether calls from a given phone number will be blocked.<\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<h4>Examples<\/h4>\n<h5>Block a number<\/h5>\n<p>In the following example, the tenant administrator wants to block all calls coming from the number range 1 (312) 555-0000 to 1 (312) 555-9999. The number pattern is created so that both numbers in range with + prefixed and numbers in the range without + prefixed are matched. You don\u2019t need to include the symbols \u2013 and () in the phone numbers because the system strips these symbols before matching. To turn on the number pattern, set the Enabled parameter to True. To disable this specific number pattern, set the parameter to False.<\/p>\n<pre>New-CsInboundBlockedNumberPattern -Name \"BlockRange1\" -Enabled $True -Description \"Block Contoso\" -Pattern \"^\\+?1312555\\d{4}$\"<\/pre>\n<p>In the next example, the tenant administrator wants to block all calls coming from the number 1 (412) 555-1234. To turn on the number pattern, the\u00a0<strong>Enabled<\/strong>\u00a0parameter is set to True.<\/p>\n<p>\u00a0<\/p>\n<pre>New-CsInboundBlockedNumberPattern -Name \"BlockNumber1\" -Enabled $True -Description \"Block Fabrikam\" -Pattern \"^\\+?14125551234$\"<\/pre>\n<p style=\"background: white;\"><span style=\"font-family: 'Segoe UI',sans-serif; color: #161616;\">Creating a new pattern adds the pattern as enabled by default. The description is an optional field to provide more information.<\/span><\/p>\n<p style=\"background: white; box-sizing: inherit; outline-color: inherit; margin: 1rem 0px 0px; overflow-wrap: break-word; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;\"><span style=\"font-family: 'Segoe UI',sans-serif; color: #161616;\">We recommend that you provide a meaningful name to easily understand why the pattern was added. To block spam numbers, consider naming the rule the same as the number pattern that\u2019s being matched, and then add additional information in the description as required.<\/span><\/p>\n<p style=\"background: white; box-sizing: inherit; outline-color: inherit; margin: 1rem 0px 0px; overflow-wrap: break-word; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;\"><span style=\"font-family: 'Segoe UI',sans-serif; color: #161616;\">Patterns are matched using Regular Expressions (Regex). For more information, see\u00a0<a style=\"box-sizing: inherit; outline-color: inherit; color: var(--theme-hyperlink); cursor: pointer; overflow-wrap: break-word; background-color: rgba(0, 0, 0, 0); outline-style: initial; outline-width: 0px;\" href=\"https:\/\/learn.microsoft.com\/en-us\/microsoftteams\/block-inbound-calls#using-regex\" data-linktype=\"self-bookmark\"><span style=\"text-decoration: none; text-underline: none;\">Using Regex<\/span><\/a>.<\/span><\/p>\n<p style=\"background: white; box-sizing: inherit; outline-color: inherit; margin: 1rem 0px 0px; overflow-wrap: break-word; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; word-spacing: 0px;\"><em><span style=\"font-family: 'Segoe UI',sans-serif; color: #161616;\">Allow time for replication before you test and validate.<\/span><\/em><\/p>\n<p>\u00a0<\/p>\n<h4>Allow a number<\/h4>\n<p>You can allow a number to call by removing the blocked number pattern. In the following example, the tenant administrator wants to allow 1 (412) 555-1234 to make calls again.<\/p>\n<p>Remove-CsInboundBlockedNumberPattern -Identity \u201cBlockNumber1\u201d<\/p>\n<p>\u00a0<\/p>\n<h3>Source reference<\/h3>\n<p>Most of this article references the Microsoft Technet article: <a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoftteams\/block-inbound-calls\" target=\"_blank\" rel=\"noopener\">Block inbound calls<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As Microsoft Teams continues to replace conventional telephony systems, there are more and more tasks to be done in this area that we are normally used to doing in a conventional telephony system. In this article we will deal with a smaller topic, which is nevertheless very important. From a user perspective, we can block [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5334,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[15,3],"tags":[],"class_list":["post-5330","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ms-teams","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5330"}],"version-history":[{"count":3,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5330\/revisions"}],"predecessor-version":[{"id":5333,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5330\/revisions\/5333"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/5334"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}