Alright, it was the "params" part that wasn't clear since none of the rest
of the MI interfaces I've used with jsonrpc required that. I'll give it a try,
thanks!
Brooks Bridges | Sr. Voice Services Engineer
O1 Communications
5190 Golden Foothill Pkwy
El Dorado Hills, CA 95762
office: 916.235.2097 | main: 888.444.1111, Option 2
email:
bbridges@o1.com<https://o1-exch02.o1.com/owa/redir.aspx?SURL=N5sdfFYz8stEVSPrjxgZ29dWpZDBKhZcE_wO6PVDAY7tpQnGGanSCG0AYQBpAGwAdABvADoAYgBiAHIAaQBkAGcAZQBzAEAAbwAxAC4AYwBvAG0A&URL=mailto%3abbridges%40o1.com>
| web:
www.o1.com<https://o1-exch02.o1.com/owa/redir.aspx?SURL=_F62ooTZqo3g5Ccv…
________________________________
From: sr-users [sr-users-bounces(a)lists.sip-router.org] on behalf of Brandon Armstead
[brandon(a)cryy.com]
Sent: Tuesday, April 19, 2016 4:18 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] another bug with JSONRPC-S?
Actually my apologies, just tested here on this end the correct parameter name is
"htable" not "name" as well, so you will want to adjust it as follows
to:
curl -s -H 'Content-Type: application/json' --data-binary
'{"jsonrpc": "2.0", "method": "htable.dump",
"params" : {"htable": "callstats"}}'
http://1.2.3.4:5060/jsonrpc<https://o1-exch02.o1.com/owa/redir.aspx?REF=…
Sincerely,
Brandon Armstead
On Tue, Apr 19, 2016 at 3:40 PM, Brandon Armstead
<brandon@cryy.com<https://o1-exch02.o1.com/owa/redir.aspx?REF=9yJL8ckpkA15oPfKviUxU9RMbDAoZUrumRyYt6Sc0idDDbX9yGjTCAFtYWlsdG86YnJhbmRvbkBjcnl5LmNvbQ..>>
wrote:
I believe what you want is something more along the lines of:
curl -s -H 'Content-Type: application/json' --data-binary
'{"jsonrpc": "2.0", "method": "htable.dump",
"params" : {"name": "callstats"}}'
http://1.2.3.4:5060/jsonrpc<https://o1-exch02.o1.com/owa/redir.aspx?REF=…
Sincerely,
Brandon Armstead
On Tue, Apr 19, 2016 at 3:33 PM, Brandon Armstead
<brandon@cryy.com<https://o1-exch02.o1.com/owa/redir.aspx?REF=9yJL8ckpkA15oPfKviUxU9RMbDAoZUrumRyYt6Sc0idDDbX9yGjTCAFtYWlsdG86YnJhbmRvbkBjcnl5LmNvbQ..>>
wrote:
Brooks,
Here is an example call:
Ijsonrpc_exec('{"jsonrpc": "2.0", "method":
"dlg.end_dlg", "params" : {"h_entry":
"$var(h_entry)", "h_id": "$var(h_id)"},
"reply_name": "kamailio_jsonrpc_reply_fifo", "id": 1}')
It looks like you are not specifying params correctly perhaps? Just a quick guess from
glancing..
Sincerely,
Brandon Armstead
On Tue, Apr 19, 2016 at 10:48 AM, Brooks Bridges
<bbridges@o1.com<https://o1-exch02.o1.com/owa/redir.aspx?REF=dFtqzA7FUfPMJ5KMZzPFecZbavgGNa2DEPvW9MOon-dDDbX9yGjTCAFtYWlsdG86YmJyaWRnZXNAbzEuY29t>>
wrote:
I may have stumbled across another bug with this module. I believe the htable.dump method
isn’t correctly recognizing that a table name is being provided:
[root@server ~]# curl -s --header 'Content-Type: application/json' --data-binary
'{"jsonrpc": "2.0", "method": "htable.dump",
"name": "callstats"}'
http://1.2.3.4:5060/jsonrpc<https://o1-exch02.o1.com/owa/redir.aspx?REF=…
{"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution
Error"}}
Debug log:
2016-04-19T17:42:30.046892+00:00 server /usr/local/sbin/kamailio[21634]: DEBUG:
<core> [tcp_main.c:2465]: tcpconn_do_send(): buf=#012HTTP/1.1 500 No htable name
given#015#012Sia: SIP/2.0/TCP
1.2.3.4:54912#015#012Content-Type<https://o1-exch02.o1.com/owa/redir.asp…U.>:
application/json#015#012Server: kamailio (4.4.0-rc1 (x86_64/linux))#015#012Content-Length:
69#015#012#015#012{"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution
Error"}}
Brooks Bridges | Sr. Voice Services Engineer
O1 Communications
5190 Golden Foothill Pkwy
El Dorado Hills, CA 95762
office: 916.235.2097<tel:916.235.2097> | main: 888.444.1111<tel:888.444.1111>,
Option 2
email:
bbridges@o1.com<https://o1-exch02.o1.com/owa/redir.aspx?REF=dFtqzA7FUfPMJ5KMZzPFecZbavgGNa2DEPvW9MOon-dDDbX9yGjTCAFtYWlsdG86YmJyaWRnZXNAbzEuY29t>
| web:
www.o1.com<https://o1-exch02.o1.com/owa/redir.aspx?REF=yzAoqQdcMGPbZ_cIn…
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org<https://o1-exch02.o1.com/owa/redir.aspx?REF=kA2kQrjCKd6GxiHtDdNU2LNle0tSNpoxsg3VMU7F-v5DDbX9yGjTCAFtYWlsdG86c3ItdXNlcnNAbGlzdHMuc2lwLXJvdXRlci5vcmc.>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<https://o1…