Discussion:
[OpenSIPS-Users] Problem with /tmp/opensips_fifo
e***@netcrc.net
2010-03-12 01:41:49 UTC
Permalink
The file /tmp/opensips_fifo for any reason disappears
for example if send the command for reboot the server.
The opensips using mi_fifo module.
With the command "opensips -c" said is ok
opensipsctl moni said (if not find the file)
ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
But for fix this problem I made the following
touch /tmp/opensips_fifo
chmod 755 /tmp/opensips_fifo
this is temporary but it works.
Another things is with the Control Panel 4.0
I have problems with the following modules and this is the message of each
-Dialog = Array ( [0] => Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo) )
- Dispatcher = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) [1] => Cannot connect to
OpenSIPS Server via Management Interface (/tmp/opensips_fifo) )
- MI Commands = /tmp/opensips_fifo
- Monit = Process - Opensips / Status - Execution failed
- SIP Trace = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) )
- Statistics Monitor = Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo)
The common problem is " /tmp/opensips_fifo"
Thanks
Erick
Bogdan-Andrei Iancu
2010-03-12 12:18:34 UTC
Permalink
Hi Erick,
The file /tmp/opensips_fifo for any reason disappears
for example if send the command for reboot the server.
The opensips using mi_fifo module.
With the command "opensips -c" said is ok
opensipsctl moni said (if not find the file)
ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
But for fix this problem I made the following
touch /tmp/opensips_fifo
chmod 755 /tmp/opensips_fifo
DO NOT DO THAT!!!!!!

the fifo file must be created by opensips daemon - if you do not have it
, it means:
- opensips is not running
- mi_fifo module is not loaded
- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo
this is temporary but it works.
Another things is with the Control Panel 4.0
I have problems with the following modules and this is the message of each
-Dialog = Array ( [0] => Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo) )
- Dispatcher = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) [1] => Cannot connect to
OpenSIPS Server via Management Interface (/tmp/opensips_fifo) )
- MI Commands = /tmp/opensips_fifo
- Monit = Process - Opensips / Status - Execution failed
- SIP Trace = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) )
- Statistics Monitor = Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo)
The common problem is " /tmp/opensips_fifo"
yes, because you created a bogus file which does not provide
communication with opensips :)

Regards,
Bogdan
Thanks
Erick
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
www.voice-system.ro
Erick Chinchilla Berrocal
2010-03-12 13:43:22 UTC
Permalink
Hi Bogan
The problem continuos
My comments
I use Opensips 1.6.1 with Control Panel 4.0
- Opensisps Status
# /etc/init.d/opensips status
Status of opensips: opensips is not running.

# /etc/init.d/opensips start
Starting opensips: opensipsListening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: x.x.x.x [x.x.x.x]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: x.x.x.x [x.x.x.x]:5060
Aliases:
tcp: abc:5060
tcp: abc.domian.net:5060
tcp: localhost:5060
udp: net:5060
udp: abc.domain.net:5060
udp: localhost:5060

#/etc/init.d/opensips status
Status of opensips: opensips is not running.

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/sbin/opensips
NAME=opensips
DESC=opensips
HOMEDIR=/var/run/opensips
PIDFILE=$HOMEDIR/$NAME.pid
DEFAULTS=/etc/default/opensips
RUN_OPENSIPS=yes

- mi_fifo module
/lib/opensips/modules# ls
aaa_radius.so call_control.so diversion.so load_balancer.so
options.so rr.so textops.so
acc.so cfgutils.so domainpolicy.so localcache.so
path.so seas.so tm.so
alias_db.so closeddial.so domain.so mangler.so pdt.so
signaling.so uac_redirect.so
auth_aaa.so db_flatstore.so drouting.so maxfwd.so
peering.so siptrace.so uac.so
auth_db.so db_mysql.so enum.so mediaproxy.so
permissions.so sl.so uri.so
auth_diameter.so db_text.so exec.so mi_datagram.so
pike.so sms.so userblacklist.so
auth.so db_virtual.so gflags.so mi_fifo.so
presence_xcapdiff.so speeddial.so usrloc.so
avpops.so dialog.so group.so msilo.so qos.so
sst.so xlog.so
b2b_entities.so dialplan.so imc.so nathelper.so
ratelimit.so statistics.so
benchmark.so dispatcher.so lcr.so nat_traversal.so
registrar.so stun.so


- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo

This is the same in the book (Building Telepfohne System qith OpenSIPS 1.6),
Chart 5
"Full script with all the resources above" pag.119 to 124


- /etc/opensips/opensips.cfg (my current setup)
fork=yes
children = 4 #total number of UDP SIP worker
processes per interface
tcp_children=6 #total number of TCP SIP worker
processes in total
disable_tcp=no
#disable_tls=no
####### Modules Section ########

#set module path
mpath="//lib/opensips/modules/"

/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "acc.so"
/* uncomment next lines for MySQL based
authentication support
NOTE: a DB (like db_mysql) module must be also
loaded */
loadmodule "auth.so"
loadmodule "auth_db.so"
/* uncomment next line for aliases support
NOTE: a DB (like db_mysql) module must be also
loaded */
loadmodule "alias_db.so"
/* uncomment next line for multi-domain support
NOTE: a DB (like db_mysql) module must be also
loaded
NOTE: be sure and enable multi-domain support in all
used modules
(see "multi-module params" section ) */
loadmodule "domain.so"
/* uncomment the next two lines for presence server
support
NOTE: a DB (like db_mysql) module must be also
loaded */
#loadmodule "presence.so"
#loadmodule "presence_xml.so"
# ----------------- setting module-specific
parameters ---------------


# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")


# ----- rr params -----
# add value to ;lr param to cope with most of the
UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this
script)
modparam("rr", "append_fromtag", 0)


# ----- registrar params -----
/* uncomment the next line not to allow more than 10
contacts per AOR */
#modparam("registrar", "max_contacts", 10)
# ----- usrloc params -----
modparam("usrloc", "db_mode", 0)
/* uncomment the following lines if you want to
enable DB persistency
for location entries */
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",

"mysql://opensips:(mysqlpassword)@localhost/opensips")

Another things
This is my first time with this application, but I like.
Can you help with the SerMyAdmin , I do not understand the setup in the
step 2 (pag.136)
/usr/local/apache-tomcat-6.0.16/webapps/serMyAdmin/WEB-INF/spring/resource.x
ml
I can look the web page, but the user and password don't work

username: ***@setup
password: secret

username: ***@sermyadmin.org
password: secret

Can you send me a example please.

This is the default configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="smtpAuthenticator" class="SmtpAuthenticator">
<constructor-arg value="***@sermyadmin.org" />
<constructor-arg value="password" />
</bean>
<bean id="mailSession" class="javax.mail.Session" factory-
method="getInstance">
<constructor-arg>
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.socketFactory.port">465</prop>
<prop key="mail.smtp.socketFactory.class">
javax.net.ssl.SSLSocketFactory
</prop>
<prop key="mail.smtp.socketFactory.fallback">false</prop>
</props>
</constructor-arg>
<constructor-arg ref="smtpAuthenticator" />
</bean>
<bean id="mailSender"
class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.gmail.com" />
<property name="session" ref="mailSession" />
</bean>
<bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage">
<property name="from" value="***@sermyadmin.org" />
</bean>
</beans>

I know my questions can be a bit silly, but I read a lot of the manual, I've
also installed several times the server and not where I'm making mistakes.
I am also doing a translation of the manual installation (summary) in
Spanish, maybe you can serve others people.

Thanks for your help
Erick Ch.

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, March 12, 2010 6:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Erick,
The file /tmp/opensips_fifo for any reason disappears
for example if send the command for reboot the server.
The opensips using mi_fifo module.
With the command "opensips -c" said is ok
opensipsctl moni said (if not find the file)
ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
But for fix this problem I made the following
touch /tmp/opensips_fifo
chmod 755 /tmp/opensips_fifo
DO NOT DO THAT!!!!!!

the fifo file must be created by opensips daemon - if you do not have it
, it means:
- opensips is not running
- mi_fifo module is not loaded
- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo
this is temporary but it works.
Another things is with the Control Panel 4.0
I have problems with the following modules and this is the message of each
-Dialog = Array ( [0] => Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo) )
- Dispatcher = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) [1] => Cannot connect to
OpenSIPS Server via Management Interface (/tmp/opensips_fifo) )
- MI Commands = /tmp/opensips_fifo
- Monit = Process - Opensips / Status - Execution failed
- SIP Trace = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) )
- Statistics Monitor = Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo)
The common problem is " /tmp/opensips_fifo"
yes, because you created a bogus file which does not provide
communication with opensips :)

Regards,
Bogdan
Thanks
Erick
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Erick Chinchilla Berrocal
2010-03-12 15:22:06 UTC
Permalink
Bogan
More info, according remember, before you install the Control Panel 4.0 ,
The OpenSIPS 1.6.1 worked well, phone register and tests.
But not for now does not work.
I reviewed the manual step by step and find nothing different from what the
manual says

opensipsctl restart
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded

INFO: Restarting OpenSIPS :

ERROR: No PID file found (/var/run/opensips.pid)! OpenSIPS probably not
running

INFO: Starting OpenSIPS :

ERROR: PID file /var/run/opensips.pid does not exist -- OpenSIPS start
failed



-----Original Message-----
From: Erick Chinchilla Berrocal [mailto:***@netcrc.net]
Sent: Friday, March 12, 2010 7:43 AM
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Bogan
The problem continuos
My comments
I use Opensips 1.6.1 with Control Panel 4.0
- Opensisps Status
# /etc/init.d/opensips status
Status of opensips: opensips is not running.

# /etc/init.d/opensips start
Starting opensips: opensipsListening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: x.x.x.x [x.x.x.x]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: x.x.x.x [x.x.x.x]:5060
Aliases:
tcp: abc:5060
tcp: abc.domian.net:5060
tcp: localhost:5060
udp: net:5060
udp: abc.domain.net:5060
udp: localhost:5060

#/etc/init.d/opensips status
Status of opensips: opensips is not running.

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/sbin/opensips
NAME=opensips
DESC=opensips
HOMEDIR=/var/run/opensips
PIDFILE=$HOMEDIR/$NAME.pid
DEFAULTS=/etc/default/opensips
RUN_OPENSIPS=yes

- mi_fifo module
/lib/opensips/modules# ls
aaa_radius.so call_control.so diversion.so load_balancer.so
options.so rr.so textops.so
acc.so cfgutils.so domainpolicy.so localcache.so
path.so seas.so tm.so
alias_db.so closeddial.so domain.so mangler.so pdt.so
signaling.so uac_redirect.so
auth_aaa.so db_flatstore.so drouting.so maxfwd.so
peering.so siptrace.so uac.so
auth_db.so db_mysql.so enum.so mediaproxy.so
permissions.so sl.so uri.so
auth_diameter.so db_text.so exec.so mi_datagram.so
pike.so sms.so userblacklist.so
auth.so db_virtual.so gflags.so mi_fifo.so
presence_xcapdiff.so speeddial.so usrloc.so
avpops.so dialog.so group.so msilo.so qos.so
sst.so xlog.so
b2b_entities.so dialplan.so imc.so nathelper.so
ratelimit.so statistics.so
benchmark.so dispatcher.so lcr.so nat_traversal.so
registrar.so stun.so


- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo

This is the same in the book (Building Telepfohne System qith OpenSIPS 1.6),
Chart 5
"Full script with all the resources above" pag.119 to 124


- /etc/opensips/opensips.cfg (my current setup)
fork=yes
children = 4 #total number of UDP SIP worker
processes per interface
tcp_children=6 #total number of TCP SIP worker
processes in total
disable_tcp=no
#disable_tls=no
####### Modules Section ########

#set module path
mpath="//lib/opensips/modules/"

/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "acc.so"
/* uncomment next lines for MySQL based
authentication support
NOTE: a DB (like db_mysql) module must be also
loaded */
loadmodule "auth.so"
loadmodule "auth_db.so"
/* uncomment next line for aliases support
NOTE: a DB (like db_mysql) module must be also
loaded */
loadmodule "alias_db.so"
/* uncomment next line for multi-domain support
NOTE: a DB (like db_mysql) module must be also
loaded
NOTE: be sure and enable multi-domain support in all
used modules
(see "multi-module params" section ) */
loadmodule "domain.so"
/* uncomment the next two lines for presence server
support
NOTE: a DB (like db_mysql) module must be also
loaded */
#loadmodule "presence.so"
#loadmodule "presence_xml.so"
# ----------------- setting module-specific
parameters ---------------


# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")


# ----- rr params -----
# add value to ;lr param to cope with most of the
UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this
script)
modparam("rr", "append_fromtag", 0)


# ----- registrar params -----
/* uncomment the next line not to allow more than 10
contacts per AOR */
#modparam("registrar", "max_contacts", 10)
# ----- usrloc params -----
modparam("usrloc", "db_mode", 0)
/* uncomment the following lines if you want to
enable DB persistency
for location entries */
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",

"mysql://opensips:(mysqlpassword)@localhost/opensips")

Another things
This is my first time with this application, but I like.
Can you help with the SerMyAdmin , I do not understand the setup in the
step 2 (pag.136)
/usr/local/apache-tomcat-6.0.16/webapps/serMyAdmin/WEB-INF/spring/resource.x
ml
I can look the web page, but the user and password don't work

username: ***@setup
password: secret

username: ***@sermyadmin.org
password: secret

Can you send me a example please.

