Description

Unexpected behavior when using db_text.so

Debugging Data

root@kamailio:/usr/lib/x86_64-linux-gnu/kamailio/kamctl# grep -r DB_PATH *
kamdbctl.dbtext:if [ -z "$DB_PATH" ] ; then
kamdbctl.dbtext:        DB_PATH="/usr/local/etc/kamailio/dbtext"
kamdbctl.dbtext:DB_PATH=$1
kamdbctl.dbtext:minfo "DBTEXT ... erasing all files at: $DB_PATH"
kamdbctl.dbtext:rm -rf $DB_PATH
kamdbctl.dbtext:        merr "kamailio_create function takes one param (DB_PATH)"
kamdbctl.dbtext:DB_PATH=$1
kamdbctl.dbtext:minfo "creating DBTEXT tables at: $DB_PATH ..."
kamdbctl.dbtext:mkdir -p $DB_PATH
kamdbctl.dbtext:    cp $DB_SCHEMA/$TABLE $DB_PATH/$TABLE
kamdbctl.dbtext:        merr "presence_create function takes one param (DB_PATH)"
kamdbctl.dbtext:DB_PATH=$1
kamdbctl.dbtext:minfo "creating DBTEXT presence tables at: $DB_PATH ..."
kamdbctl.dbtext:mkdir -p $DB_PATH
kamdbctl.dbtext:    cp $DB_SCHEMA/$TABLE $DB_PATH/$TABLE
kamdbctl.dbtext:minfo "creating DBTEXT extra tables at: $DB_PATH ..."
kamdbctl.dbtext:    cp $DB_SCHEMA/$TABLE $DB_PATH/$TABLE
root@kamailioz99s1:/usr/lib/x86_64-linux-gnu/kamailio/kamctl# grep -r DBTEXT_PATH *
dbtextdb/dbtextdb.py:    if 'DBTEXT_PATH' not in os.environ or not os.environ['DBTEXT_PATH']:
dbtextdb/dbtextdb.py:        print('DBTEXT_PATH must be set')
dbtextdb/dbtextdb.py:        location = os.environ['DBTEXT_PATH']
kamctl.dbtext:  DBTEXT_PATH="$MYLIBDIR/dbtext/kamailio/"
kamctl.dbtext:if [ -z "$DBTEXT_PATH" ] ; then
kamctl.dbtext:  DBTEXT_PATH="/usr/share/kamailio/dbtext/kamailio"
kamctl.dbtext:export DBTEXT_PATH

Possible Solutions

The simplest way to fix it is to add the lines to the file kamctlrc

root@kamailioz99s1:~/backup/orig# diff kamctlrc kamctlrc.orig
32,34d31
< # database path used by kamctl.dbtext and dbtextdb.py
< # DBTEXT_PATH="/usr/local/etc/kamailio/dbtext"
<

Additional Information

version: kamailio 5.3.9 (x86_64/linux)
flags: 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, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 7.5.0
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3170@github.com>