@fonoster/common 0.5.5 → 0.6.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +3 -0
  3. package/dist/GrpcError.d.ts +5 -0
  4. package/dist/{speech/plugin.js → GrpcError.js} +8 -12
  5. package/dist/constants.d.ts +4 -0
  6. package/dist/constants.js +6 -0
  7. package/dist/errors/PrismaErrorEnum.d.ts +6 -0
  8. package/dist/{envs.js → errors/PrismaErrorEnum.js} +8 -6
  9. package/dist/errors/handleError.d.ts +6 -0
  10. package/dist/errors/handleError.js +86 -0
  11. package/dist/errors/handleZodError.d.ts +4 -0
  12. package/dist/errors/handleZodError.js +41 -0
  13. package/dist/errors/index.d.ts +4 -0
  14. package/dist/errors/index.js +38 -0
  15. package/dist/errors/types.d.ts +5 -0
  16. package/dist/grpcStatusMap.d.ts +4 -0
  17. package/dist/grpcStatusMap.js +27 -0
  18. package/dist/index.d.ts +10 -8
  19. package/dist/index.js +41 -14
  20. package/dist/notifications/compileTemplate.d.ts +6 -0
  21. package/dist/{env_is_set.js → notifications/compileTemplate.js} +12 -14
  22. package/dist/notifications/createEmailSender.d.ts +17 -0
  23. package/dist/notifications/createEmailSender.js +55 -0
  24. package/dist/notifications/index.d.ts +2 -0
  25. package/dist/notifications/index.js +36 -0
  26. package/dist/protos/acls.proto +119 -0
  27. package/dist/protos/agents.proto +155 -0
  28. package/dist/protos/applications.proto +154 -0
  29. package/dist/protos/calls.proto +164 -0
  30. package/dist/protos/credentials.proto +119 -0
  31. package/dist/protos/domains.proto +127 -0
  32. package/dist/protos/identity.proto +286 -0
  33. package/dist/protos/numbers.proto +152 -0
  34. package/dist/protos/secrets.proto +113 -0
  35. package/dist/protos/trunks.proto +164 -0
  36. package/dist/protos/voice.proto +421 -0
  37. package/dist/tts/AzureVoices.d.ts +523 -0
  38. package/dist/tts/AzureVoices.js +3622 -0
  39. package/dist/tts/GoogleVoices.d.ts +475 -0
  40. package/dist/tts/GoogleVoices.js +3284 -0
  41. package/dist/tts/index.d.ts +3 -0
  42. package/dist/tts/index.js +37 -0
  43. package/dist/tts/types.d.ts +164 -0
  44. package/dist/tts/types.js +186 -0
  45. package/dist/types/applications.d.ts +57 -0
  46. package/dist/types/applications.js +7 -0
  47. package/dist/types/index.d.ts +1 -0
  48. package/dist/types/index.js +35 -0
  49. package/dist/types.d.ts +8 -6
  50. package/dist/utils/assertEnvsAreSet.d.ts +7 -0
  51. package/dist/utils/assertEnvsAreSet.js +37 -0
  52. package/dist/utils/assertFileExists.d.ts +5 -0
  53. package/dist/utils/assertFileExists.js +38 -0
  54. package/dist/utils/createInterceptingCall.d.ts +7 -0
  55. package/dist/utils/createInterceptingCall.js +9 -0
  56. package/dist/utils/createService.d.ts +9 -0
  57. package/dist/{service_runner.js → utils/createService.js} +15 -40
  58. package/dist/utils/datesMapper.d.ts +9 -0
  59. package/dist/utils/datesMapper.js +8 -0
  60. package/dist/utils/getServerCredentials.d.ts +10 -0
  61. package/dist/{trust_util.js → utils/getServerCredentials.js} +33 -37
  62. package/dist/utils/index.d.ts +8 -0
  63. package/dist/utils/index.js +42 -0
  64. package/dist/utils/toCamelCase.d.ts +2 -0
  65. package/dist/utils/toCamelCase.js +27 -0
  66. package/dist/utils/toPascalCase.d.ts +2 -0
  67. package/dist/utils/toPascalCase.js +29 -0
  68. package/dist/voice/Dial.d.ts +23 -0
  69. package/dist/voice/Dial.js +19 -0
  70. package/dist/voice/Gather.d.ts +18 -0
  71. package/dist/voice/Gather.js +9 -0
  72. package/dist/voice/Mute.d.ts +13 -0
  73. package/dist/voice/Mute.js +9 -0
  74. package/dist/voice/Play.d.ts +12 -0
  75. package/dist/voice/Play.js +2 -0
  76. package/dist/voice/PlayDtmf.d.ts +5 -0
  77. package/dist/voice/PlayDtmf.js +2 -0
  78. package/dist/voice/PlaybackControl.d.ts +13 -0
  79. package/dist/voice/PlaybackControl.js +11 -0
  80. package/dist/voice/Record.d.ts +18 -0
  81. package/dist/voice/Record.js +7 -0
  82. package/dist/voice/Say.d.ts +15 -0
  83. package/dist/voice/Say.js +2 -0
  84. package/dist/voice/Stream.d.ts +41 -0
  85. package/dist/voice/Stream.js +39 -0
  86. package/dist/voice/Verb.d.ts +9 -0
  87. package/dist/{healthcheck.js → voice/Verb.js} +2 -5
  88. package/dist/voice/index.d.ts +11 -0
  89. package/dist/voice/index.js +45 -0
  90. package/dist/voice/voice.d.ts +101 -0
  91. package/dist/voice/voice.js +44 -0
  92. package/package.json +29 -25
  93. package/dist/api_client.d.ts +0 -27
  94. package/dist/api_client.js +0 -110
  95. package/dist/env_is_set.d.ts +0 -1
  96. package/dist/envs.d.ts +0 -4
  97. package/dist/healthcheck.d.ts +0 -2
  98. package/dist/service_runner.d.ts +0 -13
  99. package/dist/speech/plugin.d.ts +0 -6
  100. package/dist/speech/types.d.ts +0 -17
  101. package/dist/trust_util.d.ts +0 -4
  102. /package/dist/{speech → errors}/types.js +0 -0
