I want to read params from environment, so define
#!defenv MYSQL_IP
#!trydef DBURL "mysql://kamailio:kamailio@MYSQL_IP/kamailio"
but It can't read this ”MYSQL_IP“。
root@d2e1fcc3f89e:/# env |grep MYSQL*
MYSQL_URL=172.16.4.111
MYSQL_IP=172.16.4.111
0(34) ERROR: db_mysql [km_my_con.c:166]: db_mysql_new_connection(): driver error: Unknown server host 'MYSQL_IP' (-2)
0(34) ERROR: <core> [db.c:324]: db_do_init2(): could not add connection to the pool
0(34) ERROR: dispatcher [dispatch.c:955]: ds_connect_db(): cannot initialize db connection
0(34) ERROR: dispatcher [dispatch.c:989]: ds_init_db(): unable to connect to the database
0(34) ERROR: dispatcher [dispatcher.c:439]: mod_init(): could not initiate a connect to the database
0(34) ERROR: <core> [core/sr_module.c:1030]: init_mod(): Error while initializing module dispatcher (/usr/lib/x86_64-linux-gnu/kamailio/modules/dispatcher.so)
(paste your sip traffic here)
kamailio -v
version: kamailio 5.7.4 (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, MEM_JOIN_FREE, 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_BLOCKLIST, 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 12.2.0
cat /proc/version
Linux version 3.10.0-1160.105.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Thu Dec 7 15:39:45 UTC 2023
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.