<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    received is added because the client requests that via rport
    parameter or because of using rport. If the processed request is
    REGISTER, you can try removing rport/received parameters from Via,
    then do msg_apply_changes().<br>
    <br>
    However, without rport enforcement, the response might not be routed
    back, because SIP says to send it back to the address in Via, which
    is invalid in websocket case.<br>
    <br>
    Maybe you can rewrite headers in nginx or use kamailio as a
    proxy/load balancer instead of nginx and then you have plenty of
    options to play with sip headers.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 06/10/14 02:39, Gonzalo Gasca wrote:<br>
    </div>
    <blockquote
cite="mid:CAL+DTgJJA0+ZgCu41ER8v6cd5FOzT=wcJ4pH3BdEsE8R6RGdjQ@mail.gmail.com"
      type="cite">
      <pre wrap="">I'm using Kamailio as SIP Registrar using Websockets.
My topology looks like this:

Sip client (sipml5) ---> wss ---> Nginx ---> ws ---> Kamailio 4.1.5

When I look into my SipMl5 application in the Register Message 200 OK
from Kamailio I see the Nginx private IP address 172.31.22.2

Via: SIP/2.0/WSS
df7jal23ls0d.invalid;rport=37111;received=172.31.22.2;branch=z9hG4bKtv75otkzmPVsdNWevweLt4TN9JnLnQ0p

How can I remove private IP Address in Via header to achieve topology hiding?

>From Kamailio logs:

Oct  6 00:34:21 ip-172-31-27-85 /usr/sbin/kamailio[8941]: DEBUG:
registrar [reply.c:374]: build_contact(): created Contact HF: Contact:
<a class="moz-txt-link-rfc2396E" href="mailto:sips:gogasca@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=wss"><sips:gogasca@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=wss></a>;expires=200#015#012
Oct  6 00:34:21 ip-172-31-27-85 /usr/sbin/kamailio[8941]: DEBUG: sl
[sl.c:288]: send_reply(): reply in stateless mode (sl)
Oct  6 00:34:21 ip-172-31-27-85 /usr/sbin/kamailio[8941]: DEBUG:
<core> [msg_translator.c:204]: check_via_address():
check_via_address(172.31.22.2, df7jal23ls0d.invalid, 0)
O


Version: kamailio 4.1.5 (x86_64/linux)

# ------ topoh --------

modparam("topoh", "mask_key", "opencall")
modparam("topoh", "mask_ip", "<Public IP Address of Kamailio>")
modparam("topoh", "vparam_prefix", "llamato")
modparam("topoh", "mask_callid", 1)
modparam("topoh", "sanity_checks", 1)
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>