Project

General

Profile

Sip subscribe rls » History » Version 22

Tijmen de Mes, 04/19/2012 09:24 PM

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