@@ -0,0 +1,164 @@
1
+ /*
2
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ syntax = "proto3";
20
+
21
+ package fonoster.trunks.v1beta2;
22
+
23
+ import "acls.proto";
24
+ import "credentials.proto";
25
+
26
+ // The Trunks service definition
27
+ service Trunks {
28
+ // Create a new Trunk
29
+ rpc CreateTrunk (CreateTrunkRequest) returns (CreateTrunkResponse) {}
30
+ // UpdateTrunk an existing Trunk
31
+ rpc UpdateTrunk (UpdateTrunkRequest) returns (UpdateTrunkResponse) {}
32
+ // Get a Trunk by reference
33
+ rpc GetTrunk (GetTrunkRequest) returns (Trunk) {}
34
+ // Delete a Trunk by reference
35
+ rpc DeleteTrunk (DeleteTrunkRequest) returns (DeleteTrunkResponse) {}
36
+ // List all Trunks
37
+ rpc ListTrunks (ListTrunkRequest) returns (ListTrunksResponse) {}
38
+ }
39
+
40
+ // The message for the Trunk URIs
41
+ message TrunkURI {
42
+ // The host name or IP address of the Trunk
43
+ string host = 1;
44
+ // The port number of the Trunk
45
+ int32 port = 2;
46
+ // The transport protocol of the Trunk
47
+ string transport = 3;
48
+ // The username to use when authenticating with the Trunk
49
+ string user = 4;
50
+ // The weight of the Trunk
51
+ int32 weight = 5;
52
+ // The priority of the Trunk
53
+ int32 priority = 6;
54
+ // The flag to enable or disable the Trunk
55
+ bool enabled = 7;
56
+ }
57
+
58
+ // The message for the Trunk resource
59
+ message Trunk {
60
+ // The reference of the Trunk
61
+ string ref = 1;
62
+ // The name of the Trunk
63
+ string name = 2;
64
+ // A flag to indicate if we should send a REGISTER request to the Trunk
65
+ bool send_register = 3;
66
+ // The URI for inbound requests
67
+ string inbound_uri = 4;
68
+ // The date and time when the Trunk was created
69
+ int64 created_at = 5;
70
+ // The date and time when the Trunk was last updated
71
+ int64 updated_at = 6;
72
+ // The list of IP addresses that are allowed to access the Trunks
73
+ fonoster.acls.v1beta2.Acl access_control_list = 7;
74
+ // The credentials to use when authenticating with the Trunk
75
+ fonoster.credentials.v1beta2.Credentials inbound_credentials = 8;
76
+ // The credentials to use when authenticating with the Provider
77
+ fonoster.credentials.v1beta2.Credentials outbound_credentials = 9;
78
+ // The list of URIs for the Trunk
79
+ repeated TrunkURI uris = 10;
80
+ }
81
+
82
+ // The message for the Trunk.Create
83
+ message CreateTrunkRequest {
84
+ // The name of the Trunk
85
+ string name = 1;
86
+ // A flag to indicate if we should send a REGISTER request to the Trunk
87
+ bool send_register = 2;
88
+ // The URI for inbound requests
89
+ string inbound_uri = 3;
90
+ // Reference to the AccessControlList
91
+ string access_control_list_ref = 4;
92
+ // Reference to the inbound Credentials
93
+ string inbound_credentials_ref = 5;
94
+ // Reference to the outbound Credentials
95
+ string outbound_credentials_ref = 6;
96
+ // The list of URIs for the Trunk
97
+ repeated TrunkURI uris = 7;
98
+ }
99
+
100
+ // The message for the Trunk.CreateTrunk response
101
+ message CreateTrunkResponse {
102
+ // The reference of the Trunk
103
+ string ref = 1;
104
+ }
105
+
106
+ // The message for the Trunk.UpdateTrunk
107
+ message UpdateTrunkRequest {
108
+ // The reference of the Trunk
109
+ string ref = 1;
110
+ // The name of the Trunk
111
+ string name = 2;
112
+ // A flag to indicate if we should send a REGISTER request to the Trunk
113
+ bool send_register = 3;
114
+ // The URI for inbound requests
115
+ string inbound_uri = 4;
116
+ // Reference to the AccessControlList
117
+ string access_control_list_ref = 5;
118
+ // Reference to the inbound Credentials
119
+ string inbound_credentials_ref = 6;
120
+ // Reference to the outbound Credentials
121
+ string outbound_credentials_ref = 7;
122
+ // The list of URIs for the Trunk
123
+ repeated TrunkURI uris = 8;
124
+ }
125
+
126
+ // The message for the Trunk.UpdateTrunk response
127
+ message UpdateTrunkResponse {
128
+ // The reference of the Trunk
129
+ string ref = 1;
130
+ }
131
+
132
+ // The message for the Trunk.GetTrunk
133
+ message GetTrunkRequest {
134
+ // The reference of the Trunk
135
+ string ref = 1;
136
+ }
137
+
138
+ // The message for the Trunk.DeleteTrunk
139
+ message DeleteTrunkRequest {
140
+ // The reference of the Trunk
141
+ string ref = 1;
142
+ }
143
+
144
+ // The message for the Trunk.DeleteTrunk response
145
+ message DeleteTrunkResponse {
146
+ // The reference of the Trunk
147
+ string ref = 1;
148
+ }
149
+
150
+ // The message for the Trunk.ListTrunk request
151
+ message ListTrunkRequest {
152
+ // The maximum number of items in the list
153
+ int32 page_size = 1;
154
+ // The next_page_token value returned from the previous request, if any
155
+ string page_token = 2;
156
+ }
157
+
158
+ // The message for the Trunk.ListTrunk response
159
+ message ListTrunksResponse {
160
+ // List of Trunks
161
+ repeated Trunk items = 1;
162
+ // Token to retrieve the next page of results, or empty if there are no more results in the list
163
+ string next_page_token = 2;
164
+ }
@@ -0,0 +1,421 @@
1
+ /*
2
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ syntax = "proto3";
20
+
21
+ package fonoster.voice.v1beta2;
22
+
23
+ import "google/protobuf/struct.proto";
24
+
25
+ // The voice service definition
26
+ service Voice {
27
+ rpc CreateSession(stream VoiceInStream) returns (stream VoiceOutStream) {}
28
+ }
29
+
30
+ // CreateSessionRequest is the request message for the CreateSession method
31
+ message CreateSessionRequest {
32
+ // The account making the request on behalf of the caller
33
+ string access_key_id = 1;
34
+
35
+ // Reference to an application living in the platform
36
+ string app_ref = 2;
37
+
38
+ // gRPC endpoint for the voice service
39
+ string endpoint = 3;
40
+
41
+ // PSTN number or SIP URI associated with the session
42
+ string ingress_number = 4;
43
+
44
+ // The name of the caller
45
+ string caller_name = 5;
46
+
47
+ // The caller number for the phone calling from the
48
+ string caller_number = 6;
49
+
50
+ // The session ID generated by the Media Server
51
+ string session_ref = 7;
52
+
53
+ // Use this token to validate the provenance of the request
54
+ // If the app_ref is provided, the token must include the app_ref as a claim
55
+ string session_token = 8;
56
+
57
+ // Metadata associated with the session
58
+ map<string, string> metadata = 9;
59
+ }
60
+
61
+ // Common request for verbs
62
+ message VerbRequest {
63
+ string session_ref = 1;
64
+ }
65
+
66
+ // Common response for verbs
67
+ message VerbResponse {
68
+ string session_ref = 1;
69
+ }
70
+
71
+ // Request to play a sound
72
+ message PlayRequest {
73
+ // The session reference generated by the Media Server
74
+ string session_ref = 1;
75
+
76
+ // The URL of the sound to play
77
+ string url = 2;
78
+ }
79
+
80
+ // Request to play a sound
81
+ message PlayResponse {
82
+ // The session reference generated by the Media Server
83
+ string session_ref = 1;
84
+
85
+ // The playback reference generated by the Media Server
86
+ string playback_ref = 2;
87
+ }
88
+
89
+ // The request message for the PlaybackControl method
90
+ message PlaybackControlRequest {
91
+ // The session reference generated by the Media Server
92
+ string session_ref = 1;
93
+
94
+ // The playback reference generated by the Media Server
95
+ string playback_ref = 2;
96
+
97
+ // The action to take
98
+ enum Action {
99
+ STOP = 0;
100
+ RESTART = 1;
101
+ PAUSE = 2;
102
+ UNPAUSE = 3;
103
+ FORWARD = 4;
104
+ }
105
+ Action action = 3;
106
+ }
107
+
108
+ // PlayDtmfRequest is the request message for the PlayDtmf method
109
+ message PlayDtmfRequest {
110
+ // The session reference generated by the Media Server
111
+ string session_ref = 1;
112
+
113
+ // The digits to play
114
+ string digits = 2;
115
+ }
116
+
117
+ // Request to mute or unmute the call
118
+ message MuteRequest {
119
+ // The session reference generated by the Media Server
120
+ string session_ref = 1;
121
+
122
+ // The direction to mute
123
+ enum MuteDirection {
124
+ IN = 0;
125
+ OUT = 1;
126
+ BOTH = 2;
127
+ }
128
+ MuteDirection direction = 2;
129
+ }
130
+
131
+ // Request to gather speech or DTMF
132
+ message GatherRequest {
133
+ // The session reference generated by the Media Server
134
+ string session_ref = 1;
135
+
136
+ // The source of the gather
137
+ enum GatherSource {
138
+ SPEECH = 0;
139
+ DTMF = 1;
140
+ SPEECH_AND_DTMF = 2;
141
+ }
142
+ GatherSource source = 2;
143
+
144
+ // Optional key to finish the gather
145
+ string finish_on_key = 3;
146
+
147
+ // Optional timeout in seconds
148
+ int32 timeout = 4;
149
+
150
+ // Optional number of digits to gather
151
+ int32 max_digits = 5;
152
+ }
153
+
154
+ // Response to a gather request
155
+ message GatherResponse {
156
+ // The session reference generated by the Media Server
157
+ string session_ref = 1;
158
+
159
+ // The gathered speech or digits
160
+ oneof content {
161
+ string speech = 2;
162
+ string digits = 3;
163
+ }
164
+ }
165
+
166
+ // RecordRequest is the request message to initiate a recording
167
+ message RecordRequest {
168
+ // The session reference generated by the Media Server
169
+ string session_ref = 1;
170
+
171
+ // The maximum duration of the recording in seconds
172
+ int32 max_duration = 2;
173
+
174
+ // The maximum silence before ending the recording in seconds
175
+ int32 max_silence = 3;
176
+
177
+ // Play a beep before recording
178
+ bool beep = 4;
179
+
180
+ // Finish recording on this key
181
+ string finish_on_key = 5;
182
+ }
183
+
184
+ // Response to a record request
185
+ message RecordResponse {
186
+ // The session reference generated by the Media Server
187
+ string session_ref = 1;
188
+
189
+ // The name of the recording
190
+ string name = 2;
191
+
192
+ // The duration of the recording
193
+ int32 duration = 3;
194
+
195
+ // The format of the recording
196
+ enum RecordFormat {
197
+ WAV = 0;
198
+ }
199
+ RecordFormat format = 4;
200
+ }
201
+
202
+ // Request to say a text
203
+ message SayRequest {
204
+ // The session reference generated by the Media Server
205
+ string session_ref = 1;
206
+
207
+ // The text to say
208
+ string text = 2;
209
+
210
+ // Assign a playback reference to the request
211
+ string playback_ref = 3;
212
+
213
+ // TTS options
214
+ google.protobuf.Struct options = 4;
215
+ }
216
+
217
+ // Dial request message
218
+ message DialRequest {
219
+ // The session reference generated by the Media Server
220
+ string session_ref = 1;
221
+
222
+ // The number to dial
223
+ string destination = 2;
224
+
225
+ // The caller ID to use (reserved for future use)
226
+ string caller_id = 3;
227
+
228
+ // The timeout in seconds
229
+ int32 timeout = 4;
230
+
231
+ // Record direction
232
+ enum RecordDirection {
233
+ IN = 0;
234
+ OUT = 1;
235
+ BOTH = 2;
236
+ }
237
+ RecordDirection record_direction = 5;
238
+ }
239
+
240
+ // Dial status message
241
+ message DialStatus {
242
+ // The session reference generated by the Media Server
243
+ string session_ref = 1;
244
+
245
+ // The status of the dial
246
+ enum Status {
247
+ TRYING = 0;
248
+ CANCEL = 1;
249
+ ANSWER = 2;
250
+ BUSY = 3;
251
+ PROGRESS = 4;
252
+ NOANSWER = 5;
253
+ FAILED = 6;
254
+ }
255
+ Status status = 2;
256
+ }
257
+
258
+ // Request to start an audio stream
259
+ message StartStreamRequest {
260
+ // The session reference generated by the Media Server
261
+ string session_ref = 1;
262
+
263
+ // The direction of the stream
264
+ enum StreamDirection {
265
+ IN = 0;
266
+ OUT = 1;
267
+ BOTH = 2;
268
+ }
269
+ StreamDirection direction = 2;
270
+
271
+ // Output format
272
+ enum StreamAudioFormat {
273
+ WAV = 0;
274
+ }
275
+ StreamAudioFormat format = 3;
276
+
277
+ // Enable VAD (Voice Activity Detection)
278
+ bool enableVad = 4;
279
+ }
280
+
281
+ // Response to a start stream request
282
+ message StartStreamResponse {
283
+ // The session reference generated by the Media Server
284
+ string session_ref = 1;
285
+
286
+ // The stream reference generated by the Media Server
287
+ string stream_ref = 2;
288
+ }
289
+
290
+ // Request to stop an audio stream
291
+ message StopStreamRequest {
292
+ // The session reference generated by the Media Server
293
+ string session_ref = 1;
294
+
295
+ // The stream reference generated by the Media Server
296
+ string stream_ref = 2;
297
+ }
298
+
299
+ // Message for the bidirectional streams
300
+ message StreamPayload {
301
+ // The session reference generated by the Media Server
302
+ string session_ref = 1;
303
+
304
+ // The stream reference generated by the Media Server
305
+ string stream_ref = 2;
306
+
307
+ // The message type
308
+ enum StreamMessageType {
309
+ AUDIO_IN = 0;
310
+ AUDIO_OUT = 1;
311
+ ERROR = 2;
312
+ VOICE_ACTIVITY_START = 3;
313
+ VOICE_ACTIVITY_END = 4;
314
+ }
315
+ StreamMessageType type = 3;
316
+
317
+ // The audio data
318
+ bytes data = 4;
319
+
320
+ // TODO: Consider turning this into a enum
321
+ // (Q. should we use the same error codes as gRPC?)
322
+ // Error code if any
323
+ string code = 5;
324
+
325
+ // Error message if any
326
+ string message = 6;
327
+ }
328
+
329
+ // VoiceInStream is the input stream for the voice service
330
+ message VoiceInStream {
331
+ oneof content {
332
+ // Initial request to create a new session
333
+ CreateSessionRequest request = 1;
334
+
335
+ // Command to accept the call
336
+ VerbResponse answer_response = 2;
337
+
338
+ // Response to a play request
339
+ PlayResponse play_response = 3;
340
+
341
+ // Response to a hangup request
342
+ VerbResponse hangup_response = 4;
343
+
344
+ // Response to a mute request
345
+ VerbResponse mute_response = 5;
346
+
347
+ // Response to a unmute request
348
+ VerbResponse unmute_response = 6;
349
+
350
+ // Response to a play dtmf request
351
+ VerbResponse play_dtmf_response = 7;
352
+
353
+ // Response to a gather request
354
+ GatherResponse gather_response = 8;
355
+
356
+ // Response to a playback control request
357
+ VerbResponse playback_control_response = 9;
358
+
359
+ // Response to a say request (It shares the same response as play)
360
+ PlayResponse say_response = 10;
361
+
362
+ // Response to a record request
363
+ RecordResponse record_response = 11;
364
+
365
+ // Status of a dial request progress
366
+ DialStatus dial_status = 12;
367
+
368
+ // Response to a start stream request
369
+ StartStreamResponse start_stream_response = 13;
370
+
371
+ // Message for the bidirectional streams
372
+ StreamPayload stream_payload = 154;
373
+ }
374
+ }
375
+
376
+ // VoiceOutStream is the output stream for the voice service
377
+ message VoiceOutStream {
378
+ oneof content {
379
+ // Request to accept the call
380
+ VerbRequest answer_request = 1;
381
+
382
+ // Request to play a sound
383
+ PlayRequest play_request = 2;
384
+
385
+ // Request to hangup the call
386
+ VerbRequest hangup_request = 3;
387
+
388
+ // Request to mute the call
389
+ MuteRequest mute_request = 4;
390
+
391
+ // Request to unmute the call
392
+ MuteRequest unmute_request = 5;
393
+
394
+ // Request to play dtmf
395
+ PlayDtmfRequest play_dtmf_request = 6;
396
+
397
+ // Request to gather speech or DTMF
398
+ GatherRequest gather_request = 7;
399
+
400
+ // Request to control a playback
401
+ PlaybackControlRequest playback_control_request = 9;
402
+
403
+ // Request to say a text
404
+ SayRequest say_request = 10;
405
+
406
+ // Request to record
407
+ RecordRequest record_request = 11;
408
+
409
+ // Request to dial a number
410
+ DialRequest dial_request = 12;
411
+
412
+ // Request to start an audio stream
413
+ StartStreamRequest start_stream_request = 14;
414
+
415
+ // Request to stop an audio stream
416
+ StopStreamRequest stop_stream_request = 15;
417
+
418
+ // Message for the bidirectional streams
419
+ StreamPayload stream_payload = 16;
420
+ }
421
+ }