Project

General

Profile

Sip subscribe rls » History » Version 17

Adrian Georgescu, 03/30/2009 12:29 PM

1 10 Adrian Georgescu
== sip_subscribe_rls ==
2 14 Adrian Georgescu
[[TOC(SipTesting*, sip_*,xcap*, depth=2)]]
3 1 Adrian Georgescu
4 15 Adrian Georgescu
To use this script you must to have a valid [wiki:SipSettingsAPI configuration]. The SIP Presence agent and XCAP server must have support for RLS services.
5 1 Adrian Georgescu
6 10 Adrian Georgescu
=== Description ===
7 1 Adrian Georgescu
8 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.
9 1 Adrian Georgescu
10
This script implements sending SUBSCRIBE to a RLS server and receiving NOTIFY messages from it.
11 17 Adrian Georgescu
12
[[Image(http://www.openxcap.org/chrome/site/SIMPLE-RLS-services.png)]]
13 6 Adrian Georgescu
14 2 Adrian Georgescu
Source code: [source:scripts/sip_subscribe_rls.py scripts/sip_subscribe_rls.py]
15 1 Adrian Georgescu
16
{{{
17 3 Adrian Georgescu
adigeo@ag-imac3:~$sip_subscribe_rls -h
18
Usage: sip_subscribe_rls [options] [target-user@target-domain.com]
19 1 Adrian Georgescu
20
This script will SUBSCRIBE to the presence event published by the specified
21 3 Adrian Georgescu
SIP target assuming it is a resource list handled by a RLS server. The RLS
22
server will then SUBSCRIBE in behalf of the account, collect NOTIFYs with the
23
presence information of the recipients and provide periodically aggregated
24
NOTIFYs back to the subscriber. If a target address is not specified, it will
25
subscribe to the account's own address. It will then interprete PIDF bodies
26 1 Adrian Georgescu
contained in NOTIFYs and display their meaning. The program will un-SUBSCRIBE
27
and quit when CTRL+D is pressed.
28
29
Options:
30
  -h, --help            show this help message and exit
31
  -a NAME, --account-name=NAME
32
                        The account name from which to read account settings.
33
                        Corresponds to section Account_NAME in the
34
                        configuration file. If not supplied, the section
35
                        Account will be read.
36
  --sip-address=SIP_ADDRESS
37
                        SIP address of the user in the form user@domain
38
  -p PASSWORD, --password=PASSWORD
39
                        Password to use to authenticate the local account.
40
                        This overrides the setting from the config file.
41
  -n DISPLAY_NAME, --display-name=DISPLAY_NAME
42
                        Display name to use for the local account. This
43
                        overrides the setting from the config file.
44
  -e EXPIRES, --expires=EXPIRES
45
                        "Expires" value to set in SUBSCRIBE. Default is 300
46
                        seconds.
47
  -o IP[:PORT], --outbound-proxy=IP[:PORT]
48
                        Outbound SIP proxy to use. By default a lookup of the
49
                        domain is performed based on SRV and A records. This
50
                        overrides the setting from the config file.
51
  -c CONTENT_TYPE, --content-type=CONTENT_TYPE
52
                        "Content-Type" the UA expects to receving in a NOTIFY
53
                        for this subscription. For the known events this does
54
                        not need to be specified, but may be overridden".
55
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
56
                        messages (disabled by default).
57
  -l, --log-pjsip       Print PJSIP logging output (disabled by default).
58
}}}