<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="">Hi Henning,<div class=""><br class=""></div><div class="">Thanks for this! That’s not actually the issue though. On one of my instances no registration at all was being sent. On the other, it was. I was using dummy credentials just to see if I could get a REGISTER message.<br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; 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="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-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br class="">I’ve since rebuilt my deployment as a playbook and launched to a fresh AL2/EC2 instance, and all is working. Guess it was something specific to the old machine.</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-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br 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-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Thanks for your help all!</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-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><br 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-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Cheers,<br class=""><br class="">________________________________<br class=""><br class="">Andrew White - Director<br class="">uConnected<br class=""><a href="mailto:andrew@uconnected.com.au" class="">Email: andrew@uconnected.com.au</a><br class="">Web: www.uConnected.com.au<br class=""><br class=""><br class=""></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 27 Mar 2019, at 6:33 am, Henning Westerholt <<a href="mailto:hw@kamailio.org" class="">hw@kamailio.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Am Dienstag, 26. März 2019, 15:23:05 CET schrieb Andrew White:<br class=""><blockquote type="cite" class="">I’ve done a completely fresh machine using the config from the GitHub issues<br class="">using Amazon Linux 2 and registration is sending. I’m unsure what is<br class="">varying, but I think I’ll rebuild this whole thing as an Ansible playbook<br class="">anyway so I can redeploy quickly.<br class=""></blockquote><br class="">Hello Andrew,<br class=""><br class="">the error below is from the config, that it can't resolve the <a href="http://sip.example.com" class="">sip.example.com</a> <br class="">domain. You need to replace this domain with a domain that you own, or use IP <br class="">addresses.<br class=""><br class="">Best regards,<br class=""><br class="">Henning<br class=""><br class=""><br class=""><blockquote type="cite" class="">Here’s the bash history for anyone curious:<br class=""><br class="">    1  yum install -y gcc gcc-c++ bison flex make ruby-devel git<br class="">    2  git clone <a href="https://github.com/kamailio/kamailio.git" class="">https://github.com/kamailio/kamailio.git</a><br class="">    3  cd kamailio/<br class="">    4  make include_modules="app_ruby" cfg<br class="">    5  make all &&  make install<br class="">    6  cd /usr/local/etc/kamailio/<br class="">    7  ls<br class="">    8  vim kamailio.cfg<br class="">    9  vim /etc/systemd/system/multi-user.target.wants/kamailio.service<br class="">   10  systemctl daemon-reload<br class="">   11  systemctl start kamailio<br class="">   12  tail  -f /var/log/messages<br class="">   13  ls<br class="">   14  mkdir /usr/local/etc/kamailio/dbtext<br class="">   15  cd /usr/local/etc/kamailio/dbtext<br class="">   16  ls<br class="">   17  vim uacreg<br class="">   18  systemctl restart kamailio<br class="">   19  tail  -f /var/log/messages<br class=""><br class="">Mar 26 14:18:00 ip-10-0-0-3 /usr/local/sbin/kamailio[17873]: ERROR: <core><br class="">[core/resolve.c:1698]: sip_hostport2su(): could not resolve hostname:<br class="">"<a href="http://sip.example.org" class="">sip.example.org</a>" Mar 26 14:18:00 ip-10-0-0-3<br class="">/usr/local/sbin/kamailio[17873]: ERROR: tm [ut.h:309]: uri2dst2(): failed<br class="">to resolve "<a href="http://sip.example.org" class="">sip.example.org</a>" Mar 26 14:18:00 ip-10-0-0-3<br class="">/usr/local/sbin/kamailio[17873]: ERROR: tm [uac.c:452]: t_uac_prepare(): no<br class="">socket found Mar 26 14:18:00 ip-10-0-0-3 /usr/local/sbin/kamailio[17873]:<br class="">ERROR: uac [uac_reg.c:1181]: uac_reg_update(): failed to send request for<br class="">[12345678]<br class=""><br class="">If anyone can help find the issue I’d be very interested, however it looks<br class="">like issue is package/config somewhere rather than kamailio.<br class=""><br class="">Thanks<br class=""><br class="">________________________________<br class=""><br class="">Andrew White - Director<br class="">uConnected<br class=""><a href="mailto:andrew@uconnected.com.au" class="">Email: andrew@uconnected.com.au</a><br class="">Web: www.uConnected.com.au<br class=""><br class=""><blockquote type="cite" class="">On 27 Mar 2019, at 12:23 am, Andrew White <andrew@uconnected.com.au><br class="">wrote:<br class=""><br class="">Update:<br class=""><br class="">I’ve just tried the config from the GitHub issue on another server (CentOS<br class="">7) and get the following console output:<br class=""><br class="">Mar 26 13:08:48 voice-test2 /usr/local/sbin/kamailio[29762]: ERROR: <core><br class="">[core/resolve.c:1699]: sip_hostport2su(): could not resolve hostname:<br class="">"sip.example.org <http://sip.example.org/>" Mar 26 13:08:48 voice-test2<br class="">/usr/local/sbin/kamailio[29762]: ERROR: tm [ut.h:309]: uri2dst2(): failed<br class="">to resolve "sip.example.org <http://sip.example.org/>" Mar 26 13:08:48<br class="">voice-test2 /usr/local/sbin/kamailio[29762]: ERROR: tm [uac.c:452]:<br class="">t_uac_prepare(): no socket found Mar 26 13:08:48 voice-test2<br class="">/usr/local/sbin/kamailio[29762]: ERROR: uac [uac_reg.c:1181]:<br class="">uac_reg_update(): failed to send request for [12345678]<br class=""><br class="">This looks to me like it is attempting registration and failing.<br class=""><br class="">I’ve tried this same config on my main server (Amazon Linux 2) and am not<br class="">getting any such messages.<br class=""><br class="">Both are built from the same master commit:<br class=""><br class="">AL2:<br class=""><br class="">version: kamailio 5.3.0-dev4 (x86_64/linux) 97189d<br class="">flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,<br class="">DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC,<br class="">F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,<br class="">USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,<br class="">HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144,<br class="">MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method<br class="">support: poll, epoll_lt, epoll_et, sigio_rt, select.<br class="">id: 97189d<br class="">compiled on 13:18:22 Mar 26 2019 with gcc 7.3.1<br class=""><br class="">CentOS 7:<br class=""><br class="">version: kamailio 5.3.0-dev4 (x86_64/linux) 97189d<br class="">flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,<br class="">DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC,<br class="">F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,<br class="">USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,<br class="">HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144,<br class="">MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method<br class="">support: poll, epoll_lt, epoll_et, sigio_rt, select.<br class="">id: 97189d<br class="">compiled on 13:52:08 Mar 23 2019 with gcc 4.8.5<br class=""><br class="">I’m assuming we’re missing a package, a socket definition varies,<br class="">something like that. How can I further debug this?<br class=""><br class="">Thanks!<br class=""><br class="">Andrew<br class=""><br class=""><blockquote type="cite" class="">On 27 Mar 2019, at 12:01 am, Andrew White <andrew@uconnected.com.au<br class=""><mailto:andrew@uconnected.com.au>> wrote:<br class=""><br class="">Thanks so much Miko!<br class=""><br class="">You’re completely right. This is also in the docs for the module, it<br class="">appears I’ve skimmed over that part!<br class=""><br class="">It appears the DB is now loading without error, however I don’t see any<br class="">attempting for registration in Wireshark. A kamcmd uac.reg_dump doesn’t<br class="">return any result.<br class=""><br class="">I’ve copied config shown to be working from a GitHub issue on an<br class="">unrelated problem (https://github.com/kamailio/kamailio/issues/936<br class=""><https://github.com/kamailio/kamailio/issues/936>). Relevant lines<br class="">below:<br class=""><br class="">#!define DBURL "text:///etc/kamailio/dbtext<br class=""><text:///etc/kamailio/dbtext>"<br class=""><br class="">modparam("rr", "append_fromtag", 1)<br class="">modparam("dialog", "dlg_flag", 4)<br class="">modparam("dialog", "track_cseq_updates", 1)<br class="">modparam("uac", "restore_dlg", 1)<br class="">modparam("uac", "reg_db_url", DBURL)<br class="">modparam("uac", "reg_timer_interval", 60)<br class="">modparam("uac", "reg_retry_interval", 60)<br class="">modparam("uac", "reg_contact_addr", "1.2.3.4:5060")<br class=""><br class="">And /etc/kamailio/dbtext/uacreg:<br class=""><br class="">l_uuid(string) l_username(string) l_domain(string) r_username(string)<br class="">r_domain(string) realm(string) auth_username(string)<br class="">auth_password(string) auth_proxy(string) expires(int) flags(int)<br class="">reg_delay(int) 12345678:user:domain.local:11111111:sip.example.org<br class=""><http://sip.example.org/>:sip.example.org<br class=""><http://sip.example.org/>:11111111:XXXXXXXXXXXXXXXX:sip\:sip.example.org<br class="">:600 <http://sip.example.org:600/>:0:0<br class=""><br class="">Both an lsof and a WITH_DEBUG show uac.so is being loaded without issue,<br class="">however no messages relevant to registration are showing, and no<br class="">REGISTER messages appear in Wireshark.<br class=""><br class="">A kamcmd to query the record shows it does not appear loaded:<br class=""><br class="">[root@ip-10-0-0-2 kamailio]# kamcmd uac.reg_info l_uuid 12345678<br class="">error: 404 - Record not found<br class=""><br class="">I feel like I’m missing something obvious here!<br class="">________________________________<br class=""><br class="">Andrew White - Director<br class="">uConnected<br class="">Email: andrew@uconnected.com.au <mailto:andrew@uconnected.com.au><br class="">Web: www.uConnected.com.au <http://www.uconnected.com.au/><br class=""><br class=""><blockquote type="cite" class="">On 26 Mar 2019, at 8:06 pm, Mikko Lehto <mslehto@iki.fi<br class=""><mailto:mslehto@iki.fi>> wrote:>>> <br class="">Andrew White <andrew@uconnected.com.au <br class=""></blockquote></blockquote></blockquote></blockquote><<a href="mailto:andrew@uconnected.com.au" class="">mailto:andrew@uconnected.com.au</a>>>:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">I’m currently playing with the UAC module to hand off remote<br class="">registrations with trunks to Kamailio.<br class=""><br class="">I want to keep Kamailio’s external connections low, so I’m planning to<br class="">use db_text to load the UAC info, and populate the flat file via other<br class="">methods.<br class=""><br class="">When attempting to load my UAC DB via db_text however, I get the<br class="">following:<br class=""><br class="">Mar 26 04:59:30 ip-10-0-0-2 /usr/local/sbin/kamailio[31904]: ERROR:<br class="">db_text [dbt_lib.c:143]: dbt_cache_get_db(): database<br class="">[/etc/kamailio/uac.db] does not exists! Mar 26 04:59:30 ip-10-0-0-2<br class="">/usr/local/sbin/kamailio[31902]: INFO: jsonrpcs [jsonrpcs_sock.c:443]:<br class="">jsonrpc_dgram_process(): a new child 0/31902 Mar 26 04:59:30<br class="">ip-10-0-0-2 /usr/local/sbin/kamailio[31904]: ERROR: db_text<br class="">[dbt_base.c:102]: dbt_init(): cannot get the link to database Mar 26<br class="">04:59:30 ip-10-0-0-2 /usr/local/sbin/kamailio[31904]: ERROR: uac<br class="">[uac_reg.c:1318]: uac_reg_load_db(): failed to connect to the database<br class="">.<br class="">.<br class="">.<br class="">2) Why is my db_text failing to load the file?<br class=""></blockquote><br class="">Hi<br class=""><br class="">I think your db_url should point to directory instead of file.<br class=""><br class=""><br class="">Here is one working example using other modules:<br class="">---<br class="">modparam("mtree", "db_url", "<a href="text:///opt/stuff/cfg/db_text" class="">text:///opt/stuff/cfg/db_text</a><br class=""><<a href="text:///opt/stuff/cfg/db_text" class="">text:///opt/stuff/cfg/db_text</a>>") modparam("htable", "db_url",<br class="">"<a href="text:///opt/stuff/cfg/db_text" class="">text:///opt/stuff/cfg/db_text</a> <<a href="text:///opt/stuff/cfg/db_text" class="">text:///opt/stuff/cfg/db_text</a>>") ---<br class=""><br class="">In directory /opt/stuff/cfg/db_text I have files "htable", "mtrees" and<br class="">"version":<br class=""><br class="">---<br class="">$ cat version<br class="">htable:2<br class="">mtrees:2<br class="">$ cat mtrees<br class="">id(int,auto) tname(string) tprefix(string) tvalue(string)<br class="">1:uni:3581234567:24<br class="">$ cat htable<br class="">id(int,auto) key_name(string) key_type(int) value_type(int)<br class="">key_value(string)<br class="">0:3581234567\:\:timerc:0:1:30<br class="">---<br class=""></blockquote></blockquote></blockquote></blockquote><br class=""><br class="">-- <br class="">Henning Westerholt - <a href="https://skalatan.de/blog/" class="">https://skalatan.de/blog/</a><br class="">Kamailio services - <a href="https://skalatan.de/services" class="">https://skalatan.de/services</a><br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>