This is the default configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="smtpAuthenticator" class="SmtpAuthenticator">
<constructor-arg value="***@sermyadmin.org" />
<constructor-arg value="password" />
</bean>
<bean id="mailSession" class="javax.mail.Session" factory-
method="getInstance">
<constructor-arg>
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.socketFactory.port">465</prop>
<prop key="mail.smtp.socketFactory.class">
javax.net.ssl.SSLSocketFactory
</prop>
<prop key="mail.smtp.socketFactory.fallback">false</prop>
</props>
</constructor-arg>
<constructor-arg ref="smtpAuthenticator" />
</bean>
<bean id="mailSender"
class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.gmail.com" />
<property name="session" ref="mailSession" />
</bean>
<bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage">
<property name="from" value="***@sermyadmin.org" />
</bean>
</beans>

I know my questions can be a bit silly, but I read a lot of the manual, I've
also installed several times the server and not where I'm making mistakes.
I am also doing a translation of the manual installation (summary) in
Spanish, maybe you can serve others people.

Thanks for your help
Erick Ch.

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, March 12, 2010 6:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Erick,
The file /tmp/opensips_fifo for any reason disappears
for example if send the command for reboot the server.
The opensips using mi_fifo module.
With the command "opensips -c" said is ok
opensipsctl moni said (if not find the file)
ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
But for fix this problem I made the following
touch /tmp/opensips_fifo
chmod 755 /tmp/opensips_fifo
DO NOT DO THAT!!!!!!

the fifo file must be created by opensips daemon - if you do not have it
, it means:
- opensips is not running
- mi_fifo module is not loaded
- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo
this is temporary but it works.
Another things is with the Control Panel 4.0
I have problems with the following modules and this is the message of each
-Dialog = Array ( [0] => Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo) )
- Dispatcher = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) [1] => Cannot connect to
OpenSIPS Server via Management Interface (/tmp/opensips_fifo) )
- MI Commands = /tmp/opensips_fifo
- Monit = Process - Opensips / Status - Execution failed
- SIP Trace = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) )
- Statistics Monitor = Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo)
The common problem is " /tmp/opensips_fifo"
yes, because you created a bogus file which does not provide
communication with opensips :)

Regards,
Bogdan
Thanks
Erick
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Bogdan-Andrei Iancu
2010-03-12 15:31:20 UTC
Permalink
Hi Erick,

maybe opensips is not starting - see
http://www.opensips.org/Resources/DocsTsStart

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bogan
More info, according remember, before you install the Control Panel 4.0 ,
The OpenSIPS 1.6.1 worked well, phone register and tests.
But not for now does not work.
I reviewed the manual step by step and find nothing different from what the
manual says
opensipsctl restart
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
ERROR: No PID file found (/var/run/opensips.pid)! OpenSIPS probably not
running
ERROR: PID file /var/run/opensips.pid does not exist -- OpenSIPS start
failed
-----Original Message-----
Sent: Friday, March 12, 2010 7:43 AM
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Bogan
The problem continuos
My comments
I use Opensips 1.6.1 with Control Panel 4.0
- Opensisps Status
# /etc/init.d/opensips status
Status of opensips: opensips is not running.
# /etc/init.d/opensips start
Starting opensips: opensipsListening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: x.x.x.x [x.x.x.x]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: x.x.x.x [x.x.x.x]:5060
tcp: abc:5060
tcp: abc.domian.net:5060
tcp: localhost:5060
udp: net:5060
udp: abc.domain.net:5060
udp: localhost:5060
#/etc/init.d/opensips status
Status of opensips: opensips is not running.
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/sbin/opensips
NAME=opensips
DESC=opensips
HOMEDIR=/var/run/opensips
PIDFILE=$HOMEDIR/$NAME.pid
DEFAULTS=/etc/default/opensips
RUN_OPENSIPS=yes
- mi_fifo module
/lib/opensips/modules# ls
aaa_radius.so call_control.so diversion.so load_balancer.so
options.so rr.so textops.so
acc.so cfgutils.so domainpolicy.so localcache.so
path.so seas.so tm.so
alias_db.so closeddial.so domain.so mangler.so pdt.so
signaling.so uac_redirect.so
auth_aaa.so db_flatstore.so drouting.so maxfwd.so
peering.so siptrace.so uac.so
auth_db.so db_mysql.so enum.so mediaproxy.so
permissions.so sl.so uri.so
auth_diameter.so db_text.so exec.so mi_datagram.so
pike.so sms.so userblacklist.so
auth.so db_virtual.so gflags.so mi_fifo.so
presence_xcapdiff.so speeddial.so usrloc.so
avpops.so dialog.so group.so msilo.so qos.so
sst.so xlog.so
b2b_entities.so dialplan.so imc.so nathelper.so
ratelimit.so statistics.so
benchmark.so dispatcher.so lcr.so nat_traversal.so
registrar.so stun.so
- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo
This is the same in the book (Building Telepfohne System qith OpenSIPS 1.6),
Chart 5
"Full script with all the resources above" pag.119 to 124
- /etc/opensips/opensips.cfg (my current setup)
fork=yes
children = 4 #total number of UDP SIP worker
processes per interface
tcp_children=6 #total number of TCP SIP worker
processes in total
disable_tcp=no
#disable_tls=no
####### Modules Section ########
#set module path
mpath="//lib/opensips/modules/"
/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "acc.so"
/* uncomment next lines for MySQL based
authentication support
NOTE: a DB (like db_mysql) module must be also
loaded */
loadmodule "auth.so"
loadmodule "auth_db.so"
/* uncomment next line for aliases support
NOTE: a DB (like db_mysql) module must be also
loaded */
loadmodule "alias_db.so"
/* uncomment next line for multi-domain support
NOTE: a DB (like db_mysql) module must be also
loaded
NOTE: be sure and enable multi-domain support in all
used modules
(see "multi-module params" section ) */
loadmodule "domain.so"
/* uncomment the next two lines for presence server
support
NOTE: a DB (like db_mysql) module must be also
loaded */
#loadmodule "presence.so"
#loadmodule "presence_xml.so"
# ----------------- setting module-specific
parameters ---------------
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")
# ----- rr params -----
# add value to ;lr param to cope with most of the
UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this
script)
modparam("rr", "append_fromtag", 0)
# ----- registrar params -----
/* uncomment the next line not to allow more than 10
contacts per AOR */
#modparam("registrar", "max_contacts", 10)
# ----- usrloc params -----
modparam("usrloc", "db_mode", 0)
/* uncomment the following lines if you want to
enable DB persistency
for location entries */
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",
Another things
This is my first time with this application, but I like.
Can you help with the SerMyAdmin , I do not understand the setup in the
step 2 (pag.136)
/usr/local/apache-tomcat-6.0.16/webapps/serMyAdmin/WEB-INF/spring/resource.x
ml
I can look the web page, but the user and password don't work
password: secret
password: secret
Can you send me a example please.
This is the default configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="smtpAuthenticator" class="SmtpAuthenticator">
<constructor-arg value="password" />
</bean>
<bean id="mailSession" class="javax.mail.Session" factory-
method="getInstance">
<constructor-arg>
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.socketFactory.port">465</prop>
<prop key="mail.smtp.socketFactory.class">
javax.net.ssl.SSLSocketFactory
</prop>
<prop key="mail.smtp.socketFactory.fallback">false</prop>
</props>
</constructor-arg>
<constructor-arg ref="smtpAuthenticator" />
</bean>
<bean id="mailSender"
class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.gmail.com" />
<property name="session" ref="mailSession" />
</bean>
<bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage">
</bean>
</beans>
I know my questions can be a bit silly, but I read a lot of the manual, I've
also installed several times the server and not where I'm making mistakes.
I am also doing a translation of the manual installation (summary) in
Spanish, maybe you can serve others people.
Thanks for your help
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 6:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erick,
The file /tmp/opensips_fifo for any reason disappears
for example if send the command for reboot the server.
The opensips using mi_fifo module.
With the command "opensips -c" said is ok
opensipsctl moni said (if not find the file)
ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
But for fix this problem I made the following
touch /tmp/opensips_fifo
chmod 755 /tmp/opensips_fifo
DO NOT DO THAT!!!!!!
the fifo file must be created by opensips daemon - if you do not have it
- opensips is not running
- mi_fifo module is not loaded
- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo
this is temporary but it works.
Another things is with the Control Panel 4.0
I have problems with the following modules and this is the message of
each
-Dialog = Array ( [0] => Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo) )
- Dispatcher = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) [1] => Cannot connect to
OpenSIPS Server via Management Interface (/tmp/opensips_fifo) )
- MI Commands = /tmp/opensips_fifo
- Monit = Process - Opensips / Status - Execution failed
- SIP Trace = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) )
- Statistics Monitor = Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo)
The common problem is " /tmp/opensips_fifo"
yes, because you created a bogus file which does not provide
communication with opensips :)
Regards,
Bogdan
Thanks
Erick
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
www.voice-system.ro
Erick Chinchilla Berrocal
2010-03-12 17:47:34 UTC
Permalink
Bogan
I fixed the problem with the OpenSIPS , but the other problems with the
Control Panel continues.
Now is working (Opensips)
I problem was in the file opensips.cfg. In the username and password for
the database

##
/home/netcrc# /etc/init.d/opensips status
Status of opensips: opensips is running.

##
opensipsctl -h
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
/sbin/opensipsctl $Revision: 4448 $

##
Now the problem with the Control Panel 4.0 continues
This is the situation with each module


-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to open
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )


-Dispatcher = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )

Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] => sorry
-- cannot open write fifo )

-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo) [function.fopen]:
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147

-Monit = Process - opensips
Status - Execution Failed

-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )

-Statics Monitor = Warning: fopen(/tmp/opensips_fifo) [function.fopen]:
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo

this is the current configuration from the file
"/var/www/opensips-cp/web/common/mi_comm.php"
/var/www/opensips-cp/web/common# less mi_comm.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/


function write2fifo($fifo_cmd, &$errors, &$status){

global $config;

/* check fifo file */
if (!file_exists($config->fifo_server)) {
$errors[]="No FIFO file to SIP Server"; return;
}

/* open fifo now */
$fifo_handle=fopen($config->fifo_server, "w");
if (!$fifo_handle) {
$errors[]="sorry -- cannot open write fifo"; return;
}

/* create fifo for replies */
@system("mkfifo -m 666 ".$config->reply_fifo_path);

/* add command separator */
$fifo_cmd=$fifo_cmd."\n";
// $fifo_cmd=$fifo_cmd."\n";
/* write fifo command */
if (fwrite($fifo_handle, $fifo_cmd)==-1) {
@unlink($config->reply_fifo_path);
@fclose($fifo_handle);
$errors[]="sorry -- fifo writing error"; return;
}
@fclose($fifo_handle);

/* read output now */
@$fp = fopen($config->reply_fifo_path, "r");
if (!$fp) {
@unlink($config->reply_fifo_path);
$errors[]="sorry -- reply fifo opening error"; return;
}

stream_set_timeout($fp, 5);
$status=fgetS($fp, 256);
$info = stream_get_meta_data($fp);

if ($info['timed_out']) {
fclose($fp);
$errors[]= 'Read from FIFO file to SIP server timed out';
return;
}

if (!$status) {
fclose($fp);
@unlink($config->reply_fifo_path);
$errors[]="sorry -- reply fifo reading error"; return;
}

$rd=fread($fp, 8192);
fclose($fp);
@unlink($config->reply_fifo_path);

return $rd;
}



function write2fifo_new($command, &$errors, &$status){

global $config;
global $fifo_file ;

$pos=strpos($command," ");

if ($pos===false) {

$cmd=$command;
$arg="";

}else {

$cmd=trim(substr($command,0,$pos));
$arg=trim(substr($command,$pos,strlen($command)));

$command_args=array();
$command_args=explode(" ",$arg);


}

if ($arg==""){
/* no args */
/*if the command contains delimiter ':' ,
then return , or else bad things happen */

$found_delimiter=strpos($cmd,":");
if ( $found_delimiter ===
false )
{
// mkay

}


else

{
$err="Bad command.
character ':' not permited here.";
$status=$err;

return $err ;

}


$fifo_cmd=":".$cmd.":".$config->reply_fifo_filename."\n";

} else {
/* command with args */
foreach($command_args as
$key=>$val){
$arg_list.=$val."\n";
}



$fifo_cmd=":".$cmd.":".$config->reply_fifo_filename."\n".$arg_list;

}


/* check fifo file */
if (!file_exists($fifo_file)) {
$errors[]="Cannot connect to OpenSIPS Server via Management
Interface ($fifo_file)"; return;
}

/* open fifo now */
$fifo_handle=fopen($fifo_file, "w");
if (!$fifo_handle) {
$errors[]="sorry -- cannot open write fifo"; return;
}

/* create fifo for replies */
@system("mkfifo -m 666 ".$config->reply_fifo_path);

/* add command separator */
$fifo_cmd=$fifo_cmd."\n";

/* write fifo command */

if (fwrite($fifo_handle, $fifo_cmd)==-1) {
@unlink($config->reply_fifo_path);
@fclose($fifo_handle);
$errors[]="sorry -- fifo writing error"; return;
}

@fclose($fifo_handle);

/* read output now */

@$fp = fopen($config->reply_fifo_path, "r");
if (!$fp) {
@unlink($config->reply_fifo_path);
$errors[]="sorry -- reply fifo opening error"; return;
}

stream_set_timeout($fp, 20);
$status=fgetS($fp, 256);
$info = stream_get_meta_data($fp);

if ($info['timed_out']) {
fclose($fp);
$errors[]= 'Read from FIFO file to SIP server timed out';
return;
}

if (!$status) {
fclose($fp);
@unlink($config->reply_fifo_path);
$errors[]="sorry -- reply fifo reading error"; return;
}

$rd=fread($fp, 8192);
fclose($fp);
@unlink($config->reply_fifo_path);
return $rd;
}


