XCAP-samples

Version 4 (Adrian Georgescu, 12/13/2012 09:26 am)

1 3 Adrian Georgescu
h1. XCAP samples
2 1 Adrian Georgescu
3 2 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>
66 4 Adrian Georgescu
67 4 Adrian Georgescu
h2. RLS services
68 4 Adrian Georgescu
69 4 Adrian Georgescu
<pre>
70 4 Adrian Georgescu
<?xml version="1.0" ?>
71 4 Adrian Georgescu
<rls-services xmlns="urn:ietf:params:xml:ns:rls-services">
72 4 Adrian Georgescu
	<service uri="sip%3Aag%2Bpresence%40test.sip2sip.info">
73 4 Adrian Georgescu
		<resource-list>
74 4 Adrian Georgescu
			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
75 4 Adrian Georgescu
		</resource-list>
76 4 Adrian Georgescu
		<packages>
77 4 Adrian Georgescu
			<package>
78 4 Adrian Georgescu
				presence
79 4 Adrian Georgescu
			</package>
80 4 Adrian Georgescu
		</packages>
81 4 Adrian Georgescu
	</service>
82 4 Adrian Georgescu
	<service uri="sip%3Aag%2Bdialog%40test.sip2sip.info">
83 4 Adrian Georgescu
		<resource-list>
84 4 Adrian Georgescu
			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
85 4 Adrian Georgescu
		</resource-list>
86 4 Adrian Georgescu
		<packages>
87 4 Adrian Georgescu
			<package>
88 4 Adrian Georgescu
				dialog
89 4 Adrian Georgescu
			</package>
90 4 Adrian Georgescu
		</packages>
91 4 Adrian Georgescu
	</service>
92 4 Adrian Georgescu
</rls-services>
93 4 Adrian Georgescu
</pre>