XCAP-samples

Version 2 (Adrian Georgescu, 12/13/2012 09:24 am) → Version 3/7 (Adrian Georgescu, 12/13/2012 09:25 am)

h1. XCAP document samples

h2. Presence rules

<pre>
<?xml version="1.0" ?>
<cp:ruleset xmlns:cp="urn:ietf:params:xml:ns:common-policy" xmlns:ocp="urn:oma:xml:xdm:common-policy" xmlns:pr="urn:ietf:params:xml:ns:pres-rules">
<cp:rule id="wp_prs_grantedcontacts">
<cp:conditions>
<ocp:external-list>
<ocp:entry anc="https%3A//xcap.test.sipthor.net/xcap-root/resource-lists/users/sip%3Aag%40test.sip2sip.info/index/%7E%7E/resource-lists/list%5B%40name%3D%22oma_grantedcontacts%22%5D"/>
</ocp:external-list>
</cp:conditions>
<cp:actions>
<pr:sub-handling>
allow
</pr:sub-handling>
</cp:actions>
</cp:rule>
<cp:rule id="wp_prs_blockedcontacts">
<cp:conditions>
<ocp:external-list>
<ocp:entry anc="https%3A//xcap.test.sipthor.net/xcap-root/resource-lists/users/sip%3Aag%40test.sip2sip.info/index/%7E%7E/resource-lists/list%5B%40name%3D%22oma_blockedcontacts%22%5D"/>
</ocp:external-list>
</cp:conditions>
<cp:actions>
<pr:sub-handling>
polite-block
</pr:sub-handling>
</cp:actions>
</cp:rule>
<cp:rule id="wp_prs_unlisted">
<cp:conditions>
<ocp:other-identity/>
</cp:conditions>
<cp:actions>
<pr:sub-handling>
confirm
</pr:sub-handling>
</cp:actions>
</cp:rule>
<cp:rule id="wp_prs_block_anonymous">
<cp:conditions>
<ocp:anonymous-request/>
</cp:conditions>
<cp:actions>
<pr:sub-handling>
block
</pr:sub-handling>
</cp:actions>
</cp:rule>
<cp:rule id="wp_prs_allow_own">
<cp:conditions>
<cp:identity>
<cp:one id="sip%3Aag%40test.sip2sip.info"/>
</cp:identity>
</cp:conditions>
<cp:actions>
<pr:sub-handling>
allow
</pr:sub-handling>
</cp:actions>
</cp:rule>
</cp:ruleset>
</pre>