XCAP-samples » History » Revision 6
Revision 5 (Adrian Georgescu, 12/13/2012 09:27 AM) → Revision 6/7 (Adrian Georgescu, 12/13/2012 09:31 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. Resource lists <pre> <?xml version="1.0" ?> <rl:resource-lists xmlns:addressbook="urn:ag-projects:xml:ns:addressbook" xmlns:blink="urn:ag-projects:blink:xml:ns:addressbook" xmlns:rl="urn:ietf:params:xml:ns:resource-lists"> <rl:list name="oma_buddylist"/> <rl:list name="oma_grantedcontacts"> <rl:entry uri="saghul%40gmail.com"/> </rl:list> <rl:list name="oma_blockedcontacts"> <rl:entry uri="saghul2%40test.sip2sip.info"/> </rl:list> <rl:list name="oma_allcontacts"> <rl:external anchor="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_buddylist%22%5D"/> <rl:external anchor="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"/> <rl:external anchor="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"/> </rl:list> <rl:list name="sipsimple_presence_rls"> <rl:entry uri="saghul%40test.sip2sip.info"/> </rl:list> <rl:list name="sipsimple_addressbook"> <addressbook:contact id="id1341072133147342303365"> <addressbook:name> Saul Ibarra </addressbook:name> <addressbook:uris> <addressbook:uri id="id1343985390914325976718" type="SIP" uri="saul%40ag-projects.com"> <blink:attributes/> </addressbook:uri> <addressbook:uri id="id1343985390914934732740" type="XMPP" uri="saghul%40jit.si"> <blink:attributes/> </addressbook:uri> <addressbook:uri id="id1343985390915549658015" type="XMPP" uri="saghul%40gmail.com"> <blink:attributes/> </addressbook:uri> <addressbook:uri id="id1346858434767006537914" type="SIP" uri="saghul%40sip2sip.info"> <blink:attributes/> </addressbook:uri> <addressbook:uri id="id1352399317853493372140" type="SIP" uri="saghul%40test.sip2sip.info"> <blink:attributes/> </addressbook:uri> <addressbook:uri id="id1354399366159710946049" type="SIP" uri="31208005163%40ag-projects.com"> <blink:attributes/> </addressbook:uri> </addressbook:uris> <addressbook:dialog> <addressbook:policy> block </addressbook:policy> <addressbook:subscribe> false </addressbook:subscribe> </addressbook:dialog> <addressbook:presence> <addressbook:policy> allow </addressbook:policy> <addressbook:subscribe> true </addressbook:subscribe> </addressbook:presence> <blink:attributes> <blink:attribute name="default_uri" nil="true"/> <blink:attribute name="auto_answer"> False </blink:attribute> <blink:attribute name="preferred_media"> chat </blink:attribute> <blink:attribute name="icon" nil="true"/> </blink:attributes> </addressbook:contact> </rl:list> </rl:resource-lists> </pre>