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 ?
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 again,
Thanks for help Daniel, it helps much
Regards, Melek
On Tue, Sep 24, 2019 at 10:53 AM Daniel-Constantin Mierla miconda@gmail.com wrote: