Hi Using kamailio with http jsonrpcs found next trouble
When i making request like
curl -s -H 'Content-Type: application/json' --data-binary '{"method":"htable.get","params":{**"name":"mytable"**,"key":"myparam"},"jsonrpc":"2.0"}' http://127.0.0.1:5060/jsonrpc
all fine. I getting good response
But when I making curl -s -H 'Content-Type: application/json' --data-binary '{"method":"htable.get","params":{"key":"myparam",**"name":"mytable"**},"jsonrpc":"2.0"}' http://127.0.0.1:5060/jsonrpc i.e keys of object on different places
It gives me
curl -s -H 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0", "method": "htable.get","params":{"key":"mykey","name": "mytable"}}' http://127.0.0.1:5060/jsonrpc { "jsonrpc": "2.0", "error": { "code": 500, "message": "No such htable" } }
Means kamailio cant find needed htable
I supposed that position of the key should't have a matter for the JSON objects parsers But here is looks like different
May be it is not a bug bug feature request because of it is just an unexpected behaivor
Im using kamailio 5.1.3 on the Debian 9
version: kamailio 5.1.3 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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 ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 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 on 00:25:48 May 9 2018 with gcc 6.3.0