Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command line arg --substdefs doesn't work anymore #3152

Closed
seven1240 opened this issue Jun 19, 2022 · 1 comment
Closed

command line arg --substdefs doesn't work anymore #3152

seven1240 opened this issue Jun 19, 2022 · 1 comment

Comments

@seven1240
Copy link
Contributor

seven1240 commented Jun 19, 2022

Description

with the following args

--substdefs=/S_KAM_IP_PUBLIC/$KAM_IP_PUBLIC/ \
--substdefs=/S_KAM_SIP_PORT/$KAM_SIP_PORT/

error logs when start

 0(24400) ERROR: <core> [core/ppcfg.c:57]: pp_def_qvalue(): defined value is too large 0 < 15
 0(24400) ERROR: <core> [core/ppcfg.c:192]: pp_substdef_add(): failed to enclose in quotes the value
 0(24400) ERROR: <core> [main.c:2371]: main(): failed to add substdefs expression: /S_KAM_IP_PUBLIC/192.168.7.8/

Troubleshooting

the first log was reported with this pr

#3151

so looks like pv_get_buffer_size() returns 0, and there looks like nowhere called pv_set_buffer_size().

I can confirm the same args works with the docker image: kamailio/kamailio-ci:5.4.4-alpine.

the following config works in kamailio.cfg, so only the command line arg has problem.

#!substdef "!HOMER_DB_USER!homer_user!g"
#!substdefs "/ID/subst/"

Reproduction

add the following arg to command line when kamailio start

--substdefs=/ID/VALUE/

Debugging Data

(paste your debugging data here)

Log Messages

(paste your log messages here)

SIP Traffic

(paste your sip traffic here)

Possible Solutions

Additional Information

  • Kamailio Version - output of kamailio -v
version: kamailio 5.7.0-dev0 (aarch64/linux) f2549f-dirty
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-NOSMP, 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: f2549f -dirty
compiled on 10:01:25 Jun 19 2022 with gcc 11.3.0
  • Operating System:
root@3b4aadb67f6f:/usr/src/kamailio# cat /etc/debian_version
11.3

Linux 3b4aadb67f6f 5.10.47-linuxkit #1 SMP PREEMPT Sat Jul 3 21:50:16 UTC 2021 aarch64 GNU/Linux
@miconda
Copy link
Member

miconda commented Jun 28, 2022

I pushed a patch for it, if you test and all ok, then I will backport. If still an issue, then reopen.

@miconda miconda closed this as completed Jun 28, 2022
miconda added a commit that referenced this issue Jul 4, 2022
miconda added a commit that referenced this issue Sep 15, 2022
- GH #3152

(cherry picked from commit a78adb5)
(cherry picked from commit bdd1c56)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants