XCAP-samples

Version 1 (Adrian Georgescu, 12/13/2012 09:24 am)

1 1 Adrian Georgescu
h1. XCAP document samples
2 1 Adrian Georgescu
3 1 Adrian Georgescu
h2.Presence rules
4 1 Adrian Georgescu
5 1 Adrian Georgescu
<pre>
6 1 Adrian Georgescu
<?xml version="1.0" ?>
7 1 Adrian Georgescu
<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">
8 1 Adrian Georgescu
	<cp:rule id="wp_prs_grantedcontacts">
9 1 Adrian Georgescu
		<cp:conditions>
10 1 Adrian Georgescu
			<ocp:external-list>
11 1 Adrian Georgescu
				<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"/>
12 1 Adrian Georgescu
			</ocp:external-list>
13 1 Adrian Georgescu
		</cp:conditions>
14 1 Adrian Georgescu
		<cp:actions>
15 1 Adrian Georgescu
			<pr:sub-handling>
16 1 Adrian Georgescu
				allow
17 1 Adrian Georgescu
			</pr:sub-handling>
18 1 Adrian Georgescu
		</cp:actions>
19 1 Adrian Georgescu
	</cp:rule>
20 1 Adrian Georgescu
	<cp:rule id="wp_prs_blockedcontacts">
21 1 Adrian Georgescu
		<cp:conditions>
22 1 Adrian Georgescu
			<ocp:external-list>
23 1 Adrian Georgescu
				<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"/>
24 1 Adrian Georgescu
			</ocp:external-list>
25 1 Adrian Georgescu
		</cp:conditions>
26 1 Adrian Georgescu
		<cp:actions>
27 1 Adrian Georgescu
			<pr:sub-handling>
28 1 Adrian Georgescu
				polite-block
29 1 Adrian Georgescu
			</pr:sub-handling>
30 1 Adrian Georgescu
		</cp:actions>
31 1 Adrian Georgescu
	</cp:rule>
32 1 Adrian Georgescu
	<cp:rule id="wp_prs_unlisted">
33 1 Adrian Georgescu
		<cp:conditions>
34 1 Adrian Georgescu
			<ocp:other-identity/>
35 1 Adrian Georgescu
		</cp:conditions>
36 1 Adrian Georgescu
		<cp:actions>
37 1 Adrian Georgescu
			<pr:sub-handling>
38 1 Adrian Georgescu
				confirm
39 1 Adrian Georgescu
			</pr:sub-handling>
40 1 Adrian Georgescu
		</cp:actions>
41 1 Adrian Georgescu
	</cp:rule>
42 1 Adrian Georgescu
	<cp:rule id="wp_prs_block_anonymous">
43 1 Adrian Georgescu
		<cp:conditions>
44 1 Adrian Georgescu
			<ocp:anonymous-request/>
45 1 Adrian Georgescu
		</cp:conditions>
46 1 Adrian Georgescu
		<cp:actions>
47 1 Adrian Georgescu
			<pr:sub-handling>
48 1 Adrian Georgescu
				block
49 1 Adrian Georgescu
			</pr:sub-handling>
50 1 Adrian Georgescu
		</cp:actions>
51 1 Adrian Georgescu
	</cp:rule>
52 1 Adrian Georgescu
	<cp:rule id="wp_prs_allow_own">
53 1 Adrian Georgescu
		<cp:conditions>
54 1 Adrian Georgescu
			<cp:identity>
55 1 Adrian Georgescu
				<cp:one id="sip%3Aag%40test.sip2sip.info"/>
56 1 Adrian Georgescu
			</cp:identity>
57 1 Adrian Georgescu
		</cp:conditions>
58 1 Adrian Georgescu
		<cp:actions>
59 1 Adrian Georgescu
			<pr:sub-handling>
60 1 Adrian Georgescu
				allow
61 1 Adrian Georgescu
			</pr:sub-handling>
62 1 Adrian Georgescu
		</cp:actions>
63 1 Adrian Georgescu
	</cp:rule>
64 1 Adrian Georgescu
</cp:ruleset>
65 1 Adrian Georgescu
</pre>