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
6 changes: 6 additions & 0 deletions .changeset/sip-numbers-statuses.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"github.com/livekit/protocol": patch
"@livekit/protocol": patch
---

Add separate inbound and outbound statuses for phone numbers.
38 changes: 30 additions & 8 deletions livekit/livekit_agent_simulation.pb.go

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

487 changes: 244 additions & 243 deletions livekit/livekit_agent_simulation.twirp.go

Large diffs are not rendered by default.

276 changes: 204 additions & 72 deletions livekit/livekit_phone_number.pb.go

Large diffs are not rendered by default.

170 changes: 89 additions & 81 deletions livekit/livekit_phone_number.twirp.go

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions protobufs/livekit_agent_simulation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,18 @@ message Scenario {
// Arbitrary JSON-encoded object, surfaced to the agent under test as
// SimulationContext userdata (e.g. inputs and benchmark target state).
string userdata = 5;
// SCN_-prefixed guid. Stable across edits to label, instructions, or
// expectations, so runs of the same scenario can be correlated over time.
string id = 6;
}

// A named group of scenarios, mirroring a whole scenarios.yaml file.
message ScenarioGroup {
string name = 1;
repeated Scenario scenarios = 2;
// SCNG_-prefixed guid. Stable identity of the scenarios file, independent
// of its name.
string id = 3;
}

// How the simulated user interacts with the agent under test.
Expand Down
19 changes: 17 additions & 2 deletions protobufs/livekit_phone_number.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,20 @@ enum PhoneNumberStatus {
PHONE_NUMBER_STATUS_ACTIVE = 1; // Number is active and ready for use
PHONE_NUMBER_STATUS_PENDING = 2; // Number is being provisioned
PHONE_NUMBER_STATUS_RELEASED = 3; // Number has been released
PHONE_NUMBER_STATUS_OFFLINE = 4; // Number is offline (not associated with any dispatch rule)
PHONE_NUMBER_STATUS_OFFLINE = 4; // Number is offline (provider is unreachable)
}

enum PhoneNumberInboundStatus {
PHONE_NUMBER_IN_STATUS_UNSPECIFIED = 0; // Default value
PHONE_NUMBER_IN_STATUS_ACTIVE = 1; // Number is serving inbound calls
PHONE_NUMBER_IN_STATUS_UNAVAILABLE = 2; // Inbound calling is unavailable
PHONE_NUMBER_IN_STATUS_DETACHED = 3; // Number is not serving calls (not associated with dispatch rules)
}

enum PhoneNumberOutboundStatus {
PHONE_NUMBER_OUT_STATUS_UNSPECIFIED = 0; // Default value
PHONE_NUMBER_OUT_STATUS_ACTIVE = 1; // Number is can be used to initiate outbound calls
PHONE_NUMBER_OUT_STATUS_UNAVAILABLE = 2; // Outbound calling is unavailable
}

// Phone number type enumeration
Expand Down Expand Up @@ -83,7 +96,7 @@ message PurchasePhoneNumberResponse {
// ListPhoneNumbersRequest - Request to list phone numbers
message ListPhoneNumbersRequest {
optional int32 limit = 1; // Maximum number of results (default: 50)
repeated PhoneNumberStatus statuses = 2; // Filter by statuses (active, pending, released)
repeated PhoneNumberStatus statuses = 2; // Filter by statuses (active, pending, released)
optional TokenPagination page_token = 3; // Token for pagination (empty for first page)
optional string sip_dispatch_rule_id = 4 [(logger.name) = "sipDispatchRuleID"]; // Filter by SIP dispatch rule ID
}
Expand Down Expand Up @@ -146,6 +159,8 @@ message PhoneNumber {
google.protobuf.Timestamp updated_at = 10; // Last update timestamp
repeated string capabilities = 11; // Available capabilities (e.g., "voice", "sms")
PhoneNumberStatus status = 12; // Current status
PhoneNumberInboundStatus inbound_status = 18; // Inbound calling status
PhoneNumberOutboundStatus outbound_status = 19; // Outbound calling status
google.protobuf.Timestamp assigned_at = 13; // Assignment timestamp
google.protobuf.Timestamp released_at = 14; // Release timestamp (if applicable)
string sip_dispatch_rule_id = 15 [deprecated=true, (logger.name) = "sipDispatchRuleID"]; // Associated SIP dispatch rule ID (deprecated: use sip_dispatch_rule_ids instead)
Expand Down
2 changes: 2 additions & 0 deletions utils/guid/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ const (
AgentGatewayPrefix = "GW_"
CarrierPrefix = "CR_"
PhoneNumberPrefix = "PN_"
ScenarioPrefix = "SCN_"
ScenarioGroupPrefix = "SCNG_"
)

const (
Expand Down
2 changes: 2 additions & 0 deletions utils/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ const (
CloudAgentPrivateLinkClusterPrefix = guid.CloudAgentPrivateLinkClusterPrefix
CloudAgentPrivateLinkGatewayPrefix = guid.CloudAgentPrivateLinkGatewayPrefix
CloudAgentPrivateLinkSecretPrefix = guid.CloudAgentPrivateLinkSecretPrefix
ScenarioPrefix = guid.ScenarioPrefix
ScenarioGroupPrefix = guid.ScenarioGroupPrefix
)

func NewGuid(prefix string) string {
Expand Down
Loading