<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi Alistiar,<br>
    <br>
    The BYE is a sequential/indialog request, so you need to check your
    script on how these are handled. Usually they are routed via
    record_route() (if the routing mechanism is used in your cfg). See
    <a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/blob/3.6/etc/opensips.cfg#L110">https://github.com/OpenSIPS/opensips/blob/3.6/etc/opensips.cfg#L110</a><br>
    <br>
    IF you do not understand you cfg flow, maybe you can add this script
    tracing function on top of your cfg, so you can see how the
    execution goes step by step via the cfg:
<a class="moz-txt-link-freetext" href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-6#script_trace">https://www.opensips.org/Documentation/Script-CoreFunctions-3-6#script_trace</a><br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 30.01.2026 18:54, Alistair Cleminson
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CWLP123MB50385B66A5B687FE39D15DFFB69FA@CWLP123MB5038.GBRP123.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div
style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        Thanks for the tip, it turns out I'd completely misunderstood
        the process. This configuration doesn't generate the errors
        & passes calls:</div>
      <div
style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                    if (is_method("INVITE")) {</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          $acc_extra(si) = $si;</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          $acc_extra(fU) = $fU;</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          $acc_extra(fd) = $fd;</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          $acc_extra(rU) = $rU;</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          $acc_extra(rd) = $rd;</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          do_accounting("log|db","cdr|missed|failed");</div>
      <div
style="direction: ltr; font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          if (get_source_group($var(si))) {</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                if (!alias_db_lookup("dbaliases")) {</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                      xlog("L_ERR", "LOG: DDI Alias not
        found, time=[$Ts] from uri=[$fu] to uri=[$ru]");</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                      sl_send_reply(404, "Not Found");</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                };</div>
      <div
style="direction: ltr; font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                $avp(site)=$(ruri.user{s.substr,0,5});</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                route(ALLOW);</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                exit; </div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          }</div>
      <div
style="direction: ltr; font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          else {</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                log(1, "Permissions RECORD FAIL\n");</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                sl_send_reply(403, "Forbidden");</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                                exit;</div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                          };</div>
      <div
style="direction: ltr; font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="font-family: "Courier New", Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
                    };</div>
      <div
style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        I'm still not passing BYE packets successfully though. I'll dig
        a little more before I ask again.</div>
      <div
style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        thanks</div>
      <div
style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        a.</div>
      <div
style="direction: ltr; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div id="mail-editor-reference-message-container">
        <div class="ms-outlook-mobile-reference-message skipProofing"
          style="direction: ltr;">
        </div>
        <div class="ms-outlook-mobile-reference-message skipProofing"
style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
          <b>From: </b>johan de clercq <a class="moz-txt-link-rfc2396E" href="mailto:johan@democon.be"><johan@democon.be></a><br>
          <b>Date: </b>Thursday, 29 January 2026 at 9:41 am<br>
          <b>To: </b>Alistair Cleminson
          <a class="moz-txt-link-rfc2396E" href="mailto:alistair.cleminson@wifinity.co.uk"><alistair.cleminson@wifinity.co.uk></a><br>
          <b>Subject: </b>Re: [OpenSIPS-Users] Problems passing BYE
          signal in v3.7<br>
          <br>
        </div>
        <table class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-indent: revert; line-height: revert; white-space: revert; text-transform: revert; background-color: revert; display: table; margin: revert; width: 100%; height: revert; table-layout: fixed; color: revert; box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;"
          cellspacing="0" cellpadding="0">
          <tbody>
            <tr style="background-color: revert;">
              <td
                class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-indent: revert; line-height: revert; white-space: revert; text-transform: revert; border-width: revert; border-style: revert; border-color: revert; background-color: rgb(166, 166, 166); padding: 7px 2px; word-break: revert; color: revert; width: 0px; height: revert;">
                <br>
              </td>
              <td
                class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: revert; line-height: revert; white-space: revert; text-transform: revert; border-width: revert; border-style: revert; border-color: revert; background-color: rgb(234, 234, 234); padding: 7px 5px 7px 15px; word-break: revert; color: rgb(33, 33, 33); width: 100%; height: revert;">
                <div
class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: revert; line-height: revert; white-space: revert; text-transform: revert; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; color: revert;">
                  <span
style="letter-spacing: revert; background-color: revert; line-height: revert; text-transform: revert;">You
                    don't often get email from <a class="moz-txt-link-abbreviated" href="mailto:johan@democon.be">johan@democon.be</a>.
                    <a
href="https://aka.ms/LearnAboutSenderIdentification"
data-outlook-id="badeb8f6-167b-4a68-99bb-594b0afcced0"
style="color: revert; display: revert; background-color: revert;"
                      moz-do-not-send="true">
                      Learn why this is important</a></span></div>
              </td>
              <td
                class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: revert; line-height: revert; white-space: revert; text-transform: revert; border-width: revert; border-style: revert; border-color: revert; background-color: rgb(234, 234, 234); padding: 7px 5px; word-break: revert; color: rgb(33, 33, 33); width: 75px; height: revert;">
                <br>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="ms-outlook-mobile-reference-message skipProofing"
style="text-align: left; line-height: 12pt; background-color: rgb(255, 202, 202); padding: 2pt; border-width: 1pt; border-style: solid; border-color: rgb(156, 101, 0); width: 100%; font-family: Calibri; font-size: 10pt; color: black;">
          <b>[CAUTION]</b> This email is from an external sender -
          Please be cautious, particularly with any links and
          attachments. If you suspect a phishing email, please report it
          to IT.</p>
        <p class="ms-outlook-mobile-reference-message skipProofing">maybe
          changing the 2 vars to avp's will fix the issue. </p>
        <div class="moz-cite-prefix">On 1/27/26 17:27, Alistair
          Cleminson wrote:</div>
        <blockquote>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            <span style="text-transform: none;">Hi,</span></div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            <br>
          </div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            I've nearly completed the process of upgrading our ancient
            v1.7 deployment to v3.6. The new deployment is installed on
            Ubuntu 24.04 from the OpenSIPS repos. These servers are our
            inbound hand-off from our upstream supplier, they take a
            call, inspect the called number element against the
            database, and then pass it on to the target system with the
            internal reference or decline the call.</div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            <br>
          </div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            I've never been a programmer and am much more familiar with
            Asterisk, having inherited the platform & 'maintained'
            these hosts for about ten years I'm far from fluent in the
            configuration syntax but also much less terrified than I was
            when I first opened the opensips.cfg file. Having said that,
            I've updated most of the configuration and database backend
            to successfully accept, process & pass on a call to our
            core voice platform with 2-way audio.</div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            <br>
          </div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            Unfortunately, when a call is terminated by either the
            called or calling party the BYE signal is not passed to the
            other party leaving the call hanging until they also hang up
            or an intermediate system decides the call is in a stale
            state & drops it.</div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            <br>
          </div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            From what I can tell, this is the v1.7 code which would
            capture the session related traffic and associate a BYE with
            a particular call.</div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            <br>
          </div>
          <div class="ms-outlook-mobile-reference-message skipProofing"
style="direction: ltr; text-align: left; text-indent: 0px; text-transform: none; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
            I think the problem is related to my attempt to convert the
            depreciated  allow_source_address_group() function:</div>
          <br>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>