[SR-Users] another bug with JSONRPC-S?
Brandon Armstead
brandon at cryy.com
Wed Apr 20 01:18:07 CEST 2016
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
Sincerely,
Brandon Armstead
On Tue, Apr 19, 2016 at 3:40 PM, Brandon Armstead <brandon at cryy.com> 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
>
> Sincerely,
> Brandon Armstead
>
> On Tue, Apr 19, 2016 at 3:33 PM, Brandon Armstead <brandon at cryy.com>
> 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 at o1.com> 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 at 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
>>>
>>> {"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
>>> <http://1.2.3.4:54912#015%23012Content-Type>:
>>> 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 | *main:* 888.444.1111, Option 2
>>>
>>> *email:* bbridges at o1.com | *web:* www.o1.com
>>>
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160419/e957e261/attachment.html>
More information about the sr-users
mailing list