<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi,<div><br></div><div>I would set up the PBX also as a peer.  You can then use regex rules to route... (note you’d have to enable peer to peer calls in the preferences of inbound and outbound peers)</div><div><br></div><div>Your upstream provider should be a peer in any case. And yes, you have to use the api to set up aliases if you want to use a script.<br><br><div id="AppleMailSignature" dir="ltr">Yours sincerely,<div><br></div><div>Walter Klomp</div><div><br></div></div><div dir="ltr"><br>On 26 Sep 2018, at 04:51, Kevin Masse <<a href="mailto:kmasse@questblue.com">kmasse@questblue.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->


<div class="Section1">
<p class="MsoNormal"><span style="color:#1F497D">Hello Kevin,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">With this large number of entries I would most certainly use the API to add them.  Are you using the built in API?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thank you<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Kevin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:#0F243E"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:#0F243E">Kevin Masse QuestBlue Systems, Inc. </span></b><b><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#004AFE"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:#0F243E">919 443 1617  Ext 5352 FAX 888 548 6593<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:#0F243E">1947 Evans Rd, Cary NC 27513</span><span style="font-size:7.5pt;
font-family:"Arial","sans-serif";color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:black"><a href="http://www.questblue.com">www.questblue.com</a>
</span><span style="font-size:12.0pt;font-family:
"Times New Roman","serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Spce-user [<a href="mailto:spce-user-bounces@lists.sipwise.com">mailto:spce-user-bounces@lists.sipwise.com</a>]
<b>On Behalf Of </b>Kevin Boddy<br>
<b>Sent:</b> Tuesday, September 25, 2018 2:24 PM<br>
<b>To:</b> <a href="mailto:spce-user@lists.sipwise.com">spce-user@lists.sipwise.com</a><br>
<b>Subject:</b> [Spce-user] How to add thousands of Alias Numbers to a subscriber<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-ZA">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">I’ve got a test setup of Sipwise CE mr 6.4.1 connected to my upstream voip  provider on one interface and my backend PBX on another network interface.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">I created the PBX as a subscriber and can get inbound calls working by adding in the Primary Number  and Alias Numbers fields.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">I’ve DID number ranges, non-sequential numbers in total adding up to about 50000 numbers.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">How would I add those the Alias Numbers?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">Normally on our SBC’s you can add a regular expression for the number range but on Sipwise all I can do is add the numbers in the format <cc> <ac> <upn>.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">The UPN has to have at least three digits otherwise it doesn’t work so I can cover some of the number ranges like this but this still leaves me with thousands of numbers to add to this subscriber.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">Is there a better way to achieve this?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA">Kevin<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-ZA" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p style="margin-bottom:12.0pt"><strong><span lang="EN-ZA" style="font-size:10.0pt;
font-family:"Arial","sans-serif";color:#000066">Kevin Boddy
</span></strong><b><span lang="EN-ZA" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#000066"><br>
<strong><span style="font-family:"Arial","sans-serif"">ISP Technical</span></strong></span></b><span lang="EN-ZA">
<o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><a href="http://www.firstnet.co.za"><span style="text-decoration:none"><image001.png></span></a><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:
"Arial","sans-serif";color:black">Tel:</span></strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:black"> +27318180800</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:maroon">|</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><strong><span lang="EN-ZA" style="font-size:7.5pt;
font-family:"Arial","sans-serif";color:black">Direct:
</span></strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:black">+27315736288</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:maroon">|</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><strong><span lang="EN-ZA" style="font-size:7.5pt;
font-family:"Arial","sans-serif";color:black">Mobile:
</span></strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:black">+27832661735</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:maroon">|</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><strong><span lang="EN-ZA" style="font-size:7.5pt;
font-family:"Arial","sans-serif";color:black">Fax:
</span></strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:black">+27318180801</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:maroon">|</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><strong><span lang="EN-ZA" style="font-size:7.5pt;
font-family:"Arial","sans-serif";color:black">Email:</span></strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:black"> <a href="mailto:kevin.boddy@firstnet.co.za">kevin.boddy@firstnet.co.za</a>
<br>
<strong><span style="font-family:"Arial","sans-serif"">Address: </span></strong>4 Sunbury Crescent, Sunbury Office Park, La Lucia Ridge, 4019
</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:maroon">|</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black">
</span><strong><span lang="EN-ZA" style="font-size:7.5pt;
font-family:"Arial","sans-serif";color:black">Postal Address</span></strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:black">: P O Box 703, Umhlanga Rocks, 4320</span><span lang="EN-ZA" style="font-size:7.5pt;
font-family:"Times New Roman","serif";color:black"><br>
</span><strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:black">Website:</span></strong><span lang="EN-ZA" style="font-size:7.5pt;
font-family:"Times New Roman","serif";color:black">
</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:black"><a href="http://www.firstnet.co.za" target="_blank">http://www.firstnet.co.za</a></span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Times New Roman","serif";
color:black"><br>
</span><strong><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:black">Disclaimer:</span></strong><span lang="EN-ZA" style="font-size:7.5pt;
font-family:"Times New Roman","serif";color:black">
</span><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";color:black"><a href="http://www.firstnet.co.za/disclaimer.htm" target="_blank">http://www.firstnet.co.za/disclaimer.htm</a></span><span lang="EN-ZA" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p></o:p></span></p>
<p><span lang="EN-ZA" style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:black">This email has been scanned for viruses and malware, and automatically archived by Mimecast SA (Pty) Ltd, an innovator in Software as a Service (SaaS) for business.
 Mimecast Unified Email Management (UEM) offers email continuity, security, archiving and compliance with all current legislation. To find out more contact FirstNet.</span><span lang="EN-ZA">
<o:p></o:p></span></p>
</div>


</div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>Spce-user mailing list</span><br><span><a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a></span><br><span><a href="https://lists.sipwise.com/listinfo/spce-user">https://lists.sipwise.com/listinfo/spce-user</a></span><br></div></blockquote></div></body></html>
<br>
<span style="color:rgb(34,34,34);font-family:sans-serif;background-color:rgb(255,255,255)"><font size="1"><span style="font-family:Arial;color:rgb(102,102,102);font-style:italic;vertical-align:baseline;white-space:pre-wrap">The contents of this email and any attachments are confidential and may also be privileged. You must not disseminate the contents of this email and any attachments without permission of the sender. If you have received this email by mistake, please delete all copies and inform the sender immediately. You may refer to our company's Privacy Policy </span><span style="color:rgb(102,102,102);font-family:Arial;font-style:italic;vertical-align:baseline;white-space:pre-wrap"><a href="https://myrepublic.net/sg/legal/terms-of-use-policies/privacy-policy/" target="_blank">here</a></span><span style="font-family:Arial;color:rgb(102,102,102);font-style:italic;vertical-align:baseline;white-space:pre-wrap">.</span></font></span>