Last active
October 27, 2019 10:45
-
-
Save wojciak/6c988bf3c80d36511c6e7722df5c317b to your computer and use it in GitHub Desktop.
ACI Integration API: GRPC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package audio_node; | |
service AudioNode { | |
// 1 connection with all audio channels | |
rpc StartAudioIngestion (CallId) returns (Empty); | |
rpc IngestAudio (stream AudioChunk) returns (Empty); | |
rpc FinishAudioIngestion (CallId) returns (Empty); | |
// 1 connection per audio channel | |
rpc StartChannelAudioIngestion (ChannelId) returns (Empty); | |
rpc IngestChannelAudio (stream ChannelAudioChunk) returns (Empty); | |
rpc FinishChannelAudioIngestion (ChannelId) returns (Empty); | |
} | |
message CallId { | |
int32 provider_id = 1; | |
string call_id = 2; | |
string auth_token = 3; | |
} | |
message ChannelId { | |
int32 provider_id = 1; | |
string call_id = 2; | |
int32 channel_number = 3; | |
string auth_token = 4; | |
} | |
message AudioChunk { | |
int32 provider_id = 1; | |
string call_id = 2; | |
repeated bytes channels = 3; | |
string auth_token = 4; | |
int64 timestamp = 5; | |
} | |
message ChannelAudioChunk { | |
int32 provider_id = 1; | |
string call_id = 2; | |
int32 channel_number = 3; | |
bytes audio_samples = 4; | |
string auth_token = 5; | |
int64 timestamp = 6; | |
} | |
message Empty { | |
} | |
// You need valid certificates and a telcoprovider_id setup from the ACI team | |
// Firewall test example with grpcurl (https://github.com/fullstorydev/grpcurl) | |
// ./grpcurl -cacert ca.crt -cert client.crt -keyclient.key -v \ | |
// -d '{"provider_id": {telcoprovider_id},"call_id":"{call_id}"}' \ | |
// -import-path ./aci/protos -proto aci.proto \ | |
// 18.234.149.97:443 audio_node.AudioNode.StartAudioIngestion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment