Hi Anca, Thank you very much for your reply. I took the latest xcap_client source from the trunk, copied the source code in to my 1.5.1 workspace and could see that the etag issue had been solved.
Now I discovered the following mysql problem: DBG:xcap_client:send_http_get: path = [buratino.local/pres-rules/users/sip:[email protected]/index] DBG:xcap_client:send_http_get: send_http_get return code 200. Content length=433 ERROR:db_mysql:db_mysql_val2str: destination buffer too short ERROR:core:db_print_values: Error while converting value to string ERROR:xcap_client:xcapGetNewDoc: in sql insert ERROR:presence_xml:http_get_rules_doc: while fetching data from xcap server This happens apparently when the document is about to be stored in the db - something wrong happens to the field buffer. I will check exactly what field it is. I think, something is wrong with the document blob. I will keep you updated. Best regards, Genady -----Original Message----- From: Anca Vamanu [mailto:[email protected]] Sent: Mittwoch, 13. Mai 2009 10:47 To: Belenky, Genady (HP Software and Solutions) Cc: [email protected] Subject: Re: [OpenSIPS-Devel] Presence and non integrated xcap server. Did somebody managed to get it working? HI Genady, You followed exactly my course of investigation. I also added an error buffer and discovered that there was an error when getting the etag. I already fixed that in xcap_client module. You can stick with 1.5.x branch, but please take xcap_client module from svn branch of 1.5. It already contains the necessary fixes. | |# svn co https://opensips.svn.sourceforge.net/svnroot/opensips/branches/1.5 opensips_1_5 Regards, Anca | | Belenky, Genady (HP Software and Solutions) wrote: > Hi Anca, > > I will try to get eyebeam or bria licences for the proper testing. Thanks for > the recommendation! > Meanwhile I just created all the necessary presence rules by myself and > inserted them into OpenXCAP by using xcapclient (simulating the missing > functionality in X-Lite). > > I keep my "xcap" database tables in two different schemas - one in "opensips" > and another one in "openxcap". This way I can be very close to the > non-integrated XCAP server. > > And I discovered the reason for the "Error [22] while performing curl > operation" - this was because the value "localhost" in the openXCAP > "trusted_peers" parameter was not correctly resolved. > This caused an authorization failure in openXCAP - I also checked the > openXCAP logs and they confirmed that. > > After I replaced its value by 127.0.0.1, I did not get this error anymore, > but I discovered another problem in the xcap_client module - "Error [23] > while performing curl operation". According to the libcurl documentation it > means "An error occurred when writing received data to a local file, or an > error was returned to libcurl from a write callback." > > I added some debug output in xcap_functions.c, added a new errbuff variable > and could see the libcurl error message in send_http_get: "Failed writing > header". > After that I'm concentrated on finding the error in get_xcap_etag - it seems > that the body inside of "if(strncasecmp(ptr, ETAG_HDR, ETAG_HDR_LEN)== 0)" is > not being executed. > My debug output shows that ETAG_HDR has the value "Etag:", ETAG_HDR_LEN is > set to "6" and ptr is "HTTP/1.1 200 OK" > > Can it be the reason? I will still stay with 1.5.1 since I believe, I have a > problem in the xcap_client and not in presence_xml. > > Many thanks for your help, I will keep you informed. > > Best regards, > Genady > > -----Original Message----- > From: Anca Vamanu [mailto:[email protected]] > Sent: Montag, 11. Mai 2009 19:11 > To: Belenky, Genady (HP Software and Solutions) > Cc: [email protected] > Subject: Re: [OpenSIPS-Devel] Presence and non integrated xcap server. Did > somebody managed to get it working? > > Hi Genady, > > First of all, you say that you are using X-lite for testing, but X-lite > does not have an XCAP storage support. You should upgrade to eyebeam or > bria for this. > > However, since the non integrated xcap part has not been much tested > lately, after reading your e-mail I decided to test it a bit. And I > discovered some problems. The ones from Counterpath seem to have changed > some things in the XCAP URL format (I think that they are following OMA > standards instead of IETF). > > To make it possible for OpenSIPS to use the same URL format I added two > new parameters in presence_xml module. Here is how you should set them > to have your platform working with eyebeam phones: > > modparam("presence_xml", "pres_rules_auid", > "org.openmobilealliance.pres-rules") > modparam("presence_xml", "pres_rules_filename", "pres-rules") > > Also I would mention that if you want a change in the xcap document to > be effective more rapidly, you should change the 'query_period' > parameter in 'xcap_client' module to a smaller value. > > I can not back port all the changes in 1.5.x branch since I changed the > module interface for an enhancement. Therefore I would suggest you to > upgrade to the svn trunk version at least only for the presence_xml module. > > I have another observation for your configuration: If you want to test > the non integrated xcap behaviour, be careful not to configure openxcap > and opensips to use the same database table for storing xcap documents ( > I think that this is exactly the case for your configuration). > > Please update and test again and if you have some other problems I will > look into them. > > regards, > Anca > > > genabel wrote: > >> Hi, >> >> I'm trying to get the presence server (opensips 1.5.1) working together with >> a non integrated xcap server. Currently I'm using openxcap for the demo >> solution, but later I will use a commecial xcap server. In the demo solution >> scenario openxcap has it's own database schema and tables and clearly >> separated from the opensips data. >> >> The first use case is presence authorization rules related. Getting a >> watcher-info notification, the presence server should issue an xcap request >> towards the xcap server and use the information for the authorization >> decision. I created the corresponding document in openxcap and tested it >> with xcapclient. >> >> To make the life easier (tracing), I decided to use HTTP instead of HTTPS in >> openxcap. >> >> As a client I'm using X-Lite. Both servers - opensips presence and openxcap >> are running on the same virtual machine (Ubuntu). >> >> I have the following setting in my opensips.cfg : >> >> modparam("presence|presence_xml", "db_url", >> "mysql://user:passw...@localhost/opensips") >> modparam("presence_xml", "force_active", 0) >> modparam("presence_xml", "pidf_manipulation", 1) >> modparam("presence_xml", "integrated_xcap_server", 0) >> modparam("presence_xml", "xcap_server", "myserver.local:8081") >> modparam("presence", "server_address", "sip:XXX.XXX.XXX.XXX:5060") >> modparam("presence", "fallback2db", 1) >> >> My openxcap is configured like that : >> >> [Server] >> address = 0.0.0.0 >> port = 8081 >> root = http://myserver.local >> backend = Database >> document_validation = Yes >> >> >> [Logging] >> >> [Authentication] >> type = basic >> cleartext_passwords = Yes >> default_realm = myserver.local >> trusted_peers = XXX.XXX.XXX.XXX >> >> [TLS] >> certificate = tls/server.crt >> private_key = tls/server.key >> >> [Database] >> authentication_db_uri = mysql://openxcap:openx...@localhost/openxcap >> storage_db_uri = mysql://openxcap:openx...@localhost/openxcap >> subscriber_table = subscriber >> xcap_table = xcap >> >> In this configuration I'm getting "ERROR:xcap_client:send_http_get: Error >> [22] while performing curl operation" as far as the presence server is >> trying to send an xcap request to openxcap. >> >> I also noticed that even I configured my presence server as a trusted peer >> in the openxcap config file, I need to provide the user credentials in case >> I want to access this URL in firefox or curl. >> >> Can it be the reason fot the error - missing xcap credentials configuration >> or maybe I should use https? >> And what is this curl related error message? >> >> I'm wondering if someone got a similar environment runnig. Any debugging >> hints will be appreciated. >> >> Hope you can help me, >> Best regards, >> Genady >> >> >> > > _______________________________________________ Devel mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