function xml_do_call($xmlrpc_host,$xmlrpc_port,$request,&$errors,&$status) {

$fp = @fsockopen($xmlrpc_host, $xmlrpc_port, $errno, $errstr);
if (!$fp) {
echo "Cannot connect to OpenSIPS Server via Management Interface
($xmlrpc_host/$xmlrpc_port)" . "<BR>";
//echo $errno ." - ". $errstr ;
return;
}

$query = "POST /RPC2 HTTP/1.0\nUser_Agent: opensips-cp\nHost:
".$xmlrpc_host."\nContent-Type: text/xml\nContent-Length:
".strlen($request)."\n\n".$request."\n";
if (!fputs($fp, $query, strlen($query))) {
$errors[] = "Write error"; return -1;
}


$contents = '';

while (!feof($fp)) {
$contents .= fgets($fp);
}

fclose($fp);
return $contents;

}


function write2xmlrpc($command,&$errors,&$status){

global $xmlrpc_host ;
global $xmlrpc_port ;

// command with arguments
$full_command=explode(" ",$command);

/* extract command , args */
$my_command=array_shift($full_command);

/* args */
$params=$full_command ;

if (!isset($params[0])) {
$params=NULL ;
}
$str = "";


$request = xmlrpc_encode_request($my_command, $params);
$response = xml_do_call($xmlrpc_host, $xmlrpc_port,
$request,$errors,$status);
$xml=(substr($response,strpos($response,"\r\n\r\n")+4));

preg_match('/HTTP\/1.1\s+\d+\s+[A-Za-z]+\s+/',$response,$match);
$status = substr($match[0],9);

preg_match('/\<fault\>/',$xml,$fault_match);
if ( count($fault_match)==0 ) {

preg_match_all('/\<string\>(.*\s+)+\<\/string\>/',$xml,$matches);
for ($j=0;$j<count($matches[0]);$j++){
$temp = substr($matches[0][$j],8);
$str = $str.substr($temp,0,-9);
}
} else {
preg_match_all('/\<string\>.*\<\/string\>/',$xml,$matches);
$temp = substr($matches[0][0],8);
$errors[] = "ERROR: ".substr($temp,0,-9);
}

return $str ;

}

function mi_command($command,&$errors,&$status){

global $comm_type ;
global $xmlrpc_host ;
global $xmlrpc_port ;
global $fifo_file ;

$config->reply_fifo_filename="webfifo_".rand();
$config->reply_fifo_path="/tmp/".$config->reply_fifo_filename;

$buf="";
if (strtolower($comm_type)=="fifo"){

$buf=write2fifo_new($command, $errors, $status);
}

if (strtolower($comm_type)=="xmlrpc"){
$buf=write2xmlrpc($command,$errors,$status);

}
return $buf ;

}

?>
(END)


-----Original Message-----
From: Erick Chinchilla Berrocal [mailto:***@netcrc.net]
Sent: Friday, March 12, 2010 9:22 AM
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Bogan
More info, according remember, before you install the Control Panel 4.0 ,
The OpenSIPS 1.6.1 worked well, phone register and tests.
But not for now does not work.
I reviewed the manual step by step and find nothing different from what the
manual says

opensipsctl restart
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded

INFO: Restarting OpenSIPS :

ERROR: No PID file found (/var/run/opensips.pid)! OpenSIPS probably not
running

INFO: Starting OpenSIPS :

ERROR: PID file /var/run/opensips.pid does not exist -- OpenSIPS start
failed



-----Original Message-----
From: Erick Chinchilla Berrocal [mailto:***@netcrc.net]
Sent: Friday, March 12, 2010 7:43 AM
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Bogan
The problem continuos
My comments
I use Opensips 1.6.1 with Control Panel 4.0
- Opensisps Status
# /etc/init.d/opensips status
Status of opensips: opensips is not running.

# /etc/init.d/opensips start
Starting opensips: opensipsListening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: x.x.x.x [x.x.x.x]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: x.x.x.x [x.x.x.x]:5060
Aliases:
tcp: abc:5060
tcp: abc.domian.net:5060
tcp: localhost:5060
udp: net:5060
udp: abc.domain.net:5060
udp: localhost:5060

#/etc/init.d/opensips status
Status of opensips: opensips is not running.

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/sbin/opensips
NAME=opensips
DESC=opensips
HOMEDIR=/var/run/opensips
PIDFILE=$HOMEDIR/$NAME.pid
DEFAULTS=/etc/default/opensips
RUN_OPENSIPS=yes

- mi_fifo module
/lib/opensips/modules# ls
aaa_radius.so call_control.so diversion.so load_balancer.so
options.so rr.so textops.so
acc.so cfgutils.so domainpolicy.so localcache.so
path.so seas.so tm.so
alias_db.so closeddial.so domain.so mangler.so pdt.so
signaling.so uac_redirect.so
auth_aaa.so db_flatstore.so drouting.so maxfwd.so
peering.so siptrace.so uac.so
auth_db.so db_mysql.so enum.so mediaproxy.so
permissions.so sl.so uri.so
auth_diameter.so db_text.so exec.so mi_datagram.so
pike.so sms.so userblacklist.so
auth.so db_virtual.so gflags.so mi_fifo.so
presence_xcapdiff.so speeddial.so usrloc.so
avpops.so dialog.so group.so msilo.so qos.so
sst.so xlog.so
b2b_entities.so dialplan.so imc.so nathelper.so
ratelimit.so statistics.so
benchmark.so dispatcher.so lcr.so nat_traversal.so
registrar.so stun.so


- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo

This is the same in the book (Building Telepfohne System qith OpenSIPS 1.6),
Chart 5
"Full script with all the resources above" pag.119 to 124


- /etc/opensips/opensips.cfg (my current setup)
fork=yes
children = 4 #total number of UDP SIP worker
processes per interface
tcp_children=6 #total number of TCP SIP worker
processes in total
disable_tcp=no
#disable_tls=no
####### Modules Section ########

#set module path
mpath="//lib/opensips/modules/"

/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "acc.so"
/* uncomment next lines for MySQL based
authentication support
NOTE: a DB (like db_mysql) module must be also
loaded */
loadmodule "auth.so"
loadmodule "auth_db.so"
/* uncomment next line for aliases support
NOTE: a DB (like db_mysql) module must be also
loaded */
loadmodule "alias_db.so"
/* uncomment next line for multi-domain support
NOTE: a DB (like db_mysql) module must be also
loaded
NOTE: be sure and enable multi-domain support in all
used modules
(see "multi-module params" section ) */
loadmodule "domain.so"
/* uncomment the next two lines for presence server
support
NOTE: a DB (like db_mysql) module must be also
loaded */
#loadmodule "presence.so"
#loadmodule "presence_xml.so"
# ----------------- setting module-specific
parameters ---------------


# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")


# ----- rr params -----
# add value to ;lr param to cope with most of the
UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this
script)
modparam("rr", "append_fromtag", 0)


# ----- registrar params -----
/* uncomment the next line not to allow more than 10
contacts per AOR */
#modparam("registrar", "max_contacts", 10)
# ----- usrloc params -----
modparam("usrloc", "db_mode", 0)
/* uncomment the following lines if you want to
enable DB persistency
for location entries */
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",

"mysql://opensips:(mysqlpassword)@localhost/opensips")

Another things
This is my first time with this application, but I like.
Can you help with the SerMyAdmin , I do not understand the setup in the
step 2 (pag.136)
/usr/local/apache-tomcat-6.0.16/webapps/serMyAdmin/WEB-INF/spring/resource.x
ml
I can look the web page, but the user and password don't work

username: ***@setup
password: secret

username: ***@sermyadmin.org
password: secret

Can you send me a example please.

This is the default configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="smtpAuthenticator" class="SmtpAuthenticator">
<constructor-arg value="***@sermyadmin.org" />
<constructor-arg value="password" />
</bean>
<bean id="mailSession" class="javax.mail.Session" factory-
method="getInstance">
<constructor-arg>
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.socketFactory.port">465</prop>
<prop key="mail.smtp.socketFactory.class">
javax.net.ssl.SSLSocketFactory
</prop>
<prop key="mail.smtp.socketFactory.fallback">false</prop>
</props>
</constructor-arg>
<constructor-arg ref="smtpAuthenticator" />
</bean>
<bean id="mailSender"
class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="smtp.gmail.com" />
<property name="session" ref="mailSession" />
</bean>
<bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage">
<property name="from" value="***@sermyadmin.org" />
</bean>
</beans>

I know my questions can be a bit silly, but I read a lot of the manual, I've
also installed several times the server and not where I'm making mistakes.
I am also doing a translation of the manual installation (summary) in
Spanish, maybe you can serve others people.

Thanks for your help
Erick Ch.

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, March 12, 2010 6:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Erick,
The file /tmp/opensips_fifo for any reason disappears
for example if send the command for reboot the server.
The opensips using mi_fifo module.
With the command "opensips -c" said is ok
opensipsctl moni said (if not find the file)
ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
But for fix this problem I made the following
touch /tmp/opensips_fifo
chmod 755 /tmp/opensips_fifo
DO NOT DO THAT!!!!!!

the fifo file must be created by opensips daemon - if you do not have it
, it means:
- opensips is not running
- mi_fifo module is not loaded
- the fifo_name (in opensips.cfg) is configured to a different name
than /tmp/opensips_fifo
this is temporary but it works.
Another things is with the Control Panel 4.0
I have problems with the following modules and this is the message of each
-Dialog = Array ( [0] => Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo) )
- Dispatcher = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) [1] => Cannot connect to
OpenSIPS Server via Management Interface (/tmp/opensips_fifo) )
- MI Commands = /tmp/opensips_fifo
- Monit = Process - Opensips / Status - Execution failed
- SIP Trace = Array ( [0] => Cannot connect to OpenSIPS Server via
Management Interface (/tmp/opensips_fifo) )
- Statistics Monitor = Cannot connect to OpenSIPS Server via Management
Interface (/tmp/opensips_fifo)
The common problem is " /tmp/opensips_fifo"
yes, because you created a bogus file which does not provide
communication with opensips :)

Regards,
Bogdan
Thanks
Erick
_______________________________________________
Users mailing list
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Bogdan-Andrei Iancu
2010-03-12 17:55:21 UTC
Permalink
Erick,

as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.

A simple solution will be to grant larger permissions to the fifo file
(in opensips.cfg):

modparam("mi_fifo", "fifo_mode", 0666)


http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261

you need to restart opensips!

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to open
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
-Dispatcher = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] => sorry
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro
Erick Chinchilla Berrocal
2010-03-12 19:23:33 UTC
Permalink
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam ( "mi_fifo", "fifo_mode", 0666)

if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work

Now in the Control Panel continues with problems a:
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
not work
-Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error [1]
=> sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error

-Monit = opensips - Execution Failed

-SIP trace = Array ( [0] => sorry -- reply fifo opening error )

-Static Monitor = sorry --reply fifo opening error

###
The is the email from the server

Subject: Cron <***@net> php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env:
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi

###
This is the log from Opensips-Server
Mar 12 13:55:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:56:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:56:30 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
command ds_list is not available
Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
command ds_reload is not available
Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:57:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)

###
The configuration for the file /etc/crontab

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root /var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null

##
/etc/monit/monitrc

set daemon 120
set logfile syslog facility log_daemon
set alert ***@localhost
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you can give
only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart

##
monit -t
Control file syntax OK

##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/

//database driver mysql or pgsql
$config->db_driver = "mysql";

//database host
$config->db_host = "localhost";

//database port - leave empty for default
$config->db_port = "";

//database connection user
$config->db_user = "root";

//database connection password
$config->db_pass = "(password for "root"";

//database name
$config->db_name = "opensips";

if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":" .
$config->db_port;

?>
(END)

##

/var/www/opensips-cp/config# less boxes.global.inc.php
<?php

/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/

/*==================== DEFINITION OF BOXES (servers)
========================*/
// each server is a box

$box_id=0;

// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";

// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;


// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)


$boxes[$box_id]['assoc_id']=1;

// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;


/*--------------------------------------------------------------------------
-
$box_id=1;

// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";


// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;


// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";


$boxes[$box_id]['assoc_id']=2;

// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/



/*======================== DEFINITION OF SYSTEMS ========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)

$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;


/*--------------------------------------------------------------------------
-
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/


?>
(END)

Thanks
Erick Ch.
-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Erick,

as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.

A simple solution will be to grant larger permissions to the fifo file
(in opensips.cfg):

modparam("mi_fifo", "fifo_mode", 0666)


http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261

you need to restart opensips!

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to open
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
-Dispatcher = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] => sorry
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Erick Chinchilla Berrocal
2010-03-12 23:16:33 UTC
Permalink
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well

with this change in the control panel the module "MONIT" is working well
now the problem continues with the following modules, please let me know if
you have idea, I read the manual for several times and no ....

- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] => sorry
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error

I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the "primary name
server"

This is the log
Mar 12 17:44:42 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 18:04:22 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
command dlg_list is not available
Mar 12 18:04:22 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 18:04:32 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
command dlg_list is not available
Mar 12 18:04:32 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 18:04:32 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
command dlg_list is not available
Mar 12 18:04:32 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 18:04:55 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
command ds_list is not available
Mar 12 18:04:55 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 18:04:55 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
command ds_reload is not available
Mar 12 18:04:55 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 18:07:59 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
command sip_trace is not available
Mar 12 18:07:59 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 18:08:24 net /sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)


Thanks

To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam ( "mi_fifo", "fifo_mode", 0666)

if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work

Now in the Control Panel continues with problems a:
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
not work
-Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error

-Monit = opensips - Execution Failed

-SIP trace = Array ( [0] => sorry -- reply fifo opening error )

-Static Monitor = sorry --reply fifo opening error

###
The is the email from the server

Subject: Cron <***@net> php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env:
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi

###
This is the log from Opensips-Server
Mar 12 13:55:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:56:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:56:30 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
command ds_list is not available
Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
command ds_reload is not available
Mar 12 13:56:34 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)
Mar 12 13:57:01 net /sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)

###
The configuration for the file /etc/crontab

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null

##
/etc/monit/monitrc

set daemon 120
set logfile syslog facility log_daemon
set alert ***@localhost
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you can
give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart

##
monit -t
Control file syntax OK

##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/

//database driver mysql or pgsql
$config->db_driver = "mysql";

//database host
$config->db_host = "localhost";

//database port - leave empty for default
$config->db_port = "";

//database connection user
$config->db_user = "root";

//database connection password
$config->db_pass = "(password for "root"";

//database name
$config->db_name = "opensips";

if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":"
. $config->db_port;

?>
(END)

##

/var/www/opensips-cp/config# less boxes.global.inc.php
<?php

/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/

/*==================== DEFINITION OF BOXES (servers)
========================*/
// each server is a box

