[OpenSIPS-Users] how to call ul_dump?brief using jsonrpc
Vlad Patrascu
vladp at opensips.org
Wed Nov 11 13:27:36 EST 2020
Hi Babak,
This is a bit of a mistake in the documentation, as the parameter's name
is "brief", but as value it actually expects an integer. As such the
jsonrpc request should be:
'{"jsonrpc":"2.0","method":"ul_dump","params":{"brief":1},"id":10}'
or:
'{"jsonrpc":"2.0","method":"ul_dump","params":[1],"id":10}'
Regards,
--
Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com
On 11.11.2020 15:08, Babak Yakhchali wrote:
> Hi
> I'm using opensips 3.1.
> What json should be sent as body to http mi which results like
> ul_dump?brief
> I tried this curl command but it is not working
> curl --location --request POST 'http://127.0.0.1:8080/opensips_mi' \
> --header 'Content-Type: application/json' \
> --data-raw
> '{"jsonrpc":"2.0","method":"ul_dump","id":10,*"params":["brief"]*}'
> I get
> {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params"}
>
> this works but it is not brief :)
> curl --location --request POST 'http://127.0.0.1:8080/opensips_mi'
> --header 'Content-Tya-raw '{"jsonrpc":"2.0","method":"ul_dump","id":10}'
>
> thanks
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20201111/c13722ab/attachment.html>
More information about the Users
mailing list