[OpenSIPS-Devel] OpenXCAP refreshWatchers error

Andrew Pogrebennyk andrew.pogrebennyk at portaone.com
Wed Sep 24 08:08:24 CEST 2008


Hi Anca,
I know how to do mysql logging, but i was not allowed to restart MySQL
on this server:) so it took me a bit of creativity and reading this:
http://www.mysqlperformanceblog.com/2007/09/13/enablingdisabling-query-log-without-server-restart-in-mysql-50/

These are the queries that are executed when I change the presence rules:
SELECT password
                    FROM subscriber
                    WHERE username = '000100'
                    AND domain = 'ejawal.com'
commit
SELECT etag FROM xcap
                    WHERE username = '000100' AND domain = 'ejawal.com'
                    AND doc_type= 2 AND doc_uri='index.xml'
UPDATE xcap
                        SET doc = '<?xml version=\"1.0\" 
encoding=\"UTF-8\"?>\r\n<ruleset 
xmlns=\"urn:ietf:params:xml:ns:common-policy\" 
xmlns:pr=\"urn:ietf:params:xml:ns:pres-rules\" 
xmlns:cp=\"www.counterpath.com/privacy-lists\">\r\n<rule 
id=\"whitelist\">\r\n<conditions>\r\n</conditions>\r\n<actions>\r\n<pr:sub-handling>allow</pr:sub-handling>\r\n</actions>\r\n<transformations>\r\n<pr:provide-services>\r\n<pr:all-services/>\r\n</pr:provide-services>\r\n<pr:provide-persons>\r\n<pr:all-persons/>\r\n</pr:provide-persons>\r\n<pr:provide-devices>\r\n<pr:all-devices/>\r\n</pr:provide-devices>\r\n<pr:provide-all-attributes/>\r\n</transformations>\r\n</rule>\r\n<rule 
id=\"blacklist\">\r\n<conditions>\r\n<identity>\r\n<id 
entity=\"sip:000101 at ejawal.com\"/>\r\n</identity>\r\n</conditions>\r\n<actions>\r\n<pr:sub-handling>block</pr:sub-handling>\r\n</actions>\r\n<transformations/>\r\n</rule>\r\n<cp:privacy-lists>\r\n<cp:list 
name=\"whitelist_uri_ph
commit

The document appears truncated while I see that eyeBeam sends correct
document on the wire. This could be a bug in the query sniffer, but in 
the opensips log it's also truncated so it could have happened somewhere 
in db_mysql. I have attached the log. Parameters were:
modparam("presence_xml", "force_active", 0)
modparam("presence_xml", "xcap_table", "xcap")
modparam("presence_xml", "pidf_manipulation", 1)
modparam("presence_xml", "integrated_xcap_server", 1)

Thanks for looking.

Anca Vamanu wrote:
> Hi,
> 
> If you plan on using an Xcap server, then you definitely don't need to 
> set the force_active parameter. This is used when you don't use an xcap 
> server and want all the watchers to be allowed to see the presence state 
> of a presentity.
> Anyhow, this is not the cause of what you are seeing, the document being 
> in the table, but the module not being able to fetch it. Can you please 
> catch the sql command to check if it is looking for the correct user? ( 
> if you have mysql logging enable and you use debian you will find it in 
> /var/log/mysql/mysql.log).
> 
> Anca

-- 
Sincerely,
Andrew Pogrebennyk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: opensips.log.gz
Type: application/x-gzip
Size: 1186 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/devel/attachments/20080924/850085d8/attachment.bin 


More information about the Devel mailing list