summaryrefslogtreecommitdiffstats
path: root/proto/telecom.proto
blob: f0b3d02a8d8dca4296ac2ed96c33252c7bb40d22 (plain)
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
syntax = "proto2";

package com.android.server.telecom;

option java_package = "com.android.server.telecom";
option java_outer_classname = "TelecomLogClass";

// The information about the telecom events.
message TelecomLog {

  // Information about each call.
  repeated CallLog call_logs = 1;

  // Timing information for the logging sessions
  repeated LogSessionTiming session_timings = 2;
}

message LogSessionTiming {
  enum SessionEntryPoint {
    ICA_ANSWER_CALL = 1;
    ICA_REJECT_CALL = 2;
    ICA_DISCONNECT_CALL = 3;
    ICA_HOLD_CALL = 4;
    ICA_UNHOLD_CALL = 5;
    ICA_MUTE = 6;
    ICA_SET_AUDIO_ROUTE = 7;
    ICA_CONFERENCE = 8;

    CSW_HANDLE_CREATE_CONNECTION_COMPLETE = 100;
    CSW_SET_ACTIVE = 101;
    CSW_SET_RINGING = 102;
    CSW_SET_DIALING = 103;
    CSW_SET_DISCONNECTED = 104;
    CSW_SET_ON_HOLD = 105;
    CSW_REMOVE_CALL = 106;
    CSW_SET_IS_CONFERENCED = 107;
    CSW_ADD_CONFERENCE_CALL = 108;
  }

  // The entry point into Telecom code that this session tracks.
  optional SessionEntryPoint sessionEntryPoint = 1;
  // The time it took for this session to finish.
  optional int64 time_millis = 2;
}

message Event {
  // From android.telecom.ParcelableAnalytics
  enum EventName {
    SET_SELECT_PHONE_ACCOUNT = 0;
    SET_ACTIVE = 1;
    SET_DISCONNECTED = 2;
    START_CONNECTION = 3;
    SET_DIALING = 4;
    BIND_CS = 5;
    CS_BOUND = 6;
    REQUEST_ACCEPT = 7;
    REQUEST_REJECT = 8;

    SCREENING_SENT = 100;
    SCREENING_COMPLETED = 101;
    DIRECT_TO_VM_INITIATED = 102;
    DIRECT_TO_VM_FINISHED = 103;
    BLOCK_CHECK_INITIATED = 104;
    BLOCK_CHECK_FINISHED = 105;
    FILTERING_INITIATED = 106;
    FILTERING_COMPLETED = 107;
    FILTERING_TIMED_OUT = 108;

    SKIP_RINGING = 200;
    SILENCE = 201;
    MUTE = 202;
    UNMUTE = 203;
    AUDIO_ROUTE_BT = 204;
    AUDIO_ROUTE_EARPIECE = 205;
    AUDIO_ROUTE_HEADSET = 206;
    AUDIO_ROUTE_SPEAKER = 207;

    CONFERENCE_WITH = 300;
    SPLIT_CONFERENCE = 301;
    SET_PARENT = 302;

    REQUEST_HOLD = 400;
    REQUEST_UNHOLD = 401;
    REMOTELY_HELD = 402;
    REMOTELY_UNHELD = 403;
    SET_HOLD = 404;
    SWAP = 405;

    REQUEST_PULL = 500;
  }

  // The ID of the event.
  optional EventName event_name = 1;

  // The elapsed time since the last event, rounded to one significant digit.
  // If the event is the first, this will be negative.
  optional int64 time_since_last_event_millis = 2;
}

message VideoEvent {
  // From android.telecom.ParcelableCallAnalytics
  enum VideoEventName {
    SEND_LOCAL_SESSION_MODIFY_REQUEST = 0;
    SEND_LOCAL_SESSION_MODIFY_RESPONSE = 1;
    RECEIVE_REMOTE_SESSION_MODIFY_REQUEST = 2;
    RECEIVE_REMOTE_SESSION_MODIFY_RESPONSE = 3;
  }

  // From android.telecom.VideoProfile
  enum VideoState {
     STATE_AUDIO_ONLY = 0;
     STATE_TX_ENABLED = 1;
     STATE_RX_ENABLED = 2;
     STATE_BIDIRECTIONAL = 3;
     STATE_PAUSED = 4;
  }

  // The ID of the event.
  optional VideoEventName event_name = 1;

  // The elapsed time since the last event, rounded to one significant digit.
  // If the event is the first, this will be negative.
  optional int64 time_since_last_event_millis = 2;

  // The video state
  optional int32 video_state = 3;
}