$box_id=0;

// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";

// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;


// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)


$boxes[$box_id]['assoc_id']=1;

// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;


/*------------------------------------------------------------------------
---
$box_id=1;

// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";


// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;


// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";


$boxes[$box_id]['assoc_id']=2;

// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/



/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)

$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;


/*------------------------------------------------------------------------
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/


?>
(END)

Thanks
Erick Ch.
-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Erick,

as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.

A simple solution will be to grant larger permissions to the fifo file
(in opensips.cfg):

modparam("mi_fifo", "fifo_mode", 0666)


http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261

you need to restart opensips!

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to open
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
-Dispatcher = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus
signature database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Bogdan-Andrei Iancu
2010-03-15 09:46:53 UTC
Permalink
Hi Erick,

For the failing tools, do you have the corresponding opensips modules
loaded ?

Like, for Dialog tool, do you have the dialog module loaded ?

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working well
now the problem continues with the following modules, please let me know if
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] => sorry
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the "primary name
server"
This is the log
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
not work
-Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
cannot open reply pipe (null)
cannot open reply pipe (null)
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you can
give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":"
. $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/
// each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
/*------------------------------------------------------------------------
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*------------------------------------------------------------------------
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro
Erick Chinchilla Berrocal
2010-03-15 17:08:39 UTC
Permalink
Hi
Bogdan
The problem continues

I have these modules

##
/lib/opensips/modules# ls
aaa_radius.so call_control.so diversion.so load_balancer.so
options.so rr.so textops.so
acc.so cfgutils.so domainpolicy.so localcache.so
path.so seas.so tm.so
alias_db.so closeddial.so domain.so mangler.so pdt.so
signaling.so uac_redirect.so
auth_aaa.so db_flatstore.so drouting.so maxfwd.so
peering.so siptrace.so uac.so
auth_db.so db_mysql.so enum.so mediaproxy.so
permissions.so sl.so uri.so
auth_diameter.so db_text.so exec.so mi_datagram.so
pike.so sms.so userblacklist.so
auth.so db_virtual.so gflags.so mi_fifo.so
presence_xcapdiff.so speeddial.so usrloc.so
avpops.so dialog.so group.so msilo.so qos.so
sst.so xlog.so
b2b_entities.so dialplan.so imc.so nathelper.so
ratelimit.so statistics.so
benchmark.so dispatcher.so lcr.so nat_traversal.so
registrar.so stun.so

##
/etc/opensips/opensips.cfg
/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
modparam("dialog", "db_mode", 1)
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "acc.so"
loadmodule "dialog.so"


#------- dialog ---------
modparam("dialog", "db_url",
"mysql://(username):(password)@localhost/opensips")
modparam("dialog", "dlg_flag", 4)

Reference:
http://www.opensips.org/Resources/PuaDialoinfoConfig

I tried with this options and get the same problem
##################### DIALOG #########################
loadmodule "dialog.so"
modparam("dialog", "enable_stats", 1)
modparam("dialog", "default_timeout", 21600)
modparam("dialog", "db_url", "mysql://opensips:***@database/opensips")
modparam("dialog", "db_mode", 1)
modparam("dialog", "dlg_flag", 4)

Reference
http://gventure.wordpress.com/2009/03/30/opensips-installation/


##

opensips -c
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: 192.168.50.10 [192.168.50.10]:5060
Aliases:
tcp: net:5060
tcp: server.dominio.com:5060
tcp: localhost:5060
udp: server:5060
udp: server.dominio.com:5060
udp: localhost:5060

Mar 15 13:06:03 [3014] NOTICE:core:main: config file ok, exit

##
# opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001

##
In the control panel
Module "Diallog" = Array ( [0] => sorry -- reply fifo opening error )

Any ideas

Thanks
Erick

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Monday, March 15, 2010 3:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Erick,

For the failing tools, do you have the corresponding opensips modules
loaded ?

Like, for Dialog tool, do you have the dialog module loaded ?

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working well
now the problem continues with the following modules, please let me know if
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] => sorry
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the "primary name
server"
This is the log
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
not work
-Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
cannot open reply pipe (null)
cannot open reply pipe (null)
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you can
give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":"
. $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/
// each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
/*------------------------------------------------------------------------
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*------------------------------------------------------------------------
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Bogdan-Andrei Iancu
2010-03-15 17:50:06 UTC
Permalink
Erick,

For the CP error:

##
In the control panel
Module "Diallog" = Array ( [0] => sorry -- reply fifo opening error )


what is the corresponding error in opensips logs ?

Regards,
Bogdan
Post by Bogdan-Andrei Iancu
Hi
Bogdan
The problem continues
I have these modules
##
/lib/opensips/modules# ls
aaa_radius.so call_control.so diversion.so load_balancer.so
options.so rr.so textops.so
acc.so cfgutils.so domainpolicy.so localcache.so
path.so seas.so tm.so
alias_db.so closeddial.so domain.so mangler.so pdt.so
signaling.so uac_redirect.so
auth_aaa.so db_flatstore.so drouting.so maxfwd.so
peering.so siptrace.so uac.so
auth_db.so db_mysql.so enum.so mediaproxy.so
permissions.so sl.so uri.so
auth_diameter.so db_text.so exec.so mi_datagram.so
pike.so sms.so userblacklist.so
auth.so db_virtual.so gflags.so mi_fifo.so
presence_xcapdiff.so speeddial.so usrloc.so
avpops.so dialog.so group.so msilo.so qos.so
sst.so xlog.so
b2b_entities.so dialplan.so imc.so nathelper.so
ratelimit.so statistics.so
benchmark.so dispatcher.so lcr.so nat_traversal.so
registrar.so stun.so
##
/etc/opensips/opensips.cfg
/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
modparam("dialog", "db_mode", 1)
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "acc.so"
loadmodule "dialog.so"
#------- dialog ---------
modparam("dialog", "db_url",
modparam("dialog", "dlg_flag", 4)
http://www.opensips.org/Resources/PuaDialoinfoConfig
I tried with this options and get the same problem
##################### DIALOG #########################
loadmodule "dialog.so"
modparam("dialog", "enable_stats", 1)
modparam("dialog", "default_timeout", 21600)
modparam("dialog", "db_mode", 1)
modparam("dialog", "dlg_flag", 4)
Reference
http://gventure.wordpress.com/2009/03/30/opensips-installation/
##
opensips -c
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: 192.168.50.10 [192.168.50.10]:5060
tcp: net:5060
tcp: server.dominio.com:5060
tcp: localhost:5060
udp: server:5060
udp: server.dominio.com:5060
udp: localhost:5060
Mar 15 13:06:03 [3014] NOTICE:core:main: config file ok, exit
##
# opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001
##
In the control panel
Module "Diallog" = Array ( [0] => sorry -- reply fifo opening error )
Any ideas
Thanks
Erick
-----Original Message-----
Sent: Monday, March 15, 2010 3:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erick,
For the failing tools, do you have the corresponding opensips modules
loaded ?
Like, for Dialog tool, do you have the dialog module loaded ?
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working well
now the problem continues with the following modules, please let me know
if
Post by Erick Chinchilla Berrocal
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the "primary
name
Post by Erick Chinchilla Berrocal
server"
This is the log
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
not work
-Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
cannot open reply pipe (null)
cannot open reply pipe (null)
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you can
give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":"
. $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/
// each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
/*------------------------------------------------------------------------
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*------------------------------------------------------------------------
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro
Erick Chinchilla Berrocal
2010-03-15 18:08:54 UTC
Permalink
Sorry, this is the error /var/log/opensips.log

13:09:06 net /sbin/opensips[2940]: ERROR:mi_fifo:mi_fifo_server: cannot open
reply pipe (null)
(END)

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Monday, March 15, 2010 11:50 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Erick,

For the CP error:

##
In the control panel
Module "Diallog" = Array ( [0] => sorry -- reply fifo opening error )


what is the corresponding error in opensips logs ?

Regards,
Bogdan
Post by Bogdan-Andrei Iancu
Hi
Bogdan
The problem continues
I have these modules
##
/lib/opensips/modules# ls
aaa_radius.so call_control.so diversion.so load_balancer.so
options.so rr.so textops.so
acc.so cfgutils.so domainpolicy.so localcache.so
path.so seas.so tm.so
alias_db.so closeddial.so domain.so mangler.so
pdt.so
Post by Bogdan-Andrei Iancu
signaling.so uac_redirect.so
auth_aaa.so db_flatstore.so drouting.so maxfwd.so
peering.so siptrace.so uac.so
auth_db.so db_mysql.so enum.so mediaproxy.so
permissions.so sl.so uri.so
auth_diameter.so db_text.so exec.so mi_datagram.so
pike.so sms.so userblacklist.so
auth.so db_virtual.so gflags.so mi_fifo.so
presence_xcapdiff.so speeddial.so usrloc.so
avpops.so dialog.so group.so msilo.so
qos.so
Post by Bogdan-Andrei Iancu
sst.so xlog.so
b2b_entities.so dialplan.so imc.so nathelper.so
ratelimit.so statistics.so
benchmark.so dispatcher.so lcr.so nat_traversal.so
registrar.so stun.so
##
/etc/opensips/opensips.cfg
/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
modparam("dialog", "db_mode", 1)
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "acc.so"
loadmodule "dialog.so"
#------- dialog ---------
modparam("dialog", "db_url",
modparam("dialog", "dlg_flag", 4)
http://www.opensips.org/Resources/PuaDialoinfoConfig
I tried with this options and get the same problem
##################### DIALOG #########################
loadmodule "dialog.so"
modparam("dialog", "enable_stats", 1)
modparam("dialog", "default_timeout", 21600)
modparam("dialog", "db_url",
modparam("dialog", "db_mode", 1)
modparam("dialog", "dlg_flag", 4)
Reference
http://gventure.wordpress.com/2009/03/30/opensips-installation/
##
opensips -c
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp: 192.168.50.10 [192.168.50.10]:5060
tcp: net:5060
tcp: server.dominio.com:5060
tcp: localhost:5060
udp: server:5060
udp: server.dominio.com:5060
udp: localhost:5060
Mar 15 13:06:03 [3014] NOTICE:core:main: config file ok, exit
##
# opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001
##
In the control panel
Module "Diallog" = Array ( [0] => sorry -- reply fifo opening error )
Any ideas
Thanks
Erick
-----Original Message-----
Sent: Monday, March 15, 2010 3:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erick,
For the failing tools, do you have the corresponding opensips modules
loaded ?
Like, for Dialog tool, do you have the dialog module loaded ?
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working well
now the problem continues with the following modules, please let me know
if
Post by Erick Chinchilla Berrocal
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the "primary
name
Post by Erick Chinchilla Berrocal
server"
This is the log
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
not work
-Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
cannot open reply pipe (null)
cannot open reply pipe (null)
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you can
give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":"
. $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/
// each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
/*------------------------------------------------------------------------
Post by Bogdan-Andrei Iancu
Post by Erick Chinchilla Berrocal
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*------------------------------------------------------------------------
Post by Bogdan-Andrei Iancu
Post by Erick Chinchilla Berrocal
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Erick Chinchilla Berrocal
2010-03-15 18:15:44 UTC
Permalink
Bodgab
In the syslog I have the error:

opensips-lab /usr/local/sbin/opensips[3047]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)

Instead in the apache2 error.log:

mkfifo: missing operand
Try `mkfifo --help' for more information.

I think that the reply_fifo it was not create

Any idea that can help me to solve this problem?

Thanks
Erick Ch.

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Monday, March 15, 2010 3:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Erick,

For the failing tools, do you have the corresponding opensips modules
loaded ?

Like, for Dialog tool, do you have the dialog module loaded ?

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working well
now the problem continues with the following modules, please let me know if
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] => sorry
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the "primary name
server"
This is the log
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
not work
-Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
cannot open reply pipe (null)
cannot open reply pipe (null)
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you can
give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":"
. $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/
// each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
/*------------------------------------------------------------------------
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*------------------------------------------------------------------------
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Bogdan-Andrei Iancu
2010-03-15 21:16:10 UTC
Permalink
Hi Erick,

I might have an idea about the error root - it might be related to some
cfg changes in CP that were done just before the release. Let me ask
Alex to test it and I will come back to you.

Thanks and regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgab
cannot open reply pipe (null)
mkfifo: missing operand
Try `mkfifo --help' for more information.
I think that the reply_fifo it was not create
Any idea that can help me to solve this problem?
Thanks
Erick Ch.
-----Original Message-----
Sent: Monday, March 15, 2010 3:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erick,
For the failing tools, do you have the corresponding opensips modules
loaded ?
Like, for Dialog tool, do you have the dialog module loaded ?
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working well
now the problem continues with the following modules, please let me know
if
Post by Erick Chinchilla Berrocal
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the "primary
name
Post by Erick Chinchilla Berrocal
server"
This is the log
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)"
not work
-Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
cannot open reply pipe (null)
cannot open reply pipe (null)
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you can
give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host . ":"
. $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/
// each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
/*------------------------------------------------------------------------
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*------------------------------------------------------------------------
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro
erik pepermans
2010-03-15 20:15:22 UTC
Permalink
Hi,

Got the same problem :

'opensipsctl fifo dr_reload' returns in syslog :
Mar 15 21:09:22 ns1 /sbin/opensips[22244]: INFO:drouting:dr_reload_cmd:
"dr_reload" MI command received!
Mar 15 21:09:22 ns1 /sbin/opensips[22244]:
WARNING:drouting:dr_load_routing_info: using old-style tables for
dr_gateways, probing will be disabled

Via opensips-cp 'fifo dr_reload' returns in syslog :
Mar 15 21:09:50 ns1 /sbin/opensips[22244]: ERROR:mi_fifo:mi_fifo_server:
command fifo is not available
Mar 15 21:09:50 ns1 /sbin/opensips[22244]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)

Via opensips-cp 'ps' returns in syslog :
Mar 15 21:10:27 ns1 /sbin/opensips[22244]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)

Brgds
Erik

-----Oorspronkelijk bericht-----
Van: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] Namens Erick Chinchilla Berrocal
Verzonden: maandag 15 maart 2010 19:16
Aan: 'OpenSIPS users mailling list'
Onderwerp: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo


Bodgab
In the syslog I have the error:

opensips-lab /usr/local/sbin/opensips[3047]: ERROR:mi_fifo:mi_fifo_server:
cannot open reply pipe (null)

Instead in the apache2 error.log:

mkfifo: missing operand
Try `mkfifo --help' for more information.

I think that the reply_fifo it was not create

Any idea that can help me to solve this problem?

Thanks
Erick Ch.

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Monday, March 15, 2010 3:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Erick,

For the failing tools, do you have the corresponding opensips modules
loaded ?

Like, for Dialog tool, do you have the dialog module loaded ?

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working
well now the problem continues with the following modules, please let
me know
if
Post by Erick Chinchilla Berrocal
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the
"primary
name
Post by Erick Chinchilla Berrocal
server"
This is the log
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is # -----
mi_fifo params ----- modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo") modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not
work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode",
0666)" not work -Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe (null) Mar 12
cannot open reply pipe (null) Mar 12 13:56:30 net
/sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server: cannot open reply
ERROR:mi_fifo:mi_fifo_server: command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you
can give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid #Below is
actions taken by monit when service got stuck. start program =
"/etc/init.d/opensips start" stop program = "/etc/init.d/opensips
stop" # Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host .
":" . $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel
Application for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/ // each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port $boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
/*------------------------------------------------------------------------
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*------------------------------------------------------------------------
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Bogdan-Andrei Iancu
2010-03-15 21:17:09 UTC
Permalink
Here you have 2 errors:
- first you do not have the drouting module loaded in opensips cfg
- second in the generic fifo error (mentioned it the prev email)

Regards,
Bogdan
Post by erik pepermans
Hi,
"dr_reload" MI command received!
WARNING:drouting:dr_load_routing_info: using old-style tables for
dr_gateways, probing will be disabled
command fifo is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Brgds
Erik
-----Oorspronkelijk bericht-----
Verzonden: maandag 15 maart 2010 19:16
Aan: 'OpenSIPS users mailling list'
Onderwerp: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgab
cannot open reply pipe (null)
mkfifo: missing operand
Try `mkfifo --help' for more information.
I think that the reply_fifo it was not create
Any idea that can help me to solve this problem?
Thanks
Erick Ch.
-----Original Message-----
Sent: Monday, March 15, 2010 3:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erick,
For the failing tools, do you have the corresponding opensips modules
loaded ?
Like, for Dialog tool, do you have the dialog module loaded ?
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc
The manual said insert the line
"check process opensips with pidfile /var/run/opensips.pid"
and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working
well now the problem continues with the following modules, please let
me know
if
Post by Erick Chinchilla Berrocal
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the
"primary
name
Post by Erick Chinchilla Berrocal
server"
This is the log
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is # -----
mi_fifo params ----- modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo") modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not
work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode",
0666)" not work -Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe (null) Mar 12
cannot open reply pipe (null) Mar 12 13:56:30 net
/sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server: cannot open reply
ERROR:mi_fifo:mi_fifo_server: command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow x.x.x.x # allow ipaddress to connect to the server, you
can give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid #Below is
actions taken by monit when service got stuck. start program =
"/etc/init.d/opensips start" stop program = "/etc/init.d/opensips
stop" # Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel Application
for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host .
":" . $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel
Application for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/ // each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port $boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
/*------------------------------------------------------------------------
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/
// each system is a set of servers with the same
// functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*------------------------------------------------------------------------
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
-SIP Trace = Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro
erik pepermans
2010-03-15 22:05:09 UTC
Permalink
Hi Bogdan :

The issue is some variables are empty in the function write2fifo_new in
module web/common/mi_comm.php :

function write2fifo_new($command, &$errors, &$status){

global $config;
global $fifo_file ;

---------------> missing ---------->
$config->reply_fifo_filename="webfifo_".rand();
---------------> missing ---------->
$config->reply_fifo_path="/tmp/".$config->reply_fifo_filename;

These variables are used further on this function -

Moreover 'reply_fifo_path' is hardcoded; which should not be the case I
presume.

Brgds
Erik

-----Oorspronkelijk bericht-----
Van: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] Namens Bogdan-Andrei Iancu
Verzonden: maandag 15 maart 2010 22:17
Aan: OpenSIPS users mailling list
Onderwerp: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo


Here you have 2 errors:
- first you do not have the drouting module loaded in opensips cfg
- second in the generic fifo error (mentioned it the prev email)

Regards,
Bogdan
Hi,
INFO:drouting:dr_reload_cmd: "dr_reload" MI command received! Mar 15
WARNING:drouting:dr_load_routing_info: using old-style tables for
dr_gateways, probing will be disabled
command fifo is not available
cannot open reply pipe (null)
ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe (null)
Brgds
Erik
-----Oorspronkelijk bericht-----
Berrocal
Verzonden: maandag 15 maart 2010 19:16
Aan: 'OpenSIPS users mailling list'
Onderwerp: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgab
ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe (null)
mkfifo: missing operand
Try `mkfifo --help' for more information.
I think that the reply_fifo it was not create
Any idea that can help me to solve this problem?
Thanks
Erick Ch.
-----Original Message-----
Iancu
Sent: Monday, March 15, 2010 3:47 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erick,
For the failing tools, do you have the corresponding opensips modules
loaded ?
Like, for Dialog tool, do you have the dialog module loaded ?
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Bodgan
I made the following change in the file "etc/monit/monitrc The manual
said insert the line "check process opensips with pidfile
/var/run/opensips.pid" and i changed to
"check process opensips with pidfile /var/run/opensips/opensips.pid"
with this change in the control panel the module "MONIT" is working well
with this change in the control panel the module "MONIT" is working
well now the problem continues with the following modules, please let
me know
if
Post by Erick Chinchilla Berrocal
you have idea, I read the manual for several times and no ....
- CDRViever = ok
- Dialog = Array ( [0] => sorry -- reply fifo opening error )
- DialPlan = ok
- Dispatcher = Array ( [0] => sorry -- reply fifo opening error [1]
=>
sorry
Post by Erick Chinchilla Berrocal
-- reply fifo opening error )
- Domain = ok
- Dymanic Routing = ok
- Load Balancer = ok
- MI Comands = /tmp/opensips_fifo
- Monit = ok
- Nathelper = ok
- Permissions = ok
- Prefix 2 Domain = ok
- SIP Trace = Array ( [0] => sorry -- reply fifo opening error )
- Static Monitor = sorry -- reply fifo opening error
I understand the important for the files "db.inc.php" and
"boxes.global.inc.php" , my current setup is the example in the book
charpter 6, page 132. the only difference is the password, the
"primary
name
Post by Erick Chinchilla Berrocal
server"
This is the log
ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe (null) Mar 12
command dlg_list is not available Mar 12 18:04:22 net
/sbin/opensips[2922]: ERROR:mi_fifo:mi_fifo_server: cannot open reply
ERROR:mi_fifo:mi_fifo_server: command dlg_list is not available
cannot open reply pipe (null)
command dlg_list is not available
cannot open reply pipe (null)
command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
command sip_trace is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
Thanks
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bodgan
Thanks for your assistant.
After of change the file "opensips.cfg" the configuration is # -----
mi_fifo params ----- modparam("mi_fifo", "fifo_name",
"/tmp/opensips_fifo") modparam ( "mi_fifo", "fifo_mode", 0666)
if only use the line "modparam ( "mi_fifo", "fifo_mode", 0666)" not
work
-Dialog = if only use the line "modparam ( "mi_fifo", "fifo_mode",
0666)" not work -Dispatcher =
Array ( [0] => sorry -- reply fifo opening error )
Array ( [0] => sorry -- reply fifo opening error
[1] => sorry -- reply fifo opening error )
-MI Commands = /tmp/opensips_fifo
sorry -- reply fifo opening error
-Monit = opensips - Execution Failed
-SIP trace = Array ( [0] => sorry -- reply fifo opening error )
-Static Monitor = sorry --reply fifo opening error
###
The is the email from the server
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
Content-Type: text/plain; charset=UTF-8
X-Cron-Env: <SHELL=/bin/sh>
<PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bi
###
This is the log from Opensips-Server
ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe (null) Mar 12
cannot open reply pipe (null) Mar 12 13:56:30 net
/sbin/opensips[2769]: ERROR:mi_fifo:mi_fifo_server: cannot open reply
ERROR:mi_fifo:mi_fifo_server: command ds_list is not available
cannot open reply pipe (null)
command ds_reload is not available
cannot open reply pipe (null)
cannot open reply pipe (null)
###
The configuration for the file /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
##
/etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server
and
Post by Erick Chinchilla Berrocal
allow x.x.x.x # allow ipaddress to connect to the server, you
can give only one per entry
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips.pid #Below is
actions taken by monit when service got stuck. start program =
"/etc/init.d/opensips start" stop program = "/etc/init.d/opensips
stop" # Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart
##
monit -t
Control file syntax OK
##
/var/www/opensips-cp/config# less db.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel
Application for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or
modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
//database driver mysql or pgsql
$config->db_driver = "mysql";
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "(password for "root"";
//database name
$config->db_name = "opensips";
if (!empty($config->db_port) ) $config->db_host = $config->db_host .
":" . $config->db_port;
?>
(END)
##
/var/www/opensips-cp/config# less boxes.global.inc.php
<?php
/*
* $Id$
* Copyright (C) 2008 Voice Sistem SRL
*
* This file is part of opensips-cp, a free Web Control Panel
Application for
* OpenSIPS SIP server.
*
* opensips-cp is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* opensips-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
*/
/*==================== DEFINITION OF BOXES (servers)
========================*/ // each server is a box
$box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port $boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit"; (default user and password)
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="190.x.x.x"; (IP address)
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled 1=enabled //
(cron) $boxes[$box_id]['smonitor']['charts']=1;
/*-------------------------------------------------------------------
-----
---
$box_id=1;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="192.168.0.2:8080";
// monit host:port
$boxes[$box_id]['monit']['conn']="192.168.0.2:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="pass";
$boxes[$box_id]['monit']['has_ssl']=1;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="Presence server";
$boxes[$box_id]['assoc_id']=2;
// enable local smonitor charts on this box : 0=disabled 1=enabled //
(cron) $boxes[$box_id]['smonitor']['charts']=1;
*/
/*======================== DEFINITION OF SYSTEMS
========================*/ // each system is a set of servers with
the same // functionality on the platform (like sets of
// SIP servers, sets of Load-Balancers, sets of
// Presence agents, etc)
$_system_id=0;
$systems[$_system_id]['name']="SIP Servers";
$systems[$_system_id]['desc']="OpenSIPS SIP server cluster"; //boxes
with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=1;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=1;
/*-------------------------------------------------------------------
-----
---
$_system_id=1;
$systems[$_system_id]['name']="Presence Servers";
$systems[$_system_id]['desc']="OpenSIPS Presence server cluster";
//boxes with this assoc_id are assigned to this system
$systems[$_system_id]['assoc_id']=2;
// 1= sip proxies pair , 2 = databases , 3 = media servers , etc..
$systems[$_system_id]['system_type_id']=5;
*/
?>
(END)
Thanks
Erick Ch.
-----Original Message-----
Iancu
Sent: Friday, March 12, 2010 11:55 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Erick,
as probably you run opensips as user root, the fifo file is owned by
root, so opensips-cp (run by apache, with user apache/www-data) has no
permission to write into the fifo.
A simple solution will be to grant larger permissions to the fifo
file
modparam("mi_fifo", "fifo_mode", 0666)
http://www.opensips.org/html/docs/modules/1.6.x/mi_fifo.html#id227261
you need to restart opensips!
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Now the problem with the Control Panel 4.0 continues
This is the situation with each module
-Dialog= Warning: fopen(/tmp/opensips_fifo) [function.fopen]: failed
to
open
Post by Erick Chinchilla Berrocal
stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
failed
Post by Erick Chinchilla Berrocal
to open stream: Permission denied in /var/www/opensips-
cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo [1] =>
sorry
Post by Erick Chinchilla Berrocal
-- cannot open write fifo )
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
-Monit = Process - opensips
Status - Execution Failed
failed
to
Post by Erick Chinchilla Berrocal
open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
Array ( [0] => sorry -- cannot open write fifo )
-Statics Monitor = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 147
sorry -- cannot open write fifo
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Alex Ionescu
2010-03-16 15:19:08 UTC
Permalink
Hi Erik,

