Sip subscribe presence » History » Version 17
Adrian Georgescu, 04/13/2009 10:54 AM
| 1 | 8 | Adrian Georgescu | == sip_subscribe_presence == |
|---|---|---|---|
| 2 | 10 | Adrian Georgescu | [[TOC(SipTesting*, sip_*, depth=2)]] |
| 3 | 1 | Adrian Georgescu | |
| 4 | 8 | Adrian Georgescu | === Description === |
| 5 | 1 | Adrian Georgescu | |
| 6 | 11 | Adrian Georgescu | [[Image(http://www.openxcap.org/chrome/site/SIMPLE-Server.png, nolink)]] |
| 7 | 4 | Adrian Georgescu | |
| 8 | 3 | Adrian Georgescu | Source code: [source:scripts/sip_subscribe_presence.py scripts/sip_subscribe_presence.py] |
| 9 | |||
| 10 | 1 | Adrian Georgescu | {{{ |
| 11 | adigeo@ag-imac3:~$sip_subscribe_presence -h |
||
| 12 | 5 | Adrian Georgescu | Usage: sip_subscribe_presence [options] [target-user@target-domain.com] |
| 13 | 1 | Adrian Georgescu | |
| 14 | 5 | Adrian Georgescu | This script will SUBSCRIBE to the presence event published by the specified |
| 15 | SIP target. If a SIP target is not specified, it will subscribe to its own |
||
| 16 | address. It will then interprete PIDF bodies contained in NOTIFYs and display |
||
| 17 | their meaning. The program will un-SUBSCRIBE and quit when CTRL+D is pressed. |
||
| 18 | 1 | Adrian Georgescu | |
| 19 | Options: |
||
| 20 | -h, --help show this help message and exit |
||
| 21 | 16 | Adrian Georgescu | -a ACCOUNT_NAME, --account-name=ACCOUNT_NAME |
| 22 | The name of the account to use. |
||
| 23 | 1 | Adrian Georgescu | -s, --trace-sip Dump the raw contents of incoming and outgoing SIP |
| 24 | messages (disabled by default). |
||
| 25 | 16 | Adrian Georgescu | -j, --trace-pjsip Print PJSIP logging output (disabled by default). |
| 26 | |||
| 27 | 1 | Adrian Georgescu | }}} |
| 28 | 2 | Adrian Georgescu | |
| 29 | 8 | Adrian Georgescu | === Example === |
| 30 | 2 | Adrian Georgescu | |
| 31 | {{{ |
||
| 32 | adigeo@ag-imac3:~$sip_subscribe_presence -a umts ag@ag-projects.com |
||
| 33 | Accounts available: 'alice', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default |
||
| 34 | Using account 'umts': adi@umts.ro |
||
| 35 | Resolved DNS SRV record "_sip._udp.umts.ro" --> proxy.sipthor.net:5060 |
||
| 36 | Resolved DNS A record "proxy.sipthor.net" --> 81.23.228.150, 81.23.228.129, 85.17.186.7 |
||
| 37 | Subscribing to "<sip:ag@ag-projects.com>" for the presence event, at 85.17.186.7:5060 |
||
| 38 | Received NOTIFY: |
||
| 39 | ---------------- |
||
| 40 | Presence for 31208005169@ag-projects.com: |
||
| 41 | Person id yipgulqr |
||
| 42 | Timestamp: 2008-10-26 10:37:32 |
||
| 43 | Activities |
||
| 44 | Note(en): I am working |
||
| 45 | Mood: sad, contended, mean |
||
| 46 | Time offset from UTC: 60 minutes |
||
| 47 | --- |
||
| 48 | Service id apgjjwtz |
||
| 49 | Timestamp: 2008-10-26 10:37:42 |
||
| 50 | Status: open |
||
| 51 | ---------------- |
||
| 52 | Received NOTIFY: |
||
| 53 | ---------------- |
||
| 54 | Presence for 31208005169@ag-projects.com: |
||
| 55 | Person id ksgxtgwo |
||
| 56 | Timestamp: 2008-10-26 10:41:04 |
||
| 57 | Mood: impressed, flirtatious, thirsty |
||
| 58 | Time offset from UTC: 60 minutes |
||
| 59 | Person id yipgulqr |
||
| 60 | Timestamp: 2008-10-26 10:37:32 |
||
| 61 | Activities |
||
| 62 | Note(en): I am working |
||
| 63 | Mood: sad, contended, mean |
||
| 64 | Time offset from UTC: 60 minutes |
||
| 65 | --- |
||
| 66 | Service id apgjjwtz |
||
| 67 | Timestamp: 2008-10-26 10:37:42 |
||
| 68 | Status: open |
||
| 69 | Service id hxpzsnfp |
||
| 70 | Timestamp: 2008-10-26 10:41:00 |
||
| 71 | Status: open |
||
| 72 | ---------------- |
||
| 73 | Received NOTIFY: |
||
| 74 | ---------------- |
||
| 75 | Presence for 31208005169@ag-projects.com: |
||
| 76 | Person id ksgxtgwo |
||
| 77 | Timestamp: 2008-10-26 10:41:04 |
||
| 78 | Mood: impressed, flirtatious, thirsty |
||
| 79 | Time offset from UTC: 60 minutes |
||
| 80 | Person id yipgulqr |
||
| 81 | Timestamp: 2008-10-26 10:37:32 |
||
| 82 | Activities |
||
| 83 | Note(en): I am working |
||
| 84 | Mood: sad, contended, mean |
||
| 85 | Time offset from UTC: 60 minutes |
||
| 86 | --- |
||
| 87 | Service id apgjjwtz |
||
| 88 | Timestamp: 2008-10-26 10:37:42 |
||
| 89 | Status: open |
||
| 90 | Service id hxpzsnfp |
||
| 91 | Timestamp: 2008-10-26 10:41:07 |
||
| 92 | Status: closed |
||
| 93 | ---------------- |
||
| 94 | |||
| 95 | }}} |