<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
On 1/5/12 12:22 PM, Uri Shacked wrote:
<blockquote
cite="mid:CAMMbDhSGujkO62JbyW++1h-MCmKpSnmanSxzjn65A6gqTWE0jg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hi,</div>
<div>i ask this not for sip affected problems. i what to load
the information from the DB.</div>
<div>while loading, i want the DB table to be locked for
changes... i need to know when did the loading proccess ended
in order to unlock the table.....</div>
<div>how do i set an application to run the kamctl command and
make sure the reload ended? i understand it depends on the
amount of data. that is why i need a "return code" from the
kamctl to let me know the reload ends....</div>
<div> </div>
<div>any ideas?<br>
</div>
</div>
</blockquote>
all the fifo commands return on the first line a status code and
phrase, similar to sip reply. Only in the case of '200 OK', kamctl
skips the first line and prints the rest. Since most of reload
commands don't return anything else but the first line, you don't
see anything in the terminal<br>
<br>
You can edit filter_fl in kamctl.base and remove the line:<br>
<br>
NR == 1 && /^200 OK/ { next }<br>
<br>
then it should print the status code, which can help you detect when
the command ended.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:CAMMbDhSGujkO62JbyW++1h-MCmKpSnmanSxzjn65A6gqTWE0jg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div class="gmail_quote">On Thu, Jan 5, 2012 at 12:36 PM,
Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:miconda@gmail.com">miconda@gmail.com</a>></span>
wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px
0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Hello,
<div class="im"><br>
<br>
On 1/5/12 11:03 AM, Uri Shacked wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px
0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Hi,<br>
i am using different modules like "mtree",
"carrierroute", "drouting" and so.<br>
how can i tell how long did the reload takes?<br>
</blockquote>
</div>
this is a matter of how many records are in database.
Perhaps you can count the duration of executing the reload
command.
<div class="im"><br>
<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px
0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">how
do i know if it fails?<br>
is there a way to get a return code from kamailio that
confirms that the reload ended and successfuly?<br>
</blockquote>
</div>
It returns failure code if something does not go right while
reloading.<br>
<br>
Note that reload operations are done in a dedicated process
when using kamctl commands, so sip traffic processing is not
affected.<br>
<br>
Cheers,<br>
Daniel<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Daniel-Constantin Mierla -- <a moz-do-not-send="true"
href="http://www.asipto.com/" target="_blank">http://www.asipto.com</a><br>
<a moz-do-not-send="true"
href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a>
-- <a moz-do-not-send="true"
href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>