{"id":4988,"date":"2016-03-15T19:54:24","date_gmt":"2016-03-16T00:54:24","guid":{"rendered":"http:\/\/www.nurango.com\/new\/?p=4988"},"modified":"2023-02-01T20:51:14","modified_gmt":"2023-02-01T20:51:14","slug":"asterisk-and-multiple-inbound-carrier-ips","status":"publish","type":"post","link":"https:\/\/www.nurango.ca\/blog\/asterisk-and-multiple-inbound-carrier-ips","title":{"rendered":"asterisk and Multiple Inbound Carrier IP&#8217;s"},"content":{"rendered":"<h1><span style=\"font-family: arial,helvetica,sans-serif;\">Asterisk Hack: How to accommodate your providers multiple static IP addresses<\/span><\/h1>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">It\u2019s a common scenario, \u00a0you purchased some DIDs and your provider gives you a list of dozens of IP addresses that they may send your calls from in to your asterisk box. This could either be random IPs, a Net block such as 127.0.0.1\/24 or maybe it is beneficial if the provider is constantly growing and adding servers such as ourselves. Looks like an ACL\/administrative nightmare right?! You can\u2019t possibly spend all those hours adding trunks to accommodate all of those would be IPs. Smartly, you\u2019ve stumbled over here instead.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">To make life easier we will use a simple workaround. You may already be familiar with the \u201callowguest\u201d and \u201callowanonymous\u201d SIP calls setting. It may sound counter intuitive but in order to achieve what we want to do we will need to enable this feature.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">Here\u2019s why we normally don\u2019t want to allow anonymous callers. Johnny Hacker notices an IP-PBX online. He then attempts to send a SIP call over using a random phone number. The phone system such as asterisk, has a default \u201cCatch all\/Any DID\u201d on the main Inbound route due to lazy administration, and soon finds himself hitting an Auto Attendant or special feature. He can then hammer away at the system over IP to enumerate voicemails, attempt DISA, or perhaps DOS your system all together.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>So here\u2019s what we\u2019ll do.<\/strong><\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">1) Create or modify a Catch All\/Any from Inbound routing and set it to goto \u201cCongestion\u201d. This way asterisk will not playback a message to the would be caller indicating we\u2019re a live box.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">2) Ensure you have a valid Inbound route for every DID (ie; 15145555555) and route accordingly.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">3) Enable guestmode as per the following<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>In asterisk (including vicidial)<\/strong><\/span><br \/>\n<span style=\"font-family: arial,helvetica,sans-serif;\"> nano \/etc\/asterisk\/sip.conf<\/span><br \/>\n<span style=\"font-family: arial,helvetica,sans-serif;\"> Find the line \u201callowguest = \u00a0no\u201d and change this to \u201cyes\u201d<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"font-family: arial,helvetica,sans-serif;\"><strong>FreePBX<\/strong><\/span><br \/>\n<span style=\"font-family: arial,helvetica,sans-serif;\"> Through \u201cSettings -&gt; Asterisk SIP Settings\u201d, enable both \u201cAllow SIP Guest\u201d and \u201cAllow Anonymous Inbound SIP calls\u201d by switching on \u201cYes\u201d.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">This will allow any IP to call in to the system from the from-pstn context, but since your provider is sending the valid number it is trying to reach (ie;\u00a0 15145555555), the proper Inbound route will catch the call.<\/span><\/p>\n<h4><span style=\"font-family: arial,helvetica,sans-serif;\">Thank\u2019s for joining me, hope this helped other geeks out there and feel free to subscribe to our blog for more useful tips.<\/span><\/h4>\n<h4><span style=\"font-family: arial,helvetica,sans-serif;\">nurango provides an <a title=\"phone system\" href=\"https:\/\/www.nurango.ca\/phone-system\">Encrypted Phone System<\/a> for Business&#8217; and Startups. Take a tour of our &#8220;simpler&#8221; phone system.<\/span><\/h4>\n","protected":false},"excerpt":{"rendered":"<p>Asterisk Hack: How to accommodate your providers multiple static IP addresses It\u2019s a common scenario, \u00a0you purchased some DIDs and your provider gives you a list of dozens of IP addresses that they may send your calls from in to your asterisk box. This could either be random IPs, a Net block such as 127.0.0.1\/24 or maybe it is beneficial if the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4989,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[4],"tags":[6,9],"class_list":["post-4988","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-asterisk","tag-sip"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/posts\/4988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/comments?post=4988"}],"version-history":[{"count":2,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/posts\/4988\/revisions"}],"predecessor-version":[{"id":10228,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/posts\/4988\/revisions\/10228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/media\/4989"}],"wp:attachment":[{"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/media?parent=4988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/categories?post=4988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nurango.ca\/blog\/wp-json\/wp\/v2\/tags?post=4988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}