forked from CyCoreSystems/ari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
events_gen.go
739 lines (610 loc) · 25.2 KB
/
events_gen.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
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
// file generated by eventgen
package ari
import (
"encoding/json"
"github.com/pkg/errors"
)
// EventTypes enumerates the list of event types
type EventTypes struct {
All string
ApplicationReplaced string
BridgeAttendedTransfer string
BridgeBlindTransfer string
BridgeCreated string
BridgeDestroyed string
BridgeMerged string
BridgeVideoSourceChanged string
ChannelCallerID string
ChannelConnectedLine string
ChannelCreated string
ChannelDestroyed string
ChannelDialplan string
ChannelDtmfReceived string
ChannelEnteredBridge string
ChannelHangupRequest string
ChannelHold string
ChannelLeftBridge string
ChannelStateChange string
ChannelTalkingFinished string
ChannelTalkingStarted string
ChannelUnhold string
ChannelUserevent string
ChannelVarset string
ContactInfo string
ContactStatusChange string
DeviceStateChanged string
Dial string
EndpointStateChange string
MissingParams string
Peer string
PeerStatusChange string
PlaybackContinuing string
PlaybackFinished string
PlaybackStarted string
RecordingFailed string
RecordingFinished string
RecordingStarted string
StasisEnd string
StasisStart string
TextMessageReceived string
}
// Events is the instance for grabbing event types
var Events EventTypes
func init() {
Events.All = "all"
Events.ApplicationReplaced = "ApplicationReplaced"
Events.BridgeAttendedTransfer = "BridgeAttendedTransfer"
Events.BridgeBlindTransfer = "BridgeBlindTransfer"
Events.BridgeCreated = "BridgeCreated"
Events.BridgeDestroyed = "BridgeDestroyed"
Events.BridgeMerged = "BridgeMerged"
Events.BridgeVideoSourceChanged = "BridgeVideoSourceChanged"
Events.ChannelCallerID = "ChannelCallerId"
Events.ChannelConnectedLine = "ChannelConnectedLine"
Events.ChannelCreated = "ChannelCreated"
Events.ChannelDestroyed = "ChannelDestroyed"
Events.ChannelDialplan = "ChannelDialplan"
Events.ChannelDtmfReceived = "ChannelDtmfReceived"
Events.ChannelEnteredBridge = "ChannelEnteredBridge"
Events.ChannelHangupRequest = "ChannelHangupRequest"
Events.ChannelHold = "ChannelHold"
Events.ChannelLeftBridge = "ChannelLeftBridge"
Events.ChannelStateChange = "ChannelStateChange"
Events.ChannelTalkingFinished = "ChannelTalkingFinished"
Events.ChannelTalkingStarted = "ChannelTalkingStarted"
Events.ChannelUnhold = "ChannelUnhold"
Events.ChannelUserevent = "ChannelUserevent"
Events.ChannelVarset = "ChannelVarset"
Events.ContactInfo = "ContactInfo"
Events.ContactStatusChange = "ContactStatusChange"
Events.DeviceStateChanged = "DeviceStateChanged"
Events.Dial = "Dial"
Events.EndpointStateChange = "EndpointStateChange"
Events.MissingParams = "MissingParams"
Events.Peer = "Peer"
Events.PeerStatusChange = "PeerStatusChange"
Events.PlaybackContinuing = "PlaybackContinuing"
Events.PlaybackFinished = "PlaybackFinished"
Events.PlaybackStarted = "PlaybackStarted"
Events.RecordingFailed = "RecordingFailed"
Events.RecordingFinished = "RecordingFinished"
Events.RecordingStarted = "RecordingStarted"
Events.StasisEnd = "StasisEnd"
Events.StasisStart = "StasisStart"
Events.TextMessageReceived = "TextMessageReceived"
}
// DecodeEvent converts a JSON-encoded event to an ARI event.
func DecodeEvent(data []byte) (Event, error) {
// Decode the event type
var typer Message
err := json.Unmarshal(data, &typer)
if err != nil {
return nil, errors.Wrap(err, "failed to decode type")
}
if typer.Type == "" {
return nil, errors.New("no type found")
}
switch typer.Type {
case Events.ApplicationReplaced:
var e ApplicationReplaced
err = json.Unmarshal(data, &e)
return &e, err
case Events.BridgeAttendedTransfer:
var e BridgeAttendedTransfer
err = json.Unmarshal(data, &e)
return &e, err
case Events.BridgeBlindTransfer:
var e BridgeBlindTransfer
err = json.Unmarshal(data, &e)
return &e, err
case Events.BridgeCreated:
var e BridgeCreated
err = json.Unmarshal(data, &e)
return &e, err
case Events.BridgeDestroyed:
var e BridgeDestroyed
err = json.Unmarshal(data, &e)
return &e, err
case Events.BridgeMerged:
var e BridgeMerged
err = json.Unmarshal(data, &e)
return &e, err
case Events.BridgeVideoSourceChanged:
var e BridgeVideoSourceChanged
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelCallerID:
var e ChannelCallerID
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelConnectedLine:
var e ChannelConnectedLine
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelCreated:
var e ChannelCreated
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelDestroyed:
var e ChannelDestroyed
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelDialplan:
var e ChannelDialplan
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelDtmfReceived:
var e ChannelDtmfReceived
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelEnteredBridge:
var e ChannelEnteredBridge
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelHangupRequest:
var e ChannelHangupRequest
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelHold:
var e ChannelHold
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelLeftBridge:
var e ChannelLeftBridge
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelStateChange:
var e ChannelStateChange
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelTalkingFinished:
var e ChannelTalkingFinished
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelTalkingStarted:
var e ChannelTalkingStarted
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelUnhold:
var e ChannelUnhold
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelUserevent:
var e ChannelUserevent
err = json.Unmarshal(data, &e)
return &e, err
case Events.ChannelVarset:
var e ChannelVarset
err = json.Unmarshal(data, &e)
return &e, err
case Events.ContactInfo:
var e ContactInfo
err = json.Unmarshal(data, &e)
return &e, err
case Events.ContactStatusChange:
var e ContactStatusChange
err = json.Unmarshal(data, &e)
return &e, err
case Events.DeviceStateChanged:
var e DeviceStateChanged
err = json.Unmarshal(data, &e)
return &e, err
case Events.Dial:
var e Dial
err = json.Unmarshal(data, &e)
return &e, err
case Events.EndpointStateChange:
var e EndpointStateChange
err = json.Unmarshal(data, &e)
return &e, err
case Events.MissingParams:
var e MissingParams
err = json.Unmarshal(data, &e)
return &e, err
case Events.Peer:
var e Peer
err = json.Unmarshal(data, &e)
return &e, err
case Events.PeerStatusChange:
var e PeerStatusChange
err = json.Unmarshal(data, &e)
return &e, err
case Events.PlaybackContinuing:
var e PlaybackContinuing
err = json.Unmarshal(data, &e)
return &e, err
case Events.PlaybackFinished:
var e PlaybackFinished
err = json.Unmarshal(data, &e)
return &e, err
case Events.PlaybackStarted:
var e PlaybackStarted
err = json.Unmarshal(data, &e)
return &e, err
case Events.RecordingFailed:
var e RecordingFailed
err = json.Unmarshal(data, &e)
return &e, err
case Events.RecordingFinished:
var e RecordingFinished
err = json.Unmarshal(data, &e)
return &e, err
case Events.RecordingStarted:
var e RecordingStarted
err = json.Unmarshal(data, &e)
return &e, err
case Events.StasisEnd:
var e StasisEnd
err = json.Unmarshal(data, &e)
return &e, err
case Events.StasisStart:
var e StasisStart
err = json.Unmarshal(data, &e)
return &e, err
case Events.TextMessageReceived:
var e TextMessageReceived
err = json.Unmarshal(data, &e)
return &e, err
}
return nil, errors.New("unhandled type: " + typer.Type)
}
// ApplicationReplaced - "Notification that another WebSocket has taken over for an application.An application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event."
type ApplicationReplaced struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
}
// BridgeAttendedTransfer - "Notification that an attended transfer has occurred."
type BridgeAttendedTransfer struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
DestinationApplication string `json:"destination_application"` // Application that has been transferred into
DestinationBridge string `json:"destination_bridge"` // Bridge that survived the merge result
DestinationLinkFirstLeg ChannelData `json:"destination_link_first_leg"` // First leg of a link transfer result
DestinationLinkSecondLeg ChannelData `json:"destination_link_second_leg"` // Second leg of a link transfer result
DestinationThreewayBridge BridgeData `json:"destination_threeway_bridge"` // Bridge that survived the threeway result
DestinationThreewayChannel ChannelData `json:"destination_threeway_channel"` // Transferer channel that survived the threeway result
DestinationType string `json:"destination_type"` // How the transfer was accomplished
IsExternal bool `json:"is_external"` // Whether the transfer was externally initiated or not
ReplaceChannel ChannelData `json:"replace_channel,omitempty"` // The channel that is replacing transferer_first_leg in the swap
Result string `json:"result"` // The result of the transfer attempt
TransferTarget ChannelData `json:"transfer_target,omitempty"` // The channel that is being transferred to
Transferee ChannelData `json:"transferee,omitempty"` // The channel that is being transferred
TransfererFirstLeg ChannelData `json:"transferer_first_leg"` // First leg of the transferer
TransfererFirstLegBridge BridgeData `json:"transferer_first_leg_bridge"` // Bridge the transferer first leg is in
TransfererSecondLeg ChannelData `json:"transferer_second_leg"` // Second leg of the transferer
TransfererSecondLegBridge BridgeData `json:"transferer_second_leg_bridge"` // Bridge the transferer second leg is in
}
// BridgeBlindTransfer - "Notification that a blind transfer has occurred."
type BridgeBlindTransfer struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Bridge BridgeData `json:"bridge"` // The bridge being transferred
Channel ChannelData `json:"channel"` // The channel performing the blind transfer
Context string `json:"context"` // The context transferred to
Exten string `json:"exten"` // The extension transferred to
IsExternal bool `json:"is_external"` // Whether the transfer was externally initiated or not
ReplaceChannel ChannelData `json:"replace_channel,omitempty"` // The channel that is replacing transferer when the transferee(s) can not be transferred directly
Result string `json:"result"` // The result of the transfer attempt
Transferee ChannelData `json:"transferee,omitempty"` // The channel that is being transferred
}
// BridgeCreated - "Notification that a bridge has been created."
type BridgeCreated struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Bridge BridgeData `json:"bridge"`
}
// BridgeDestroyed - "Notification that a bridge has been destroyed."
type BridgeDestroyed struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Bridge BridgeData `json:"bridge"`
}
// BridgeMerged - "Notification that one bridge has merged into another."
type BridgeMerged struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Bridge BridgeData `json:"bridge"`
BridgeFrom BridgeData `json:"bridge_from"`
}
// BridgeVideoSourceChanged - "Notification that the source of video in a bridge has changed."
type BridgeVideoSourceChanged struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Bridge BridgeData `json:"bridge"`
OldVideoSourceId string `json:"old_video_source_id,omitempty"`
}
// ChannelCallerID - "Channel changed Caller ID."
type ChannelCallerID struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
CallerPresentation int `json:"caller_presentation"` // The integer representation of the Caller Presentation value.
CallerPresentationTxt string `json:"caller_presentation_txt"` // The text representation of the Caller Presentation value.
Channel ChannelData `json:"channel"` // The channel that changed Caller ID.
}
// ChannelConnectedLine - "Channel changed Connected Line."
type ChannelConnectedLine struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"` // The channel whose connected line has changed.
}
// ChannelCreated - "Notification that a channel has been created."
type ChannelCreated struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"`
}
// ChannelDestroyed - "Notification that a channel has been destroyed."
type ChannelDestroyed struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Cause int `json:"cause"` // Integer representation of the cause of the hangup
CauseTxt string `json:"cause_txt"` // Text representation of the cause of the hangup
Channel ChannelData `json:"channel"`
}
// ChannelDialplan - "Channel changed location in the dialplan."
type ChannelDialplan struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"` // The channel that changed dialplan location.
DialplanApp string `json:"dialplan_app"` // The application about to be executed.
DialplanAppData string `json:"dialplan_app_data"` // The data to be passed to the application.
}
// ChannelDtmfReceived - "DTMF received on a channel.This event is sent when the DTMF ends. There is no notification about the start of DTMF"
type ChannelDtmfReceived struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"` // The channel on which DTMF was received
Digit string `json:"digit"` // DTMF digit received (0-9, A-E, # or *)
DurationMs int `json:"duration_ms"` // Number of milliseconds DTMF was received
}
// ChannelEnteredBridge - "Notification that a channel has entered a bridge."
type ChannelEnteredBridge struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Bridge BridgeData `json:"bridge"`
Channel ChannelData `json:"channel"`
}
// ChannelHangupRequest - "A hangup was requested on the channel."
type ChannelHangupRequest struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Cause int `json:"cause"` // Integer representation of the cause of the hangup.
Channel ChannelData `json:"channel"` // The channel on which the hangup was requested.
Soft bool `json:"soft"` // Whether the hangup request was a soft hangup request.
}
// ChannelHold - "A channel initiated a media hold."
type ChannelHold struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"` // The channel that initiated the hold event.
Musicclass string `json:"musicclass,omitempty"` // The music on hold class that the initiator requested.
}
// ChannelLeftBridge - "Notification that a channel has left a bridge."
type ChannelLeftBridge struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Bridge BridgeData `json:"bridge"`
Channel ChannelData `json:"channel"`
}
// ChannelStateChange - "Notification of a channel's state change."
type ChannelStateChange struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"`
}
// ChannelTalkingFinished - "Talking is no longer detected on the channel."
type ChannelTalkingFinished struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"` // The channel on which talking completed.
Duration int `json:"duration"` // The length of time, in milliseconds, that talking was detected on the channel
}
// ChannelTalkingStarted - "Talking was detected on the channel."
type ChannelTalkingStarted struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"` // The channel on which talking started.
}
// ChannelUnhold - "A channel initiated a media unhold."
type ChannelUnhold struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"` // The channel that initiated the unhold event.
}
// ChannelUserevent - "User-generated event with additional user-defined fields in the object."
type ChannelUserevent struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Bridge BridgeData `json:"bridge,omitempty"` // A bridge that is signaled with the user event.
Channel ChannelData `json:"channel,omitempty"` // A channel that is signaled with the user event.
Endpoint EndpointData `json:"endpoint,omitempty"` // A endpoint that is signaled with the user event.
Eventname string `json:"eventname"` // The name of the user event.
Userevent interface{} `json:"userevent"` // Custom Userevent data
}
// ChannelVarset - "Channel variable changed."
type ChannelVarset struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel,omitempty"` // The channel on which the variable was set.If missing, the variable is a global variable.
Value string `json:"value"` // The new value of the variable.
Variable string `json:"variable"` // The variable that changed.
}
// ContactInfo - "Detailed information about a contact on an endpoint."
type ContactInfo struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Aor string `json:"aor"` // The Address of Record this contact belongs to.
ContactStatus string `json:"contact_status"` // The current status of the contact.
RoundtripUsec string `json:"roundtrip_usec,omitempty"` // Current round trip time, in microseconds, for the contact.
Uri string `json:"uri"` // The location of the contact.
}
// ContactStatusChange - "The state of a contact on an endpoint has changed."
type ContactStatusChange struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
ContactInfo ContactInfo `json:"contact_info"`
Endpoint EndpointData `json:"endpoint"`
}
// DeviceStateChanged - "Notification that a device state has changed."
type DeviceStateChanged struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
DeviceState DeviceStateData `json:"device_state"` // Device state object
}
// Dial - "Dialing state has changed."
type Dial struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Caller ChannelData `json:"caller,omitempty"` // The calling channel.
Dialstatus string `json:"dialstatus"` // Current status of the dialing attempt to the peer.
Dialstring string `json:"dialstring,omitempty"` // The dial string for calling the peer channel.
Forward string `json:"forward,omitempty"` // Forwarding target requested by the original dialed channel.
Forwarded ChannelData `json:"forwarded,omitempty"` // Channel that the caller has been forwarded to.
Peer ChannelData `json:"peer"` // The dialed channel.
}
// EndpointStateChange - "Endpoint state changed."
type EndpointStateChange struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Endpoint EndpointData `json:"endpoint"`
}
// MissingParams - "Error event sent when required params are missing."
type MissingParams struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Params []string `json:"params"` // A list of the missing parameters
}
// Peer - "Detailed information about a remote peer that communicates with Asterisk."
type Peer struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Address string `json:"address,omitempty"` // The IP address of the peer.
Cause string `json:"cause,omitempty"` // An optional reason associated with the change in peer_status.
PeerStatus string `json:"peer_status"` // The current state of the peer. Note that the values of the status are dependent on the underlying peer technology.
Port string `json:"port,omitempty"` // The port of the peer.
Time string `json:"time,omitempty"` // The last known time the peer was contacted.
}
// PeerStatusChange - "The state of a peer associated with an endpoint has changed."
type PeerStatusChange struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Endpoint EndpointData `json:"endpoint"`
Peer Peer `json:"peer"`
}
// PlaybackContinuing - "Event showing the continuation of a media playback operation from one media URI to the next in the list."
type PlaybackContinuing struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Playback PlaybackData `json:"playback"` // Playback control object
}
// PlaybackFinished - "Event showing the completion of a media playback operation."
type PlaybackFinished struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Playback PlaybackData `json:"playback"` // Playback control object
}
// PlaybackStarted - "Event showing the start of a media playback operation."
type PlaybackStarted struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Playback PlaybackData `json:"playback"` // Playback control object
}
// RecordingFailed - "Event showing failure of a recording operation."
type RecordingFailed struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Recording LiveRecordingData `json:"recording"` // Recording control object
}
// RecordingFinished - "Event showing the completion of a recording operation."
type RecordingFinished struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Recording LiveRecordingData `json:"recording"` // Recording control object
}
// RecordingStarted - "Event showing the start of a recording operation."
type RecordingStarted struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Recording LiveRecordingData `json:"recording"` // Recording control object
}
// StasisEnd - "Notification that a channel has left a Stasis application."
type StasisEnd struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Channel ChannelData `json:"channel"`
}
// StasisStart - "Notification that a channel has entered a Stasis application."
type StasisStart struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Args []string `json:"args"` // Arguments to the application
Channel ChannelData `json:"channel"`
ReplaceChannel ChannelData `json:"replace_channel,omitempty"`
}
// TextMessageReceived - "A text message was received from an endpoint."
type TextMessageReceived struct {
EventData `json:",inline"`
// Header describes any transport-related metadata
Header Header `json:"-"`
Endpoint EndpointData `json:"endpoint,omitempty"`
Message TextMessageData `json:"message"`
}