<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    On 3/29/12 11:17 AM, Herv&eacute; Cochet wrote:
    <blockquote cite="mid:4F7428AC.10408@technosens.fr" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      Hello,<br>
      <br>
      I used kamailio to handle SIP line from a provider using uacreg
      table.<br>
      Everything was working fine till they add a proxy which do not set
      (or
      not propagate) route header in ACK or BYE request.<br>
      <br>
      So my routing logic is broken in the "in-dialog" transaction mode,
      since the loose_route return FALSE.<br>
      <br>
      If I try to force a t_relay after the loose_route, my message may
      not
      be routing properly if for example my UAC was not connected with
      the
      standard 5060 port or use a different protocol like TCP (It works
      if
      both are in UDP and use 5060 port).<br>
      Is there a way to retrieve the record-route previously sets for
      this
      session in order to route this message properly ?<br>
    </blockquote>
    <br>
    is the Record-Route set mirrored in the 200ok?<br>
    <br>
    If the device is not supporting record-routing, then ACK/BYE should
    not get to your proxy. Can you post a full sip trace for such a call
    (from invite to bye)? It will help to understand how the message
    flow is and maybe we can help more.<br>
    <br>
    As a generic hint for storing/retrieving data, look at htable
    module, or if you prefer to use database storage, sqlops may be an
    alternative. You can keep the values based on callid.<br>
    <br>
    <blockquote cite="mid:4F7428AC.10408@technosens.fr" type="cite">
      <br>
      <br>
      <br>
      Another problem is that the dialog module do not match the BYE
      transaction, the "did" variable is missing since the route is not
      there
      but it should match the request with SIP matching (dlg_match_mode
      is
      set to 1).<br>
      <br>
      For example my dialog parameters are:<br>
      <br>
      dialog::&nbsp; hash=1214:1340198900<br>
      <i>&nbsp;&nbsp;&nbsp; state:: 3<br>
        &nbsp;&nbsp;&nbsp; timestart:: 1333006717<br>
        &nbsp;&nbsp;&nbsp; timeout:: 80537132<br>
        &nbsp;&nbsp;&nbsp; callid:: <a moz-do-not-send="true"
          class="moz-txt-link-abbreviated"
          href="mailto:16260-CI-30dd2867-797784ae0@my.sip.provider">16260-CI-30dd2867-797784ae0@my.sip.provider</a><br>
        &nbsp;&nbsp;&nbsp; from_uri:: <a moz-do-not-send="true"
          class="moz-txt-link-abbreviated"
          href="mailto:sip:0367023024@my.sip.provider;user=phone">sip:0367023024@my.sip.provider;user=phone</a><br>
        &nbsp;&nbsp;&nbsp; from_tag:: 16260-GI-30dd2868-17bb342c3<br>
        &nbsp;&nbsp;&nbsp; caller_contact:: <a class="moz-txt-link-freetext" href="sip:13.12.14.20:5060">sip:13.12.14.20:5060</a><br>
        &nbsp;&nbsp;&nbsp; caller_cseq:: 815264875<br>
        &nbsp;&nbsp;&nbsp; caller_route_set:: <a class="moz-txt-link-rfc2396E" href="sip:13.12.14.20:5060;lr">&lt;sip:13.12.14.20:5060;lr&gt;</a><br>
        &nbsp;&nbsp;&nbsp; caller_bind_addr:: udp:130.120.140.131:5060<br>
        &nbsp;&nbsp;&nbsp; to_uri:: <a moz-do-not-send="true"
          class="moz-txt-link-abbreviated"
          href="mailto:sip:0974711672@13.12.14.17;user=phone">sip:0974711672@13.12.14.17;user=phone</a><br>
        &nbsp;&nbsp;&nbsp; to_tag:: 1878467993<br>
        &nbsp;&nbsp;&nbsp; callee_contact:: <a moz-do-not-send="true"
          class="moz-txt-link-abbreviated"
          href="mailto:sip:0974711672@96.57.249.78:1024">sip:0974711672@96.57.249.78:1024</a><br>
        &nbsp;&nbsp;&nbsp; callee_cseq:: 815264875<br>
        &nbsp;&nbsp;&nbsp; callee_route_set:: <br>
        &nbsp;&nbsp;&nbsp; callee_bind_addr:: udp:130.120.140.131:5060</i><br>
      <br>
      The BYE request:<br>
      <i>BYE <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
          href="mailto:sip:0974711672@96.57.249.78:1024">sip:0974711672@96.57.249.78:1024</a>
        SIP/2.0
        <br>
        Call-ID: <a moz-do-not-send="true"
          class="moz-txt-link-abbreviated"
          href="mailto:16260-CI-30dd2867-797784ae0@my.sip.provider">16260-CI-30dd2867-797784ae0@my.sip.provider</a>
        <br>
        CSeq: 815264876 BYE
        <br>
        From: "0033482531303"
        <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
          href="mailto:sip:0367023024@my.sip.provider;user=phone">&lt;sip:0367023024@my.sip.provider;user=phone&gt;</a>;tag=16260-GI-30dd2868-17bb342c3
        <br>
        Max-Forwards: 28
        <br>
        Record-Route: <a class="moz-txt-link-rfc2396E" href="sip:13.12.14.20:5060;lr">&lt;sip:13.12.14.20:5060;lr&gt;</a>
        <br>
        To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
          href="mailto:sip:0974711672@13.12.14.17;user=phone">&lt;sip:0974711672@13.12.14.17;user=phone&gt;</a>;tag=1878467993
        <br>
        Via: SIP/2.0/UDP
        13.12.14.20:5060;branch=z9hG4bK-LNVP-1196a924-5f1f495a
        <br>
        Reason: q.850;cause=16
        <br>
        User-Agent: Cirpack/v4.42a (gw_sip)
        <br>
        Content-Length: 0</i><br>
      <br>
      Why does this BYE request is not matched by the dialog modules
      using
      SIP parameters (Call-ID, uri, tag seems correct) ?<br>
    </blockquote>
    <br>
    Can you try to execute dlg_manage()? If Route header is missing,
    then there is nothing that triggers automatically dialog matching.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <blockquote cite="mid:4F7428AC.10408@technosens.fr" type="cite">
      <br>
      <br>
      Herv&eacute;<br>
      <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
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a class="moz-txt-link-freetext" href="http://www.asipto.com/index.php/kamailio-advanced-training/">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre>
  </body>
</html>