Hello,
have you looked at jansson module? Is it not offering what you need?
Cheers,
Daniel
On 24.09.19 10:42, Melek Oktay wrote:
Hi,
I am trying to monitor uac channels status periodically in kamailio config file.I call uac.reg_dump rpc command and result will be inside in $var(uac_channel) variable
jsonrpc_exec('{"jsonrpc": "2.0", "method": "uac.reg_dump"}');
$var(uac_channel) = $jsonrpl(body);
it returns me json formatted result like below, it has a several channels info and their status flags
{"jsonrpc":"2.0", "result":[{"l_uuid":"YY","l_username":"YY","l_domain":"YY","r_username":"YY","., "flags":16 },
{"l_uuid":"XX","l_username":"XX","l_domain":"XX","r_username":"XX",,... "flags":1 }}]}
I could not parse this result on kamailio.cfg file ! I want to learn channel that has a 16 value in flag attribute for example !!
Would you help me to figure out how I am gonna parse this json file please ?
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat