CreateTrunk creates a new SIP trunk for the organization.
POST/api/v1/voice/sip-trunks
Configures a SIP connection for making and receiving calls.
Parameters
- trunk_name: Required, display name
- trunk_type: Required, customer_trunk or provider_trunk
- provider_id: Optional, reference to SIP provider template
- host/port: Required, SIP server address
- username/password: Credentials for authentication
- auth_type: credentials, ip, or both
- codecs: Audio codec preference order
- dtmf: DTMF signaling method
- max_channels: Concurrent call limit
Side Effects
- Creates PJSIP endpoint in Asterisk realtime database
- Creates authentication, AOR, and identify records
Errors
- ALREADY_EXISTS: Trunk name already exists
- PERMISSION_DENIED: Caller lacks voice:trunk:write permission
Request
Responses
- 200
- default
A successful response.
An unexpected error response.