<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 all,<div class=""><br class=""></div><div class="">I’ve done a completely fresh machine using the config from the GitHub issues using Amazon Linux 2 and registration is sending. I’m unsure what is varying, but I think I’ll rebuild this whole thing as an Ansible playbook anyway so I can redeploy quickly.</div><div class=""><br class=""></div><div class="">Here’s the bash history for anyone curious:</div><div class=""><br class=""></div><div class=""><div class="">    1  yum install -y gcc gcc-c++ bison flex make ruby-devel git</div><div class="">    2  git clone <a href="https://github.com/kamailio/kamailio.git" class="">https://github.com/kamailio/kamailio.git</a></div><div class="">    3  cd kamailio/</div><div class="">    4  make include_modules="app_ruby" cfg</div><div class="">    5  make all &&  make install</div><div class="">    6  cd /usr/local/etc/kamailio/</div><div class="">    7  ls</div><div class="">    8  vim kamailio.cfg</div><div class="">    9  vim /etc/systemd/system/multi-user.target.wants/kamailio.service</div><div class="">   10  systemctl daemon-reload</div><div class="">   11  systemctl start kamailio</div><div class="">   12  tail  -f /var/log/messages</div><div class="">   13  ls</div><div class="">   14  mkdir /usr/local/etc/kamailio/dbtext</div><div class="">   15  cd /usr/local/etc/kamailio/dbtext</div><div class="">   16  ls</div><div class="">   17  vim uacreg</div><div class="">   18  systemctl restart kamailio</div><div class="">   19  tail  -f /var/log/messages</div><div class=""><br class=""></div><div class=""><div class="">Mar 26 14:18:00 ip-10-0-0-3 /usr/local/sbin/kamailio[17873]: ERROR: <core> [core/resolve.c:1698]: sip_hostport2su(): could not resolve hostname: "<a href="http://sip.example.org" class="">sip.example.org</a>"</div><div class="">Mar 26 14:18:00 ip-10-0-0-3 /usr/local/sbin/kamailio[17873]: ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "<a href="http://sip.example.org" class="">sip.example.org</a>"</div><div class="">Mar 26 14:18:00 ip-10-0-0-3 /usr/local/sbin/kamailio[17873]: ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found</div><div class="">Mar 26 14:18:00 ip-10-0-0-3 /usr/local/sbin/kamailio[17873]: ERROR: uac [uac_reg.c:1181]: uac_reg_update(): failed to send request for [12345678]</div></div><div class=""><br class=""></div><div class="">If anyone can help find the issue I’d be very interested, however it looks like issue is package/config somewhere rather than kamailio.</div><div class=""><br class="webkit-block-placeholder"></div><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;">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=""></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 27 Mar 2019, at 12:23 am, Andrew White <<a href="mailto:andrew@uconnected.com.au" class="">andrew@uconnected.com.au</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Update:<div class=""><br class=""></div><div class="">I’ve just tried the config from the GitHub issue on another server (CentOS 7) and get the following console output:</div><div class=""><br class=""></div><div class=""><div class="">Mar 26 13:08:48 voice-test2 /usr/local/sbin/kamailio[29762]: ERROR: <core> [core/resolve.c:1699]: sip_hostport2su(): could not resolve hostname: "<a href="http://sip.example.org/" class="">sip.example.org</a>"</div><div class="">Mar 26 13:08:48 voice-test2 /usr/local/sbin/kamailio[29762]: ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "<a href="http://sip.example.org/" class="">sip.example.org</a>"</div><div class="">Mar 26 13:08:48 voice-test2 /usr/local/sbin/kamailio[29762]: ERROR: tm [uac.c:452]: t_uac_prepare(): no socket found</div><div class="">Mar 26 13:08:48 voice-test2 /usr/local/sbin/kamailio[29762]: ERROR: uac [uac_reg.c:1181]: uac_reg_update(): failed to send request for [12345678]</div>
<div class=""><br class=""></div><div class="">This looks to me like it is attempting registration and failing.</div><div class=""><br class=""></div><div class="">I’ve tried this same config on my main server (Amazon Linux 2) and am not getting any such messages.</div><div class=""><br class=""></div><div class="">Both are built from the same master commit:</div><div class=""><br class=""></div><div class="">AL2:</div><div class=""><br class=""></div><div class=""><div class="">version: kamailio 5.3.0-dev4 (x86_64/linux) 97189d</div><div class="">flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES</div><div class="">ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB</div><div class="">poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.</div><div class="">id: 97189d</div><div class="">compiled on 13:18:22 Mar 26 2019 with gcc 7.3.1</div><div class=""><br class=""></div><div class="">CentOS 7:</div><div class=""><br class=""></div><div class=""><div class="">version: kamailio 5.3.0-dev4 (x86_64/linux) 97189d</div><div class="">flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES</div><div class="">ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB</div><div class="">poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.</div><div class="">id: 97189d</div><div class="">compiled on 13:52:08 Mar 23 2019 with gcc 4.8.5</div></div></div><div class=""><br class=""></div><div class="">I’m assuming we’re missing a package, a socket definition varies, something like that. How can I further debug this?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">Andrew</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 27 Mar 2019, at 12:01 am, Andrew White <<a href="mailto:andrew@uconnected.com.au" class="">andrew@uconnected.com.au</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" 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="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">Thanks so much Miko!</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">You’re completely right. This is also in the docs for the module, it 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 attempting for registration in Wireshark. A kamcmd uac.reg_dump doesn’t return any result.</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">I’ve copied config shown to be working from a GitHub issue on an unrelated problem (<a href="https://github.com/kamailio/kamailio/issues/936" class="">https://github.com/kamailio/kamailio/issues/936</a>). Relevant lines below:</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class=""><br class=""></div><div style="text-align: start; text-indent: 0px;" class=""><div style="background-color: rgb(30, 30, 30); line-height: 18px;" class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(212, 212, 212); font-family: Menlo, Monaco, "Courier New", monospace; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: pre; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;" class=""><div style="line-height: 18px;" class=""><div class=""><span style="color: #6a9955;" class="">#!define DBURL "<a href="text:///etc/kamailio/dbtext" class="">text:///etc/kamailio/dbtext</a>"</span></div><br class=""><div class="">modparam(<span style="color: #ce9178;" class="">"rr"</span>, <span style="color: #ce9178;" class="">"append_fromtag"</span>, 1)</div><div class="">modparam(<span style="color: #ce9178;" class="">"dialog"</span>, <span style="color: #ce9178;" class="">"dlg_flag"</span>, 4)</div><div class="">modparam(<span style="color: #ce9178;" class="">"dialog"</span>, <span style="color: #ce9178;" class="">"track_cseq_updates"</span>, 1)</div><div class="">modparam(<span style="color: #ce9178;" class="">"uac"</span>, <span style="color: #ce9178;" class="">"restore_dlg"</span>, 1)</div><div class="">modparam(<span style="color: #ce9178;" class="">"uac"</span>, <span style="color: #ce9178;" class="">"reg_db_url"</span>, DBURL)</div><div class="">modparam(<span style="color: #ce9178;" class="">"uac"</span>, <span style="color: #ce9178;" class="">"reg_timer_interval"</span>, 60)</div><div class="">modparam(<span style="color: #ce9178;" class="">"uac"</span>, <span style="color: #ce9178;" class="">"reg_retry_interval"</span>, 60)</div><div class="">modparam(<span style="color: #ce9178;" class="">"uac"</span>, <span style="color: #ce9178;" class="">"reg_contact_addr"</span>, <span style="color: #ce9178;" class="">"1.2.3.4:5060"</span>)</div></div></div></div></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">And /etc/kamailio/dbtext/uacreg:</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class=""><br class=""></div><div style="text-align: start; text-indent: 0px;" class=""><div style="background-color: rgb(30, 30, 30);" class=""><font color="#d4d4d4" face="Menlo, Monaco, Courier New, monospace" class=""><span style="caret-color: rgb(212, 212, 212); white-space: pre;" class="">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:<a href="http://sip.example.org/" class="">sip.example.org</a>:<a href="http://sip.example.org/" class="">sip.example.org</a>:11111111:XXXXXXXXXXXXXXXX:sip\:<a href="http://sip.example.org:600/" class="">sip.example.org:600</a>:0:0</span></font></div></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class=""><br class="">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.</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">A kamcmd to query the record shows it does not appear loaded:</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class=""><br class=""></div><div style="text-align: start; text-indent: 0px;" class=""><div class="">[root@ip-10-0-0-2 kamailio]# kamcmd uac.reg_info l_uuid 12345678</div><div class="">error: 404 - Record not found</div><div class=""><br class=""></div><div class="">I feel like I’m missing something obvious here!</div></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" 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: <a href="http://www.uconnected.com.au/" class="">www.uConnected.com.au</a><br class=""></div></div></div>
</div>
<div class=""><br class=""><blockquote type="cite" class=""><div class="">On 26 Mar 2019, at 8:06 pm, Mikko Lehto <<a href="mailto:mslehto@iki.fi" class="">mslehto@iki.fi</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Andrew White <<a href="mailto:andrew@uconnected.com.au" class="">andrew@uconnected.com.au</a>>:<br class=""><br class=""><blockquote type="cite" class="">I’m currently playing with the UAC module to hand off remote registrations with trunks to Kamailio.<br class=""><br 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.<br class=""><br class="">When attempting to load my UAC DB via db_text however, I get the following:<br class=""><br 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!<br 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<br 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<br 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<br class="">.<br class="">.<br class="">.<br class="">2) Why is my db_text failing to load the file?<br class=""></blockquote><br class=""><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="">modparam("htable", "db_url", "<a href="text:///opt/stuff/cfg/db_text" class="">text:///opt/stuff/cfg/db_text</a>")<br class="">---<br class=""><br class="">In directory /opt/stuff/cfg/db_text I have files "htable", "mtrees" and "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=""><br class="">-- <br class="">Mikko<br class=""><br class="">_______________________________________________<br class="">Kamailio (SER) - Users Mailing List<br class=""><a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class=""><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>