Project

General

Profile

XCAP-samples » History » Version 3

Adrian Georgescu, 12/13/2012 09:25 AM

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