[OpenSIPS-Users] REG::opensipsctl with multiple opensips instances

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Jan 8 16:42:23 CET 2016


Hi Ravi,

That is the whole point - you do not define that var in opensipsctlrc 
(you let it undefine). And you set it as env var when running the 
opensipsctl tool. Like:

    #> OSIPS_FIFO=/tmp/opensips1 opensipsctl fifo ps

Even more, you can create 2 shell scripts as wrappers around opensipctl 
to defineOSIPS_FIFO to the correct value.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.01.2016 20:48, Ravitez Ravi wrote:
> Hello Bogdan,
>                     Thank you for the help,but i'm unable to find 
> where to update OSIPS_FIFO other then in opensipsctrl,
>
> Config :
>
> binary :  opensips1
>
> Config File : opensips1.cfg
>
>              modparam("mi_fifo", "fifo_name", "/tmp/opensips1")
>
>    modparam("mi_fifo", "fifo_mode", 0666)
>
> binary :    opensips2
>
> Config File : opensips2.cfg
>
> modparam("mi_fifo", "fifo_name", "/tmp/opensips2")
>
>     modparam("mi_fifo", "fifo_mode", 0666)
>
> binary : opensipsctl
>
> Config File : opensipsctlrc
>
>
> ase 1:
>
> Config :
>
> ## path to FIFO file
>
> #OSIPS_FIFO="/tmp/opensips_fifo" (commented out)
>
>
> FIFO Command : opensipsctl fifo arg
>
> Output : "ERROR: /tmp/opensips_fifo does not exist"
>
>
> Case 2:
>
> Config :
>
> ## path to FIFO file
>
> OSIPS_FIFO="/tmp/opensips1"
>
>
> FIFO Command : opensipsctl fifo arg
>
> Output : Displays valid data
>
>
> Case 3 :
>
> Config :
>
> ## path to FIFO file
>
> OSIPS_FIFO="/tmp/opensips2"
>
>
> FIFO Command : opensipsctl fifo arg
>
> Output : Displays valid data
>
>
> We have only one opensipsctl binary,is there a way that we can have 
> two opensipsctlrc files and pass it as an argument to
>
> opensipsctl,which will prevent us from modifying opensipsctlrc.Thank 
> you for your time.
>
>
>
> Regards,
>
> Ravitez.D
>
>
>
> On Thu, Jan 7, 2016 at 9:40 AM, Bogdan-Andrei Iancu 
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
>     Assuming you use FIFO backend for MI, have you configured
>     different fifo files in the 2 instances ? If so, you can do
>
>         OSIPS_FIFO=/tmp_my_fifo opensipsctl fifo ps
>
>     be sure you have no FIFO defined in the opensipsctlrc file (by
>     default it;s not)
>
>     Regards,
>
>     Bogdan-Andrei Iancu
>     OpenSIPS Founder and Developer
>     http://www.opensips-solutions.com
>
>     On 07.01.2016 15:08, Ravitez Ravi wrote:
>>
>>     Hello Bogdan,
>>                             Good Day,
>>                             It's over MI, say if I execute
>>     "opensipctrl fifo ps" it shows data related to "opensips2",is
>>     there a way to specify which process to get data from.
>>                             Thank you.
>>
>>     Regards,
>>     Ravitez.D
>>
>>     On Jan 7, 2016 3:09 AM, "Bogdan-Andrei Iancu"
>>     <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>>
>>         Hi Ravi,
>>
>>         When you say "picks up data from opensips2" - it is data over
>>         MI or data from DB ?
>>
>>         Regards,
>>
>>         Bogdan-Andrei Iancu
>>         OpenSIPS Founder and Developer
>>         http://www.opensips-solutions.com
>>
>>         On 06.01.2016 23:04, Ravitez Ravi wrote:
>>>         Hello All,
>>>                     Good Day and a Happy New Year.
>>>                     I have two instances of openSips(V1.11)
>>>         executable running say "opensips1" and "opensips2"
>>>                     when i execute opensipsctl it always picks up
>>>         data from "opensips2" is there a way that we can
>>>                     choose which executable to pick.Thank you for
>>>         the help.
>>>
>>>         Regards,
>>>         Ravitez.D
>>>
>>>
>>>         _______________________________________________
>>>         Users mailing list
>>>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160108/edf528ea/attachment.htm>


More information about the Users mailing list