<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">At some point we need a framed protocol for this kind of lists. Kamailio builds it in memory before sending. We do need something that sends out chunks.<div><br></div><div>/O</div><div><br><div><div>14 aug 2013 kl. 14:41 skrev Alex Balashov <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite">By the way, I have not tried connecting to the binrpc interface via network socket and retrieving the output that way.  I am only trying to connect to it via the 'kamcmd' utility via the default UNIX domain socket.<br><br>On 08/14/2013 08:37 AM, Alex Balashov wrote:<br><br><blockquote type="cite">Hello,<br><br>I am having trouble getting a large list of dialogs (800+) out of<br>Kamailio using the dlg.list binrpc command.<br><br>I posted a while back that the list of dialog data was coming back<br>truncated, and was told to increase:<br><br>     modparam("ctl", "binrpc_max_body_size", ...)<br>     modparam("ctl", "binrpc_struct_max_body_size", ...)<br><br>I did that, increasing the buffers to 20 MB.  Then, when I ran<br><br>    sercmd -s unixs:/tmp/kamailio_ctl dlg.list<br><br>I got:<br><br>    ERROR: reply too big<br><br>which clearly seemed to be on the client side now.<br><br>So, I looked in the sources for sercmd (now sercmd), in<br>sip-router/utils/sercmd/sercmd.c, and found this:<br><br>     if ((ret=get_reply(s, reply_buf, MAX_REPLY_SIZE, cookie, &in_pkt,<br>                     &msg_body))<0){<br>         switch(ret){<br>             case -1:<br>                 goto error_read;<br>             case -2:<br>                 goto error_parse;<br>             case -3:<br>                 goto error_cookie;<br>             case -4:<br>                 goto error_toobig;<br><br>So, I adjusted:<br><br>    #define MAX_REPLY_SIZE<br><br>to several megabytes as well, and tried the same with MAX_BODY_SIZE too.<br><br>Now, when I run the dlg.list command, it just hangs and never returns<br>anything.  It was stuck there for well over 20 minutes.  An 'strace' on<br>sercmd reveals that it receives what appears to be the full listing, but<br>keeps wanting to read() more.  I don't have the exact output handy at<br>the moment, but it looked like this:<br><br>    socket(PF_FILE, SOCK_STREAM, 0)         = 3<br>    connect(3, {sa_family=AF_FILE, path="/tmp/kamailio_ctl"}, 110) = 0<br>    writev(3, [{"\241\3\v%s\230\4", 7}, {"\221\tdlg.list\0", 11}], 2) = 18<br>    read(3, "\241\27\16\257%s\230\4\221Hhash:551:9521 state:4 "...,<br>786432) = 340000<br>    read(3,<br>    [just hangs here]<br><br>Now, I would have assumed that perhaps there is more to read and the<br>output is not returning due to some endless locking of the dialog<br>profile table, which is constantly changing.  However, that cannot be<br>the case because<br><br>    kamctl fifo dlg_list<br><br>works fine for any amount of dialogs, and always returns all the data<br>near-instantly!<br><br>Any assistance is much appreciated!<br><br>-- Alex<br><br>[1] I don't have the output handy at the moment, but it was a read() value:<br><br></blockquote><br><br>-- <br>Alex Balashov - Principal<br>Evariste Systems LLC<br>235 E Ponce de Leon Ave<br>Suite 106<br>Decatur, GA 30030<br>United States<br>Tel: +1-678-954-0670<br>Web: <a href="http://www.evaristesys.com/">http://www.evaristesys.com/</a>, <a href="http://www.alexbalashov.com/">http://www.alexbalashov.com/</a><br><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>---</div><div>* Olle E Johansson - <a href="mailto:oej@edvina.net">oej@edvina.net</a></div><div>* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden</div><div><br class="webkit-block-placeholder"></div></span><br class="Apple-interchange-newline">

</div>
<br></div></body></html>