<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>kamailio adds only outbound address in in a new single Via
      header, being required by the next hop to send the reply back o
      kamailio. However, the full Via stack has to be sent back in the
      reply, but the registrar doesn't do it.</p>
    <p>Based on the server header in reply, it is a Cirpack and it seems
      that it doesn't support IPv6 at all, not even in parsing and just
      mirroring required headers, because it doesn't sent back the Via
      with IPv6 addresses. For routing, it would need only ipv4.</p>
    <p>Overall, this has nothing to do with kamailio and no matter what
      version of kamailio you use, it will be the same behavior. Maybe
      you can ask the provider of registrar about ipv6.<br>
    </p>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 06.09.18 17:52, Karlheinz Knapp
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CABxF9wnH89y72LjkTj2m5n58kg78dJ4yYLav+vwT+++KQ8o6gQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div>Hi,</div>
                        <div><br>
                        </div>
                        <div>of course kamailio is listening on IPv4 and
                          IPv6.</div>
                        <div><br>
                        </div>
                        <div>Register coming from IPv6 and goes out on
                          IPv4:</div>
                        <div><br>
                        </div>
                        <div>REGISTER sip:<a
                            href="http://sip.ggew-net.de"
                            moz-do-not-send="true">sip.ggew-net.de</a>
                          SIP/2.0<br>
                          Via: SIP/2.0/UDP
                          217.113.176.155;branch=z9hG4bK98fc.314c428d232717f129932376c83e2c02.0<br>
                          Via: SIP/2.0/UDP
[2A05:E2C2:0:401:F40D:E8C5:5D85:2A95]:5060;received=2A05:E2C2:0:401:F40D:E8C5:5D85:2A95;branch=z9hG4bK001755af58b0e811a048bb9f393b8bfe;r<br>
                          rt=5060<br>
                          From: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=4236924539<br>
                          To: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>><br>
                          Call-ID:
                          8080BCAE-58B0-E811-A046-BB9F393B8BFE@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95<br>
                          CSeq: 1 REGISTER<br>
                          Contact:
<a class="moz-txt-link-rfc2396E" href="sip:4962519448281@[2A05:E2C2:0:401:F40D:E8C5:5D85:2A95]:5060"><sip:4962519448281@[2A05:E2C2:0:401:F40D:E8C5:5D85:2A95]:5060></a>;+sip.instance="<urn:uuid:00E0F96C-5BAF-E811-A877-86B14B4F5249>"<br>
                          Allow: INVITE, ACK, BYE, CANCEL, INFO,
                          MESSAGE, NOTIFY, OPTIONS, REFER, UPDATE, PRACK<br>
                          Max-Forwards: 69<br>
                          Allow-Events: org.3gpp.nwinitdereg<br>
                          User-Agent: SIPPER for PhonerLite<br>
                          Supported: replaces, from-change, gruu<br>
                          Expires: 900<br>
                          Content-Length: 0<br>
                          P-hint: outbound</div>
                        <div><br>
                        </div>
                        <div>Answer on IPv4:</div>
                        <div>SIP/2.0 401 Unauthorized<br>
                          Call-ID:
                          8080BCAE-58B0-E811-A046-BB9F393B8BFE@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95<br>
                          CSeq: 1 REGISTER<br>
                          From: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=4236924539<br>
                          Server: Cirpack/v4.76 (gw_sip)<br>
                          To: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=00-07683-7956ba80-5065f1a44<br>
                          Via: SIP/2.0/UDP
