<div dir="ltr"><div dir="ltr"><div><div><div>Hello!<br><br></div>Sorry for the late reply.<br><br></div>Here is my report on the issue with db_text and drouting: <a href="https://github.com/OpenSIPS/opensips/issues/3518" target="_blank">https://github.com/OpenSIPS/opensips/issues/3518</a><br><br></div>Is this description enough to fix the bug?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 27 Sept 2024 at 09:43, Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div>
    Hi Dmitry,<br>
    <br>
    Yeah, a bit of a know but ignored issue - most of the module in
    OpenSIPS, when loading data from DB, expect a DB_STRING (a NULL
    terminated string) to be returned. But the db_text driver is
    returning a DB_STR (string with len, not NULL terminated). And the
    drouting module is a bit more strict when comes to checking the
    returned data types.<br>
    <br>
    Could you open please a bug report on github tracker, maybe it is
    time to get a proper fix for this.<br>
    <br>
    Regards,<br>
    <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank">https://www.siphub.com</a></pre>
    <div>On 26.09.2024 17:03, Dmitry Gimalayskiy
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">
          <div>
            <div><span style="white-space:pre-wrap">Hello</span><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap">everybody</span><span style="white-space:pre-wrap">!</span><br>
              <br>
            </div>
            I am trying to use db_text for drouting, but I am getting an
            error when loading the <span>opensips</span>:<br>
            <br>
            <br>
            # tail -f /var/log/<span>opensips</span>/<span>opensips</span>.log | egrep
            "ERR|CRIT|WAR"<br>
            ERROR:drouting:dr_load_routing_info: column gwid has a bad
            type [4], accepting only [3]"<br>
            CRITICAL:drouting:dr_reload_data_head: failed to load
            routing info"<br>
            <br>
            This is my db_text/dr_gateways: <br>
            # cat db_text/dr_gateways <br>
            id(int) gwid(str) type(int) address(str) strip(int)
            pri_prefix(str,null) attrs(str,null) probe_mode(int)
            state(int) socket(str,null) description(str,null)<br>
            1:asterisk:0:10.214.0.78:0:::0:0:udp\:10.214.0.77\:5081:test
            out provider server\n<br>
            <br>
          </div>
          And <span>opensips</span> version:<br>
          <div>
            <div># <span>opensips</span>-cli -x mi
              version</div>
            <div>{<br>
                  "Server": "<span>OpenSIPS</span>
              (3.4.5 (x86_64/linux))"<br>
              }<br>
              <br>
            </div>
            <div>How can I fix this error?</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div></div>