<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 10, 2020 at 3:25 PM Administrator <<a href="mailto:admin@tootai.net">admin@tootai.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi list,<br>
<br>
We have a strange behavior: a customer Snom300 behind a public FW has <br>
contact like<br>
<br>
contact              : <br>
sip:user@x.y.39.147:2048;x-ast-orig-host=<a href="http://169.254.252.1:2048" rel="noreferrer" target="_blank">169.254.252.1:2048</a></blockquote><div><br></div><div>x-ast-orig-host is a header we add to incoming requests when rewrite_contact is on AND the host we get the request from is different from the host in the contact URI.  We do this so we can restore the original contact URI when we send responses.  Here's the scenario...</div><div><br></div><div>A client behind a firewall sends Asterisk a REGISTER request.  The contact URI is probably going to be a non-routable ip address like 192.168.0.1 but the host the packet comes from will be the public ip address of the firewall.   In order to properly route responses and subsequent requests, the "rewrite_contact" option can be used to force Asterisk to substitute the private ip address in the contact header with the public ip address we actually got the packet from.  This way we send responses and new requests to the public ip address. This all works well except for 1 scenario...   When a client sends a REGISTER request, they can use the IP address in the contact header of the response to match it to the request.  If we've rewritten the contact header, they won't be able to match it.   So we save off the contact host into that x-ast-orig-host header and when we send responses back to the client, we still send it to the public ip address git we reset the contact host back to what was in the original request.  We then strip all x-ast* headers before we actually send the packets.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
The phone can place calls but not receive any. Also, qualify give <br>
unreachable which seems correct when looking the x-ast-orig-host IP. <br>
Problem is that the local IP of this phone is 192.168.1.75<br></blockquote><div><br></div><div>Well, 169.254.x.x addresses are Automatic Assigned Ip Addresses assigned by the device itself when it can't get a dhcp ip address.  It's highly unlikely that things are going to function normally if the device doesn't have a real ip address.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Question: how asterisk sets this IP ? It looks for us like a FW issue as <br>
we have other customers with approaching local network organisation and <br>
which are not facing this problem.<br></blockquote><div><br></div><div>See above.  You should also check that the router the phone is connected to does NOT have SIP ALG turned on because that will mess with the SIP headers.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks for any hint.<br>
<br>
-- <br>
Daniel<br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
      <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color:rgb(7,55,99)">George Joseph</span><br></div></div><div dir="ltr" style="font-size:small"></div><div style="font-family:tahoma,sans-serif;font-size:small"><span style="color:rgb(7,55,99)">Asterisk Software Developer</span><br></div><span style="color:rgb(7,55,99);font-family:tahoma,sans-serif;font-size:small">direct/fax +1 256 428 6012</span><br><div style="font-family:tahoma,sans-serif;font-size:small"><font color="#073763" style="--darkreader-inline-color:#97cdf8;">Check us out at</font> <a href="http://www.sangoma.com/" style="color:rgb(17,85,204)" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br></div><div style="font-family:tahoma,sans-serif;font-size:small"><img src="cid:ii_k3abte590" alt="image.png" width="184" height="32" style="margin-right: 0px;"></div></div></div></div></div></div></div></div></div>