<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Even if the dialog is matched, kamailio does not automatically
      updates r-uri, so dialog stored data is not used for routing, it
      is kept for ability to generate BYE by itself (and send
      keepalives).</p>
    <p>There is a function that can be used to update r-uri using dialog
      stored data:</p>
    <p>  *
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.f.dlg_set_ruri">https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.f.dlg_set_ruri</a></p>
    <p>But it has to be explicitly used in config.</p>
    <p>If you don't use it, then it's either something wrong in the BYE
      Route/r-uri or other operations done in config.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 05.05.22 08:57, <a class="moz-txt-link-abbreviated" href="mailto:mack@dopensource.com">mack@dopensource.com</a>
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:9894EF65-4974-496F-AC88-85100F146F78@dopensource.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode:
        space; line-break: after-white-space;" class="">
        <div class="">I configured the dialog module to match routing
          based on SIP elements versus the (Dialog ID) did.  It looks
          like it’s using the callid SIP element, but it’s still looking
          it up using the dialog module.  I was hoping it would route on
          the RURI of the BYE.  But, it looks like it’s using the dialog
          lookup table, which has the wrong RURI because that was the
          original server we sent the request to.  How can I get
          Kamailio to  route based on the RURI within the BYE. </div>
        <div class=""><br class="">
        </div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: rr [rr_cb.c:94]:
          run_rr_callbacks(): callback id 0 entered with <lr></div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_hash.c:887]:
          internal_get_dlg(): ref dlg 0x7f6d97faf200 with 1 -> 3</div>
        <div class=""><font class="" color="#ff0000">May  5 06:28:13
            sbc-atlanta /usr/sbin/kamailio[27066]: DEBUG: dialog
            [dlg_hash.c:891]: internal_get_dlg(): dialog
            callid='oeIojv5OA59S9FYCCu7BcQ..' found on entry 777, dir=2
            to-tag='sip+3+f36a00a5+44b60208'</font></div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_profile.c:536]:
          set_current_dialog(): setting current dialog [777:1428]</div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_hash.c:1290]:
          next_state_dlg(): dialog 0x7f6d97faf200 changed from state 4
          to state 5, due event 7 (ref 3)</div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_hash.c:1071]:
          dlg_ref_helper(): ref op on 0x7f6d97faf200 with 1 from
          dlg_handlers.c:1441</div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_hash.c:1075]:
          dlg_ref_helper(): ref dlg 0x7f6d97faf200 with 1 -> 4</div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog
          [dlg_handlers.c:1452]: dlg_onroute(): BYE successfully
          processed</div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_hash.c:1091]:
          dlg_unref_helper(): unref op on 0x7f6d97faf200 with 2 from
          dlg_handlers.c:1476</div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_hash.c:1095]:
          dlg_unref_helper(): unref dlg 0x7f6d97faf200 with 2 -> 2</div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_hash.c:1091]:
          dlg_unref_helper(): unref op on 0x7f6d97faf200 with 1 from
          dlg_hash.c:1109</div>
        <div class="">May  5 06:28:13 sbc-atlanta
          /usr/sbin/kamailio[27066]: DEBUG: dialog [dlg_hash.c:1095]:
          dlg_unref_helper(): unref dlg 0x7f6d97faf200 with 1 -> 1</div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
        <div class="">Thanks in advance</div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <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>
    <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 Advanced Training - Online
  * <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </body>
</html>