Hi all,

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

When running using WITH_DEBUG flag, it does not appear to attempt on normal 
start. A kamcmd uac.reg_reload yields:

Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) DEBUG: ctl [io_listener.c:442]: 
handle_new_connect(): handle_stream read: new connection (1) on 
/var/run/kamailio//kamailio_ctl
Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) DEBUG: <core> 
[core/sr_module.c:632]: find_mod_export_record(): found export of <db_bind_api> 
in module db_text [/usr/local/lib64/kamailio/modules/db_text.so]
Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) DEBUG: <core> [db.c:210]: 
db_bind_mod(): using db bind api for db_text
Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) DEBUG: db_text [dbt_base.c:55]: 
dbt_init(): initializing for db url: [text:///etc/kamailio/uac.db]
Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) DEBUG: db_text [dbt_lib.c:125]: 
dbt_cache_get_db(): looking for db /etc/kamailio/uac.db!
Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) ERROR: db_text [dbt_lib.c:143]: 
dbt_cache_get_db(): database [/etc/kamailio/uac.db] does not exists!
Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) ERROR: db_text 
[dbt_base.c:102]: dbt_init(): cannot get the link to database
Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) ERROR: uac [uac_reg.c:1318]: 
uac_reg_load_db(): failed to connect to the database
Mar 26 05:07:52 ip-10-0-0-2 kamailio: 22(32177) DEBUG: ctl [io_listener.c:495]: 
handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl

The file of course does exist, and has fine permissions (Kamailio runs as root 
in this case):

-rw-r--r-- 1 root root 169 Mar 26 04:49 /etc/kamailio/uac.db

Contents of file:

l_uuid(str) l_username(str) l_domain(str) r_username(str) r_domain(str) 
realm(str) auth_username(str) auth_password(str) auth_proxy(str) expires(int) 
flags(int) reg_delay(int)
123:test:test.com:test:test.com:test.com:user:pass:10.0.0.100:600::

(At this stage I just want to see the reg packet in Wireshark).

1) Is this the correct method to do UAC? Load credentials, then Kamailio will 
handle the registration and renewal? I’ve struggled a bit to understand the 
documentation, hence the testing
2) Why is my db_text failing to load the file?

Thanks!

________________________________

Andrew White - Director
uConnected
Email: [email protected]
Web: www.uConnected.com.au

 

_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to