Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/heavy-scissors-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/protocol": patch
---

Changes for ingress observability support
63 changes: 63 additions & 0 deletions observability/ingressobs/gen_reporter.go

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

87 changes: 87 additions & 0 deletions observability/ingressobs/gen_reporter_noop.go

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

33 changes: 33 additions & 0 deletions observability/ingressobs/gen_source.go

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

7 changes: 4 additions & 3 deletions observability/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/livekit/protocol/observability/agentsobs"
"github.com/livekit/protocol/observability/egressobs"
"github.com/livekit/protocol/observability/gatewayobs"
"github.com/livekit/protocol/observability/ingressobs"
"github.com/livekit/protocol/observability/roomobs"
"github.com/livekit/protocol/observability/telephonycallobs"
"github.com/livekit/protocol/observability/telephonyobs"
Expand All @@ -18,7 +19,7 @@ type Reporter interface {
Telephony() telephonyobs.Reporter
Connector() any // any is a placeholder for the connector type
Egress() egressobs.Reporter
Ingress() any
Ingress() ingressobs.Reporter
GatewayMetrics() any // any is a placeholder for the gateway metrics type
TelephonyCall() telephonycallobs.Reporter
Close()
Expand Down Expand Up @@ -54,8 +55,8 @@ func (reporter) Egress() egressobs.Reporter {
return egressobs.NewNoopReporter()
}

func (reporter) Ingress() any {
return nil
func (reporter) Ingress() ingressobs.Reporter {
return ingressobs.NewNoopReporter()
}

func (reporter) GatewayMetrics() any {
Expand Down
10 changes: 0 additions & 10 deletions protobufs/rpc/ingress.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ service IngressInternal {
option (psrpc.options).multi = true;
option (psrpc.options).topics = true;
};

rpc KillIngressSession(KillIngressSessionRequest) returns (google.protobuf.Empty) {
option (psrpc.options) = {
topics: true
topic_params: {
names: ["ingress_id", "resource_id"]
typed: false
}
};
};
}

service IngressHandler {
Expand Down
49 changes: 25 additions & 24 deletions protobufs/rpc/io.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ message GetIngressInfoResponse {
livekit.IngressInfo info = 1;
string token = 2;
string ws_url = 3;
string project_id = 6;
map<string, string> logging_fields = 4;
map<string, string> feature_flags = 5;
}
Expand All @@ -77,20 +78,20 @@ message UpdateIngressStateRequest {
}

message GetSIPTrunkAuthenticationRequest {
string sip_call_id = 6 [deprecated=true];
string sip_call_id = 6 [deprecated = true];

// What Number is calling
string from = 2 [deprecated=true];
string from = 2 [deprecated = true];
// What Host is calling
string from_host = 7 [deprecated=true];
string from_host = 7 [deprecated = true];

// What Number was called
string to = 3 [deprecated=true];
string to = 3 [deprecated = true];
// What Host was called
string to_host = 5 [deprecated=true];
string to_host = 5 [deprecated = true];

// What is the IP address of the called number
string src_address = 4 [deprecated=true];
string src_address = 4 [deprecated = true];

SIPCall call = 8;

Expand All @@ -107,7 +108,7 @@ message GetSIPTrunkAuthenticationResponse {
(logger.redact) = true,
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
];
bool drop = 3;
bool drop = 3;
// Trunk used to fulfill this request
string sip_trunk_id = 4;
// Used in Cloud only
Expand All @@ -121,22 +122,22 @@ message GetSIPTrunkAuthenticationResponse {
}

message EvaluateSIPDispatchRulesRequest {
string sip_call_id = 8 [deprecated=true];
string sip_participant_id = 1 [deprecated=true];
string sip_call_id = 8 [deprecated = true];
string sip_participant_id = 1 [deprecated = true];
// Trunk from the auth response, if any
string sip_trunk_id = 10;

// What Number is calling
string calling_number = 2 [deprecated=true];
string calling_number = 2 [deprecated = true];

// What Host is calling
string calling_host = 11 [deprecated=true];
string calling_host = 11 [deprecated = true];

// What Number was called
string called_number = 3 [deprecated=true];
string called_number = 3 [deprecated = true];

// What is the IP address of the called number
string src_address = 4 [deprecated=true];
string src_address = 4 [deprecated = true];

// What pin has been entered if any
string pin = 5;
Expand All @@ -145,7 +146,7 @@ message EvaluateSIPDispatchRulesRequest {
bool no_pin = 6;

// What Host was called
string called_host = 7 [deprecated=true];
string called_host = 7 [deprecated = true];

// Extra participant attributes added for this call.
// Usually include provider-specific metadata.
Expand Down Expand Up @@ -181,7 +182,7 @@ message EvaluateSIPDispatchRulesResponse {
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
];

bool request_pin = 3 [deprecated=true]; // see result
bool request_pin = 3 [deprecated = true]; // see result

// optional token that should be used when creating LiveKit participant
string token = 4 [
Expand Down Expand Up @@ -246,7 +247,7 @@ message UpdateSIPCallStateRequest {
livekit.SIPCallInfo call_info = 1;
livekit.SIPTransferInfo transfer_info = 2;

// NEXT ID: 3
// NEXT ID: 3
}

message RecordCallContextRequest {
Expand All @@ -256,7 +257,7 @@ message RecordCallContextRequest {
}

enum SIPDispatchResult {
LEGACY_ACCEPT_OR_PIN = 0; // check request_pin field
LEGACY_ACCEPT_OR_PIN = 0; // check request_pin field
ACCEPT = 1;
REQUEST_PIN = 2;
REJECT = 3;
Expand All @@ -271,11 +272,11 @@ enum SIPTrunkAuthenticationError {

message SIPCall {
string lk_call_id = 1;
string source_ip = 2; // source ip (without port)
livekit.SIPUri address = 3; // address in the request line (INVITE)
livekit.SIPUri from = 4; // From header
livekit.SIPUri to = 5; // To header
repeated livekit.SIPUri via = 6; // Via headers
string sip_call_id = 7; // SIP protocol generated call ID
string project_id = 8; // LiveKit project ID (Cloud only)
string source_ip = 2; // source ip (without port)
livekit.SIPUri address = 3; // address in the request line (INVITE)
livekit.SIPUri from = 4; // From header
livekit.SIPUri to = 5; // To header
repeated livekit.SIPUri via = 6; // Via headers
string sip_call_id = 7; // SIP protocol generated call ID
string project_id = 8; // LiveKit project ID (Cloud only)
}
Loading
Loading