Welcome!

Daniel


On 26.02.18 11:06, José Seabra wrote:
Hi Daniel,

Thank you for your hint, it took me to the right solution :)
basically  the json doc was wrongly specified

before:
'{"jsonrpc": "2.0", "method": "htable.reload", "id":"htable"}'
now:
'{"jsonrpc": "2.0", "method": "htable.reload", "params" : {"htable": "htable"}, "id": 1}'


Thank you for you help.

Regards
José

2018-02-26 8:15 GMT+00:00 Daniel-Constantin Mierla <miconda@gmail.com>:

Hello,

print the jsonrpcs variables to see the code and result:

  - https://www.kamailio.org/wiki/cookbooks/5.1.x/pseudovariables#jsonrpcs_variables

Cheers,
Daniel


On 23.02.18 15:46, José Seabra wrote:
Hello there,
I'm using xHTTP and json_rpc module to receive http instructions to reload htable's from database to memory.

The way i'm calling the json_rpc in kamailio script is the following:

                $var(json_rpc)='{"jsonrpc": "2.0", "method": "htable.reload", "id":"htable"}';
                jsonrpc_exec($var(json_rpc));

The execution of this command doesn't give any errors, but the changes made on htable database  weren't transmitted to the memory.

I have attached the kamailio log where you can see that there isn't any erros on json_rpc execution  during reload instructions, the strange thing here is that the htable module only says:

2018-02-23 14:33:44.968  DEBUG: htable [ht_db.c:96]: ht_db_open_con(): database connection opened successfully

doesn't report if the reload was success or not.

Those logs attached were printed with kamailio debug set to level 4.

The kamailio version is 4.4.2.

Thank you

--
Best Regards
José Seabra


_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com



--
Cumprimentos
José Seabra

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com