<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
I tested it [stop, start, restart] and it worked<br><br>First I commented the line below in the kamctlrc scrip to make sure that it was working because of the change you suggested on the kamctl script and not because my workaround<br><br>STARTOPTIONS=" -f /usr/local/kamailio-3.1/etc/kamailio/kamailio.cfg"<br><br>Then I found these lines and made it like this:<br><div>
<div>&nbsp;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ $SYSLOG = 1 ] ; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #$OSERBIN -P $PID_FILE $STARTOPTIONS 1&gt;/dev/null 2&gt;/dev/null<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $OSERBIN -P $PID_FILE&nbsp; -f $ETCDIR/kamailio.cfg $STARTOPTIONS 1&gt;/dev/null 2&gt;/dev/null<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #$OSERBIN -P $PID_FILE -E $STARTOPTIONS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $OSERBIN -P $PID_FILE -E&nbsp; -f $ETCDIR/kamailio.cfg $STARTOPTIONS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sleep 3<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ ! -s $PID_FILE ] ; then<br><br><br>I stoppped, started and restarted kamailio several times and it works now.<br><br>Thank you very much<br>fborot<br><br></div></div><br><br><div><hr id="stopSpelling">From: fborot@hotmail.com<br>To: henning.westerholt@1und1.de; sr-users@lists.sip-router.org<br>Subject: RE: [SR-Users] kamailio fails to start with kamctl start<br>Date: Tue, 5 Jul 2011 14:10:09 -0400<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>

<div dir="ltr">
thank you Henning, I will replace the lines on the kamctl script and report back the results<br><br><div>
<div>&nbsp;</div></div><br><br><div>&gt; From: henning.westerholt@1und1.de<br>&gt; To: sr-users@lists.sip-router.org<br>&gt; Subject: Re: [SR-Users] kamailio fails to start with kamctl start<br>&gt; Date: Tue, 5 Jul 2011 18:19:10 +0200<br>&gt; CC: fborot@hotmail.com<br>&gt; <br>&gt; On Monday 27 June 2011, Fabian Borot wrote:<br>&gt; &gt; I fixed the problem but I would like somebody to shed some light into this<br>&gt; &gt; issue.<br>&gt; &gt; <br>&gt; &gt; I noticed that when I run kamailio w/o telling where to load the<br>&gt; &gt; kamailio.cfg file is when it failed. So I went to the kamctl script and<br>&gt; &gt; notice that in the section where "kamctl start" happens the variable<br>&gt; &gt; $STARTOPTIONS was empty. I went to the etc/kamailio/kamctlrc, un-commented<br>&gt; &gt; the line with $STARTOPTIONS and made it like this:<br>&gt; &gt; <br>&gt; &gt;  <br>&gt; &gt; STARTOPTIONS=" -f /usr/local/kamailio-3.1/etc/kamailio/kamailio.cfg" -&gt;<br>&gt; &gt; this points to the config file which is in a custom path<br>&gt; &gt; <br>&gt; &gt; So, it seems that when one installs kamailio in a directory other than the<br>&gt; &gt; default path with the prefix option ['make prefix="new path here" all' and<br>&gt; &gt; 'make prefix="new path here" install'] you have to explicitly tell it<br>&gt; &gt; somehow to load the config file from somewhere else. Or I did not do it<br>&gt; &gt; correctly. Can somebody please confirm?. I thought that the initialization<br>&gt; &gt; scripts would also take care of that. I have installed kamailio 1.4.3 <br>&gt; &gt; 1.5.0, 1.5.2 using the prefix option at 'make' time several times and<br>&gt; &gt; never had this issue.<br>&gt; <br>&gt; Hi Fabian,<br>&gt; <br>&gt; I've just tested it in master branch and could reproduce it. It seems the <br>&gt; kamctl command misses a variable inclusion in the start cmd. Not sure why it <br>&gt; worked in 1.5 and earlier, did not tried it.<br>&gt; <br>&gt; Can you please try the attached patch for the kamctl in your checkout? If you <br>&gt; don't want to compile and install again, you could also do the changes in the <br>&gt; installed version manually.<br>&gt; <br>&gt; Best regards,<br>&gt; <br>&gt; Henning<br></div>                                               </div></div>                                               </div></body>
</html>