XCAP-samples
Version 4 (Adrian Georgescu, 12/13/2012 09:26 am) → Version 5/7 (Adrian Georgescu, 12/13/2012 09:27 am)
h1. XCAP 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>
h2. RLS services
<pre>
<?xml version="1.0" ?>
<rls-services xmlns="urn:ietf:params:xml:ns:rls-services">
<service uri="sip%3Aag%2Bpresence%40test.sip2sip.info">
<resource-list>
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%22sipsimple_presence_rls%22%5D
</resource-list>
<packages>
<package>
presence
</package>
</packages>
</service>
<service uri="sip%3Aag%2Bdialog%40test.sip2sip.info">
<resource-list>
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%22sipsimple_dialog_rls%22%5D
</resource-list>
<packages>
<package>
dialog
</package>
</packages>
</service>
</rls-services>
</pre>
h2. Status icon
<pre>
<?xml version='1.0' encoding='UTF-8'?>
<content xmlns="urn:oma:xml:prs:pres-content"><mime-type>image/png</mime-type><encoding>base64</encoding><data>iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAIAAAD+EZyLAAAl10lEQVRoBVWb2Y8l133fa791116n
Z+lZOTMiOaQoSqIoyQYs2Q8K5E0ykCDIS/KYfyDIW/6GwO8BogCxFQRGNsVJ5NixY4EyKXPRUCJn
4Uz39PS+3L59t9qXfL6nekSlpud23apT5/yW72891fb3v/ul2q7s2rEsy+ZX7VQ2pzq3LMfc4otr
rlVcsbmh8QzQtbquzYke18M8pGfNcJ1Y3Kis86/Nrdq2eJyRzUK1FmIYY5jZcisIqLjY/GtuVVbt
W35plc1gLrIuj3DdtiFSRPOsjgqC9LuuK08cWO75DY12LKc0N/UBlZ/T5XBa85AebK7DKfzq4Dnb
hTixwrq63wzhvsi0HbNq7XBSlPO0iOdJmZVpnjPAC/xuN+z3Qt9zCrcUNfxAFoRpLn2prJLlEUsF
...
iSDi1AJEJkMAk8EagYW9Q/O3j+dwg0IpUK6BFweywGv/P8HB6Yn10+vLAAAAAElFTkSuQmCC
</data></content>
</pre>
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>
h2. RLS services
<pre>
<?xml version="1.0" ?>
<rls-services xmlns="urn:ietf:params:xml:ns:rls-services">
<service uri="sip%3Aag%2Bpresence%40test.sip2sip.info">
<resource-list>
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%22sipsimple_presence_rls%22%5D
</resource-list>
<packages>
<package>
presence
</package>
</packages>
</service>
<service uri="sip%3Aag%2Bdialog%40test.sip2sip.info">
<resource-list>
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%22sipsimple_dialog_rls%22%5D
</resource-list>
<packages>
<package>
dialog
</package>
</packages>
</service>
</rls-services>
</pre>
h2. Status icon
<pre>
<?xml version='1.0' encoding='UTF-8'?>
<content xmlns="urn:oma:xml:prs:pres-content"><mime-type>image/png</mime-type><encoding>base64</encoding><data>iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAIAAAD+EZyLAAAl10lEQVRoBVWb2Y8l133fa791116n
Z+lZOTMiOaQoSqIoyQYs2Q8K5E0ykCDIS/KYfyDIW/6GwO8BogCxFQRGNsVJ5NixY4EyKXPRUCJn
4Uz39PS+3L59t9qXfL6nekSlpud23apT5/yW72891fb3v/ul2q7s2rEsy+ZX7VQ2pzq3LMfc4otr
rlVcsbmh8QzQtbquzYke18M8pGfNcJ1Y3Kis86/Nrdq2eJyRzUK1FmIYY5jZcisIqLjY/GtuVVbt
W35plc1gLrIuj3DdtiFSRPOsjgqC9LuuK08cWO75DY12LKc0N/UBlZ/T5XBa85AebK7DKfzq4Dnb
hTixwrq63wzhvsi0HbNq7XBSlPO0iOdJmZVpnjPAC/xuN+z3Qt9zCrcUNfxAFoRpLn2prJLlEUsF
...
iSDi1AJEJkMAk8EagYW9Q/O3j+dwg0IpUK6BFweywGv/P8HB6Yn10+vLAAAAAElFTkSuQmCC
</data></content>
</pre>