<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
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 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 26.09.2024 17:03, Dmitry Gimalayskiy
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKOvPxtndsMOrzgH96WwUsR4WpbO1+v=ZtWEm4rATTVB3wPZUA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div>
<div><span class="gmail-EzKURWReUAB5oZgtQNkl"
style="white-space:pre-wrap">Hello</span><span
style="white-space:pre-wrap"> </span><span
class="gmail-EzKURWReUAB5oZgtQNkl"
style="white-space:pre-wrap">everybody</span><span
class="gmail-EzKURWReUAB5oZgtQNkl"
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 class="gmail-il">opensips</span>:<br>
<br>
<br>
# tail -f /var/log/<span class="gmail-il">opensips</span>/<span
class="gmail-il">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 class="gmail-il">opensips</span> version:<br>
<div>
<div># <span class="gmail-il">opensips</span>-cli -x mi
version</div>
<div>{<br>
"Server": "<span class="gmail-il">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 class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>