Skip to content

Commit

Permalink
Add support for additional SIP transports.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed May 21, 2024
1 parent 47e4c6b commit 67ba0a5
Show file tree
Hide file tree
Showing 7 changed files with 501 additions and 366 deletions.
6 changes: 6 additions & 0 deletions .changeset/modern-penguins-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@livekit/protocol": minor
"github.com/livekit/protocol": minor
---

Add support for additional SIP transports.
510 changes: 299 additions & 211 deletions livekit/livekit_sip.pb.go

Large diffs are not rendered by default.

136 changes: 71 additions & 65 deletions livekit/livekit_sip.twirp.go

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

15 changes: 15 additions & 0 deletions protobufs/livekit_sip.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ message CreateSIPTrunkRequest {
string metadata = 11;
}

enum SIPTransport {
SIP_AUTO = 0;
SIP_UDP = 1;
SIP_TCP = 2;
SIP_TLS = 3;
}

message SIPTrunkInfo {
string sip_trunk_id = 1;

Expand All @@ -103,13 +110,19 @@ message SIPTrunkInfo {
// Number used to make outbound calls
string outbound_number = 4;

// Transport used for outbound calls.
SIPTransport outbound_transport = 13;

repeated string inbound_numbers_regex = 5 [deprecated=true];

// Accepted `To` values. This Trunk will only accept a call made to
// these numbers. This allows you to have distinct Trunks for different phone
// numbers at the same provider.
repeated string inbound_numbers = 10;

// Allowed transports for inbound calls.
repeated SIPTransport inbound_transports = 14;

// Username and password used to authenticate inbound and outbound SIP invites
// May be empty to have no Authentication
string inbound_username = 6;
Expand All @@ -121,6 +134,8 @@ message SIPTrunkInfo {
string name = 11;
// User-defined metadata for the Trunk.
string metadata = 12;

// NEXT ID: 15
}

message ListSIPTrunkRequest {
Expand Down
4 changes: 3 additions & 1 deletion protobufs/rpc/sip.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package rpc;
option go_package = "github.com/livekit/protocol/rpc";

import "options.proto";
import "livekit_sip.proto";

service SIPInternal {
rpc CreateSIPParticipant(InternalCreateSIPParticipantRequest) returns (InternalCreateSIPParticipantResponse) {
Expand All @@ -31,6 +32,7 @@ message InternalCreateSIPParticipantRequest {
string sip_call_id = 13;
// IP that SIP INVITE is sent too
string address = 2;
livekit.SIPTransport transport = 16;

// Number used to make the call
string number = 3;
Expand Down Expand Up @@ -59,7 +61,7 @@ message InternalCreateSIPParticipantRequest {
// Optionally play ringtone in the room as an audible indicator for existing participants
bool play_ringtone = 12;

// NEXT ID: 16
// NEXT ID: 17
}

message InternalCreateSIPParticipantResponse {
Expand Down
Loading

0 comments on commit 67ba0a5

Please sign in to comment.