Yes, when i send my request i can see (debug is set to 3): Sep 23 11:52:22 dcloud-03 /usr/sbin/kamailio[22020]: DEBUG: ctl [../../io_wait.h:376]: io_watch_add(): DBG: io_watch_add(0x7f5bd6304460, 14, 3, 0x1ab22e0), fd_no=2 Sep 23 11:52:22 dcloud-03 /usr/sbin/kamailio[22020]: DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on * Sep 23 11:52:22 dcloud-03 /usr/sbin/kamailio[22020]: DEBUG: ctl [../../io_wait.h:598]: io_watch_del(): DBG: io_watch_del (0x7f5bd6304460, 14, -1, 0x10) fd_no=3 called and that's all...
Yes, there are double quotes in my command. But for me it is correct, when i check the frame using wireshark, i see {"id": 1, "jsonrpc": "2.0", "method": "ul.dump"} ....
Thank Loic
2015-09-23 11:50 GMT+02:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
can you look at network traffic (e.g., ngrep) or start kamailio with debug=3 in kamailio.cfg?
You should see what is processed.
At a quick look, you command line is using double quotes to wrap all the json string, which has other double quotes inside, so the shell will split that -- but maybe that is just an example posted here, not the actual command you used.
Cheers, Daniel
On 23/09/15 11:46, Loïc Boissy wrote:
Hello
I am trying to use JSONRPC-S Kamailio module to request for example the content of the location table. More generally, i would like to send RPC commands to my kamailio server using http request. For the moment, kamailio server always returns "400 bad request: corrupted packet".
To send my request, i use curl. For example:
curl --header 'Content-Type: application/json' --data-binary "{"id": 1, "jsonrpc": "2.0", "method": "ul.dump" }" http://XXX.XXX.XXX.XXX/RPC/ http://XXX.XXX.XXX.XXX/RPC/
Is there specific syntax to respect? Kamailio server version is 4.3.2.
Thank you in advance. Loic BOISSY
Visit Digigram at IBC2015 at Stand 8.C51, Sept. 11-15 in Amsterdam Register here http://www.ibc.org/page.cfm/link=478 for your *FREE* pass with Digigram's Exhibitor Customer Code *4462*
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users