<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>can you test with the master branch or backport the patch from
      the commit:</p>
    <p>  -
<a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/commit/5fabdea4d86c527a2e38caaae7a54884367d6a7c">https://github.com/kamailio/kamailio/commit/5fabdea4d86c527a2e38caaae7a54884367d6a7c</a></p>
    <p>If all goes fine, then I can backport to 5.x.x branches.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 22.11.17 12:57, CARLOS GARCIA
      MORCHON wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:DB5PR06MB16068CD7B8B80DFED7F1BC04EA200@DB5PR06MB1606.eurprd06.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EstiloCorreo18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EstiloCorreo19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></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]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span lang="EN-GB">I have an IMS core
            deployed using kamailio 5.0.2. Calls from clients are
            reaching the core pcscf from a freeswitch (with address
            A.A.A.A) + a kamailio acting as proxy (with address
            B.B.B.B), so the INVITE request looks like this:<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">INVITE <a
              href="sip:1111111111@mnc001.mcc001.3gppnetwork.org"
              moz-do-not-send="true">
              sip:1111111111@mnc001.mcc001.3gppnetwork.org</a> SIP/2.0<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Record-Route: <<a
              href="sip:A.A.A.A;lr" moz-do-not-send="true">sip:A.A.A.A;lr</a>><o:p></o:p></span></p>
        <p class="MsoNormal">Via: SIP/2.0/UDP
          A.A.A.A;branch=z9hG4bK8735.ef7a61e110f335b2e92a8c1d430de585.0<o:p></o:p></p>
        <p class="MsoNormal">Via: SIP/2.0/UDP
          B.B.B.B:5080;received=B.B.B.B;rport=5080;branch=z9hG4bKHpB704ZaXSKtm<o:p></o:p></p>
        <p class="MsoNormal"><span lang="EN-GB">Max-Forwards: 65<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">From: "222222222" <<a
              href="sip:222222222@B.B.B.B" moz-do-not-send="true">sip:222222222@B.B.B.B</a>>;tag=eytD49ymQr71S<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">To: <<a
              href="sip:1111111111@mnc001.mcc001.3gppnetwork.org"
              moz-do-not-send="true">sip:1111111111@mnc001.mcc001.3gppnetwork.org</a>><o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Call-ID:
            77d249c0-487c-1236-1997-00163edbaa97<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">CSeq: 115249948 INVITE<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Contact: <<a
              href="sip:mod_sofia@B.B.B.B:5080" moz-do-not-send="true">sip:mod_sofia@B.B.B.B:5080</a>><o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">User-Agent:
            FreeSWITCH-mod_sofia/1.6.19+git~20170927T175834Z~38f568d343~64bit<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Allow: INVITE, ACK, BYE,
            CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER,
            NOTIFY<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Supported: timer, path,
            replaces<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Allow-Events: talk,
            hold, conference, refer<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Content-Type:
            application/sdp<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Content-Disposition:
            session<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Content-Length: 224<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">P-Charge-Info: <<a
              href="sip:222222222@mobile.tuenti.int"
              moz-do-not-send="true">sip:222222222@mobile.tuenti.int</a>>;npi=ISDN;noa=4<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">X-FS-Support:
            update_display,send_info<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Remote-Party-ID:
            "222222222" <<a href="sip:222222222@B.B.B.B"
              moz-do-not-send="true">sip:222222222@B.B.B.B</a>>;party=calling;screen=yes;privacy=off<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">If the client cancels
            the request, the CANCEL request that gets to the core pcscf
            looks like this:<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal">CANCEL <a
            href="sip:1111111111@mnc001.mcc001.3gppnetwork.org"
            moz-do-not-send="true">
            sip:1111111111@mnc001.mcc001.3gppnetwork.org</a> SIP/2.0<o:p></o:p></p>
        <p class="MsoNormal">Via: SIP/2.0/UDP
          A.A.A.A;branch=z9hG4bK8735.ef7a61e110f335b2e92a8c1d430de585.0<o:p></o:p></p>
        <p class="MsoNormal"><span lang="EN-GB">Max-Forwards: 65<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">From: "222222222" <<a
              href="sip:222222222@B.B.B.B" moz-do-not-send="true">sip:222222222@B.B.B.B</a>>;tag=eytD49ymQr71S<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">To: <<a
              href="sip:1111111111@mnc001.mcc001.3gppnetwork.org"
              moz-do-not-send="true">sip:1111111111@mnc001.mcc001.3gppnetwork.org</a>><o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Call-ID:
            77d249c0-487c-1236-1997-00163edbaa97<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">CSeq: 115249948 CANCEL<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Content-Length: 0<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Reason:
            Q.850;cause=16;text="Normal Call Clearing"<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">The processing of the
            CANCEL at the pcscf is eventually reaching the
            t_check_trans() function, but the logs return “no CANCEL
            matching found!” and thus the processing ends. I have
            followed the code up to the via_matching function in the
            t_lookup.c file of the tm module source and added some logs.
            The via matching is failing at the port comparison (the port
            stored for the INVITE is “5060”, the port stored for the
            CANCEL is “0”.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">The flow works ok with a
            different client (connected directly to the core) which
            includes the port in the Via headers.<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">¿Can this be a bug in
            kamailio or am I doing something wrong?. AFAIK The RFC 3261
            does not mandate to include the ports in the sent-by element
            of the Via header<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Thanks!<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-GB">Carlos<o:p></o:p></span></p>
      </div>
      <br>
      <hr>
      <font face="Arial" size="1" color="Gray"><br>
        Este mensaje y sus adjuntos se dirigen exclusivamente a su
        destinatario, puede contener información privilegiada o
        confidencial y es para uso exclusivo de la persona o entidad de
        destino. Si no es usted. el destinatario indicado, queda
        notificado de que la lectura, utilización, divulgación y/o copia
        sin autorización puede estar prohibida en virtud de la
        legislación vigente. Si ha recibido este mensaje por error, le
        rogamos que nos lo comunique inmediatamente por esta misma vía y
        proceda a su destrucción.<br>
        <br>
        The information contained in this transmission is privileged and
        confidential information intended only for the use of the
        individual or entity named above. If the reader of this message
        is not the intended recipient, you are hereby notified that any
        dissemination, distribution or copying of this communication is
        strictly prohibited. If you have received this transmission in
        error, do not read it. Please immediately reply to the sender
        that you have received this communication in error and then
        delete it.<br>
        <br>
        Esta mensagem e seus anexos se dirigem exclusivamente ao seu
        destinatário, pode conter informação privilegiada ou
        confidencial e é para uso exclusivo da pessoa ou entidade de
        destino. Se não é vossa senhoria o destinatário indicado, fica
        notificado de que a leitura, utilização, divulgação e/ou cópia
        sem autorização pode estar proibida em virtude da legislação
        vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos
        o comunique imediatamente por esta mesma via e proceda a sua
        destruição<br>
      </font>
      <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.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 Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>