Page MenuHomePhabricator

XCAP samples
Updated 290 Days AgoPublic

Presence rules

<?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>

RLS services

<?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>

Status icon

<?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>

Resource lists

<?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>

PIDF

Content-Type: application/pidf+xml

<?xml version="1.0"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:ag@test.sip2sip.info">
  <tuple xmlns="urn:ietf:params:xml:ns:pidf" xmlns:agp-pidf="urn:ag-projects:xml:ns:pidf" xmlns:c="urn:ietf:params:xml:ns:pidf:cipid" xmlns:caps="urn:ietf:params:xml:ns:pidf:caps" xmlns:agp-caps="urn:ag-projects:xml:ns:pidf:caps" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" id="SID-f4649f87-1aa3-44ec-ab49-d0464528d706">
    <status>
      <basic>open</basic>
      <agp-pidf:extended>away</agp-pidf:extended>
    </status>
    <c:display-name>Adrian Georgescu</c:display-name>
    <c:map>Netherlands/Haarlem</c:map>
    <c:icon>https%3A//xcap.test.sipthor.net/xcap-root/org.openmobilealliance.pres-content/users/sip%3Aag%40test.sip2sip.info/oma_status-icon/index</c:icon>
    <c:homepage>http%3A//georgescu.info</c:homepage>
    <agp-pidf:device-info id="f4649f87-1aa3-44ec-ab49-d0464528d706">
      <agp-pidf:description>imac3-2</agp-pidf:description>
      <agp-pidf:user-agent>Blink Pro 2.0.0 (MacOSX)</agp-pidf:user-agent>
      <agp-pidf:time-offset>120</agp-pidf:time-offset>
    </agp-pidf:device-info>
    <caps:servcaps>
      <caps:audio>true</caps:audio>
      <caps:message>true</caps:message>
      <caps:text>true</caps:text>
      <agp-caps:file-transfer>true</agp-caps:file-transfer>
      <agp-caps:screen-sharing>true</agp-caps:screen-sharing>
    </caps:servcaps>
    <rpid:user-input idle-threshold="600">active</rpid:user-input>
    <dm:deviceID>f4649f87-1aa3-44ec-ab49-d0464528d706</dm:deviceID>
    <contact>sip%3Aag%40test.sip2sip.info</contact>
    <note/>
    <timestamp>2012-09-21T12:53:57.802353+02:00</timestamp>
  </tuple>
  <dm:person xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" id="PID-5c82e1b170c9aa1a670c4388052657f2">
    <rpid:time-offset>120</rpid:time-offset>
    <dm:timestamp>2012-09-21T12:53:57.802353+02:00</dm:timestamp>
  </dm:person>
  <dm:device xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" id="DID-f4649f87-1aa3-44ec-ab49-d0464528d706">
    <dm:deviceID>f4649f87-1aa3-44ec-ab49-d0464528d706</dm:deviceID>
    <dm:note>Blink Pro 2.0.0 (MacOSX) at imac3-2</dm:note>
    <dm:timestamp>2012-09-21T12:53:57.802353+02:00</dm:timestamp>
  </dm:device>
</presence>
Last Author
tijmen
Last Edited
Feb 28 2018, 1:46 PM

Event Timeline

tijmen created this document.Feb 28 2018, 1:46 PM
tijmen edited the content of this document. (Show Details)