Skip to content

Commit

Permalink
Add SIP RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-Der committed Nov 8, 2023
1 parent e230ee2 commit 92178e8
Show file tree
Hide file tree
Showing 15 changed files with 1,560 additions and 479 deletions.
695 changes: 411 additions & 284 deletions livekit/livekit_sip.pb.go

Large diffs are not rendered by default.

113 changes: 58 additions & 55 deletions livekit/livekit_sip.twirp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions livekit_sip.proto
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ message CreateSIPTrunkRequest {

message SIPTrunkInfo {
string sip_trunk_id = 1;

repeated string addresses = 2;
string to = 3;
repeated string allowed_destinations_regex = 4;
}

message ListSIPTrunkRequest {
Expand Down Expand Up @@ -117,8 +121,8 @@ message SIPDispatchRuleIndividual {
string pin = 2;
}

message CreateSIPDispatchRuleRequest {
oneof instrument {
message SIPDispatchRule {
oneof rule {
// SIPDispatchRuleDirect is a `SIP Dispatch Rule` that puts a user directly into a room
// This places users into an existing room. Optionally you can require a pin before a user can
// enter the room
Expand All @@ -131,18 +135,25 @@ message CreateSIPDispatchRuleRequest {
// SIPDispatchRuleIndividual is a `SIP Dispatch Rule` that creates a new room for each caller.
SIPDispatchRuleIndividual dispatch_rule_individual = 3;
}
}

message CreateSIPDispatchRuleRequest {
SIPDispatchRule rule = 1;

// What trunks are accepted for this dispatch rule
// If empty all trunks will match this dispatch rule
repeated string trunk_ids = 4;
repeated string trunk_ids = 2;

// By default the From value (Phone number) is used as the participant identity
// If true a random value will be used instead
bool hide_phone_number = 6;
bool hide_phone_number = 3;
}

message SIPDispatchRuleInfo {
string sip_dispatch_rule_id = 1;
SIPDispatchRule rule = 2;
repeated string trunk_ids = 3;
bool hide_phone_number = 4;
}

message ListSIPDispatchRuleRequest {
Expand Down
1 change: 1 addition & 0 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func Proto() error {
"rpc/agent.proto",
"rpc/egress.proto",
"rpc/ingress.proto",
"rpc/sip.proto",
"rpc/io.proto",
"rpc/room.proto",
"rpc/participant.proto",
Expand Down
Loading

0 comments on commit 92178e8

Please sign in to comment.