---
title: "Get SIP trunk by ID"
method: GET
path: "/api/v1/phones/sip-trunks/:id"
tags: ["Phones - Sip Trunks"]
---

# Get SIP trunk by ID

`GET /api/v1/phones/sip-trunks/:id`

## Request

- Base URL: `https://api.voicelogica.ai`
- URL: `https://api.voicelogica.ai/api/v1/phones/sip-trunks/:id`
- Auth: API key in header `x-api-key`

## Headers

- `x-api-key` string, required
- `x-company-id` string

## Response `200`

SIP trunk retrieved

- object: Response schema for a SIP trunk including company metadata, audit fields, and registration state
  - `id` string, required: Unique identifier
  - `createdAt` string, date-time, required: Creation timestamp
  - `active` boolean, required: Whether the entity is active
  - `createdBy` string, required: Name of the user who created the entity
  - `createdById` string, required: ID of the user who created the entity
  - `modifiedAt` string, date-time: ISO 8601 date string
  - `modifiedBy` string: Name of the user who last modified the entity
  - `modifiedById` string: ID of the user who last modified the entity
  - `companyId` string, required: Company identifier
  - `company` object: Any valid JSON value
  - `groupIds` string[]: Linked group IDs
  - `name` string, required: Display name for this SIP trunk
  - `host` string: Remote SIP host, FQDN, or IP
  - `port` integer, required: Remote SIP port
  - `transport` 'udp' | 'tcp' | 'tls', required: SIP transport (udp, tcp, tls)
  - `sipTrunkRole` 'provider_trunk' | 'remote_pbx_extension' | 'customer_pbx_trunk': Business role for this SIP trunk
  - `source` 'system' | 'custom': Who provisioned this trunk: 'system' (VL free DID) or 'custom' (customer-configured)
  - `provider` 'msteams': Managed peer preset ('msteams' = Microsoft Teams Direct Routing; peer fields are server-controlled). The customer pairs <trunkId>.sip.voicelogica.ai as the SBC in their Microsoft tenant.
  - `sipDomain` string: Incoming PBX trunk SIP domain slug; render as <slug>.sip.voicelogica.ai
  - `supportsInbound` boolean: Whether this provider trunk can receive inbound calls
  - `supportsOutbound` boolean: Whether this provider trunk can originate outbound calls
  - `blockInternationalCalls` boolean: When true, outbound calls and transfers on this trunk to explicitly international numbers (+ / 00 prefix) outside Greece and Cyprus are refused
  - `outsideLinePrefix` string: PBX outside-line digit(s) (usually '0'): stripped from inbound caller numbers, added to outbound dialed numbers
  - `inboundAuthType` 'ip_auth' | 'registration' | 'none', required: Inbound authentication mode
  - `outboundAuthType` 'registration' | 'ip_auth' | 'none', required: Outbound authentication mode
  - `username` string: Outbound SIP username when using registration or digest
  - `password` string: Outbound SIP password when using registration or digest
  - `authId` string: SIP auth ID / login ID for digest authentication
  - `ipWhitelist` string[], required: Trusted static source IPs or CIDR ranges for inbound SIP
  - `allowedRtpIps` string[]: Additional RTP source IPs (same port) for split-edge media
  - `privateServers` string[]: Admin-only RTP server IPs this trunk must use (empty = public pool)
  - `domain` string: SIP domain / realm
  - `fromDomain` string: From header domain override
  - `outboundProxy` string: Outbound SIP proxy if configured
  - `sipProxy` string: Alias for outboundProxy; outbound SIP proxy if configured
  - `defaultPhoneNumber` string: Default phone number for this trunk; used in Refer-To for agent/PIN transfers
  - `codecs` string[], required: Allowed codecs for this trunk
  - `enabled` boolean, required: Whether this trunk is enabled for routing
  - `allowOriginationThroughRemotePbx` boolean: Whether remote PBX extension trunks may originate through the remote PBX
  - `staticDestinationHost` string: Static PBX host/IP for IP-auth incoming PBX trunks that do not REGISTER
  - `staticDestinationPort` integer: Static PBX SIP port for IP-auth incoming PBX trunks that do not REGISTER
  - `maxChannels` integer, nullable: Maximum concurrent calls allowed on this trunk (null = unlimited)
  - `pickUpDelay` integer: Seconds the inbound call rings before the AI answers (0 = immediately)
  - `registrationExpiresSeconds` integer: Outbound REGISTER Expires interval (60-86400s)
  - `grantedRegistrationExpiresSeconds` integer: Registrar 423 Min-Expires floor (SIP operational; refresh cadence / wire Expires only — user registrationExpiresSeconds is unchanged)
  - `registrarBindingExpiresSeconds` integer: Registrar 200 Expires header when shorter than we requested (refresh/stale only; never Contact expires countdown)
  - `otherRegistrations` string[]: Edge trunks: other devices registered on the same carrier account (host:port), per the registrar; they ring too and can answer calls first
  - `registrationRefreshSeconds` integer: Computed REGISTER refresh interval in seconds (read-only; not stored)
  - `srtpEnabled` boolean: Whether this trunk offers SDES SRTP on outbound INVITEs (peer can answer with matching crypto or reject with 488 for plain-RTP retry)
  - `registered` boolean, required: Whether the trunk is currently registered (maintained by the SIP stack for registration modes)
  - `lastRegisteredAt` string, date-time: ISO 8601 date string
  - `lastResolvedPeerIp` string: Last DNS-resolved peer IP (system-written)
  - `destinationType` 'user' | 'user_group' | 'ai_agent' | 'external_number' | 'external_bridge' | 'conference_room': Type of destination used by the inbound route
  - `destinationId` string: Default inbound destination entity id
  - `webhookUrl` string: Pre-answer CALL_INBOUND webhook URL (empty string when auto-disabled after repeated delivery failures)
  - `tunnelType` 'none' | 'wireguard': NAT traversal: none or wireguard edge relay
  - `contactHost` 'phone_id' | 'company_id' | 'ip': Host in our SIP Contact: phone_id (default), company_id, or ip (only for a proxy that mishandles a hostname). Ignored on edge trunks.
  - `edgeDeviceId` string: Bound edge device id when tunnelType is wireguard
  - `trunkNumberCount` integer: Total trunk numbers attached to this trunk
  - `inboundTrunkNumberCount` integer: Trunk numbers enabled for inbound routing
  - `outboundCallerIdTrunkNumberCount` integer: Trunk numbers enabled as outbound caller IDs
  - `hasInboundTrunkNumbers` boolean: True when this trunk has at least one inbound-enabled trunk number
  - `inboundPeers` object[]: Carrier/PBX peers currently REGISTERed toward this trunk (non-expired; from durable store)
    - `id` string, required: Unique identifier
    - `createdAt` string, date-time, required: Creation timestamp
    - `active` boolean, required: Whether the entity is active
    - `createdBy` string, required: Name of the user who created the entity
    - `createdById` string, required: ID of the user who created the entity
    - `modifiedAt` string, date-time: ISO 8601 date string
    - `modifiedBy` string: Name of the user who last modified the entity
    - `modifiedById` string: ID of the user who last modified the entity
    - `companyId` string, required: Company identifier
    - `company` object: Any valid JSON value
    - `groupIds` string[]: Linked group IDs
    - `sipTrunkId` string, required: SIP trunk this peer registered against
    - `remoteAddress` string, required: Source IP observed for REGISTER traffic
    - `remotePort` integer, required: UDP/TCP/TLS source port
    - `transport` 'udp' | 'tcp' | 'tls', required: Transport used toward the peer
    - `contactUri` string, required: Parsed Contact URI from REGISTER
    - `fromUser` string: Username from REGISTER From header when available
    - `registeredAt` string, date-time, required: When we last acknowledged a successful REGISTER
    - `expiresAt` string, date-time, required: When this binding lapses unless refreshed by the peer
  - `guidance` string: Connection outcome explanation, returned when the trunk is created
  - `connectionInfo` string[]: Key connection values as "label: value" lines (SBC address, SIP domain, platform signaling IP…), returned when the trunk is created
  - `nextSteps` string[]: Kind-specific steps to finish connecting this trunk (e.g. the SBC address to pair for Teams, the SIP domain to point a PBX at), returned when the trunk is created

## Other responses

- `401`: Unauthorized
- `403`: Invalid CSRF
- `429`: Rate limit exceeded
- `500`: Internal Server Error

---

[API](https://skmtc.dev/voicelogica/apis/voice-logica-api.md) · [All operations](https://skmtc.dev/voicelogica/apis/voice-logica-api/llms.txt) · [OpenAPI document](https://skmtc.dev/voicelogica/apis/voice-logica-api/revisions/30f76840084e?raw)
