[SR-Users] Error opening Kamailio's FIFO
Kurt Mullen
kmullen at practical-pc.com
Thu Dec 9 19:20:29 CET 2010
This issue has not been resolved. I am still getting the same error when
trying to use kamctl for anything.
I have tried all of the suggestions posted to date with no resolution. Is
there anything more I can provide to help resolve this problem?
Kurt
-----Original Message-----
From: sr-users-bounces at lists.sip-router.org
[mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of
sr-users-request at lists.sip-router.org
Sent: Monday, December 06, 2010 4:02 PM
To: sr-users at lists.sip-router.org
Subject: sr-users Digest, Vol 67, Issue 20
Send sr-users mailing list submissions to
sr-users at lists.sip-router.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
sr-users-request at lists.sip-router.org
You can reach the person managing the list at
sr-users-owner at lists.sip-router.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of sr-users digest..."
Today's Topics:
1. presence_xml and xpath (Andreas Granig)
2. Re: presence_xml and xpath (Daniel-Constantin Mierla)
3. Re: presence_xml and xpath (Andreas Granig)
4. Re: presence_xml and xpath (Daniel-Constantin Mierla)
5. Re: presence_xml and xpath (Andreas Granig)
6. Re: Error opening Kamailio's FIFO (Kurt Mullen)
----------------------------------------------------------------------
Message: 1
Date: Mon, 06 Dec 2010 15:13:06 +0100
From: Andreas Granig <agranig at sipwise.com>
Subject: [SR-Users] presence_xml and xpath
To: sr-users at lists.sip-router.org
Message-ID: <4CFCEF72.4040308 at sipwise.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I'm having troubles fetching an xpath from an xml document using
presence_xml, so I probably do something wrong (using kamailio 3.0.x):
$xml(x=>doc) = '<?xml version="1.0" encoding="utf-8"?><presence
xmlns="urn:ietf:params:xml:ns:pidf"
entity="sip:test at mydomain.com"><tuple
id="86ae65b7-42de-4399-b635-295caad13aac"><status><basic>none</basic></statu
s></tuple></presence>';
xlog("L_INFO", "all=$xml(x=>doc)\n");
-> prints the whole document, which is ok
xlog("L_INFO", "tmp1=$xml(x=>xpath:/)\n");
-> also prints the whole document (including the xml tag in the beginning,
not sure if this is ok)
xlog("L_INFO", "tmp2=$xml(x=>xpath:/presence)\n");
-> prints an empty string
How is this actually supposed to work? What I'd like to do in the end is
extracting for example the "none" from the "basic"-tag by specifying
"xpath:/presence/tuple/status/basic", which also returns an empty string
now, also when appended with "/text()".
Thanks a lot,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL:
<http://lists.sip-router.org/pipermail/sr-users/attachments/20101206/c6635f4
4/attachment-0001.pgp>
------------------------------
Message: 2
Date: Mon, 06 Dec 2010 16:11:44 +0100
From: Daniel-Constantin Mierla <miconda at gmail.com>
Subject: Re: [SR-Users] presence_xml and xpath
To: Andreas Granig <agranig at sipwise.com>
Cc: sr-users at lists.sip-router.org
Message-ID: <4CFCFD30.8000401 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hello,
On 12/6/10 3:13 PM, Andreas Granig wrote:
> Hi,
>
> I'm having troubles fetching an xpath from an xml document using
> presence_xml, so I probably do something wrong (using kamailio 3.0.x):
>
> $xml(x=>doc) = '<?xml version="1.0" encoding="utf-8"?><presence
> xmlns="urn:ietf:params:xml:ns:pidf"
> entity="sip:test at mydomain.com"><tuple
> id="86ae65b7-42de-4399-b635-295caad13aac"><status><basic>none</basic><
> /status></tuple></presence>';
>
> xlog("L_INFO", "all=$xml(x=>doc)\n");
>
> -> prints the whole document, which is ok
>
> xlog("L_INFO", "tmp1=$xml(x=>xpath:/)\n");
>
> -> also prints the whole document (including the xml tag in the
> beginning, not sure if this is ok)
>
> xlog("L_INFO", "tmp2=$xml(x=>xpath:/presence)\n");
>
> -> prints an empty string
>
> How is this actually supposed to work? What I'd like to do in the end
> is extracting for example the "none" from the "basic"-tag by
> specifying "xpath:/presence/tuple/status/basic", which also returns an
> empty string now, also when appended with "/text()".
the problem is in between IETF and XML guys :-)
xpath require to use a prefix for namespaces. The SIMPLE guys liked to set a
default one without prefix.
For this case, try:
modparam("presence_xml", "xml_ns", "pidf=urn:ietf:params:xml:ns:pidf")
then:
xlog("L_INFO",
"tmp2=$xml(x=>xpath:/pidf:presence/pidf:tuple/pidf:status/pidf:basic)\n");
- see which one is giving more convenient resultL with text() or no text()
There are some tricks I did for the xcap_server, because I think this is not
scaling. There I just changed 'xmlns=' in 'xmlnx=' or so, so there is no
namespace without prefix -- then your format for xpath works fine.
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com
------------------------------
Message: 3
Date: Mon, 06 Dec 2010 18:09:38 +0100
From: Andreas Granig <agranig at sipwise.com>
Subject: Re: [SR-Users] presence_xml and xpath
To: miconda at gmail.com
Cc: sr-users at lists.sip-router.org
Message-ID: <4CFD18D2.6010209 at sipwise.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Daniel,
>> How is this actually supposed to work? What I'd like to do in the end is
>> extracting for example the "none" from the "basic"-tag by specifying
>> "xpath:/presence/tuple/status/basic", which also returns an empty string
>> now, also when appended with "/text()".
> the problem is in between IETF and XML guys :-)
>
> xpath require to use a prefix for namespaces. The SIMPLE guys liked to
> set a default one without prefix.
>
> For this case, try:
>
> modparam("presence_xml", "xml_ns", "pidf=urn:ietf:params:xml:ns:pidf")
>
> then:
>
> xlog("L_INFO",
> "tmp2=$xml(x=>xpath:/pidf:presence/pidf:tuple/pidf:status/pidf:basic)\n");
Got it. But what if it gets a bit more difficult than that? :)
I've an xml document where the namespace for some elements changes, like
this:
<?xml version="1.0" encoding="utf-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:foo at mydomain.com">
<tuple id="86ae65b7-42de-4399-b635-295caad13aac">
<status>
<basic>none</basic>
<geopriv xmlns="urn:ietf:params:xml:ns:pidf:geopriv10">
<location-info>
<location xmlns="http://www.opengis.net/gml">
[snip]
As you can see, the "geopriv" element changes the namespace from "pidf"
to "pidf:geopriv10". Even giving the full namespace
(".../urn:ietf:params:xml:ns:pidf:geopriv10:geopriv") to capture the
"geopriv" element results in
ERROR: presence_xml [pv_xml.c:310]: unable to evaluate xpath expression
[/pidf:presence/pidf:tuple/pidf:status/urn:ietf:params:xml:ns:pidf:geopriv10
:geopriv/83]
Any ideas are highly appreciated :)
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL:
<http://lists.sip-router.org/pipermail/sr-users/attachments/20101206/14e2ae3
f/attachment-0001.pgp>
------------------------------
Message: 4
Date: Mon, 06 Dec 2010 19:17:16 +0100
From: Daniel-Constantin Mierla <miconda at gmail.com>
Subject: Re: [SR-Users] presence_xml and xpath
To: Andreas Granig <agranig at sipwise.com>
Cc: sr-users at lists.sip-router.org
Message-ID: <4CFD28AC.3020607 at gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hello,
On 12/6/10 6:09 PM, Andreas Granig wrote:
> Hi Daniel,
>
>>> How is this actually supposed to work? What I'd like to do in the end is
>>> extracting for example the "none" from the "basic"-tag by specifying
>>> "xpath:/presence/tuple/status/basic", which also returns an empty string
>>> now, also when appended with "/text()".
>> the problem is in between IETF and XML guys :-)
>>
>> xpath require to use a prefix for namespaces. The SIMPLE guys liked to
>> set a default one without prefix.
>>
>> For this case, try:
>>
>> modparam("presence_xml", "xml_ns", "pidf=urn:ietf:params:xml:ns:pidf")
>>
>> then:
>>
>> xlog("L_INFO",
>>
"tmp2=$xml(x=>xpath:/pidf:presence/pidf:tuple/pidf:status/pidf:basic)\n");
> Got it. But what if it gets a bit more difficult than that? :)
>
> I've an xml document where the namespace for some elements changes, like
> this:
>
> <?xml version="1.0" encoding="utf-8"?>
> <presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="sip:foo at mydomain.com">
> <tuple id="86ae65b7-42de-4399-b635-295caad13aac">
> <status>
> <basic>none</basic>
> <geopriv xmlns="urn:ietf:params:xml:ns:pidf:geopriv10">
> <location-info>
> <location xmlns="http://www.opengis.net/gml">
> [snip]
>
> As you can see, the "geopriv" element changes the namespace from "pidf"
> to "pidf:geopriv10". Even giving the full namespace
> (".../urn:ietf:params:xml:ns:pidf:geopriv10:geopriv") to capture the
> "geopriv" element results in
>
> ERROR: presence_xml [pv_xml.c:310]: unable to evaluate xpath expression
>
[/pidf:presence/pidf:tuple/pidf:status/urn:ietf:params:xml:ns:pidf:geopriv10
:geopriv/83]
>
> Any ideas are highly appreciated :)
you can define many xml_ns parameters, each with different prefix. I
guess the inner xmlns overwrites the other one in your sample xml
document, so you have to use different prefix for that nodes:
modparam("presence_xml", "xml_ns", "pidf=urn:ietf:params:xml:ns:pidf")
modparam("presence_xml", "xml_ns",
"geop=urn:ietf:params:xml:ns:pidf:geopriv10")
Try a path like:
/pidf:presence/pidf:tuple/pidf:status/geop:geopriv/...
Hope it works.
Daniel
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com
------------------------------
Message: 5
Date: Mon, 06 Dec 2010 19:41:49 +0100
From: Andreas Granig <agranig at sipwise.com>
Subject: Re: [SR-Users] presence_xml and xpath
To: Daniel-Constantin Mierla <miconda at gmail.com>
Cc: sr-users at lists.sip-router.org
Message-ID: <4CFD2E6D.1030007 at sipwise.com>
Content-Type: text/plain; charset="iso-8859-1"
On 12/06/2010 07:17 PM, Daniel-Constantin Mierla wrote:
> you can define many xml_ns parameters, each with different prefix. I
> guess the inner xmlns overwrites the other one in your sample xml
> document, so you have to use different prefix for that nodes:
>
> modparam("presence_xml", "xml_ns", "pidf=urn:ietf:params:xml:ns:pidf")
> modparam("presence_xml", "xml_ns",
> "geop=urn:ietf:params:xml:ns:pidf:geopriv10")
>
> Try a path like:
> /pidf:presence/pidf:tuple/pidf:status/geop:geopriv/...
Works like charm, thanks a lot :)
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL:
<http://lists.sip-router.org/pipermail/sr-users/attachments/20101206/8c447e8
b/attachment-0001.pgp>
------------------------------
Message: 6
Date: Mon, 6 Dec 2010 16:01:58 -0600
From: "Kurt Mullen" <kmullen at practical-pc.com>
Subject: Re: [SR-Users] Error opening Kamailio's FIFO
To: <sr-users at lists.sip-router.org>
Message-ID: <00d901cb9591$33dc1910$9b944b30$@practical-pc.com>
Content-Type: text/plain; charset="us-ascii"
> This should be a UNIX style path e.g. /tmp/kamailio.fifo The directory
where the fifo is must be writable by the kamailio user.
I thought the line modparam("mi_fifo", "fifo_mode",0666) set the
permissions on the folder/file.
Also, I tried changing the path to /tmp/kamailio.fifo that did not work
either
Please change as below:
> kamctlrc
> ## path to FIFO file
> OSER_FIFO="/tmp/kamailio_fifo"
kamailio.cfg
> # ----- mi_fifo params -----
>modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
I have also tried this. Here is what I am getting.
ERROR: Error opening Kamailio's FIFO /tmp/kamailio_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/tmp/kamailio_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
Interesting side note:
After the initial installation and reboot, Kamailio came up and was running
and kamctl moni displayed the correct results. However after running
"service kamailio restart" I began getting the error again and have not
been able to clear it.
-----Original Message-----
From: sr-users-bounces at lists.sip-router.org
[mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of
sr-users-request at lists.sip-router.org
Sent: Monday, December 06, 2010 3:37 AM
To: sr-users at lists.sip-router.org
Subject: sr-users Digest, Vol 67, Issue 17
Send sr-users mailing list submissions to
sr-users at lists.sip-router.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
sr-users-request at lists.sip-router.org
You can reach the person managing the list at
sr-users-owner at lists.sip-router.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of sr-users digest..."
Today's Topics:
1. Re: lcr in 3.1 - no reload without Siremis? (Anders)
2. Error opening Kamailio's FIFO (Kurt Mullen)
3. Re: lcr in 3.1 - no reload without Siremis? (Juha Heinanen)
4. Re: Error opening Kamailio's FIFO (marius zbihlei)
5. Re: Error opening Kamailio's FIFO (Huy Nguyen)
----------------------------------------------------------------------
Message: 1
Date: Sun, 5 Dec 2010 14:32:20 -0500
From: Anders <vaerge at gmail.com>
Subject: Re: [SR-Users] lcr in 3.1 - no reload without Siremis?
To: Juha Heinanen <jh at tutpro.com>
Cc: sr-users at lists.sip-router.org
Message-ID:
<AANLkTimfd8CdXENb+oX6n2YNx54ohbudz8jUraX=yVGy at mail.gmail.com>
Content-Type: text/plain; charset=windows-1252
For anyone else who might not be able to find the old `kamctl lcr`-commands,
the alternatives to some can be found here:
http://www.kamailio.org/docs/modules/3.1.x/modules/lcr.html#id2960364
Being able to reload the lcr didn't solve my problem though - still not
finding any gw when I run next_gw(), so I'm still open for input...
On Sat, Dec 4, 2010 at 6:08 PM, Juha Heinanen <jh at tutpro.com> wrote:
> Anders writes:
>
>> But I added it manually to the tables, so maybe I needed to load them
>> to memory ? but ?kamctl lcr reload? has been discontinued, so no
>> loading. Is Siremis necessary as the input tool for lcr and gws?
>
> anders,
>
> read what is new in 3.1 wiki page and lcr manual. ?also, ctl help
> knows about lcr ctl commands.
>
> -- juha
>
------------------------------
Message: 2
Date: Sun, 5 Dec 2010 17:40:26 -0600
From: "Kurt Mullen" <kmullen at practical-pc.com>
Subject: [SR-Users] Error opening Kamailio's FIFO
To: <users at lists.kamailio.org>
Message-ID: <005301cb94d5$cb5a2aa0$620e7fe0$@practical-pc.com>
Content-Type: text/plain; charset="us-ascii"
I am getting this error when I try to run kamctl:
ERROR: Error opening Kamailio's FIFO FIFO
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"FIFO")' in your config
ERROR: and also have loaded the mi_fifo module.
I am able to start Kamailio with Kamailio start
I have poured over all the responses on Google for two days trying to fix
this error. I have tried everything I know of.
I have tried each example.
kamctlrc
DB Path is correct:
# database path used by dbtext or db_berkeley
DB_PATH="/usr/share/kamailio/dbtext"
## control engine: FIFO or UNIXSOCK
## - default FIFO
CTLENGINE="FIFO"
## path to FIFO file
OSER_FIFO="FIFO" (I have already tried commenting this out)
kamailio.cfg
loadmodule "mi_fifo.so"
Path to modules is correct:
mpath="modules_k:modules"
#!else
mpath="/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/"
#!endif
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/kamailio.fifo")
modparam("mi_fifo", "fifo_mode",0666)
This is installed on Ubuntu Server 10.10 64 bit Intel .
Can someone please help?
Kurt A. Mullen
Practical PC, LLC
(O) 830.542.4102 x204
(F) 210.767.3912
------------------------------
Message: 4
Date: Mon, 6 Dec 2010 11:28:08 +0200
From: marius zbihlei <marius.zbihlei at 1and1.ro>
Subject: Re: [SR-Users] Error opening Kamailio's FIFO
To: <sr-users at lists.sip-router.org>
Message-ID: <4CFCACA8.4060701 at 1and1.ro>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
On 12/06/2010 01:40 AM, Kurt Mullen wrote:
Hello,
>
> I am getting this error when I try to run kamctl:
>
> ERROR: Error opening Kamailio's FIFO FIFO
>
> ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
> "FIFO")' in your config
>
> ERROR: and also have loaded the mi_fifo module.
>
> I am able to start Kamailio with Kamailio start
>
> I have poured over all the responses on Google for two days trying to
> fix this error. I have tried everything I know of.
>
> I have tried each example.
>
> kamctlrc
>
> DB Path is correct:
>
> # database path used by dbtext or db_berkeley
>
> DB_PATH="/usr/share/kamailio/dbtext"
>
> ## control engine: FIFO or UNIXSOCK
>
> ## - default FIFO
>
> CTLENGINE="FIFO"
>
> ## path to FIFO file
>
> OSER_FIFO="FIFO" (I have already tried commenting this out)
>
This should be a UNIX style path e.g. /tmp/kamailio.fifo The directory where
the fifo is must be writable by the kamailio user.
Marius
>
> kamailio.cfg
>
> loadmodule "mi_fifo.so"
>
> Path to modules is correct:
>
> mpath="modules_k:modules"
>
> #!else
>
> mpath="/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/"
>
> #!endif
>
> # ----- mi_fifo params -----
>
> modparam("mi_fifo", "fifo_name", "/tmp/kamailio.fifo")
>
> modparam("mi_fifo", "fifo_mode",0666)
>
> This is installed on Ubuntu Server 10.10 64 bit Intel .
>
> Can someone please help?
>
> *Kurt A. Mullen*
>
> Practical PC, LLC
>
> (O) 830.542.4102 x204
>
> (F) 210.767.3912
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.sip-router.org/pipermail/sr-users/attachments/20101206/94d2504
e/attachment-0001.htm>
------------------------------
Message: 5
Date: Mon, 6 Dec 2010 16:37:02 +0700
From: Huy Nguyen <huy_quocnguyen at live.com>
Subject: Re: [SR-Users] Error opening Kamailio's FIFO
To: <marius.zbihlei at 1and1.ro>, <sr-users at lists.sip-router.org>
Message-ID: <SNT143-w25D045EDFE876E65656E1B9E2B0 at phx.gbl>
Content-Type: text/plain; charset="windows-1258"
Hi,
Please change as below:
kamctlrc
## path to FIFO file
OSER_FIFO="/tmp/kamailio_fifo"
kamailio.cfg
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
Regards,
Huy Nguyen
www.htk-inc.com
Date: Mon, 6 Dec 2010 11:28:08 +0200
From: marius.zbihlei at 1and1.ro
To: sr-users at lists.sip-router.org
Subject: Re: [SR-Users] Error opening Kamailio's FIFO
On 12/06/2010 01:40 AM, Kurt Mullen wrote:
Hello,
I am getting this error when I try to run kamctl:
ERROR: Error opening Kamailio's FIFO FIFO
ERROR: Make sure you have the line
'modparam("mi_fifo", "fifo_name", "FIFO")' in your config
ERROR: and also have loaded the mi_fifo module.
I am able to start Kamailio with Kamailio start
I have poured over all the responses on Google for two days trying to fix
this error. I have tried everything I know of.
I have tried each example.
kamctlrc
DB Path is correct:
# database path used by dbtext or db_berkeley
DB_PATH="/usr/share/kamailio/dbtext"
## control engine: FIFO or UNIXSOCK
## - default FIFO
CTLENGINE="FIFO"
## path to FIFO file
OSER_FIFO="FIFO" (I have already tried commenting this out)
This should be a UNIX style path e.g. /tmp/kamailio.fifo The directory where
the fifo is must be writable by the kamailio user.
Marius
kamailio.cfg
loadmodule "mi_fifo.so"
Path to modules is correct:
mpath="modules_k:modules"
#!else
mpath="/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/"
#!endif
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name",
"/tmp/kamailio.fifo")
modparam("mi_fifo", "fifo_mode",0666)
This is installed on Ubuntu Server 10.10 64 bit Intel .
Can someone please help?
Kurt A. Mullen
Practical PC, LLC
(O) 830.542.4102 x204
(F) 210.767.3912
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.sip-router.org/pipermail/sr-users/attachments/20101206/23bf3fa
0/attachment.htm>
------------------------------
_______________________________________________
sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
End of sr-users Digest, Vol 67, Issue 17
****************************************
------------------------------
_______________________________________________
sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
End of sr-users Digest, Vol 67, Issue 20
****************************************
More information about the sr-users
mailing list