Adjust STARTOPTIONS to include "-p /var/run/opensips.pid" <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">( replace with the path to where you want the pid file )</span><div>
<font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">There are other options you may want to adjust for starting opensips. Note that some options are overridden if set in the config file like listen address. Here is the list of options you can see when you run opensips with the help option -h</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><div><path to opensips base install>/sbin/opensips -h</div><div>version: opensips 1.6.4-tls (x86_64/linux)</div>
<div>Usage: opensips -l address [-l address ...] [options]</div><div>Options:</div><div> -f file Configuration file (default /opt/opensips/etc/opensips/opensips.cfg)</div><div> -c Check configuration file for errors</div>
<div> -C Similar to '-c' but in addition checks the flags of exported</div><div> functions from included route blocks</div><div> -l address Listen on the specified address/interface (multiple -l</div>
<div> mean listening on more addresses). The address format is</div><div> [proto:]addr[:port], where proto=udp|tcp and </div><div> addr= host|ip_address|interface_name. E.g: -l locahost, </div>
<div> -l udp:<a href="http://127.0.0.1:5080">127.0.0.1:5080</a>, -l eth0:5062 The default behavior</div><div> is to listen on all the interfaces.</div><div> -n processes Number of child processes to fork per interface</div>
<div> (default: 8)</div><div> -r Use dns to check if is necessary to add a "received="</div><div> field to a via</div><div> -R Same as `-r` but use reverse dns;</div>
<div> (to use both use `-rR`)</div><div> -v Turn on "via:" host checking when forwarding replies</div><div> -d Debugging mode (multiple -d increase the level)</div><div>
-D Do not fork into daemon mode</div><div> -E Log to stderr</div><div> -T Disable tcp</div><div> -N processes Number of tcp child processes (default: equal to `-n`)</div><div> -W method poll method</div>
<div> -V Version number</div><div> -h This help message</div><div> -b nr Maximum receive buffer size which will not be exceeded by</div><div> auto-probing procedure even if OS allows</div>
<div> -m nr Size of shared memory allocated in Megabytes</div><div> -w dir Change the working directory to "dir" (default "/")</div><div> -t dir Chroot to "dir"</div>
<div> -u uid Change uid </div><div> -g gid Change gid </div><div> -P file Create a pid file</div><div> -G file Create a pgid file</div><div><br></div><div>Dave</div></span></font><br><div class="gmail_quote">
On Fri, Jan 14, 2011 at 7:20 AM, Chris Liu <span dir="ltr"><<a href="mailto:cachris68@yahoo.ca">cachris68@yahoo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:times new roman,new york,times,serif;font-size:10pt">Hi Anca,<br><br>Thank you very much , i add this line to /etc/opensips/opensipsctlrc <br><div class="im"><br>STARTOPTIONS=" -f /etc/opensips/opensips.cfg"<br>
<br></div><span style="color:rgb(0, 0, 255);font-weight:bold">opensipsctl start</span> use this configure file now. Thanks<br><br>Do you know why I start with <span style="color:rgb(0, 0, 255)">/etc/init.d/opensips start </span>, there is no opensips.pid in /var/run ?<br>
<br>Regards,<br><br>Chris<br><div><br></div><div style="font-family:times new roman,new york,times,serif;font-size:10pt"><br><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><font face="Tahoma" size="2"><hr size="1">
<b><span style="font-weight:bold">From:</span></b> Anca Vamanu
<<a href="mailto:anca@opensips.org" target="_blank">anca@opensips.org</a>><br><b><span style="font-weight:bold">To:</span></b> <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
<b><span style="font-weight:bold">Sent:</span></b> Fri, January 14, 2011 9:37:59 AM<br><b><span style="font-weight:bold">Subject:</span></b> Re: [OpenSIPS-Users] Some strange things with starting opensips<br></font><div>
<div>
</div><div class="h5"><br>
Hi Chris,<br>
<br>
You need to set the path to the configuration file.<br>
You should edit file opensipsctlrc ( localed in etc/opensips/ ) and
set STARTOPTIONS=" -f /etc/opensips/opensips.cfg" ( replace with the
path to your configuration file).<br>
<br>
Regards,<br>
<pre>-- <br>Anca Vamanu<br><a rel="nofollow" href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a></pre>
<br>
<br>
<br>
On 01/14/2011 06:26 AM, Chris Liu wrote:
<blockquote type="cite">
<div style="font-family:times new roman,new york,times,serif;font-size:10pt">
<div>Hi everyone,<br>
<br>
We can use <span style="color:rgb(0, 0, 255);font-weight:bold">opensipsctl start</span> and <span style="color:rgb(0, 0, 255);font-weight:bold">service opensips start</span>
to startup opensips, can anybody show me the different of
these two ways?<br>
<br>
On my CentOS system, when I use <span style="color:rgb(0, 0, 255);font-weight:bold">service opensips start </span>tostartup
the system, no opensips.pid in /var/run and I can find
/tmp/opensips_fifo but it will disapear in about 10 mins. If I
use <span style="color:rgb(0, 0, 255);font-weight:bold">opensipsctl
start</span> to start the system, /tmp/opensips_fifo and
opensips.pid are fine.<br>
<br>
But interest thing is seems <span style="color:rgb(0, 0, 255);font-weight:bold">service opensips start </span>doesn't
use the configure file. I changed the name of configure file
and try <span style="color:rgb(0, 0, 255);font-weight:bold">service opensips start</span>, It works with no
error! Anybody know which configure file be use by it?<br>
[root@OpenSIP1/etc/opensips]# mv opensips.cfg opensips.cfg_<br>
[root@OpenSIP1/etc/opensips]# opensipsctl stop<br>
INFO: Stopping OpenSIPS : <br>
INFO: stopped<br>
[root@OpenSIP1/etc/opensips]# opensipsctl start<br>
INFO: Starting OpenSIPS : <br>
INFO: started (pid: 15088)<br>
</div>
</div>
</blockquote>
</div></div></div></div>
</div><br></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div>