<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Do you send the request to the port on which ctl module is
listening? if yes, that is not correct one, you have to send it to
the port for sip packets.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 23/09/15 12:00, Loïc Boissy wrote:<br>
</div>
<blockquote
cite="mid:CAHrc+6k9JMLZ3MMyE0xV2BjmNhAj5QocJCkmE5gqDAqKGdF9uQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Yes, when i send my request i can see (debug is set to 3):</div>
<div>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</div>
<div>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 *</div>
<div>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</div>
<div>and that's all...</div>
<div><br>
</div>
<div>Yes, there are double quotes in my command. But for me it
is correct, when i check the frame using wireshark, i see</div>
<div><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:12px;text-align:justify">{"id":
1, "jsonrpc": "2.0", "method": "ul.dump"}</span><br>
</div>
<div><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:12px;text-align:justify">....</span></div>
<div><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:12px;text-align:justify"><br>
</span></div>
<div><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:12px;text-align:justify">Thank</span></div>
<div><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:12px;text-align:justify">Loic</span></div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-09-23 11:50 GMT+02:00
Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:miconda@gmail.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a></a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
<br>
can you look at network traffic (e.g., ngrep) or start
kamailio with debug=3 in kamailio.cfg?<br>
<br>
You should see what is processed.<br>
<br>
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.<br>
<br>
Cheers,<br>
Daniel
<div>
<div class="h5"><br>
<br>
<div>On 23/09/15 11:46, Loïc Boissy wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Hello
<div><br clear="all">
<div>
<div
style="font-family:Verdana;font-size:12px">I
am trying to use JSONRPC-S Kamailio module
to request for example <span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;text-align:justify">the
content of the location table. More
generally, i would like to send RPC
commands to my kamailio server using http
request.</span></div>
<div
style="font-family:Verdana;font-size:12px"><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;text-align:justify">For
the moment, kamailio server always returns
"400 bad request: corrupted packet".</span></div>
<div
style="font-family:Verdana;font-size:12px"><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;text-align:justify"><br>
</span></div>
<div
style="font-family:Verdana;font-size:12px"><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;text-align:justify">To
send my request, i use curl. For example:</span></div>
<div
style="font-family:Verdana;font-size:12px"><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;text-align:justify"><br>
</span></div>
<div><span style="text-align:justify"><font
face="Helvetica, Arial" color="#000000"><span
style="font-size:12px">curl --header
'Content-Type: application/json'
--data-binary "{"id": 1, "jsonrpc":
"2.0", "method": "ul.dump" }"</span></font></span><span
style="font-size:12px;color:rgb(0,0,0);font-family:Helvetica,Arial;text-align:justify"> <a
moz-do-not-send="true"
href="http://XXX.XXX.XXX.XXX/RPC/"
target="_blank"><a class="moz-txt-link-freetext" href="http://XXX.XXX.XXX.XXX/RPC/">http://XXX.XXX.XXX.XXX/RPC/</a></a></span></div>
<div
style="font-family:Verdana;font-size:12px"><br>
</div>
<div
style="font-family:Verdana;font-size:12px">Is
there specific syntax to respect?</div>
<div
style="font-family:Verdana;font-size:12px">Kamailio
server version is 4.3.2.<br>
</div>
<div
style="font-family:Verdana;font-size:12px"><br>
</div>
<div
style="font-family:Verdana;font-size:12px">Thank
you in advance.</div>
</div>
<div>Loic BOISSY</div>
<div><br>
</div>
</div>
</div>
<br>
</div>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<div style="font-size:12.8000001907349px"><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">Visit</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px"> Digigram at </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">IBC2015</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px"> at </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">Stand
8</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px">.</span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">C51</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px">, </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">Sept</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px">. </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">11-15</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px"> in </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">Amsterdam</span></div>
<div style="font-size:12.8000001907349px"><font
face="arial, sans-serif" color="#545454"><span
style="line-height:18.2000007629395px">Register <a
moz-do-not-send="true"
href="http://www.ibc.org/page.cfm/link=478"
style="color:rgb(17,85,204)" target="_blank">here</a> for
your <b>FREE</b> pass with Digigram's Exhibitor
Customer Code <b>4462</b></span></font></div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
<span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
<span class="HOEnZb"><font color="#888888"> <br>
<pre cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - <a moz-do-not-send="true" href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a></pre>
</font></span></div>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div style="color:rgb(136,136,136)">
<div
style="color:rgb(34,34,34);font-size:12.8000001907349px"><br>
</div>
<div
style="color:rgb(34,34,34);font-size:12.8000001907349px">
<table style="font-family:Arial">
<tbody>
<tr>
<td rowspan="7"><a
moz-do-not-send="true"
href="http://www.digigram.com/"
style="color:rgb(17,85,204)"
target="_blank"><img
moz-do-not-send="true"
src="http://www.digigram.com/show/img1.png"
height="100" border="0"
width="129"></a></td>
</tr>
<tr>
<td colspan="5"><b>Loïc BOISSY</b></td>
</tr>
<tr>
<td colspan="5"><i>R&D software
engineer</i><i
style="font-size:12.8000001907349px"> &
Project manager</i><br>
</td>
</tr>
<tr>
<td colspan="5"><span
style="color:rgb(111,185,217);font-weight:bold">office:</span> +33
(0)4 76 52 53 16</td>
</tr>
<tr>
<td colspan="5"><span
style="color:rgb(111,185,217);font-weight:bold">cell:</span> +33
(0)6 81 54 63 19</td>
</tr>
<tr>
<td colspan="5"><span
style="color:rgb(111,185,217);font-weight:bold">fax:</span> +33
(0)4 76 52 18 44</td>
</tr>
<tr>
<td><a moz-do-not-send="true"
href="http://www.digigram.com/company/pressroom.php"
style="color:rgb(17,85,204)"
target="_blank"><img
moz-do-not-send="true"
src="http://www.digigram.com/show/img2.png"
style="vertical-align:middle"
height="22" border="0"
width="23"></a> <a
moz-do-not-send="true"
href="https://www.facebook.com/Digigram.Official?ref=hl"
style="color:rgb(17,85,204)"
target="_blank"><img
moz-do-not-send="true"
src="http://www.digigram.com/show/img3.png"
style="vertical-align:middle"
height="22" border="0"
width="25"></a> <a
moz-do-not-send="true"
href="https://plus.google.com/+Digigram"
style="color:rgb(17,85,204)"
target="_blank"><img
moz-do-not-send="true"
src="http://www.digigram.com/show/img4.png"
style="vertical-align:middle"
height="22" border="0"
width="24"></a> <a
moz-do-not-send="true"
href="https://www.linkedin.com/company/digigram"
style="color:rgb(17,85,204)"
target="_blank"><img
moz-do-not-send="true"
src="http://www.digigram.com/show/img5.png"
style="vertical-align:middle"
height="25" border="0"
width="25"></a> <a
moz-do-not-send="true"
href="https://twitter.com/digigram"
style="color:rgb(17,85,204)"
target="_blank"><img
moz-do-not-send="true"
src="http://www.digigram.com/show/img6.png"
style="vertical-align:middle"
height="26" border="0"
width="24"></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<div style="font-size:12.8000001907349px"><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">Visit</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px"> Digigram
at </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">IBC2015</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px"> at </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">Stand
8</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px">.</span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">C51</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px">, </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">Sept</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px">. </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">11-15</span><span
style="color:rgb(84,84,84);line-height:18.2000007629395px"> in </span><span
style="font-weight:bold;color:rgb(84,84,84);line-height:18.2000007629395px">Amsterda<wbr>m</span></div>
<div style="font-size:12.8000001907349px"><font face="arial,
sans-serif" color="#545454"><span
style="line-height:18.2000007629395px">Register <a
moz-do-not-send="true"
href="http://www.ibc.org/page.cfm/link=478"
style="color:rgb(17,85,204)" target="_blank">here</a> for
your <b>FREE</b> pass with Digigram's Exhibitor Customer
Code <b>4462</b></span></font></div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a></pre>
</body>
</html>