message EventTimingEntry {
  enum EventTimingName {
    ACCEPT_TIMING = 0;
    REJECT_TIMING = 1;
    DISCONNECT_TIMING = 2;
    HOLD_TIMING = 3;
    UNHOLD_TIMING = 4;
    OUTGOING_TIME_TO_DIALING_TIMING = 5;
    BIND_CS_TIMING = 6;
    SCREENING_COMPLETED_TIMING = 7;
    DIRECT_TO_VM_FINISHED_TIMING = 8;
    BLOCK_CHECK_FINISHED_TIMING = 9;
    FILTERING_COMPLETED_TIMING = 10;
    FILTERING_TIMED_OUT_TIMING = 11;
  }

  // The name of the event timing.
  optional EventTimingName timing_name = 1;

  // The number of milliseconds that this event pair took.
  optional int64 time_millis = 2;
}

// Information about each call.
message CallLog {

  // Information on call-types.
  enum CallType {

    // Call type is not known.
    CALLTYPE_UNKNOWN = 0;

    // Incoming call.
    CALLTYPE_INCOMING = 1;

    // Outgoing call.
    CALLTYPE_OUTGOING = 2;
  }

  // Termination code.
  enum CallTerminationCode {

    // Disconnected because of an unknown or unspecified reason.
    CALL_TERMINATION_CODE_UNKNOWN = 0;

    // Disconnected because there was an error, such as a problem
    // with the network.
    CALL_TERMINATION_CODE_ERROR = 1;

    // Disconnected because of a local user-initiated action,
    // such as hanging up.
    CALL_TERMINATION_CODE_LOCAL = 2;

    // Disconnected because of a remote user-initiated action,
    // such as the other party hanging up.
    CALL_TERMINATION_CODE_REMOTE = 3;

    // Disconnected because it has been canceled.
    CALL_TERMINATION_CODE_CANCELED = 4;

    // Disconnected because there was no response to an incoming call.
    CALL_TERMINATION_CODE_MISSED = 5;

    // Disconnected because the user rejected an incoming call.
    CALL_TERMINATION_CODE_REJECTED = 6;

    // Disconnected because the other party was busy.
    CALL_TERMINATION_CODE_BUSY = 7;

    // Disconnected because of a restriction on placing the call,
    // such as dialing in airplane mode.
    CALL_TERMINATION_CODE_RESTRICTED = 8;

    // Disconnected for reason not described by other disconnect codes.
    CALL_TERMINATION_CODE_OTHER = 9;

    // Disconnected because the connection manager did not support the call.
    // The call will be tried again without a connection manager.
    CONNECTION_MANAGER_NOT_SUPPORTED = 10;
  }

  // Start time of the connection.
  // Rounded to the nearest 5 minute interval.
  optional int64 start_time_5min = 1;

  // Duration in millis.
  optional int64 call_duration_millis = 2;

  // Call type.
  optional CallType type  = 3;

  // True if the call interrupted an in-progress call, whether it was the
  // user dialing out during a call or an incoming call during another call.
  optional bool is_additional_call = 4 [default = false];

  // True if the call was interrupted by another call.
  optional bool is_interrupted = 5 [default = false];

  // A bitmask with bits corresponding to call technologies that were used
  // during the call. The ones that we will record are CDMA, GSM, IMS, SIP,
  // and third-party.
  // https://googleplex-android-review.git.corp.google.com/#/c/816516/6/src/com/android/server/telecom/Analytics.java
  optional int32 call_technologies = 6;

  // Indicates the call termination code.
  optional CallTerminationCode call_termination_code = 7;

  // A list of the package names of connection services used.
  repeated string connection_service = 9;

  // Set to true if the call was created from createCallForExistingConnection.
  optional bool is_created_from_existing_connection = 10 [default = false];

  // Set to true if its an emergency call.
  optional bool is_emergency_call = 11 [default = false];

  // A list of the events that occur during the call.
  repeated Event call_events = 12;

  // A map from the names of latency timings to the timings.
  repeated EventTimingEntry call_timings = 13;

  // Whether this call has ever been a video call
  optional bool is_video_call = 14 [default = false];

  // A list of the video events during the call.
  repeated VideoEvent video_events = 15;
}