Project

General

Profile

Sip publish presence » History » Version 19

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

1 19 Adrian Georgescu
== sip-publish-presence ==
2 1 Adrian Georgescu
3 11 Adrian Georgescu
[[TOC(SipTesting*, sip_*, depth=2)]]
4 13 Adrian Georgescu
5 9 Adrian Georgescu
=== Description ===
6 1 Adrian Georgescu
7
This script implements SIP PUBLISH method, for publishing event state.  PUBLISH is similar to REGISTER in that it allows a user to create, modify, and remove state in another entity which manages this state on behalf of the user.  Addressing a PUBLISH request is identical to addressing a SUBSCRIBE request.  The Request-URI of a PUBLISH request is populated with the address of the resource for which the user wishes to publish event state.  The user may in turn have multiple User Agents or endpoints that publish event state. Each endpoint may publish its own unique state, out of which the event state compositor generates the composite event state of the resource.  In addition to a particular resource, all published event state is associated with a specific event package.  Through a subscription to that event package, the user is able to discover the composite event state of all of the active publications.
8 16 Adrian Georgescu
9 18 Adrian Georgescu
> This script is available in ''sipclients'' package that must be installed separately from SIP SIMPLe client SDK package.
10
11 2 Adrian Georgescu
[[Image(http://www.openxcap.org/chrome/site/SIMPLE-Server.png)]]
12
13 1 Adrian Georgescu
{{{
14 18 Adrian Georgescu
adigeo@ag-imac3:~$sip-publish-presence -h  
15
Usage: sip-publish-presence [options]
16 1 Adrian Georgescu
17
This script will publish rich presence state of the specified SIP account to a
18
SIP Presence Agent, the presence information can be changed using a menu-
19
driven interface.
20
21
Options:
22
  -h, --help            show this help message and exit
23 15 Adrian Georgescu
  -a ACCOUNT_NAME, --account-name=ACCOUNT_NAME
24
                        The name of the account to use.
25 1 Adrian Georgescu
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
26
                        messages (disabled by default).
27 15 Adrian Georgescu
  -j, --trace-pjsip     Print PJSIP logging output (disabled by default).
28 1 Adrian Georgescu
}}}
29
30 9 Adrian Georgescu
=== Example ===
31 1 Adrian Georgescu
32
{{{
33 18 Adrian Georgescu
adigeo@ag-imac3:~$sip-publish-presence 
34 1 Adrian Georgescu
Accounts available: 'alice', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
35
Using default account: 31208005169@ag-projects.com
36
Resolved DNS SRV record "_sip._udp.ag-projects.com" --> proxy.sipthor.net:5060
37
Resolved DNS A record "proxy.sipthor.net" --> 85.17.186.7, 81.23.228.150, 81.23.228.129
38
39
Commands:
40
  a: set activities information
41
  b: toggle basic status
42
  m: set mood information
43
  n: set note
44
  q: quit program
45
  s: show PIDF
46
47
<?xml version='1.0' encoding='UTF-8'?>
48
<presence xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns="urn:ietf:params:xml:ns:pidf" entity="31208005169@ag-projects.com">
49
  <tuple id="apgjjwtz">
50
    <status>
51
      <basic>open</basic>
52
    </status>
53
    <timestamp>2008-10-26T10:37:16+01:00</timestamp>
54
  </tuple>
55
  <dm:person id="yipgulqr">
56
    <rpid:time-offset>60</rpid:time-offset>
57
    <dm:timestamp>2008-10-26T10:37:16+01:00</dm:timestamp>
58
  </dm:person>
59
</presence>
60
61
Commands:
62
  a: set activities information
63
  b: toggle basic status
64
  m: set mood information
65
  n: set note
66
  q: quit program
67
  s: show PIDF
68
69
Commands:
70
  a: set activity
71
  c: clear all activity data
72
  d: delete activity
73
  n: set activity note
74
  q: quit program
75
  s: show current activity
76
  r: set random activity
77
  x: exit to upper level menu
78
79
Set note> I am working
80
81
Note set
82
83
Commands:
84
  a: set activities information
85
  b: toggle basic status
86
  m: set mood information
87
  n: set note
88
  q: quit program
89
  s: show PIDF
90
91
92
Commands:
93
  a: add a mood
94
  c: clear all mood data
95
  d: delete a mood
96
  n: set mood note
97
  q: quit program
98
  s: show current moods
99
  r: set random mood
100
  x: exit to upper level menu
101
102
You are now contended, sad, mean
103
104
Commands:
105
  a: set activities information
106
  b: toggle basic status
107
  m: set mood information
108
  n: set note
109
  q: quit program
110
  s: show PIDF
111
112
<?xml version='1.0' encoding='UTF-8'?>
113
<presence xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns="urn:ietf:params:xml:ns:pidf" entity="31208005169@ag-projects.com">
114
  <tuple id="apgjjwtz">
115
    <status>
116
      <basic>open</basic>
117
    </status>
118
    <timestamp>2008-10-26T10:37:16+01:00</timestamp>
119
  </tuple>
120
  <dm:person id="yipgulqr">
121
    <rpid:mood>
122
      <rpid:mean/>
123
      <rpid:contended/>
124
      <rpid:sad/>
125
    </rpid:mood>
126
    <rpid:activities>
127
      <rpid:note xml:lang="en">I am working</rpid:note>
128
    </rpid:activities>
129
    <rpid:time-offset>60</rpid:time-offset>
130
    <dm:timestamp>2008-10-26T10:37:32+01:00</dm:timestamp>
131
  </dm:person>
132
</presence>
133
134
Commands:
135
  a: set activities information
136
  b: toggle basic status
137
  m: set mood information
138
  n: set note
139
  q: quit program
140
  s: show PIDF
141
142
Your basic status is now 'closed'
143
144
Commands:
145
  a: set activities information
146
  b: toggle basic status
147
  m: set mood information
148
  n: set note
149
  q: quit program
150
  s: show PIDF
151
152
Your basic status is now 'open'
153
154
Commands:
155
  a: set activities information
156
  b: toggle basic status
157
  m: set mood information
158
  n: set note
159
  q: quit program
160
  s: show PIDF
161
162
<?xml version='1.0' encoding='UTF-8'?>
163
<presence xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns="urn:ietf:params:xml:ns:pidf" entity="31208005169@ag-projects.com">
164
  <tuple id="apgjjwtz">
165
    <status>
166
      <basic>open</basic>
167
    </status>
168
    <timestamp>2008-10-26T10:37:42+01:00</timestamp>
169
  </tuple>
170
  <dm:person id="yipgulqr">
171
    <rpid:mood>
172
      <rpid:mean/>
173
      <rpid:contended/>
174
      <rpid:sad/>
175
    </rpid:mood>
176
    <rpid:activities>
177
      <rpid:note xml:lang="en">I am working</rpid:note>
178
    </rpid:activities>
179
    <rpid:time-offset>60</rpid:time-offset>
180
    <dm:timestamp>2008-10-26T10:37:32+01:00</dm:timestamp>
181
  </dm:person>
182
</presence>
183
184
Commands:
185
  a: set activities information
186
  b: toggle basic status
187
  m: set mood information
188
  n: set note
189
  q: quit program
190
  s: show PIDF
191
}}}