Skip to content

Commit cd32bce

Browse files
authored
Merge pull request #484 from signalwire/devon/calling-api-username
feat: add SIP authentication parameters to call API
2 parents d66ca7d + b7a56d9 commit cd32bce

3 files changed

Lines changed: 44 additions & 2 deletions

File tree

fern/apis/signalwire-rest/openapi.yaml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,11 @@ paths:
450450
command: dial
451451
params:
452452
from: '+15551234567'
453-
to: '+15559876543'
453+
to: sip:alice@sip.example.com
454454
url: https://example.com/swml
455455
caller_id: '+15551234567'
456+
username: alice
457+
password: s3cr3t
456458
status_url: https://example.com/status_callback
457459
status_events:
458460
- answered
@@ -17121,6 +17123,16 @@ components:
1712117123
description: Destination address. Accepts E.164 (`+xxxxxxxxxxx`), SIP URI (`sip:` / `sips:`), Verto URI (`verto:`), client address (`client:`), or a fabric address. Required unless `to_script` is provided.
1712217124
examples:
1712317125
- sip:from-sip@example-112233445567.sip.signalwire.com
17126+
username:
17127+
type: string
17128+
description: SIP authentication username, forwarded to the destination when `to` is a SIP URI. Ignored for PSTN and WebRTC/Verto destinations. Write-only — never returned in the call response.
17129+
examples:
17130+
- alice
17131+
password:
17132+
type: string
17133+
description: SIP authentication password, forwarded to the destination when `to` is a SIP URI. Ignored for PSTN and WebRTC/Verto destinations. Write-only — never returned in the call response.
17134+
examples:
17135+
- s3cr3t
1712417136
to_script:
1712517137
anyOf:
1712617138
- type: string
@@ -17242,6 +17254,16 @@ components:
1724217254
description: Destination address. Accepts E.164 (`+xxxxxxxxxxx`), SIP URI (`sip:` / `sips:`), Verto URI (`verto:`), client address (`client:`), or a fabric address. Required unless `to_script` is provided.
1724317255
examples:
1724417256
- sip:from-sip@example-112233445567.sip.signalwire.com
17257+
username:
17258+
type: string
17259+
description: SIP authentication username, forwarded to the destination when `to` is a SIP URI. Ignored for PSTN and WebRTC/Verto destinations. Write-only — never returned in the call response.
17260+
examples:
17261+
- alice
17262+
password:
17263+
type: string
17264+
description: SIP authentication password, forwarded to the destination when `to` is a SIP URI. Ignored for PSTN and WebRTC/Verto destinations. Write-only — never returned in the call response.
17265+
examples:
17266+
- s3cr3t
1724517267
to_script:
1724617268
anyOf:
1724717269
- type: string
@@ -17368,6 +17390,16 @@ components:
1736817390
description: Destination address. Accepts E.164 (`+xxxxxxxxxxx`), SIP URI (`sip:` / `sips:`), Verto URI (`verto:`), client address (`client:`), or a fabric address. Required unless `to_script` is provided.
1736917391
examples:
1737017392
- sip:from-sip@example-112233445567.sip.signalwire.com
17393+
username:
17394+
type: string
17395+
description: SIP authentication username, forwarded to the destination when `to` is a SIP URI. Ignored for PSTN and WebRTC/Verto destinations. Write-only — never returned in the call response.
17396+
examples:
17397+
- alice
17398+
password:
17399+
type: string
17400+
description: SIP authentication password, forwarded to the destination when `to` is a SIP URI. Ignored for PSTN and WebRTC/Verto destinations. Write-only — never returned in the call response.
17401+
examples:
17402+
- s3cr3t
1737117403
to_script:
1737217404
anyOf:
1737317405
- type: string

specs/signalwire-rest/calling-api/calls/models/examples.tsp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ const dialCallExample = #{
1515
command: "dial",
1616
params: #{
1717
from: "+15551234567",
18-
to: "+15559876543",
18+
to: "sip:alice@sip.example.com",
1919
url: "https://example.com/swml",
2020
caller_id: "+15551234567",
21+
username: "alice",
22+
password: "s3cr3t",
2123
status_url: "https://example.com/status_callback",
2224
status_events: #["answered", "ended"],
2325
codecs: #[OutboundCallCodec.PCMU, OutboundCallCodec.PCMA],

specs/signalwire-rest/calling-api/calls/models/requests.tsp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,14 @@ model CallCreateParamsBase {
417417
@example("sip:from-sip@example-112233445567.sip.signalwire.com")
418418
to?: string;
419419

420+
@doc("SIP authentication username, forwarded to the destination when `to` is a SIP URI. Ignored for PSTN and WebRTC/Verto destinations. Write-only — never returned in the call response.")
421+
@example("alice")
422+
username?: string;
423+
424+
@doc("SIP authentication password, forwarded to the destination when `to` is a SIP URI. Ignored for PSTN and WebRTC/Verto destinations. Write-only — never returned in the call response.")
425+
@example("s3cr3t")
426+
password?: string;
427+
420428
@doc("Inline SWML document (JSON or YAML string), or an `http(s)://` URL that returns one, executed at the destination end. Useful for directing the call to a RelayBin / external SWML handler. When present, `to` may be omitted.")
421429
@example("https://example.com/destination.swml.json")
422430
to_script?: string | SWMLObject;

0 commit comments

Comments
 (0)