Andrew White andrew@uconnected.com.au:
I’m currently playing with the UAC module to hand off remote registrations with trunks to Kamailio.
I want to keep Kamailio’s external connections low, so I’m planning to use db_text to load the UAC info, and populate the flat file via other methods.
When attempting to load my UAC DB via db_text however, I get the following:
Mar 26 04:59:30 ip-10-0-0-2 /usr/local/sbin/kamailio[31904]: ERROR: db_text [dbt_lib.c:143]: dbt_cache_get_db(): database [/etc/kamailio/uac.db] does not exists! Mar 26 04:59:30 ip-10-0-0-2 /usr/local/sbin/kamailio[31902]: INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/31902 Mar 26 04:59:30 ip-10-0-0-2 /usr/local/sbin/kamailio[31904]: ERROR: db_text [dbt_base.c:102]: dbt_init(): cannot get the link to database Mar 26 04:59:30 ip-10-0-0-2 /usr/local/sbin/kamailio[31904]: ERROR: uac [uac_reg.c:1318]: uac_reg_load_db(): failed to connect to the database . . . 2) Why is my db_text failing to load the file?
Hi
I think your db_url should point to directory instead of file.
Here is one working example using other modules: --- modparam("mtree", "db_url", "text:///opt/stuff/cfg/db_text") modparam("htable", "db_url", "text:///opt/stuff/cfg/db_text") ---
In directory /opt/stuff/cfg/db_text I have files "htable", "mtrees" and "version":
--- $ cat version htable:2 mtrees:2 $ cat mtrees id(int,auto) tname(string) tprefix(string) tvalue(string) 1:uni:3581234567:24 $ cat htable id(int,auto) key_name(string) key_type(int) value_type(int) key_value(string) 0:3581234567::timerc:0:1:30 ---