Skip to main content
Session Initiation Protocol (SIP) is a signaling protocol for starting, ending, and changing user sessions over an IP network. The Wavix platform provides scalable, enterprise-level features for inbound and outbound calls. This guide shows you how to create and configure SIP trunks on your Wavix account using the Wavix API.
The Wavix SIP trunks API is available only for Flex Pro users.

Prerequisites

Before you create your first SIP trunk, sign up for a Wavix account.

Create a Wavix account

  1. Sign up for a Wavix account using your business email address.
  2. Confirm your email address and phone number during the sign-up process.
  3. Wait for your account to be approved by the Wavix team.
  4. After approval, choose either the Wavix Flex or Flex Pro account level.
Once your account is approved, you can access the Wavix app and APIs.

Find your API key

Wavix uses API keys to authenticate requests. To find API keys associated with your account:
  1. Sign in to your Wavix account.
  2. Go to AdministrationAPI Keys.
  3. Copy the API key you want to use, or create a new one by clicking Create new.

List SIP trunks on your Wavix account

To list SIP trunks and view their statuses on your Wavix account, use the following method:
GET https://api.wavix.com/v1/trunks?appid=your_api_key

Create and configure SIP trunks

The Wavix platform supports these authentication methods for SIP trunks:
  • Digest - SIP devices authenticate with a login and password.
  • IP Authentication - The SIP trunk authenticates SIP INVITE messages sent from specified IP addresses. IP Authentication requires manual approval by Wavix administrators.
For outbound calls, Wavix supports one Caller ID per SIP trunk by default. To use more than one Caller ID, enable Caller ID Passthrough. Caller ID Passthrough requires manual approval by Wavix administrators.
To create a SIP trunk on your account, use this API method:
POST https://api.wavix.com/v1/trunks?appid=your_api_key
Response:
{
    "label ": "My SIP trunk",
    "password": "YOUR_SIP_TRUNK_PASSWORD",
    "callerid": "12121234567",
    "ip_restrict": false,
    "didinfo_enabled": true,
    "call_restrict": true,
    "call_limit": 60,
    "cost_limit": true,
    "max_call_cost": 0.18,
    "channels_restrict": true,
    "max_channels": 10,
    "rewrite_enabled": true,
    "rewrite_prefix": "00",
    "rewrite_cond": "1",
    "passthrough": false
}
After you create the SIP trunk, you receive a response with the SIP trunk ID and its configuration parameters. To update a SIP trunk configuration, use this API method:
PUT https://api.wavix.com/v1/trunks/trunk_id?appid=your_api_key
Paste the following JSON in the request body
{
    "label": "SIP trunk label",
    "password": "YOUR_SIP_TRUNK_PASSWORD",
    "callerid": "12121234567",
    "ip_restrict": true,
    "didinfo_enabled": true,
    "call_restrict": false,
    "call_limit": 60,
    "cost_limit": true,
    "max_call_cost": 0.18,
    "channels_restrict": true,
    "max_channels": 10,
    "rewrite_enabled": true,
    "rewrite_prefix": "00",
    "rewrite_cond": "1",
    "passthrough": false
}

Delete a SIP trunk

To delete a SIP trunk from your account, use this API method:
DELETE https://api.wavix.com/v1/trunks/trunk_id?appid=your_api_key
I