Project

General

Profile

Sip publish presence » History » Version 22

Tijmen de Mes, 04/19/2012 09:23 PM

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