<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 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:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
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";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
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;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText>Good morning Jon and thank you for your answers.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Another user was assisting me along and we did resolve the banning issue.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Additionally you comment on the global setting set to yes was an excellent recommendation.  I did what you said immediately. That worked without an issue.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>The list user <b>Jeremie</b> was very helpful last night in cleaning up my miscellaneous issues.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>At this point I am only down to one issue that I believe to be my last step to an outbound call from the Asterisk SIP Trunk.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I have Asterisk sending calls to the SIPWISE with the following pattern.  1NXXNXXXXXX (cc)(ac)(sn) for USA calls.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I know for sure I am struggling with the rewrite rules so the call can then be sent off to my carrier.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Inbound Rewrite Rules for Caller<o:p></o:p></p><p class=MsoPlainText>Inbound Rewrite Rules for Callee<o:p></o:p></p><p class=MsoPlainText>Outbound Rewrite Rules for Caller<o:p></o:p></p><p class=MsoPlainText>Outbound Rewrite Rules for Callee<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><img width=595 height=389 id="Picture_x0020_1" src="cid:image001.png@01CDE40C.51C38140"><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I think if there was a sample of the rewrite rule for USA dialing and perhaps international dialing I would have this.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Thank you for your response and Jeremie last night.  We are getting very close.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Thanks<o:p></o:p></p><p class=MsoPlainText>Kevin<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-----Original Message-----<br>From: spce-user-bounces@lists.sipwise.com [mailto:spce-user-bounces@lists.sipwise.com] On Behalf Of Jon Bonilla (Manwe)<br>Sent: Thursday, December 27, 2012 4:23 AM<br>To: spce-user@lists.sipwise.com<br>Subject: Re: [Spce-user] Asterisk SIP Trunk to Sipwise - Subscriber or something else?<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>El Wed, 26 Dec 2012 15:56:02 -0500<o:p></o:p></p><p class=MsoPlainText>"Kevin Masse" <<a href="mailto:kmasse@questblue.com"><span style='color:windowtext;text-decoration:none'>kmasse@questblue.com</span></a>> escribió:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Hi Kevin<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Here is a simple breakdown of the situation.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Installation of sipwise was done by following full install <o:p></o:p></p><p class=MsoPlainText>> instructions provided.  There were no errors in this process.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ·         Inbound calls are routing to Asterisk Box via Subscriber e.164<o:p></o:p></p><p class=MsoPlainText>> number match.  This works without any issues.   (no nat, asterisk is sitting<o:p></o:p></p><p class=MsoPlainText>> on public IP)  This is working because I have the Asterisk box <o:p></o:p></p><p class=MsoPlainText>> allowing anonymous SIP calls for testing avoiding having to register the trunk.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Are you allowing unauthenticated calls from spce peer or globally? If it's the second you should remove that. Use the "insecure" setting in sip.conf, but never "allowguest"<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Example for a 1.4 box (should more or less work the same for newer versions)<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>[spce]<o:p></o:p></p><p class=MsoPlainText>type=peer<o:p></o:p></p><p class=MsoPlainText>host=1.2.3.4<o:p></o:p></p><p class=MsoPlainText>insecure=invite,port<o:p></o:p></p><p class=MsoPlainText>fromuser=user_at_spce<o:p></o:p></p><p class=MsoPlainText>fromdomain=domain_at_spce<o:p></o:p></p><p class=MsoPlainText>defaultuser=user_at_spce<o:p></o:p></p><p class=MsoPlainText>context=sip_in<o:p></o:p></p><p class=MsoPlainText>;Optional<o:p></o:p></p><p class=MsoPlainText>;nat=no<o:p></o:p></p><p class=MsoPlainText>;qualify=no<o:p></o:p></p><p class=MsoPlainText>;disallow=all<o:p></o:p></p><p class=MsoPlainText>;allow=alaw<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ·         Inbound calls are routing to a telephone registered as a subscriber<o:p></o:p></p><p class=MsoPlainText>> directly to sipwise.  This works without any issues.  (NAT in use, <o:p></o:p></p><p class=MsoPlainText>> telephone is behind router)<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> ·         Outbound calls from the telephone registered as a subscriber<o:p></o:p></p><p class=MsoPlainText>> directly to sipwise are working perfect.  No issues here.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> The issue I am having is the SIP trunk registering to sipwise and <o:p></o:p></p><p class=MsoPlainText>> getting banned every time I make a call attempt.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>What's your register line, you sip peer configuration at sip.conf and what's the ngrep-sip of those registrations?<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> The configuration sample provide here appear straight forward but I <o:p></o:p></p><p class=MsoPlainText>> need to understand the process a little better.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 1st Do I want my Asterisk box to register to the sipwise as a <o:p></o:p></p><p class=MsoPlainText>> subscriber with the subscriber name and password?<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>If you have a static public ip you can leave the asterisk as subscriber but don't register it (you can fake a permanent contact for it) <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>YOu can also trust the ip address and don't request authentication (check the trusted preferences.) But don't make it because you have asterisk configuration problems. Better to debug them first.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> 2nd Do I want my Asterisk box to register to the sipwise server as <o:p></o:p></p><p class=MsoPlainText>> something else to be able to make outbound calls?<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>As subscriber.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> What ends up happening when I try all of the sip trunk settings in the <o:p></o:p></p><p class=MsoPlainText>> list examples is the Asterisk box ends up getting banned under System<o:p></o:p></p><p class=MsoPlainText>> Administration à Security Bans à Users   (The IP is not getting banned just<o:p></o:p></p><p class=MsoPlainText>> the user)<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>The user won't be bale to make calls (the authentication process is never reached for banned users) until the ban expires because it's banned. This prevents brute force attacks against user/password.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> I can provide lots of information but it may not be needed if the <o:p></o:p></p><p class=MsoPlainText>> above 2 questions have an answer.  I can keep reading from there.<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>>  <o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText>> Happy Holidays!<o:p></o:p></p><p class=MsoPlainText>> <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Same to you! Merry christmas!<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p></div></body></html>