Skip to content

Instantly share code, notes, and snippets.

@wojciak
Last active October 27, 2019 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wojciak/6c988bf3c80d36511c6e7722df5c317b to your computer and use it in GitHub Desktop.
Save wojciak/6c988bf3c80d36511c6e7722df5c317b to your computer and use it in GitHub Desktop.
ACI Integration API: GRPC
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