Hello,

I am trying to get json RPCs running. simpleequests seem to work, but I can't figure out how to pass parameters. For example

curl --header 'Content-Type: application/json' --data-binary '{"id": 1,"jsonrpc": "2.0", "method": "ul.db_users" }' http://localhost:8081/RPC/

{
      "jsonrpc":  "2.0",
      "error":    {
            "code":     500,
            "message":  "Not enough parameters (table to lookup)"
      },
      "id": 1
}

According to http://www.kamailio.org/docs/docbooks/3.2.x/rpc_api/rpc_api.html#rpc.getting_parameters parameters dont have names and according to http://www.kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.r.db_users 1 parameter is required.

I guessed adding "params":"location" => no error anymore, but still no result:

curl --header 'Content-Type: application/json' --data-binary '{"id": 1,"jsonrpc": "2.0", "method": "ul.db_users", "params":"location"}' http://localhost:8081/RPC/
{
      "jsonrpc":  "2.0",
      "result":   {
      },
      "id": 1
}

Same result (no error) if I pass "params":"nonsense", so "params" seems to be kind of ignored ...

What's the correct json syntax here or in general?

Best regards,
Volker