<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="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:Arial;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
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]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'>Hi guys,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'>I recently faced an issue regarding SIP registration: I
have a 2-NIC Linux PC, with eth0 set to address 192.168.1.1 (NATted over public
network, with address 89.X.Y.Z) and eth1 set to address 1.1.1.1. In [sip.conf] I
set general option<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>bindaddr=0.0.0.0
; IP address to bind to (0.0.0.0 binds to all)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'>Then I have configured an account as following:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>[999]<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>type=friend<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>username=999<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>host=dynamic<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>port=5080<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>context=sipfrom<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>nat=no<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>canreinvite=no<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>call-limit=8<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>videosupport=no<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>disallow=all<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>allow=alaw<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>qualify=15000<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'>So far, so good.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'>Now, I have an internal process (onto Linux PC) which is a
SIP endpoint and should register to Asterisk as 1.1.1.1:5080, but an external
entity (i.e. a SIP endpoint over public Internet) is trying to register to
Asterisk as <a href="mailto:999@89.X.Y.Z">999@89.X.Y.Z</a>:5060 and the
registration SUCCEEDS! When I launch the CLI command sip show peers, I see a
row like this:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:11.0pt;
font-family:"Courier New"'>999/999
1.1.1.1
5060 OK (3 ms)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'>Can someone explain me this kind of behaviour? Is it
normal? Can I restrict registration of 999 peer only to SIP UA from network
1.1.1.X?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'>Thanks for your help! Regards,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Verdana><span style='font-size:11.0pt;
font-family:Verdana'>Alberto Aggio<o:p></o:p></span></font></p>
</div>
</body>
</html>