I have fixed the "bug". If you want you can update your CP version and
everything will work fine.

Regards,
Alex
Post by erik pepermans
some variables are empty in the function write2fifo_new in
--
Alex Ionescu
www.voice-system.ro
Erick Chinchilla Berrocal
2010-03-16 17:10:13 UTC
Permalink
Alex
Can you send me the procedure. Only re-install?
In my information have the following:
http://opensips-cp.sourceforge.net/
Book "Building Telephony Systems with OpenSIPS 1.6", / Chapter 6 / pages
128.
Use the Opensips 1.6.1 and Control Panel 4.0
Thanks
Erick Ch.

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Alex Ionescu
Sent: Tuesday, March 16, 2010 9:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Hi Erik,

I have fixed the "bug". If you want you can update your CP version and
everything will work fine.

Regards,
Alex
Post by erik pepermans
some variables are empty in the function write2fifo_new in
--
Alex Ionescu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Bogdan-Andrei Iancu
2010-03-16 17:15:44 UTC
Permalink
yes, re-install OpenSIPS-CP either from SVN, either from tarballs. See
download section on http://opensips-cp.sourceforge.net/

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Alex
Can you send me the procedure. Only re-install?
http://opensips-cp.sourceforge.net/
Book "Building Telephony Systems with OpenSIPS 1.6", / Chapter 6 / pages
128.
Use the Opensips 1.6.1 and Control Panel 4.0
Thanks
Erick Ch.
-----Original Message-----
Sent: Tuesday, March 16, 2010 9:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erik,
I have fixed the "bug". If you want you can update your CP version and
everything will work fine.
Regards,
Alex
Post by erik pepermans
some variables are empty in the function write2fifo_new in
--
Bogdan-Andrei Iancu
www.voice-system.ro
Erick Chinchilla Berrocal
2010-03-17 16:38:36 UTC
Permalink
Bogdan
My comments
I made the following changes (step by step)
1- Check the Opensips Status
- # opensips -h
version: opensips 1.6.1-notls (i386/linux)

