Skip to Content
SIP trunks

Get a SIP trunk

Permissionsip-trunks:readAuthentication
GET
/sip-trunks/{id}

Returns the complete safe configuration and provisioning state. Nullable fields are emitted as JSON null and collection fields as arrays or objects, enabling lossless agent round trips.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Response Body

The SIP trunk.

application/json
  1. response

Complete public SIP trunk state. Secrets and raw upstream errors are never returned. Every safe field is present; unset scalars are null and empty collections are arrays or objects.

id*string
Formatuuid
name*string
provider*SipTrunkProvider

sip uses customer-managed carrier/PBX configuration; twilio_automated provisions Twilio resources from stored account credentials.

Value in"sip""twilio_automated"
sip_signaling_mode*SipSignalingMode
Value in"static_peer""registered_peer""remote_registered_peer"
inbound_auth_mode*SipAuthMode
Value in"ip_allowlist""credentials"
inbound_allowed_addresses*array<string>
outbound_address*string|null
outbound_transport*|null
outbound_auth_mode*SipAuthMode
Value in"ip_allowlist""credentials"
has_credentials*boolean

Whether encrypted SIP credentials exist. Credential values are never returned.

registrar_username*string|null
registrar_domain*string|null
registration_status*SipRegistrationStatus

Registration state, interpreted for the trunk's signaling mode. not_applicable is every static_peer trunk. unregistered and expired describe the registered_peer direction (the PBX registers to Kejue Voice), where a Contact expiry really exists. registering, failed, disabled and unknown describe the remote_registered_peer direction (Kejue Voice registers to the PBX) and come from the SIP registrar's periodic report — unknown means no recent report, not a failure.

Value in"not_applicable""unregistered""registered""expired""registering""failed""disabled""unknown"
registration_contact*string|null
last_register_at*|
Formatdate-time
registration_expires_at*|
Formatdate-time
registration_checked_at*|

When the SIP registrar last reported on this trunk. A liveness heartbeat for the report itself, not call activity. Only populated for remote_registered_peer; null means the registrar has never reported and registration_status reads unknown.

Formatdate-time
remote_registrar_address*string|null
remote_registrar_domain*string|null
remote_register_realm*string|null
remote_register_username*string|null
remote_registrar_transport*|null
remote_register_expires_seconds*integer|null
livekit_inbound_trunk_id*string|null
livekit_outbound_trunk_id*string|null
status*SipTrunkStatus
Value in"provisioning""active""error""archived"
last_error*|

Sanitized recovery-oriented message suitable for customers and agents.

last_error_code*|

Stable machine-readable provider/provisioning error code.

archived_at*|
Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
inbound_allowed_numbers*array<string>
inbound_media_encryption*SipMediaEncryption
Value in"disable""allow""require"
inbound_ringing_timeout_ms*integer|null
inbound_max_call_duration_ms*integer|null
inbound_headers*
inbound_headers_to_attributes*
inbound_attributes_to_headers*
inbound_include_headers*SipIncludeHeaders
Value in"none""x""all"
outbound_metadata*string
outbound_destination_country*string|null
outbound_media_encryption*SipMediaEncryption
Value in"disable""allow""require"
outbound_from_host*string|null
outbound_headers*
outbound_headers_to_attributes*
outbound_attributes_to_headers*
outbound_include_headers*SipIncludeHeaders
Value in"none""x""all"
outbound_allowed_prefixes*array<string>
outbound_allowed_sip_hosts*array<string>
pcap_enabled*boolean
outbound_capacity_mode*SipOutboundCapacityMode
Value in"unknown""fixed""unlimited"
max_concurrent_outbound*integer|null
max_outbound_cps*number|null
outbound_cps_burst*integer|null
outbound_capacity_profile_id*|
Formatuuid
outbound_via_proxy*boolean

Outbound INVITEs are relayed through the Kejue Voice SIP edge (port 5060). Always true for twilio_automated trunks on a deployment with a SIP edge.

Example Request
curl -X GET 'https://api.kejue.co/v1/sip-trunks/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "provider": "sip",  "sip_signaling_mode": "static_peer",  "inbound_auth_mode": "ip_allowlist",  "inbound_allowed_addresses": [    "string"  ],  "outbound_address": "string",  "outbound_transport": "udp",  "outbound_auth_mode": "ip_allowlist",  "has_credentials": true,  "registrar_username": "string",  "registrar_domain": "string",  "registration_status": "not_applicable",  "registration_contact": "string",  "last_register_at": "2019-08-24T14:15:22Z",  "registration_expires_at": "2019-08-24T14:15:22Z",  "registration_checked_at": "2019-08-24T14:15:22Z",  "remote_registrar_address": "string",  "remote_registrar_domain": "string",  "remote_register_realm": "string",  "remote_register_username": "string",  "remote_registrar_transport": "udp",  "remote_register_expires_seconds": 0,  "livekit_inbound_trunk_id": "string",  "livekit_outbound_trunk_id": "string",  "status": "provisioning",  "last_error": "string",  "last_error_code": "string",  "archived_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "inbound_allowed_numbers": [    "string"  ],  "inbound_media_encryption": "disable",  "inbound_ringing_timeout_ms": 0,  "inbound_max_call_duration_ms": 0,  "inbound_headers": {    "property1": "string",    "property2": "string"  },  "inbound_headers_to_attributes": {    "property1": "string",    "property2": "string"  },  "inbound_attributes_to_headers": {    "property1": "string",    "property2": "string"  },  "inbound_include_headers": "none",  "outbound_metadata": "string",  "outbound_destination_country": "string",  "outbound_media_encryption": "disable",  "outbound_from_host": "string",  "outbound_headers": {    "property1": "string",    "property2": "string"  },  "outbound_headers_to_attributes": {    "property1": "string",    "property2": "string"  },  "outbound_attributes_to_headers": {    "property1": "string",    "property2": "string"  },  "outbound_include_headers": "none",  "outbound_allowed_prefixes": [    "string"  ],  "outbound_allowed_sip_hosts": [    "string"  ],  "pcap_enabled": true,  "outbound_capacity_mode": "unknown",  "max_concurrent_outbound": 0,  "max_outbound_cps": 0,  "outbound_cps_burst": 0,  "outbound_capacity_profile_id": "02bf7876-e473-45bd-8a48-0a573b361197",  "outbound_via_proxy": true}