This repository has been archived by the owner on Sep 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathari_structs.go
421 lines (366 loc) · 12.2 KB
/
ari_structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
package ari
type Channel struct {
Id string `json:"id"`
Name string `json:"name"`
State string `json:"state"`
Caller CallerID `json:"caller"`
Connected CallerID `json:"connected"`
Accountcode string `json:"accountcode"`
Dialplan DialplanCEP `json:"dialplan"`
Creationtime string `json:"creationtime"`
}
type BridgeDestroyed struct {
Bridge Bridge `json:"bridge"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type BridgeCreated struct {
Bridge Bridge `json:"bridge"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type Playback struct {
Id string `json:"id"`
Media_Uri string `json:"media_uri"`
Target_Uri string `json:"target_uri"`
Language string `json:"language"`
State string `json:"state"`
}
type DeviceState struct {
Name string `json:"name"`
State string `json:"state"`
}
type ChannelDtmfReceived struct {
Digit string `json:"digit"`
Duration_Ms int `json:"duration_ms"`
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelHangupRequest struct {
Cause int `json:"cause"`
Soft bool `json:"soft"`
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type TextMessageReceived struct {
Message TextMessage `json:"message"`
Endpoint Endpoint `json:"endpoint"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type LiveRecording struct {
Name string `json:"name"`
Format string `json:"format"`
Target_Uri string `json:"target_uri"`
State string `json:"state"`
Duration int `json:"duration"`
Talking_Duration int `json:"talking_duration"`
Silence_Duration int `json:"silence_duration"`
Cause string `json:"cause"`
}
type ChannelEnteredBridge struct {
Bridge Bridge `json:"bridge"`
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type Bridge struct {
Id string `json:"id"`
Technology string `json:"technology"`
Bridge_Type string `json:"bridge_type"`
Bridge_Class string `json:"bridge_class"`
Creator string `json:"creator"`
Name string `json:"name"`
Channels []string `json:"channels"`
}
type BridgeMerged struct {
Bridge Bridge `json:"bridge"`
Bridge_From Bridge `json:"bridge_from"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type BuildInfo struct {
Os string `json:"os"`
Kernel string `json:"kernel"`
Options string `json:"options"`
Machine string `json:"machine"`
Date string `json:"date"`
User string `json:"user"`
}
type SystemInfo struct {
Version string `json:"version"`
Entity_ID string `json:"entity_id"`
}
type ConfigInfo struct {
Name string `json:"name"`
Default_Language string `json:"default_language"`
Max_Channels int `json:"max_channels"`
Max_Open_Files int `json:"max_open_files"`
Max_Load float64 `json:"max_load"`
Setid SetId `json:"setid"`
}
type RecordingFailed struct {
Recording LiveRecording `json:"recording"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type PlaybackFinished struct {
Playback Playback `json:"playback"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelUserevent struct {
Eventname string `json:"eventname"`
Channel Channel `json:"channel"`
Bridge Bridge `json:"bridge"`
Endpoint Endpoint `json:"endpoint"`
Userevent string `json:"userevent"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelCallerId struct {
Caller_Presentation int `json:"caller_presentation"`
Caller_Presentation_Txt string `json:"caller_presentation_txt"`
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type EndpointStateChange struct {
Endpoint Endpoint `json:"endpoint"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type BridgeAttendedTransfer struct {
Result string `json:"result"`
Transferer_First_Leg Channel `json:"transferer_first_leg"`
Transferer_Second_Leg Channel `json:"transferer_second_leg"`
Replace_Channel Channel `json:"replace_channel"`
Is_External bool `json:"is_external"`
Transferer_First_Leg_Bridge Bridge `json:"transferer_first_leg_bridge"`
Transferer_Second_Leg_Bridge Bridge `json:"transferer_second_leg_bridge"`
Destination_Bridge string `json:"destination_bridge"`
Destination_Link_Second_Leg Channel `json:"destination_link_second_leg"`
Destination_Threeway_Channel Channel `json:"destination_threeway_channel"`
Destination_Threeway_Bridge Bridge `json:"destination_threeway_bridge"`
Transferee Channel `json:"transferee"`
Transfer_Target Channel `json:"transfer_target"`
Destination_Type string `json:"destination_type"`
Destination_Application string `json:"destination_application"`
Destination_Link_First_Leg Channel `json:"destination_link_first_leg"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type Mailbox struct {
Name string `json:"name"`
Old_Messages int `json:"old_messages"`
New_Messages int `json:"new_messages"`
}
type Sound struct {
Id string `json:"id"`
Text string `json:"text"`
Formats []FormatLangPair `json:"formats"`
}
type Dialed struct {
}
type ChannelStateChange struct {
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelCreated struct {
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelTalkingStarted struct {
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelLeftBridge struct {
Bridge Bridge `json:"bridge"`
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type StoredRecording struct {
Name string `json:"name"`
Format string `json:"format"`
}
type FormatLangPair struct {
Language string `json:"language"`
Format string `json:"format"`
}
type StatusInfo struct {
Startup_Time string `json:"startup_time"`
Last_Reload_Time string `json:"last_reload_time"`
}
type Endpoint struct {
Technology string `json:"technology"`
Resource string `json:"resource"`
State string `json:"state"`
Channel_IDs []string `json:"channel_ids"`
}
type DeviceStateChanged struct {
Device_State DeviceState `json:"device_state"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type RecordingStarted struct {
Recording LiveRecording `json:"recording"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type StasisEnd struct {
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type Application struct {
Name string `json:"name"`
Channel_IDs []string `json:"channel_ids"`
Bridge_IDs []string `json:"bridge_ids"`
Endpoint_IDs []string `json:"endpoint_ids"`
Device_Names []string `json:"device_names"`
}
type MissingParams struct {
Params []string `json:"params"`
Type string `json:"type"`
}
type Dial struct {
Caller Channel `json:"caller"`
Peer Channel `json:"peer"`
Forward string `json:"forward"`
Forwarded Channel `json:"forwarded"`
Dialstring string `json:"dialstring"`
Dialstatus string `json:"dialstatus"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type AsteriskInfo struct {
Build BuildInfo `json:"build"`
System SystemInfo `json:"system"`
Config ConfigInfo `json:"config"`
Status StatusInfo `json:"status"`
}
type TextMessageVariable struct {
Key string `json:"key"`
Value string `json:"value"`
}
type ChannelTalkingFinished struct {
Channel Channel `json:"channel"`
Duration int `json:"duration"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelVarset struct {
Variable string `json:"variable"`
Value string `json:"value"`
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type StasisStart struct {
Args []string `json:"args"`
Channel Channel `json:"channel"`
Replace_Channel Channel `json:"replace_channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelDestroyed struct {
Cause int `json:"cause"`
Cause_Txt string `json:"cause_txt"`
Channel Channel `json:"channel"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type ChannelDialplan struct {
Channel Channel `json:"channel"`
Dialplan_App string `json:"dialplan_app"`
Dialplan_App_Data string `json:"dialplan_app_data"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type SetId struct {
User string `json:"user"`
Group string `json:"group"`
}
type CallerID struct {
Name string `json:"name"`
Number string `json:"number"`
}
type PlaybackStarted struct {
Playback Playback `json:"playback"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type BridgeBlindTransfer struct {
Channel Channel `json:"channel"`
Replace_Channel Channel `json:"replace_channel"`
Transferee Channel `json:"transferee"`
Exten string `json:"exten"`
Context string `json:"context"`
Result string `json:"result"`
Is_External bool `json:"is_external"`
Bridge Bridge `json:"bridge"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type Message struct {
Type string `json:"type"`
}
type RecordingFinished struct {
Recording LiveRecording `json:"recording"`
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}
type DialplanCEP struct {
Context string `json:"context"`
Exten string `json:"exten"`
Priority uint64 `json:"priority"`
}
type Variable struct {
Value string `json:"value"`
}
type TextMessage struct {
From string `json:"from"`
To string `json:"to"`
Body string `json:"body"`
Variables []TextMessageVariable `json:"variables"`
}
type ApplicationReplaced struct {
Application string `json:"application"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
}