Hello, I discovered that kamcmd command doesn't allow the same argument for a rpc command if I call a one-liner command or from the kamcmd console. it's related to ul.add command

If I call this command from bash:
kamcmd ul.add location 222@domain.com sip:222@tbd.domain.com:5088;transport=udp 0 -1.0 . 0 2240 5023 . udp:8.12.6.7:5060

the command will fail with 2 errors:
error: 500 - Not enough parameters or wrong format
-bash: 0: command not found

I discovered if I remove ;transport=udp I get rid of the errors and I get new one:
Unknown option `-1'.

And if I set my Q value from -1.0 to 0.0 the command works

BUT

If I go into the kamcmd console and I ask the exact original command, it works and I can see in usrloc database that it accepted my Q value to -1.0 and the transport=udp string

I tried to use s: to force some argument as string but it doesn't works , may be I don't use correctly

I tried unsuccessfully:

kamcmd ul.add location 298@domain.com s:sip:298@tbd.domain.com:5088;transport=udp 0 s:-1.0 . 0 2240 5023 . udp:8.12.6.7:5060

-->

I use kamailio version
kamailio 5.7.1 (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 10.2.1

kamcmd has been built from the same source code with the rest of the program

Built on debian 11




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/4137@github.com>