-# ps -ef | grep opensips
netcrc 4776 1 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4777 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4778 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4779 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4780 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4781 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4782 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4783 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4784 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4785 4776 0 Mar16 ? 00:00:01 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4786 4776 0 Mar16 ? 00:00:01 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4787 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4788 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4790 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4793 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4794 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4798 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4800 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4801 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
root 5533 5529 0 11:19 pts/0 00:00:00 grep opensips

- # /etc/init.d/opensips status
Status of opensips: opensips is running.


-opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001

-# opensips -c
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp:192.168.50.20 [192.168.50.10]:5060
Aliases:
tcp: net:5060
tcp: net.dominio.com:5060
tcp: localhost:5060
udp: net:5060
udp: net.dominio.com:5060
udp: localhost:5060

Mar 17 11:21:33 [5567] NOTICE:core:main: config file ok, exiting...

- # monit -t
Control file syntax OK

2- Remove the old file
- /var/www# ls
index.html opensips-cp opensips-cp_4.0.tgz
- rm opensips-cp_4.0.tgz
- /var/www# ls
index.html opensips-cp

3- Install (download the Control Panel File)
- wget
http://sourceforge.net/projects/opensips-cp/files/opensips-cp/4.0/opensips-c
p_4.0.tgz/download (date 21010-03-16)
2010-03-17 11:28:03 (548 KB/s) - `opensips-cp_4.0.tgz' saved
[356706/356706]
- /var/www# ls
index.html opensips-cp opensips-cp_4.0.tgz
- tar -xzvf opensips-cp_4.0.tgz
- chown www-data:www-data opensips-cp -R

3- MDB2
-/var/www# pear install MDB2
Ignoring installed package pear/MDB2
Nothing to install
- /var/www# pear install MDB2#mysql
WARNING: channel "pear.php.net" has updated its protocols, use
"channel-update pear.php.net" to update
Skipping package "pear/MDB2", already installed as version 2.4.1
No valid packages found
install failed
- pear install log
Ignoring installed package pear/log
Nothing to install

4- Configure Apache (This
- /etc/apache2/apache2.conf
-After doing so, include the following line below the last line:
Alias /cp "/var/www/opensips-cp/web"
-Also, change the owner of the log file:
chown www-data:www-data
/var/www/opensips-cp/config/access.log

5- Install Tables in MySQL
- /var/www/opensips-cp/config/tools/admin/add_admin/
o mysql -Dopensips -p < ocp_admin_privileges.mysql
o mysql -u root -p
o mysql> use opensips
o INSERT INTO ocp_admin_privileges
(username,password,available_tools,permissions) values
('admin','admin','all','all');
o quit
- /var/www/opensips-cp/config/tools/system/cdrviewer/
o mysql -D opensips -p < cdrs.mysql
o mysql -D opensips -p < opensips_cdrs_1_6.mysql
6 - Edit the cron_job/generate-cdrs.sh
-/var/www/opensips-cp/cron_job# vim generate-cdrs_mysql.sh
#!/bin/sh
HOSTNAME="localhost"
USER="root"
PASS="(root password)"
DATABASE="opensips"
mysql -h $HOSTNAME -u $USER -p$PASS -e "call opensips_cdrs_1_6(); "
$DATABASE

7- Edit the /etc/crontab file
-vim /etc/crontab
SHELL=/bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report
/etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php >
/dev/null
#

8- smonitor module
- /var/www/opensips-cp/config/tools/system/smonitor/
. mysql -p opensips <tables.mysql

9- Add a cron job that collects data from the OpenSIPS machine
- /etc/crontab
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
10- Restart OpenSIPS and Apache
-Apache
# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting .
#/etc/init.d/apache2 status
Apache is running (pid 5635)..

-Opensips
/etc/init.d/opensips restart
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp:192.168.50.20 [192.168.50.10]:5060
Aliases:
tcp: net:5060
tcp: net.dominio.com:5060
tcp: localhost:5060
udp: net:5060
udp: net.dominio.com:5060
udp: localhost:5060
.
- /etc/init.d/opensips status
Status of opensips: opensips is running.

11- Install Monit
- apt-get install monit
- /etc/monit/monitrc
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server
and
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart

- monit -t
Control file syntax OK

12- Edit the /etc/default/monit
- vim /etc/default/monit
# Defaults for monit initscript
# sourced by /etc/init.d/monit
# installed at /etc/default/monit by maintainer scripts
# Fredrik Steen <***@debian.org>
# You must set this variable to for monit to start
startup=1
# To change the intervals which monit should run uncomment
# and change this variable.
# CHECK_INTERVALS=180

13- Configuring Control Panel
- /var/www/opensips-cp/config
db.inc.php

//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "( root password)";
//database name
$config->db_name = "opensips";
if ($config->db_port !=
"")$config->db_host=$config->db_host":" $config->db_port;

13- Configure the FIFO access
-/var/www/opensips-cp/config/
- boxes.global.inc.php
- $box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit";
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="192.168.50.10";
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled
1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;

14- globals.php
- // Password can be saved in plain text mode by setting
// $config->admin_passwd_mode to 0 or chyphered mode, by setting it
to 1
$config->admin_passwd_mode=0;

15- Access http://server_ip_address/cp

And this was the result
when access the web page, after the login and passoword, select the boton
"go" and said
Fatal error: Call to undefined method MDB2_Error::setFetchMode() in
/var/www/opensips-cp/web/db_connect.php on line 31

The logs
Mar 17 12:09:09 net /sbin/opensips[2841]: INFO:core:sig_usr: signal 15
received
Mar 17 12:09:09 net /sbin/opensips[2849]: INFO:core:sig_usr: signal 15
received
Mar 17 12:09:10 net opensips: INFO:core:init_tcp: using epoll_lt as the TCP
io watch method (auto detected)
Mar 17 12:09:10 net /sbin/opensips[2913]: NOTICE:core:main: version:
opensips 1.6.1-notls (i386/linux)
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:core:main: using 128 Mb
shared memory
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:core:main: using 1 Mb private
memory per process
Mar 17 12:09:10 net /sbin/opensips[2913]: NOTICE:signaling:mod_init:
initializing module ...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:sl:mod_init: Initializing
StateLess engine
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:tm:mod_init: TM -
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:maxfwd:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:usrloc:ul_init_locks: locks
array size 512
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:registrar:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:textops:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:xlog:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:acc:mod_init: initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:dialog:mod_init: Dialog
module - initializing
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:auth:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:auth_db:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:alias_db:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
Mar 17 12:09:10 net /sbin/opensips[2913]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb


Another things
I installed the software in other server , version1.6.2 w/control panel 4.0
use the default password for mysql (user=opensips, password= openipsrw)
Only changed the following:
1- Install phpmyadmin , for check the tables and users (this is ok)
2- Opensips Status
- # opensips -h
version: opensips 1.6.2-notls (i386/linux)
- /etc/init.d/opensips status
Status of opensips: opensips is running.
- opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001
- # opensipsctl ul show
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
entering fifo_cmd ul_dump
Domain:: location table=512 records=1
AOR:: 1001
Contact::
sip:***@192.168.50.211:47966;rinstance=4c55623c92dd123b Q=
Expires:: 3549
Callid::
N2U4ZDBjYzczZmJjYmJlYzAwMTUyYTk3ODJhOWMxMjc.
Cseq:: 2
User-agent:: X-Lite release 1104o stamp 56125
State:: CS_NEW
Flags:: 0
Cflag:: 0
Socket:: udp:192.168.50.106:5060
Methods:: 5951
FIFO command was:
:ul_dump:opensips_receiver_4523

3- /etc/init.d/opensips
- MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
[ -z "$USER" ] && USER=netsip
[ -z "$GROUP" ] && GROUP=netsip
[ $MEMORY -le 0 ] && MEMORY=32

4- /etc/default/opensips
- # User to run as
USER=netsip

# Group to run as
GROUP=netsip

5- I can Access the control panel with but has the following problems
5.A - Access with login and password = admin / admin = ok
5.B - Modules
Admin = OK
User = OK
System
- CDRViewer = OK
- Dialog = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open write
fifo )
- Dialplan = OK
- Dispatcher = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open
write fifo )
-Domian = OK
-Dymanic Routing = OK
-Load Balancer= ok
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
sorry -- cannot open write fifo
-Monit= ok
-Nathelper= ok
-Permissions = OK
-Prefix 2 Domain = OK
-SIP trace = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open write
fifo )
-Statistics Monitor = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied
in /var/www/opensips-cp/web/common/mi_comm.php on line 91
sorry -- cannot open write
fifo

6- Enable the following modules in opensips.cfg
- loadmodule "dialog.so"
- loadmodule "drouting.so"

#------- dialog ---------
modparam("dialog", "db_url",
"mysql://opensips:***@localhost/opensips")
modparam("dialog", "dlg_flag", 4)

#------- drouting --------
modparam("drouting", "db_url",
"mysql://opensips:***@localhost/opensips")

7- Log
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:xlog:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:acc:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:dialog:mod_init:
Dialog module - initializing
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:drouting:dr_init:
Dynamic-Routing - initializing
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:auth:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:auth_db:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:alias_db:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 218 kb
Mar 17 11:07:23 erick-server /sbin/opensips[4331]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 218 kb
Mar 17 11:07:23 erick-server /sbin/opensips[4332]:
WARNING:drouting:dr_load_routing_info: table "dr_gateways" empty
Mar 17 11:07:23 erick-server /sbin/opensips[4332]:
WARNING:drouting:dr_load_routing_info: no valid destinations set -> ignoring
the routing rules
Mar 17 12:11:54 erick-server /sbin/opensips[4339]: new branch at
sip:***@192.168.50.211:47966;rinstance=4c55623c92dd123b
Mar 17 12:11:54 erick-server /sbin/opensips[4338]: incoming reply
Mar 17 12:11:57 erick-server /sbin/opensips[4339]: incoming reply
(END)

Bodgan in two installations I have the similar problem , I don't have any
idea , can you check the step by step are the correct o let me know what
is my problem.


Thanks
Erick Ch.

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Tuesday, March 16, 2010 11:16 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

yes, re-install OpenSIPS-CP either from SVN, either from tarballs. See
download section on http://opensips-cp.sourceforge.net/

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Alex
Can you send me the procedure. Only re-install?
http://opensips-cp.sourceforge.net/
Book "Building Telephony Systems with OpenSIPS 1.6", / Chapter 6 / pages
128.
Use the Opensips 1.6.1 and Control Panel 4.0
Thanks
Erick Ch.
-----Original Message-----
Sent: Tuesday, March 16, 2010 9:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erik,
I have fixed the "bug". If you want you can update your CP version and
everything will work fine.
Regards,
Alex
Post by erik pepermans
some variables are empty in the function write2fifo_new in
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Erick Chinchilla Berrocal
2010-03-18 18:30:53 UTC
Permalink
Bogdan
I have good new
This is the history

1- Install the patch
cd /var/www
tar -xvzf /path/to/opensips-cp.tgz
cd opensips-cp
patch -p1 < /path/to/opensips-cp_4.0.patch

2- Re-configure the Control-Panel File

3- Access the control panel http://192.168.50.10/cp/
- Access is ok
4- Check each module
- Only the module
MI Commands = did't work, said "/tmp/opensips_fifo"
- Check the link

http://opensips-cp.sourceforge.net/index.php?req=documentation
- and check the line in the file "boxes.global.inc.php"
Before
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";

After
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="127.0.0.1:8080";

-Checked again the Control Panel and don't report problems with the
modules.

5- Now the next step is test the installation and connect other gateways.
Please if you have any procedure for check the correct operation for the
control panel , please let me know.

I have confusion with the modules "MI Commands" and "Statics Monitor", no
reports problems but don't get information
Reference
http://opensips-cp.sourceforge.net/
Statistics Monitor Module (smonitor)

##Static Chart
Failed to issue query, error message : MDB2 Error: syntax error


Another things
We use the same procedure with Opensips 1.6.2 and Control Panel 4.0, but the
problem continues. See below.


Thanks for your help

Erick Ch.



-----Original Message-----
From: Erick Chinchilla Berrocal [mailto:***@netcrc.net]
Sent: Wednesday, March 17, 2010 10:39 AM
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

Bogdan
My comments
I made the following changes (step by step)
1- Check the Opensips Status
- # opensips -h
version: opensips 1.6.1-notls (i386/linux)

-# ps -ef | grep opensips
netcrc 4776 1 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4777 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4778 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4779 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4780 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4781 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4782 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4783 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4784 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4785 4776 0 Mar16 ? 00:00:01 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4786 4776 0 Mar16 ? 00:00:01 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4787 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4788 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4790 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4793 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4794 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4798 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4800 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4801 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
root 5533 5529 0 11:19 pts/0 00:00:00 grep opensips

- # /etc/init.d/opensips status
Status of opensips: opensips is running.


-opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001

-# opensips -c
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp:192.168.50.20 [192.168.50.10]:5060
Aliases:
tcp: net:5060
tcp: net.dominio.com:5060
tcp: localhost:5060
udp: net:5060
udp: net.dominio.com:5060
udp: localhost:5060

Mar 17 11:21:33 [5567] NOTICE:core:main: config file ok, exiting...

- # monit -t
Control file syntax OK

2- Remove the old file
- /var/www# ls
index.html opensips-cp opensips-cp_4.0.tgz
- rm opensips-cp_4.0.tgz
- /var/www# ls
index.html opensips-cp

3- Install (download the Control Panel File)
- wget
http://sourceforge.net/projects/opensips-cp/files/opensips-cp/4.0/opensips-c
p_4.0.tgz/download (date 21010-03-16)
2010-03-17 11:28:03 (548 KB/s) - `opensips-cp_4.0.tgz' saved
[356706/356706]
- /var/www# ls
index.html opensips-cp opensips-cp_4.0.tgz
- tar -xzvf opensips-cp_4.0.tgz
- chown www-data:www-data opensips-cp -R