217.113.176.155;received=217.113.176.155;rport=5060;branch=z9hG4bK98fc.314c428d232717f129932376c83e2c02.0<br>
                          WWW-Authenticate: Digest realm="<a
                            href="http://sip.ggew-net.de"
                            moz-do-not-send="true">sip.ggew-net.de</a>",nonce="7956b03f7acf80ba100f00e723284f58",opaque="7950c9065c0c955",stale=false,algorithm=MD5<br>
                          Content-Length: 0</div>
                        <div><br>
                        </div>
                        <div>The same answer on th IPv6 side after
                          kamailio without something special:</div>
                        <div>SIP/2.0 401 Unauthorized<br>
                          Call-ID:
                          8080BCAE-58B0-E811-A046-BB9F393B8BFE@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95<br>
                          CSeq: 1 REGISTER<br>
                          From: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=4236924539<br>
                          Server: Cirpack/v4.76 (gw_sip)<br>
                          To: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=00-07683-7956ba80-5065f1a44<br>
                          WWW-Authenticate: Digest realm="<a
                            href="http://sip.ggew-net.de"
                            moz-do-not-send="true">sip.ggew-net.de</a>",nonce="7956b03f7acf80ba100f00e723284f58",opaque="7950c9065c0c955",stale=false,algorithm=MD5<br>
                          Content-Length: 0</div>
                        <div><br>
                        </div>
                        <div>It contains no Via header!!!</div>
                        <div><br>
                        </div>
                        <div>If I add my append_hf()</div>
                        <div>append_hf("Via: SIP/2.0/UDP
                          [2a05:e2c1:2::111];branch=$sel(via[1].branch);rport=5060\r\n",
                          "To");</div>
                        <div>msg_apply_changes();</div>
                        <div><br>
                        </div>
                        <div>I get:</div>
                        <div>SIP/2.0 401 Unauthorized<br>
                          Call-ID:
                          8080BCAE-58B0-E811-A046-BB9F393B8BFE@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95<br>
                          CSeq: 1 REGISTER<br>
                          From: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=4236924539<br>
                          Server: Cirpack/v4.76 (gw_sip)<br>
                          To: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=00-07683-7956ba80-5065f1a44<br>
                          Via: SIP/2.0/UDP
217.113.176.155;received=217.113.176.155;rport=5060;branch=z9hG4bK98fc.314c428d232717f129932376c83e2c02.0<br>
                          WWW-Authenticate: Digest realm="<a
                            href="http://sip.ggew-net.de"
                            moz-do-not-send="true">sip.ggew-net.de</a>",nonce="7956b03f7acf80ba100f00e723284f58",opaque="7950c9065c0c955",stale=false,algorithm=MD5<br>
                          Content-Length: 0</div>
                        <div><br>
                        </div>
                        <div>With the original Via header !!!</div>
                        <div><br>
                        </div>
                        <div>If I add a second Via with append_hf()</div>
                        <div><br>
                        </div>
                        <div>append_hf("Via: SIP/2.0/UDP
                          [2a05:e2c2:0:401:3002:AA:754A:F475]:5060;rport\r\n",
                          "To");<br>
                          append_hf("Via: SIP/2.0/UDP
                          [2a05:e2c1:2::111];branch=$sel(via[1].branch);rport=5060\r\n",
                          "To");<br>
                          msg_apply_changes();<br>
                        </div>
                        <div><br>
                        </div>
                        <div>I can see this additional line in the IPv6
                          packet too.</div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>SIP/2.0 401 Unauthorized<br>
                          Call-ID:
                          0038C332-5AB0-E811-ABC9-80F5AA6CB72C@2A05:E2C2:0:401:F40D:E8C5:5D85:2A95<br>
                          CSeq: 1 REGISTER<br>
                          From: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=2618219059<br>
                          Server: Cirpack/v4.76 (gw_sip)<br>
                          To: "PhonerLite" <<a
                            href="mailto:sip%3A4962519448281@sip.ggew-net.de"
                            moz-do-not-send="true">sip:4962519448281@sip.ggew-net.de</a>>;tag=00-07871-795b4386-0dc31d606<br>
                          Via: SIP/2.0/UDP
[2a05:e2c1:2::111];branch=z9hG4bK0ce8.b94e5d3389049004487a8551ac2c8c41.0;rport=5060<br>
                          Via: SIP/2.0/UDP
217.113.176.155;received=217.113.176.155;rport=5060;branch=z9hG4bK0ce8.b94e5d3389049004487a8551ac2c8c41.0<br>
                          WWW-Authenticate: Digest realm="<a
                            href="http://sip.ggew-net.de"
                            moz-do-not-send="true">sip.ggew-net.de</a>",nonce="795b3345266c3dd57a52e3237f4276dd",opaque="7950c9065c0c955",stale=false,algorithm=MD5<br>
                          Content-Length: 0</div>
                        <div><br>
                        </div>
                        <div>But since I don't have the right branch,
                          PhonerLite starts a new registration instead
                          of reregister with username password.</div>
                        <div><br>
                        </div>
                        <div>Best regards<br>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.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-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
  </body>
</html>