-
Notifications
You must be signed in to change notification settings - Fork 1
/
conversation_call.go
48 lines (44 loc) · 2.38 KB
/
conversation_call.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
package gcloudcx
import (
"time"
"github.com/google/uuid"
)
// FaxStatus describes a FAX status
type FaxStatus struct {
Direction string `json:"direction"` // inbound,outbound
ActivePage int `json:"activePage"`
ExpectedPages int `json:"expectedPages"`
LinesTransmitted int `json:"linesTransmitted"`
BytesTransmitted int `json:"bytesTransmitted"`
BaudRate int `json:"baudRate"`
PageErrors int `json:"pageErrors"`
LineErrors int `json:"lineErrors"`
}
// ConversationCall describes a Call (like belonging to Participant)
type ConversationCall struct {
ID uuid.UUID `json:"id"`
Self *Address `json:"self"`
Direction string `json:"direction"` // inbound,outbound
State string `json:"state"` // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
Muted bool `json:"muted"`
Held bool `json:"held"`
Confined bool `json:"confined"`
Recording bool `json:"recording"`
RecordingState string `json:"recodingState"` // none,active,paused
RecordingID string `json:"recordingId"`
Segments []Segment `json:"segments"`
DocumentID string `json:"documentId"`
Provider string `json:"provider"`
ScriptID string `json:"scriptId"`
PeerID string `json:"peerId"`
UUIData string `json:"uuiData"`
Other *Address `json:"other"`
ConnectedTime time.Time `json:"connectedTime"`
DisconnectedTime time.Time `json:"disconnectedTime"`
StartAlertingTime time.Time `json:"startAlertingTime"`
StartHoldTime time.Time `json:"startHoldTime"`
DisconnectType string `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
DisconnectReasons []*DisconnectReason `json:"disconnectReasons"`
FaxStatus FaxStatus `json:"faxStatus"`
ErrorInfo ErrorBody `json:"errorInfo"`
}