<div>Hi David,</div>
<div>thank you for you answer, </div>
<div>&nbsp;</div>
<div><span class="gmail_quote">2008/11/6, <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ingdavidcespedes@cable.net.co" target="_blank">ingdavidcespedes@cable.net.co</a> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ingdavidcespedes@cable.net.co" target="_blank">ingdavidcespedes@cable.net.co</a>&gt;:</span><span class="q"> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi!<br><br>I had the same problem (My PC was responding everything it receives through the default gateway &quot;eth0&quot;&nbsp;&nbsp;). Everybody say that it was an Asterisk bug, but it was a problem in the routing table. </blockquote>

<div>&nbsp;</div></span>
<div>Yes, I&#39;m new to Openser but I know quite well Asterisk, and I don&#39;t think it is a bug or&nbsp; a misconfiguration&nbsp;. </div><span class="q"><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Type route in a terminal and check if they are the way you are thinking. If not, add the correct route. Tell me if it solve your problem.</blockquote>

<div>&nbsp;</div></span>
<div>The route table is correct, but a strange thing happens since&nbsp; the SIP packet is sent from the correct nic, but un the UDP header of that packet I see as source the IP of the other nic (the one that received the orinal packet)</div>

<div>&nbsp;</div>
<div>I have to investigate a little more on this aspect anyway.</div>
<div><span class="e" id="q_11d720f6f0361376_5">
<div>&nbsp;</div>
<div>C.</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">David Cespedes<br><br>----- Mensaje original -----<br>De: Cosimo Fadda &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:cfadda.lists@gmail.com" target="_blank">cfadda.lists@gmail.com</a>&gt;<br>
Fecha: Miércoles, Noviembre 5, 2008 9:36 am<br>Asunto: [Kamailio-Users] Openser as Proxy and Asterisk as Registrar<br><br>&gt; Hi everybody<br>&gt; I&#39;d like to implement this scenario:<br>&gt;<br>&gt; -----------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----------<br>
&gt; -----<br>&gt; |&nbsp;&nbsp;GW/FW<br>&gt; |&lt;----LAN1----&gt;|eth0|Openser|eth1|&lt;----LAN2----&gt;|eth0|asterisk| --<br>&gt; &gt;PSTN-----------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-----<br>&gt; ----------<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |_______________________________________________|<br>
&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; Where:<br>&gt; - Openser is reachable from the outside&nbsp;&nbsp;with a public&nbsp;&nbsp;IP<br>&gt; forwarded to<br>&gt; eth0 private address;<br>&gt;<br>&gt; - Asterisk is connected to Openser using another separated LAN<br>
&gt; - Openser acts as proxy (for requests coming from the&nbsp;&nbsp;outside) and<br>&gt; Asterisk act as registrar and gateway.<br>&gt;<br>&gt;<br>&gt; This is the description, now the questions:<br>&gt; -since opneser has two different nics, how can configure it to<br>
&gt; properly<br>&gt; send register request to asterisk?<br>&gt; This is what currently happens:<br>&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.40.68:5060/" target="_blank">192.168.40.68:5060</a>: is eth0 Openser Address<br>
&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.12.165/" target="_blank">192.168.12.165</a> is eth1 Openser Address<br>&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.12.106/" target="_blank">192.168.12.106</a>&nbsp;&nbsp;is Asterisk address<br>
&gt; 82.187.X.X is Openser public address<br>&gt; Network 192.168.40.X is not reachable from net 192.168.12.X<br>&gt;<br>&gt; &lt;-- SIP read from <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.40.68:5060/" target="_blank">192.168.40.68:5060</a>:&nbsp;&nbsp;REGISTER sip:<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.12.106/" target="_blank">192.168.12.106</a><br>
&gt; SIP/2.0&nbsp;&nbsp; // 12.106 is Asterisk address<br>&gt; Via: SIP/2.0/UDP 82.187.X.X;branch=z9hG4bKfe0f.21364c47.0 Via:<br>&gt; SIP/2.0/UDP<br>&gt; 192.168.40.254:2660;rport=2265;received=82.187.Y.Ybranch=z9hG4bK532058BAC7C544E0961E038CC29B2106<br>
&gt;<br>&gt; From: Cfadda &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sip%3A225@82.187.90.68" target="_blank">sip:225@82.187.90.68</a>&gt;;tag=3189722840<br>&gt; To: Cfadda &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sip%3A225@82.187.90.68" target="_blank">sip:225@82.187.90.68</a>&gt;<br>
&gt; Contact: &quot;Cfadda&quot; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://sip:225@192.168.40.254:2660/" target="_blank">sip:225@192.168.40.254:2660</a>&gt;<br>&gt; Call-ID: 487DA353295C484FA58B2FB1464A2210@82.187.X.X<br>
&gt; CSeq: 65140 REGISTER<br>&gt; Expires: 1800<br>&gt; Max-Forwards: 69<br>&gt; User-Agent: X-PRO release 1105x<br>&gt; Content-Length: 0<br>&gt;<br>&gt;<br>&gt; Nov&nbsp;&nbsp;5 10:37:28 VERBOSE[23848] logger.c: --- (12 headers 0 lines) --<br>
&gt; -<br>&gt; Nov&nbsp;&nbsp;5 10:37:28 VERBOSE[23848] logger.c: Using latest REGISTER<br>&gt; request<br>&gt; as basis request<br>&gt; Nov&nbsp;&nbsp;5 10:37:28 VERBOSE[23848] logger.c: Sending to 82.187.X.X :<br>&gt; 5060<br>&gt; (non-NAT)<br>
&gt; Nov&nbsp;&nbsp;5 10:37:28 VERBOSE[23848] logger.c: Transmitting (NAT) to<br>&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.40.68:5060/" target="_blank">192.168.40.68:5060</a>:<br>&gt; SIP/2.0 100 Trying<br>
&gt; Via: SIP/2.0/UDP 82.187.X.X<br>&gt; ;branch=z9hG4bKfe0f.21364c47.0;received=<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.40.68/" target="_blank">192.168.40.68</a><br>&gt; Via: SIP/2.0/UDP<br>
&gt; 192.168.40.254:2660;rport=2265;received=82.187.Y.Y;branch=z9hG4bK532058BAC7C544E0961E038CC29B2106<br>&gt;<br>&gt; From: Cfadda &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sip%3A225@82.187.90.68" target="_blank">sip:225@82.187.90.68</a>&gt;;tag=3189722840<br>
&gt; To: Cfadda &lt;sip:225@82.187.X.X &gt;<br>&gt; Call-ID: 487DA353295C484FA58B2FB1464A2210@82.187.X.X<br>&gt; CSeq: 65140 REGISTER<br>&gt; User-Agent: Asterisk PBX<br>&gt; Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br>
&gt; Contact: &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sip%3A225@192.168.12.106" target="_blank">sip:225@192.168.12.106</a>&gt;<br>&gt; Content-Length: 0<br>&gt;<br>&gt;<br>&gt; ---<br>&gt; Nov&nbsp;&nbsp;5 10:37:28 VERBOSE[23848] logger.c: Transmitting (NAT) to<br>
&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.40.68:5060/" target="_blank">192.168.40.68:5060</a>:<br>&gt; SIP/2.0 401 Unauthorized<br>&gt; Via: SIP/2.0/UDP 82.187.X.X<br>&gt; ;branch=z9hG4bKfe0f.21364c47.0;received=<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.40.68/" target="_blank">192.168.40.68</a><br>
&gt; Via: SIP/2.0/UDP<br>&gt; 192.168.40.254:2660;rport=2265;received=82.187.Y.Y;branch=z9hG4bK532058BAC7C544E0961E038CC29B2106<br>&gt;<br>&gt; From: Cfadda &lt;sip:225@82.187.X.X &gt;;tag=3189722840<br>&gt; To: Cfadda &lt;sip:225@82.187.X.X &gt;;tag=as4c420a53<br>
&gt; Call-ID: 487DA353295C484FA58B2FB1464A2210@82.187.X.X<br>&gt; CSeq: 65140 REGISTER<br>&gt; User-Agent: Asterisk PBX<br>&gt; Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br>&gt; WWW-Authenticate: Digest algorithm=MD5, realm=&quot;asterisk&quot;,<br>
&gt; nonce=&quot;05f14a3e&quot;Content-Length: 0<br>&gt;<br>&gt; So asterisk sends response to the wrong interface.<br>&gt;<br>&gt; How can I solve this?<br>&gt;<br>&gt; Thanks in advance,<br>&gt;<br>&gt; C.<br>&gt;<br>&gt; _______________________________________________<br>
&gt; Users mailing list<br>&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br><br></blockquote></span></div></div><br>