[sr-dev] [kamailio] janssonrpc-c does not return results if no route option specified (#256)

Laurent Debacker notifications at github.com
Mon Jul 20 14:58:12 CEST 2015


Experimenting janssonrpc-c, I noticed that I can't get anythin in the result variable, if no "route" option is specified.
1/ With "route" option, everything is OK:
janssonrpc_request("local", "bar.PIC1", '{"cli": "$avp(cli)","en": "$avp(cld)"}', "route=RPC_Init_Resp,retry=1");
route[RPC_Init_Resp] {
xlog("JANSSON result:  $var(result)\n");

The "xlog" returns the json formatted results as expected:
JANSSON result:  {"result":{"NetScenario":"PreCall","cli":"123456789","en":"9876543210Destination":"sip:xxx at xx.x.xx.xxx:xxxx","NextRPC":"bar.PIC2"}}

2/ The exact same request, without the route option does not return anything:
janssonrpc_request("local", "bar.PIC1", '{"cli": "$avp(cli)","en": "$avp(cld)"}');
xlog("JANSSON result:  $var(result)\n");

The "xlog" returns 0 this time:
JANSSON result:  0

A tshark trace indicates the same response is returned by the jsonrpc server, excluding a potential issue on this side.

I am available for futher information
Best regards,

Laurent.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/256
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150720/b1222de6/attachment.html>


More information about the sr-dev mailing list