<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class=""><div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px;"><div class="">Hi all,</div><div class=""><br class=""></div><div class="">I’m currently playing with the UAC module to hand off remote registrations with trunks to Kamailio.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">When attempting to load my UAC DB via db_text however, I get the following:</div><div class=""><br class=""></div><div class="">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!</div><div class="">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</div><div class="">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</div><div class="">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</div><div class=""><br class=""></div><div class="">When running using WITH_DEBUG flag, it does not appear to attempt on normal start. A kamcmd uac.reg_reload yields:</div><div class=""><br class=""></div><div class="">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</div><div class="">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]</div><div class="">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</div><div class="">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: [<a href="text:///etc/kamailio/uac.db" class="">text:///etc/kamailio/uac.db</a>]</div><div class="">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!</div><div class="">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!</div><div class="">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</div><div class="">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</div><div class="">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</div><div class=""><br class=""></div><div class="">The file of course does exist, and has fine permissions (Kamailio runs as root in this case):</div><div class=""><br class=""></div><div class="">-rw-r--r-- 1 root root 169 Mar 26 04:49 /etc/kamailio/uac.db</div><div class=""><br class=""></div><div class="">Contents of file:</div><div class=""><br class=""></div><div class="">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)</div><div class="">123:test:<a href="http://test.com" class="">test.com</a>:test:<a href="http://test.com" class="">test.com</a>:<a href="http://test.com" class="">test.com</a>:user:pass:10.0.0.100:600::</div><div class=""><br class=""></div><div class="">(At this stage I just want to see the reg packet in Wireshark).</div><div class=""><br class=""></div><div class="">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</div><div class="">2) Why is my db_text failing to load the file?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">________________________________</div><div class=""><br class=""></div><div class="">Andrew White - Director</div><div class="">uConnected</div><div class=""><a href="mailto:andrew@uconnected.com.au" class="">Email: andrew@uconnected.com.au</a></div><div class="">Web: <a href="http://www.uConnected.com.au" class="">www.uConnected.com.au</a></div><div class=""><br class=""></div><div class=""> </div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;" class=""><br class=""></div></div></div></div></div></div></body></html>