Skip to content

Commit d3bacc4

Browse files
committed
fix: close remaining gaps against the SIP Addresses spec doc
- context_id: document that it must reference an existing Domain in the project (previously undocumented, matches the 422 invalid_parameter case in the source doc) - user + context_id: document the domain+user uniqueness constraint (previously undocumented value_not_unique case) - user: add a no-whitespace/non-blank pattern, covering the documented missing_required_parameter and format cases without attempting to encode full SIP userinfo grammar - context (response): fix "account" vs "project" default-Domain wording inconsistency with context_id - interface doc: note that SIP addresses are scoped to the caller's project (cross-project or non-SIP IDs return 404)
1 parent dbb0c03 commit d3bacc4

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

fern/apis/signalwire-rest/openapi.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42267,7 +42267,7 @@ components:
4226742267
- support-line
4226842268
context:
4226942269
type: string
42270-
description: The Domain this address is grouped under — for example, `public` for your account's default Domain.
42270+
description: The Domain this address is grouped under — for example, `public` for your project's default Domain.
4227142271
examples:
4227242272
- public
4227342273
uri:
@@ -42362,14 +42362,15 @@ components:
4236242362
- sales-line
4236342363
user:
4236442364
type: string
42365-
description: SIP username used to reach this address (no spaces). Defaults to `*`, which accepts any username.
42365+
pattern: ^\S+$
42366+
description: SIP username used to reach this address (no spaces). Defaults to `*`, which accepts any username. Together with the address's Domain, must be unique across your SignalWire account.
4236642367
examples:
4236742368
- agent
4236842369
default: '*'
4236942370
context_id:
4237042371
allOf:
4237142372
- $ref: '#/components/schemas/uuid'
42372-
description: ID of the Domain this address should be grouped under. Defaults to your project's default Domain.
42373+
description: ID of the Domain this address should be grouped under. Must exist in your project. Defaults to your project's default Domain.
4237342374
examples:
4237442375
- 9c8b7a6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
4237542376
calling_handler_resource_id:
@@ -42548,13 +42549,14 @@ components:
4254842549
- renamed-line
4254942550
user:
4255042551
type: string
42551-
description: SIP username used to reach this address (no spaces).
42552+
pattern: ^\S+$
42553+
description: SIP username used to reach this address (no spaces). Together with the address's Domain, must be unique across your SignalWire account.
4255242554
examples:
4255342555
- agent
4255442556
context_id:
4255542557
allOf:
4255642558
- $ref: '#/components/schemas/uuid'
42557-
description: ID of the Domain this address should be grouped under. Defaults to the address's current Domain when omitted.
42559+
description: ID of the Domain this address should be grouped under. Must exist in your project. Defaults to the address's current Domain when omitted.
4255842560
examples:
4255942561
- 9c8b7a6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
4256042562
ip_auth_enabled:

specs/signalwire-rest/fabric-api/sip-addresses/main.tsp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ namespace SignalWireAPI.Fabric.SipAddresses {
2222
settings, IP authentication, and a resource that answers the calls it receives. Use this API to
2323
list, create, update, and delete SIP addresses without the dashboard.
2424
25+
This API only sees SIP addresses that belong to your project. An ID from another project, or an
26+
ID that belongs to a different kind of address (for example, a video room), returns a 404.
27+
2528
<Note>
2629
This is the public REST management API for standalone SIP addresses. It's separate from
2730
[Assign domain application handler](/docs/apis/rest/domain-applications/assign-domain-application-handler),

specs/signalwire-rest/fabric-api/sip-addresses/models/core.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ model SipAddress {
3333
@example("support-line")
3434
display_name: string;
3535

36-
@doc("The Domain this address is grouped under — for example, `public` for your account's default Domain.")
36+
@doc("The Domain this address is grouped under — for example, `public` for your project's default Domain.")
3737
@example("public")
3838
context: string;
3939

specs/signalwire-rest/fabric-api/sip-addresses/models/requests.tsp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ model SipAddressCreateRequest {
99
@pattern("^[a-z0-9]+(-[a-z0-9]+)*$")
1010
name: string;
1111

12-
@doc("SIP username used to reach this address (no spaces). Defaults to `*`, which accepts any username.")
12+
@doc("SIP username used to reach this address (no spaces). Defaults to `*`, which accepts any username. Together with the address's Domain, must be unique across your SignalWire account.")
1313
@example("agent")
14+
@pattern("^\\S+$")
1415
user?: string = "*";
1516

16-
@doc("ID of the Domain this address should be grouped under. Defaults to your project's default Domain.")
17+
@doc("ID of the Domain this address should be grouped under. Must exist in your project. Defaults to your project's default Domain.")
1718
@example("9c8b7a6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d")
1819
context_id?: uuid;
1920

@@ -62,11 +63,12 @@ model SipAddressUpdateRequest {
6263
@pattern("^[a-z0-9]+(-[a-z0-9]+)*$")
6364
name?: string;
6465

65-
@doc("SIP username used to reach this address (no spaces).")
66+
@doc("SIP username used to reach this address (no spaces). Together with the address's Domain, must be unique across your SignalWire account.")
6667
@example("agent")
68+
@pattern("^\\S+$")
6769
user?: string;
6870

69-
@doc("ID of the Domain this address should be grouped under. Defaults to the address's current Domain when omitted.")
71+
@doc("ID of the Domain this address should be grouped under. Must exist in your project. Defaults to the address's current Domain when omitted.")
7072
@example("9c8b7a6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d")
7173
context_id?: uuid;
7274

0 commit comments

Comments
 (0)