Hi, you can look into presence handbook (http://ftp.iptel.org/pub/ser/presence/presence-handbook/ar01s02.html#xcap.ex...) - there are some simple scripts for storing data onto XCAP server. You can delete data on the server using DELETE HTTP method and retrieve them via GET method (with whatever web browser). I'm attaching script samples of fetching a part of a document and deleting a document.
Vaclav
On Wed, Nov 15, 2006 at 05:25:30PM +0530, VinayG wrote:
hai,
We are trying to setup xcap server (http://download.dns-hosting.info/XCAP/) with no presence functionality. we would like to use this server to store, retrieve, modify the contact/group list documents at the server.
We have followed the instructions given for installation in the site( http://download.dns-hosting.info/XCAP/).
Installation instructions
Setup php (Skipped this part as we are not using any authentication and also commented authentication check code in index.php(given below) file of xcap-server)
Setup Apache web server(no ssl support) Create a virtual host for Apache server as follows: <VirtualHost 192.168.3.209:80> ServerName 192.168.3.209 DocumentRoot /var/www/xcap-root RewriteEngine On RewriteRule /xcap-root/(.*) /xcap-root/index.php ProxyVia On # SSLEngine On # SSLCertificateFile /path/to/server.crt # SSLCertificateKeyFile /path/to//server.key # SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>
Enable php as scripting language and add index.php to the list of index files. LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
<IfModule mod_dir.c> DirectoryIndex index.php </IfModule>
Make sure the user under which the Apache server runs has the rights to write into the root directory of the virtual host: chmod -R g+w /var/www/xcap-root chown -R apache /var/www/xcap-root
Setup SIP User Agent (Skipped this part, as we are facing problems in setup of ser as presence agent)
Setup XCAP server Create a file index.php under the xcap-root directory and change the database connection details to the place where SER subscriber table is located and add the IP addresses of the SER PA server in the trusted list:
<? include("xcap-lib.php"); $XCAPServer = new XCAPServer(); $XCAPServer->AuthOptions = array( 'dsn' => "mysql://ser:passwd@db/ser", 'table' => "subscriber", 'usernamecol' => "username", 'passwordcol' => "password", 'cryptType' => "none", ); $XCAPServer->trustedPeers = array('21.23.228.49','21.23.228.46'); #if ($XCAPServer->authenticate() && $XCAPServer->authorize()) { if ($_SERVER['REQUEST_METHOD'] == "GET") { $XCAPServer->getFile(); } else if ($_SERVER['REQUEST_METHOD'] == "PUT") { $XCAPServer->putFile(); } else if ($_SERVER['REQUEST_METHOD'] == "DELETE") { $XCAPServer->deleteFile(); } #} ?>
In effect, we are configuring apache server to work as xcap server.
How to ADD/RETRIEVE a contact list file to/from the XCAP server?
Any help is greatly appreciated.
Thanks Vinay G
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers