ERROR:presence:mi_refreshWatchers: no rules doc found for the user

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ERROR:presence:mi_refreshWatchers: no rules doc found for the user

Gustavo Santana Robledo

Hi there,

I'm encountering this error, when I import a presence rule for a particular user.

This is the scenario:


Presence rules for user pepe:

<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns="urn:ietf:params:xml:ns:common-policy" xmlns:pr="urn:ietf:params:xml:ns:pres-rules">
        <rule id="blacklist">
                <conditions>
                        <identity>
                                <one id = "sip:[hidden email]"/>
                        </identity>
                </conditions>
                <actions>
                        <pr:sub-handling>block</pr:sub-handling>
                </actions>
                <transformations/>
        </rule>
</ruleset>


I can see that the xcap entry gets written to the DB, however, the rule doesn´t take effect. Checking the logs, I can see that opensips is complaining that I can´t find the rules doc (see below)

Any clues?

Ta


Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: DBG:presence:mi_refreshWatchers: start
Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: DBG:presence:mi_refreshWatchers: event 'presence'
Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: DBG:presence:search_event: start event= [presence]
Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: ERROR:presence:mi_refreshWatchers: no rules doc found for the user
Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: ERROR:mi_xmlrpc:default_method: command (refreshWatchers) processing failed.


Gustavo Santana Robledo
Departamento de I+D
Homeland Security
FEDETEC - Efectivos de Técnicas S.A.
Autovía de Andalucía Km 12,700
Polígono Industrial Los Ángeles
28906 - Getafe - Madrid
España
Tel + 34 91 453 24 00 - ext: 4137
Fax + 34 91 724 30 14
e-mail:
gsantana@...


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR:presence:mi_refreshWatchers: no rules doc found for the user

Gustavo Santana Robledo

Hi there,

I found what the problem was.

I did the following changes in my config file:

Remove the following line (this allows the get_rules_doc in xcap_auth.c to resume executing and fetch the document) :

modparam("presence_xml", "force_active", 0)

Add the following line (this tells the presence server to look for the xcap docs in the database)

modparam("presence_xml", "integrated_xcap_server", 1)


I hope this helps

Best Regards

Gus




From: Gustavo Santana Robledo/Fedetec
To: [hidden email]
Date: 17/03/2009 15:06
Subject: ERROR:presence:mi_refreshWatchers: no rules doc found for the user




Hi there,

I'm encountering this error, when I import a presence rule for a particular user.

This is the scenario:


Presence rules for user pepe:

<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns="urn:ietf:params:xml:ns:common-policy" xmlns:pr="urn:ietf:params:xml:ns:pres-rules">
        <rule id="blacklist">
                <conditions>
                        <identity>
                                <one id = "sip:[hidden email]"/>
                        </identity>
                </conditions>
                <actions>
                        <pr:sub-handling>block</pr:sub-handling>
                </actions>
                <transformations/>
        </rule>
</ruleset>


I can see that the xcap entry gets written to the DB, however, the rule doesn´t take effect. Checking the logs, I can see that opensips is complaining that I can´t find the rules doc (see below)

Any clues?

Ta


Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: DBG:presence:mi_refreshWatchers: start
Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: DBG:presence:mi_refreshWatchers: event 'presence'
Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: DBG:presence:search_event: start event= [presence]
Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: ERROR:presence:mi_refreshWatchers: no rules doc found for the user
Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]: ERROR:mi_xmlrpc:default_method: command (refreshWatchers) processing failed.


Gustavo Santana Robledo
Departamento de I+D
Homeland Security
FEDETEC - Efectivos de Técnicas S.A.
Autovía de Andalucía Km 12,700
Polígono Industrial Los Ángeles
28906 - Getafe - Madrid
España
Tel + 34 91 453 24 00 - ext: 4137
Fax + 34 91 724 30 14
e-mail:
gsantana@...




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR:presence:mi_refreshWatchers: no rules doc found for the user

Anca Vamanu-2
In reply to this post by Gustavo Santana Robledo
Hi Gustavo,

I need some more info.
1. What version are you using? 1.5 ?
2. Have you set integrated_xcap_server parameter?
3. Do a select in database : select doc from xcap where user="your-user"
and domain="your-domain" and doc_type=2; and print here the result.

regards,
Anca

Gustavo Santana Robledo wrote:

