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