3- MDB2
-/var/www# pear install MDB2
Ignoring installed package pear/MDB2
Nothing to install
- /var/www# pear install MDB2#mysql
WARNING: channel "pear.php.net" has updated its protocols, use
"channel-update pear.php.net" to update
Skipping package "pear/MDB2", already installed as version 2.4.1
No valid packages found
install failed
- pear install log
Ignoring installed package pear/log
Nothing to install

4- Configure Apache (This
- /etc/apache2/apache2.conf
-After doing so, include the following line below the last line:
Alias /cp "/var/www/opensips-cp/web"
-Also, change the owner of the log file:
chown www-data:www-data
/var/www/opensips-cp/config/access.log

5- Install Tables in MySQL
- /var/www/opensips-cp/config/tools/admin/add_admin/
o mysql -Dopensips -p < ocp_admin_privileges.mysql
o mysql -u root -p
o mysql> use opensips
o INSERT INTO ocp_admin_privileges
(username,password,available_tools,permissions) values
('admin','admin','all','all');
o quit
- /var/www/opensips-cp/config/tools/system/cdrviewer/
o mysql -D opensips -p < cdrs.mysql
o mysql -D opensips -p < opensips_cdrs_1_6.mysql
6 - Edit the cron_job/generate-cdrs.sh
-/var/www/opensips-cp/cron_job# vim generate-cdrs_mysql.sh
#!/bin/sh
HOSTNAME="localhost"
USER="root"
PASS="(root password)"
DATABASE="opensips"
mysql -h $HOSTNAME -u $USER -p$PASS -e "call opensips_cdrs_1_6(); "
$DATABASE

7- Edit the /etc/crontab file
-vim /etc/crontab
SHELL=/bin/sh

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report
/etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php >
/dev/null
#

8- smonitor module
- /var/www/opensips-cp/config/tools/system/smonitor/
. mysql -p opensips <tables.mysql

9- Add a cron job that collects data from the OpenSIPS machine
- /etc/crontab
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php > /dev/null
10- Restart OpenSIPS and Apache
-Apache
# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting .
#/etc/init.d/apache2 status
Apache is running (pid 5635)..

-Opensips
/etc/init.d/opensips restart
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp:192.168.50.20 [192.168.50.10]:5060
Aliases:
tcp: net:5060
tcp: net.dominio.com:5060
tcp: localhost:5060
udp: net:5060
udp: net.dominio.com:5060
udp: localhost:5060
.
- /etc/init.d/opensips status
Status of opensips: opensips is running.

11- Install Monit
- apt-get install monit
- /etc/monit/monitrc
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server
and
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu > 90% for 5 cycles then restart

- monit -t
Control file syntax OK

12- Edit the /etc/default/monit
- vim /etc/default/monit
# Defaults for monit initscript
# sourced by /etc/init.d/monit
# installed at /etc/default/monit by maintainer scripts
# Fredrik Steen <***@debian.org>
# You must set this variable to for monit to start
startup=1
# To change the intervals which monit should run uncomment
# and change this variable.
# CHECK_INTERVALS=180

13- Configuring Control Panel
- /var/www/opensips-cp/config
db.inc.php

//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "( root password)";
//database name
$config->db_name = "opensips";
if ($config->db_port !=
"")$config->db_host=$config->db_host":" $config->db_port;

13- Configure the FIFO access
-/var/www/opensips-cp/config/
- boxes.global.inc.php
- $box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit";
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="192.168.50.10";
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled
1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;

14- globals.php
- // Password can be saved in plain text mode by setting
// $config->admin_passwd_mode to 0 or chyphered mode, by setting it
to 1
$config->admin_passwd_mode=0;

15- Access http://server_ip_address/cp

And this was the result
when access the web page, after the login and passoword, select the boton
"go" and said
Fatal error: Call to undefined method MDB2_Error::setFetchMode() in
/var/www/opensips-cp/web/db_connect.php on line 31

The logs
Mar 17 12:09:09 net /sbin/opensips[2841]: INFO:core:sig_usr: signal 15
received
Mar 17 12:09:09 net /sbin/opensips[2849]: INFO:core:sig_usr: signal 15
received
Mar 17 12:09:10 net opensips: INFO:core:init_tcp: using epoll_lt as the TCP
io watch method (auto detected)
Mar 17 12:09:10 net /sbin/opensips[2913]: NOTICE:core:main: version:
opensips 1.6.1-notls (i386/linux)
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:core:main: using 128 Mb
shared memory
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:core:main: using 1 Mb private
memory per process
Mar 17 12:09:10 net /sbin/opensips[2913]: NOTICE:signaling:mod_init:
initializing module ...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:sl:mod_init: Initializing
StateLess engine
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:tm:mod_init: TM -
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:maxfwd:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:usrloc:ul_init_locks: locks
array size 512
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:registrar:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:textops:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:xlog:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:acc:mod_init: initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:dialog:mod_init: Dialog
module - initializing
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:auth:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:auth_db:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:alias_db:mod_init:
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
Mar 17 12:09:10 net /sbin/opensips[2913]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb


Another things
I installed the software in other server , version1.6.2 w/control panel 4.0
use the default password for mysql (user=opensips, password= openipsrw)
Only changed the following:
1- Install phpmyadmin , for check the tables and users (this is ok)
2- Opensips Status
- # opensips -h
version: opensips 1.6.2-notls (i386/linux)
- /etc/init.d/opensips status
Status of opensips: opensips is running.
- opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001
- # opensipsctl ul show
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
entering fifo_cmd ul_dump
Domain:: location table=512 records=1
AOR:: 1001
Contact::
sip:***@192.168.50.211:47966;rinstance=4c55623c92dd123b Q=
Expires:: 3549
Callid::
N2U4ZDBjYzczZmJjYmJlYzAwMTUyYTk3ODJhOWMxMjc.
Cseq:: 2
User-agent:: X-Lite release 1104o stamp 56125
State:: CS_NEW
Flags:: 0
Cflag:: 0
Socket:: udp:192.168.50.106:5060
Methods:: 5951
FIFO command was:
:ul_dump:opensips_receiver_4523

3- /etc/init.d/opensips
- MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
[ -z "$USER" ] && USER=netsip
[ -z "$GROUP" ] && GROUP=netsip
[ $MEMORY -le 0 ] && MEMORY=32

4- /etc/default/opensips
- # User to run as
USER=netsip

# Group to run as
GROUP=netsip

5- I can Access the control panel with but has the following problems
5.A - Access with login and password = admin / admin = ok
5.B - Modules
Admin = OK
User = OK
System
- CDRViewer = OK
- Dialog = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open write
fifo )
- Dialplan = OK
- Dispatcher = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open
write fifo )
-Domian = OK
-Dymanic Routing = OK
-Load Balancer= ok
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
sorry -- cannot open write fifo
-Monit= ok
-Nathelper= ok
-Permissions = OK
-Prefix 2 Domain = OK
-SIP trace = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open write
fifo )
-Statistics Monitor = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied
in /var/www/opensips-cp/web/common/mi_comm.php on line 91
sorry -- cannot open write
fifo

6- Enable the following modules in opensips.cfg
- loadmodule "dialog.so"
- loadmodule "drouting.so"

#------- dialog ---------
modparam("dialog", "db_url",
"mysql://opensips:***@localhost/opensips")
modparam("dialog", "dlg_flag", 4)

#------- drouting --------
modparam("drouting", "db_url",
"mysql://opensips:***@localhost/opensips")

7- Log
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:xlog:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:acc:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:dialog:mod_init:
Dialog module - initializing
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:drouting:dr_init:
Dynamic-Routing - initializing
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:auth:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:auth_db:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]: INFO:alias_db:mod_init:
initializing...
Mar 17 11:07:23 erick-server /sbin/opensips[4331]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 218 kb
Mar 17 11:07:23 erick-server /sbin/opensips[4331]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 218 kb
Mar 17 11:07:23 erick-server /sbin/opensips[4332]:
WARNING:drouting:dr_load_routing_info: table "dr_gateways" empty
Mar 17 11:07:23 erick-server /sbin/opensips[4332]:
WARNING:drouting:dr_load_routing_info: no valid destinations set -> ignoring
the routing rules
Mar 17 12:11:54 erick-server /sbin/opensips[4339]: new branch at
sip:***@192.168.50.211:47966;rinstance=4c55623c92dd123b
Mar 17 12:11:54 erick-server /sbin/opensips[4338]: incoming reply
Mar 17 12:11:57 erick-server /sbin/opensips[4339]: incoming reply
(END)

Bodgan in two installations I have the similar problem , I don't have any
idea , can you check the step by step are the correct o let me know what
is my problem.


Thanks
Erick Ch.

-----Original Message-----
From: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Tuesday, March 16, 2010 11:16 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo

yes, re-install OpenSIPS-CP either from SVN, either from tarballs. See
download section on http://opensips-cp.sourceforge.net/

Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Alex
Can you send me the procedure. Only re-install?
http://opensips-cp.sourceforge.net/
Book "Building Telephony Systems with OpenSIPS 1.6", / Chapter 6 / pages
128.
Use the Opensips 1.6.1 and Control Panel 4.0
Thanks
Erick Ch.
-----Original Message-----
Sent: Tuesday, March 16, 2010 9:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erik,
I have fixed the "bug". If you want you can update your CP version and
everything will work fine.
Regards,
Alex
Post by erik pepermans
some variables are empty in the function write2fifo_new in
--
Bogdan-Andrei Iancu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3997 (20090409) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
Alex Ionescu
2010-03-22 12:33:54 UTC
Permalink
Hi Erick,

Can you be a little more specific about the issues that you are facing
regarding OpenSIPS CP - MI Commands ?
About the Statistics Monitor (that should generate & show some graphichs
for some parameters that you want to monitor).
I have a few hints for you, maybe it will help :
- check the permissions of the user apache on the folder "...
/web/tools/system/smonitor/generated" - because this is the place where
charts are saved;
- check if you have set up in crontab this script "get_opensips_stats.php";
- and, the most important, check the first line of
"get_opensips_stats.php" and see if the path set up there is the
correct one !
Let me know if you succeed