>
> Hi there,
>
> I'm encountering this error, when I import a presence rule for a
> particular user.
>
> This is the scenario:
>
>
> Presence rules for user pepe:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ruleset xmlns="urn:ietf:params:xml:ns:common-policy"
> xmlns:pr="urn:ietf:params:xml:ns:pres-rules">
>         <rule id="blacklist">
>                 <conditions>
>                         <identity>
>                                 <one id = "sip:[hidden email]"/>
>                         </identity>
>                 </conditions>
>                 <actions>
>                         <pr:sub-handling>block</pr:sub-handling>
>                 </actions>
>                 <transformations/>
>         </rule>
> </ruleset>
>
>
> I can see that the xcap entry gets written to the DB, however, the
> rule doesn´t take effect. Checking the logs, I can see that opensips
> is complaining that I can´t find the rules doc (see below)
>
> Any clues?
>
> Ta
>
>
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> DBG:presence:mi_refreshWatchers: start
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> DBG:presence:mi_refreshWatchers: event 'presence'
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> DBG:presence:search_event: start event= [presence]
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> ERROR:presence:mi_refreshWatchers: no rules doc found for the user
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> ERROR:mi_xmlrpc:default_method: command (refreshWatchers) processing
> failed.
>
>
>
>
> *Gustavo Santana Robledo
> Departamento de I+D *
> Homeland Security
> FEDETEC - Efectivos de Técnicas S.A.
> Autovía de Andalucía Km 12,700
> Polígono Industrial Los Ángeles
> 28906 - Getafe - Madrid
> España
> Tel + 34 91 453 24 00 - ext: 4137
> Fax + 34 91 724 30 14
> e-mail: _gsantana@fedetec.es_ <mailto:[hidden email]>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR:presence:mi_refreshWatchers: no rules doc found for the user

Anca Vamanu-2
In reply to this post by Gustavo Santana Robledo
Hi,

Glad you figured it out.
I saw this e-mail after I sent out the other reply :).

Indeed you are right with your observations.
There is this line in the code at the beginning of get_rules_doc
function called by MI command refreshWatcher:
    if(force_active)
        return 0;

So if you don't set force_active parameter to 0 nothing will happen, and
this is right since if you have force_active=1 it means that you don't
care about presence rules documents and consider all subscriptions allowed.

regards,
Anca


Gustavo Santana Robledo wrote:

>
> Hi there,
>
> I found what the problem was.
>
> I did the following changes in my config file:
>
> Remove the following line (this allows the get_rules_doc in
> xcap_auth.c to resume executing and fetch the document) :
>
> modparam("presence_xml", "force_active", 0)
>
> Add the following line (this tells the presence server to look for the
> xcap docs in the database)
>
> modparam("presence_xml", "integrated_xcap_server", 1)
>
>
> I hope this helps
>
> Best Regards
>
> Gus
>
>
>
>
>
>
>
>
>
>
> From: Gustavo Santana Robledo/Fedetec
> To: [hidden email]
> Date: 17/03/2009 15:06
> Subject: ERROR:presence:mi_refreshWatchers: no rules doc found for
> the user
>
>
> ------------------------------------------------------------------------
>
>
> Hi there,
>
> I'm encountering this error, when I import a presence rule for a
> particular user.
>
> This is the scenario:
>
>
> Presence rules for user pepe:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ruleset xmlns="urn:ietf:params:xml:ns:common-policy"
> xmlns:pr="urn:ietf:params:xml:ns:pres-rules">
>         <rule id="blacklist">
>                 <conditions>
>                         <identity>
>                                 <one id = "sip:[hidden email]"/>
>                         </identity>
>                 </conditions>
>                 <actions>
>                         <pr:sub-handling>block</pr:sub-handling>
>                 </actions>
>                 <transformations/>
>         </rule>
> </ruleset>
>
>
> I can see that the xcap entry gets written to the DB, however, the
> rule doesn´t take effect. Checking the logs, I can see that opensips
> is complaining that I can´t find the rules doc (see below)
>
> Any clues?
>
> Ta
>
>
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> DBG:presence:mi_refreshWatchers: start
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> DBG:presence:mi_refreshWatchers: event 'presence'
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> DBG:presence:search_event: start event= [presence]
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> ERROR:presence:mi_refreshWatchers: no rules doc found for the user
> Mar 17 14:58:33 linux1 /usr/sbin/opensips[30181]:
> ERROR:mi_xmlrpc:default_method: command (refreshWatchers) processing
> failed.
>
>
>
>
> *Gustavo Santana Robledo
> Departamento de I+D *
> Homeland Security
> FEDETEC - Efectivos de Técnicas S.A.
> Autovía de Andalucía Km 12,700
> Polígono Industrial Los Ángeles
> 28906 - Getafe - Madrid
> España
> Tel + 34 91 453 24 00 - ext: 4137
> Fax + 34 91 724 30 14
> e-mail: _gsantana@fedetec.es_ <mailto:[hidden email]>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users