Resources -> Documentation -> Presence -> Presence Server -> Xcap_client moduleExported Parameters
Developer's GuideThis module represents an XCAP client interface for OpenSIPS with retrieving capabilities only. It is meant to be used by other OpenSIPS modules that use XCAP storage. Now this module is used by presence_xml and rls modules. Presence_xml and xcap_client interaction(when integrated_xcap_client parameter is not set) The API contains the following functions:
typedef char* (*xcap_get_elem_t)(xcap_get_req_t req, char** etag);
This function retrieves an element from the excap server( either a hole document or a node from the document.
typedef char* (*xcapGetNewDoc_t)(xcap_get_req_t req, str user, str domain);
This function is a request to fetch the document indicated in the request strucuture and handle its update. Calling this function will ensures that in the database table will always be the updated version of the document.
The argument of the two functions is a structure containing the request. It has the following fields:
The xcap_doc_sel_t has the following structure:
Example: For selecting a presence authorization rules document the strucuture is filed like this: xcap_doc_sel_t doc_sel;
doc_sel.auid.s= "presence-rules";
doc_sel.auid.len= strlen("presence-rules");
doc_sel.doc_type= PRES_RULES;
doc_sel.type= USERS_TYPE;
doc_sel.xid= uri;
doc_sel.filename.s= "index";
doc_sel.filename.len= 5;
The xcap_node_sel_t structure that identifies a node from a document can be constructed using functions from the API:
typedef xcap_node_sel_t* (*xcap_nodeSel_init_t )(void);
typedef xcap_node_sel_t* (*xcap_nodeSel_add_step_t)(xcap_node_sel_t* curr_sel, str* name, str* namespace, int pos, attr_test_t* attr_test, str* extra_sel);
The attr_test in the parameters list is to be used in case an attribute test should be made to select the node. The definition of the structure is:
typedef struct att_test
{
str name;
str value;
}attr_test_t;
typedef xcap_node_sel_t* (*xcap_nodeSel_add_terminal_t)(xcap_node_sel_t* curr_sel, char* attr_sel, char* namespace_sel, char* extra_sel );
typedef void (*xcap_nodeSel_free_t)(xcap_node_sel_t* node);
There is also one function which allows registering a callback to be called by the module when a change occurs in a document:
Module ReadmeYou can read the modules's readme here . | News OpenSIPS 1.6.211th of March 2010
OpenSIPS 1.6.2 is brings new features... OpenSIPS Control Panel 4.008th of March 2010
OpenSIPS CP 4.0 comes with user provisioning... Conference on "OpenSIPS 2.0"5th of March 2010
VoIP Users Conference will host an audio conference OpenSIPS webinar25th of February 2010
Next webinars is Explaining the default script OpenSIPS 2.0 Design15th of February 2010
Design of OpenSIPS 2.0 is unveiled OpenSIPS webinar28th of January 2010
Next OpenSIPS webinars is SIP Introduction Building Telephony Systems with OpenSIPS 1.621st of January 2010
New edition is available... OpenSIPS 1.6.1 is released21st of December 2009
OpenSIPS 1.6.1 minor release is out... OpenSIPS Development Course17th of December 2009
OpenSIPS Devel Course for 2010... OpenSIPS Bootcamps 201009th of December 2009
2010 Schedule for Bootcamp events... User Location is faster13th of November 2009
USRLOC is 3 time faster than before... OpenSIPS Control Panel 3.030th of October 2009
OpenSIPS CP 3.0 major release is out... OpenSIPS 1.6.0 is released16th of October 2009
OpenSIPS 1.6.0 major release is out... OpenSIPS VoIP Service21th of September 2009
OpenSIPS project offers free VoIP services... OpenSIPS & Astricon21th of September 2009
OpenSIPS talks and exhibits at Astricon 2009... SVN freeze17th of September 2009
SVN trunk gets frozen to prepare 1.6 release... New types of script routes10th of September 2009
New additions to configuration file routes... STUN server7th of September 2009
OpenSIPS has now a built-in STUN server... Pseudovariable implementation extended3rd of September 2009
Added new operations for pvars to give more power to the script writer... OpenSIPS Asterisk Integration30th of August 2009
Tutorial for realtime integration... OpenSIPS 1.5.3 is released27th of August 2009
OpenSIPS 1.5.3 minor release is out... AAA and RADIUS support18th of April 2009
New AAA API and RADIUS enhancements in OpenSIPS OpenSIPS webinar4th of April 2009
Next OpenSIPS webinars is Types of Routs in OpenSIPS B2BUA3rd of August 2009
A B2BUA signaling implementation in OpenSIPS DB virtual23th of July 2009
A DB conn mixer for failover, parallel and LB Codec manipulation23th of July 2009
SDP codecs and priorities manipulation Memcached interfacing16th of July 2009
memcached support for memory caching API OpenSIPS 1.5.2 is released15th of July 2009
OpenSIPS 1.5.2 minor release is out... OpenSIPS@ClueCon14th of July 2009
OpenSIPS talks at ClueCon OpenSIPS webinar30th of June 2009
Next OpenSIPS webinars is Routing in SIP REGISTRAR enhancements29th of June 2009
REGISTRAR module becomes more flexible OpenSIPS free webinars01st of June 2009
OpenSIPS webinars program was launched OpenSIPS-CP 2.0 is released13rd of April 2009
OpenSIPS Control Panel 2.0 major release is out... OpenSIPS 1.5.1 is released13rd of April 2009
OpenSIPS 1.5.1 minor release is out... OpenSIPS 1.5.0 is released23rd of March 2009
OpenSIPS 1.5.0 major release is out... OpenSIPS 1.4.5 is released23rd of March 2009
OpenSIPS 1.4.5 minor release is out... OpenSIPS as Load Balancer4th of March 2009 OpenSIPS at Amoocon (AsteriskTAG)24th of February 2009 |