Regards,
Alex
Post by Bogdan-Andrei Iancu
Bogdan
I have good new
This is the history
1- Install the patch
cd /var/www
tar -xvzf /path/to/opensips-cp.tgz
cd opensips-cp
patch -p1< /path/to/opensips-cp_4.0.patch
2- Re-configure the Control-Panel File
3- Access the control panel http://192.168.50.10/cp/
- Access is ok
4- Check each module
- Only the module
MI Commands = did't work, said "/tmp/opensips_fifo"
- Check the link
http://opensips-cp.sourceforge.net/index.php?req=documentation
- and check the line in the file "boxes.global.inc.php"
Before
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
After
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="127.0.0.1:8080";
-Checked again the Control Panel and don't report problems with the
modules.
5- Now the next step is test the installation and connect other gateways.
Please if you have any procedure for check the correct operation for the
control panel , please let me know.
I have confusion with the modules "MI Commands" and "Statics Monitor", no
reports problems but don't get information
Reference
http://opensips-cp.sourceforge.net/
Statistics Monitor Module (smonitor)
##Static Chart
Failed to issue query, error message : MDB2 Error: syntax error
Another things
We use the same procedure with Opensips 1.6.2 and Control Panel 4.0, but the
problem continues. See below.
Thanks for your help
Erick Ch.
-----Original Message-----
Sent: Wednesday, March 17, 2010 10:39 AM
To: 'OpenSIPS users mailling list'
Subject: RE: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Bogdan
My comments
I made the following changes (step by step)
1- Check the Opensips Status
- # opensips -h
version: opensips 1.6.1-notls (i386/linux)
-# ps -ef | grep opensips
netcrc 4776 1 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4777 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4778 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4779 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4780 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4781 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4782 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4783 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4784 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4785 4776 0 Mar16 ? 00:00:01 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4786 4776 0 Mar16 ? 00:00:01 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4787 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4788 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4790 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4793 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4794 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4798 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4800 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
netcrc 4801 4776 0 Mar16 ? 00:00:00 /sbin/opensips -P
/var/run/opensips/opensips.pid -m 128 -u netcrc -g netcrc
root 5533 5529 0 11:19 pts/0 00:00:00 grep opensips
- # /etc/init.d/opensips status
Status of opensips: opensips is running.
-opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001
-# opensips -c
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp:192.168.50.20 [192.168.50.10]:5060
tcp: net:5060
tcp: net.dominio.com:5060
tcp: localhost:5060
udp: net:5060
udp: net.dominio.com:5060
udp: localhost:5060
Mar 17 11:21:33 [5567] NOTICE:core:main: config file ok, exiting...
- # monit -t
Control file syntax OK
2- Remove the old file
- /var/www# ls
index.html opensips-cp opensips-cp_4.0.tgz
- rm opensips-cp_4.0.tgz
- /var/www# ls
index.html opensips-cp
3- Install (download the Control Panel File)
- wget
http://sourceforge.net/projects/opensips-cp/files/opensips-cp/4.0/opensips-c
p_4.0.tgz/download (date 21010-03-16)
2010-03-17 11:28:03 (548 KB/s) - `opensips-cp_4.0.tgz' saved
[356706/356706]
- /var/www# ls
index.html opensips-cp opensips-cp_4.0.tgz
- tar -xzvf opensips-cp_4.0.tgz
- chown www-data:www-data opensips-cp -R
3- MDB2
-/var/www# pear install MDB2
Ignoring installed package pear/MDB2
Nothing to install
- /var/www# pear install MDB2#mysql
WARNING: channel "pear.php.net" has updated its protocols, use
"channel-update pear.php.net" to update
Skipping package "pear/MDB2", already installed as version 2.4.1
No valid packages found
install failed
- pear install log
Ignoring installed package pear/log
Nothing to install
4- Configure Apache (This
- /etc/apache2/apache2.conf
Alias /cp "/var/www/opensips-cp/web"
chown www-data:www-data
/var/www/opensips-cp/config/access.log
5- Install Tables in MySQL
- /var/www/opensips-cp/config/tools/admin/add_admin/
o mysql -Dopensips -p< ocp_admin_privileges.mysql
o mysql -u root -p
o mysql> use opensips
o INSERT INTO ocp_admin_privileges
(username,password,available_tools,permissions) values
('admin','admin','all','all');
o quit
- /var/www/opensips-cp/config/tools/system/cdrviewer/
o mysql -D opensips -p< cdrs.mysql
o mysql -D opensips -p< opensips_cdrs_1_6.mysql
6 - Edit the cron_job/generate-cdrs.sh
-/var/www/opensips-cp/cron_job# vim generate-cdrs_mysql.sh
#!/bin/sh
HOSTNAME="localhost"
USER="root"
PASS="(root password)"
DATABASE="opensips"
mysql -h $HOSTNAME -u $USER -p$PASS -e "call opensips_cdrs_1_6(); "
$DATABASE
7- Edit the /etc/crontab file
-vim /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd /&& run-parts --report
/etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd /
&& run-parts --report /etc/cron.monthly )
*/3 * * * * root
/var/www/opensips-cp/cron_job/generate-cdrs_mysql.sh
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php>
/dev/null
#
8- smonitor module
- /var/www/opensips-cp/config/tools/system/smonitor/
. mysql -p opensips<tables.mysql
9- Add a cron job that collects data from the OpenSIPS machine
- /etc/crontab
* * * * * root php
/var/www/opensips-cp/cron_job/get_opensips_stats.php> /dev/null
10- Restart OpenSIPS and Apache
-Apache
# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting .
#/etc/init.d/apache2 status
Apache is running (pid 5635)..
-Opensips
/etc/init.d/opensips restart
Listening on
udp: 127.0.0.1 [127.0.0.1]:5060
udp: 192.168.50.10 [192.168.50.10]:5060
tcp: 127.0.0.1 [127.0.0.1]:5060
tcp:192.168.50.20 [192.168.50.10]:5060
tcp: net:5060
tcp: net.dominio.com:5060
tcp: localhost:5060
udp: net:5060
udp: net.dominio.com:5060
udp: localhost:5060
.
- /etc/init.d/opensips status
Status of opensips: opensips is running.
11- Install Monit
- apt-get install monit
- /etc/monit/monitrc
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server
and
allow admin:monit # require user 'admin' with password 'monit'
check process opensips with pidfile /var/run/opensips/opensips.pid
#Below is actions taken by monit when service got stuck.
start program = "/etc/init.d/opensips start"
stop program = "/etc/init.d/opensips stop"
# Admin will notify by mail if below of the condition satisfied.
if cpu is greater than 70% for 2 cycles then alert
if cpu> 90% for 5 cycles then restart
- monit -t
Control file syntax OK
12- Edit the /etc/default/monit
- vim /etc/default/monit
# Defaults for monit initscript
# sourced by /etc/init.d/monit
# installed at /etc/default/monit by maintainer scripts
# You must set this variable to for monit to start
startup=1
# To change the intervals which monit should run uncomment
# and change this variable.
# CHECK_INTERVALS=180
13- Configuring Control Panel
- /var/www/opensips-cp/config
db.inc.php
//database host
$config->db_host = "localhost";
//database port - leave empty for default
$config->db_port = "";
//database connection user
$config->db_user = "root";
//database connection password
$config->db_pass = "( root password)";
//database name
$config->db_name = "opensips";
if ($config->db_port !=
"")$config->db_host=$config->db_host":" $config->db_port;
13- Configure the FIFO access
-/var/www/opensips-cp/config/
- boxes.global.inc.php
- $box_id=0;
// mi host:port pair || fifo_file
$boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
// monit host:port
$boxes[$box_id]['monit']['conn']="127.0.0.1:2812";
$boxes[$box_id]['monit']['user']="admin";
$boxes[$box_id]['monit']['pass']="monit";
$boxes[$box_id]['monit']['has_ssl']=0;
// description (appears in mi , monit )
$boxes[$box_id]['desc']="192.168.50.10";
$boxes[$box_id]['assoc_id']=1;
// enable local smonitor charts on this box : 0=disabled
1=enabled
// (cron)
$boxes[$box_id]['smonitor']['charts']=1;
14- globals.php
- // Password can be saved in plain text mode by setting
// $config->admin_passwd_mode to 0 or chyphered mode, by setting it
to 1
$config->admin_passwd_mode=0;
15- Access http://server_ip_address/cp
And this was the result
when access the web page, after the login and passoword, select the boton
"go" and said
Fatal error: Call to undefined method MDB2_Error::setFetchMode() in
/var/www/opensips-cp/web/db_connect.php on line 31
The logs
Mar 17 12:09:09 net /sbin/opensips[2841]: INFO:core:sig_usr: signal 15
received
Mar 17 12:09:09 net /sbin/opensips[2849]: INFO:core:sig_usr: signal 15
received
Mar 17 12:09:10 net opensips: INFO:core:init_tcp: using epoll_lt as the TCP
io watch method (auto detected)
opensips 1.6.1-notls (i386/linux)
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:core:main: using 128 Mb
shared memory
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:core:main: using 1 Mb private
memory per process
initializing module ...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:sl:mod_init: Initializing
StateLess engine
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:tm:mod_init: TM -
initializing...
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:usrloc:ul_init_locks: locks
array size 512
initializing...
initializing...
initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:acc:mod_init: initializing...
Mar 17 12:09:10 net /sbin/opensips[2913]: INFO:dialog:mod_init: Dialog
module - initializing
initializing...
initializing...
initializing...
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
Another things
I installed the software in other server , version1.6.2 w/control panel 4.0
use the default password for mysql (user=opensips, password= openipsrw)
1- Install phpmyadmin , for check the tables and users (this is ok)
2- Opensips Status
- # opensips -h
version: opensips 1.6.2-notls (i386/linux)
- /etc/init.d/opensips status
Status of opensips: opensips is running.
- opensipsctl online
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
1001
- # opensipsctl ul show
database engine 'MYSQL' loaded
Control engine 'FIFO' loaded
entering fifo_cmd ul_dump
Domain:: location table=512 records=1
AOR:: 1001
Expires:: 3549
N2U4ZDBjYzczZmJjYmJlYzAwMTUyYTk3ODJhOWMxMjc.
Cseq:: 2
User-agent:: X-Lite release 1104o stamp 56125
State:: CS_NEW
Flags:: 0
Cflag:: 0
Socket:: udp:192.168.50.106:5060
Methods:: 5951
:ul_dump:opensips_receiver_4523
3- /etc/init.d/opensips
- MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
[ -z "$USER" ]&& USER=netsip
[ -z "$GROUP" ]&& GROUP=netsip
[ $MEMORY -le 0 ]&& MEMORY=32
4- /etc/default/opensips
- # User to run as
USER=netsip
# Group to run as
GROUP=netsip
5- I can Access the control panel with but has the following problems
5.A - Access with login and password = admin / admin = ok
5.B - Modules
Admin = OK
User = OK
System
- CDRViewer = OK
- Dialog = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open write
fifo )
- Dialplan = OK
- Dispatcher = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open
write fifo )
-Domian = OK
-Dymanic Routing = OK
-Load Balancer= ok
-MI Commands = /tmp/opensips_fifo
Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
sorry -- cannot open write fifo
-Monit= ok
-Nathelper= ok
-Permissions = OK
-Prefix 2 Domain = OK
-SIP trace = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied in
/var/www/opensips-cp/web/common/mi_comm.php on line 91
Array ( [0] => sorry -- cannot open write
fifo )
-Statistics Monitor = Warning: fopen(/tmp/opensips_fifo)
[function.fopen]: failed to open stream: Permission denied
in /var/www/opensips-cp/web/common/mi_comm.php on line 91
sorry -- cannot open write
fifo
6- Enable the following modules in opensips.cfg
- loadmodule "dialog.so"
- loadmodule "drouting.so"
#------- dialog ---------
modparam("dialog", "db_url",
modparam("dialog", "dlg_flag", 4)
#------- drouting --------
modparam("drouting", "db_url",
7- Log
initializing...
initializing...
Dialog module - initializing
Dynamic-Routing - initializing
initializing...
initializing...
initializing...
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 218 kb
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 218 kb
WARNING:drouting:dr_load_routing_info: table "dr_gateways" empty
WARNING:drouting:dr_load_routing_info: no valid destinations set -> ignoring
the routing rules
Mar 17 12:11:54 erick-server /sbin/opensips[4339]: new branch at
Mar 17 12:11:54 erick-server /sbin/opensips[4338]: incoming reply
Mar 17 12:11:57 erick-server /sbin/opensips[4339]: incoming reply
(END)
Bodgan in two installations I have the similar problem , I don't have any
idea , can you check the step by step are the correct o let me know what
is my problem.
Thanks
Erick Ch.
-----Original Message-----
Sent: Tuesday, March 16, 2010 11:16 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
yes, re-install OpenSIPS-CP either from SVN, either from tarballs. See
download section on http://opensips-cp.sourceforge.net/
Regards,
Bogdan
Post by Erick Chinchilla Berrocal
Alex
Can you send me the procedure. Only re-install?
http://opensips-cp.sourceforge.net/
Book "Building Telephony Systems with OpenSIPS 1.6", / Chapter 6 / pages
128.
Use the Opensips 1.6.1 and Control Panel 4.0
Thanks
Erick Ch.
-----Original Message-----
Sent: Tuesday, March 16, 2010 9:19 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo
Hi Erik,
I have fixed the "bug". If you want you can update your CP version and
everything will work fine.
Regards,
Alex
Post by erik pepermans
some variables are empty in the function write2fifo_new in
--
Alex Ionescu
www.voice-system.ro
erik pepermans
2010-03-16 19:52:51 UTC
Permalink
Thanks Alex,

Now works as a charm -

Brgds
Erik

-----Oorspronkelijk bericht-----
Van: users-***@lists.opensips.org
[mailto:users-***@lists.opensips.org] Namens Alex Ionescu
Verzonden: dinsdag 16 maart 2010 16:19
Aan: OpenSIPS users mailling list
Onderwerp: Re: [OpenSIPS-Users] Problem with /tmp/opensips_fifo


Hi Erik,

I have fixed the "bug". If you want you can update your CP version and
everything will work fine.

Regards,
Alex
some variables are empty in the function write2fifo_new in module
--
Alex Ionescu
www.voice-system.ro


_______________________________________________
Users mailing list
***@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Loading...