Project

General

Profile

Sip publish presence » History » Version 21

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

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