Project

General

Profile

Sip subscribe rls » History » Version 20

Adrian Georgescu, 01/24/2010 03:39 PM

1 20 Adrian Georgescu
== sip-subscribe-rls ==
2
3 14 Adrian Georgescu
[[TOC(SipTesting*, sip_*,xcap*, depth=2)]]
4 1 Adrian Georgescu
5 20 Adrian Georgescu
> This script is available in ''sipclients'' package that must be installed separately from SIP SIMPLe client SDK package.
6
7 10 Adrian Georgescu
=== Description ===
8 1 Adrian Georgescu
9 8 Adrian Georgescu
A Resource List Server (RLS) services application is a Session Initiation Protocol (SIP) application whereby a server receives SUBSCRIBE requests for a resource, and generates subscriptions towards a resource list. The received NOTIFY messages are the  aggregated downstream to the original subscriber generating less traffic to the subscriber end-user device.
10 1 Adrian Georgescu
11 17 Adrian Georgescu
This script implements sending SUBSCRIBE to a RLS server and receiving NOTIFY messages from it.
12 1 Adrian Georgescu
13 2 Adrian Georgescu
[[Image(http://www.openxcap.org/chrome/site/SIMPLE-RLS-services.png)]]
14 1 Adrian Georgescu
15
{{{
16 20 Adrian Georgescu
adigeo@ag-imac3:~$sip-subscribe-rls -h
17
Usage: sip-subscribe-rls [options] [target-user@target-domain.com]
18 1 Adrian Georgescu
19
This script will SUBSCRIBE to the presence event published by the specified
20 3 Adrian Georgescu
SIP target assuming it is a resource list handled by a RLS server. The RLS
21
server will then SUBSCRIBE in behalf of the account, collect NOTIFYs with the
22
presence information of the recipients and provide periodically aggregated
23
NOTIFYs back to the subscriber. If a target address is not specified, it will
24
subscribe to the account's own address. It will then interprete PIDF bodies
25 1 Adrian Georgescu
contained in NOTIFYs and display their meaning. The program will un-SUBSCRIBE
26
and quit when CTRL+D is pressed.
27
28
Options:
29
  -h, --help            show this help message and exit
30
  -a NAME, --account-name=NAME
31
                        The account name from which to read account settings.
32
                        Corresponds to section Account_NAME in the
33
                        configuration file. If not supplied, the section
34
                        Account will be read.
35
  --sip-address=SIP_ADDRESS
36
                        SIP address of the user in the form user@domain
37
  -p PASSWORD, --password=PASSWORD
38
                        Password to use to authenticate the local account.
39
                        This overrides the setting from the config file.
40
  -n DISPLAY_NAME, --display-name=DISPLAY_NAME
41
                        Display name to use for the local account. This
42
                        overrides the setting from the config file.
43
  -e EXPIRES, --expires=EXPIRES
44
                        "Expires" value to set in SUBSCRIBE. Default is 300
45
                        seconds.
46
  -o IP[:PORT], --outbound-proxy=IP[:PORT]
47
                        Outbound SIP proxy to use. By default a lookup of the
48
                        domain is performed based on SRV and A records. This
49
                        overrides the setting from the config file.
50
  -c CONTENT_TYPE, --content-type=CONTENT_TYPE
51
                        "Content-Type" the UA expects to receving in a NOTIFY
52
                        for this subscription. For the known events this does
53
                        not need to be specified, but may be overridden".
54
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
55
                        messages (disabled by default).
56
  -l, --log-pjsip       Print PJSIP logging output (disabled by default).
57
}}}
58 19 Adrian Georgescu
59
=== Example ===
60
61
{{{
62 20 Adrian Georgescu
adigeo@ag-imac3:~$sip-subscribe-rls 
63 19 Adrian Georgescu
Using account 31208005169@ag-projects.com
64
Subscribing to sip:31208005169-buddies@ag-projects.com for the presence event
65
Subscription succeeded at 81.23.228.150:5060;transport=udp
66
Received NOTIFY:
67
--kDhCK3ub5XA4X3gQoEF5Mugt
68
Content-Transfer-Encoding: binary
69
Content-ID: <1239691491.sip:31208005169-buddies@ag-projects.com.615954109>
70
Content-Type: application/rlmi+xml;charset="UTF-8r"
71
72
<?xml version="1.0"?>
73
<list uri="sip:31208005169-buddies@ag-projects.com" xmlns="urn:ietf:params:xml:ns:rlmi" version="1" fullState="true">
74
  <resource uri="sip:adi@umts.ro"/>
75
  <resource uri="sip:alice@ag-projects.com"/>
76
  <resource uri="sip:luci@umts.ro"/>
77
</list>
78
79
--kDhCK3ub5XA4X3gQoEF5Mugt--
80
81
82
Available control keys:
83
  t: toggle SIP trace on the console
84
  j: toggle PJSIP trace on the console
85
  n: toggle notifications trace on the console
86
  Ctrl-d: quit the program
87
  ?: display this help message
88
}}}