[OpenSIPS-Users] db_text for drouting - column gwid has a bad type [4], accepting only [3]

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Sep 27 06:43:08 UTC 2024


Hi Dmitry,

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.

Could you open please a bug report on github tracker, maybe it is time 
to get a proper fix for this.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 26.09.2024 17:03, Dmitry Gimalayskiy wrote:
> Helloeverybody!
>
> I am trying to use db_text for drouting, but I am getting an error 
> when loading the opensips:
>
>
> # tail -f /var/log/opensips/opensips.log | egrep "ERR|CRIT|WAR"
> ERROR:drouting:dr_load_routing_info: column gwid has a bad type [4], 
> accepting only [3]"
> CRITICAL:drouting:dr_reload_data_head: failed to load routing info"
>
> This is my db_text/dr_gateways:
> # cat db_text/dr_gateways
> 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)
> 1:asterisk:0:10.214.0.78:0:::0:0:udp\:10.214.0.77\:5081:test out 
> provider server\n
>
> And opensips version:
> # opensips-cli -x mi version
> {
>     "Server": "OpenSIPS (3.4.5 (x86_64/linux))"
> }
>
> How can I fix this error?
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240927/beaa2bed/attachment-0001.html>


More information about the Users mailing list