Thanks so much Miko!
You’re completely right. This is also in the docs for the module, it appears I’ve skimmed over that part!
It appears the DB is now loading without error, however I don’t see any attempting for registration in Wireshark. A kamcmd uac.reg_dump doesn’t return any result.
I’ve copied config shown to be working from a GitHub issue on an unrelated problem (https://github.com/kamailio/kamailio/issues/936 https://github.com/kamailio/kamailio/issues/936). Relevant lines below:
#!define DBURL "text:///etc/kamailio/dbtext"
modparam("rr", "append_fromtag", 1) modparam("dialog", "dlg_flag", 4) modparam("dialog", "track_cseq_updates", 1) modparam("uac", "restore_dlg", 1) modparam("uac", "reg_db_url", DBURL) modparam("uac", "reg_timer_interval", 60) modparam("uac", "reg_retry_interval", 60) modparam("uac", "reg_contact_addr", "1.2.3.4:5060")
And /etc/kamailio/dbtext/uacreg:
l_uuid(string) l_username(string) l_domain(string) r_username(string) r_domain(string) realm(string) auth_username(string) auth_password(string) auth_proxy(string) expires(int) flags(int) reg_delay(int) 12345678:user:domain.local:11111111:sip.example.org:sip.example.org:11111111:XXXXXXXXXXXXXXXX:sip:sip.example.org:600:0:0
Both an lsof and a WITH_DEBUG show uac.so is being loaded without issue, however no messages relevant to registration are showing, and no REGISTER messages appear in Wireshark.
A kamcmd to query the record shows it does not appear loaded:
[root@ip-10-0-0-2 kamailio]# kamcmd uac.reg_info l_uuid 12345678 error: 404 - Record not found
I feel like I’m missing something obvious here! ________________________________
Andrew White - Director uConnected Email: andrew@uconnected.com.au Web: www.uConnected.com.au
On 26 Mar 2019, at 8:06 pm, Mikko Lehto mslehto@iki.fi wrote:
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
-- Mikko
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users