SIP trunking functionality

SIP trunking is useful when you want to setup incoming calls. For example if you are managing a large call-center, creating a SIP trunk (endpoint) and assigning it to your communications infrastructure such as virtual PBX lets you route your voice calls to your employees using large variety of communication methods such as landline/ mobile phones, browsers and mobile apps.

Step 1. Prerequisites

1. Register at and create your Apifonica account.

2. Top up the balance and check that the balance is not less than 5 EUR before testing callback functionality.

3. In your personal account, find your Apifonica AccountSID and password (AuthToken).

4. Rent an Apifonica local or virtual phone number to be used for calling:

Step 2. Create new Endpoint

Using Console: make a POST request to /accounts/{accountSID}/endpoints, where {accountSID} is your account SID you found previously in your personal account.
The parameters you will need to specify are:

  • name – is the name of your desired endpoint
  • ip – is ip address of your PBX.

Note that a static IP is required to use a SIP trunking.

For more details please refer to Create new endpoint article

Step 2. Link the number

1. In order to link number to endpoint you need to know {numberSID} of your rented number that you wish to associate with SIP trunking.
To do so, Using console: make a GET request to /accounts/{accountSID}/numbers You will get a response containing info on properties of your rented numbers, including {numberSID} of each number (example: num38701906-0731-33fd-8187-2bf957769228)

2. Now to link endpoint to your chosen number using console: make PUT request with defined endpoint_sid to/accounts/{accountSID}/numbers/{numberSID}

For more details please refer to Link endpoint to number article

3. In case you need to unlink endpoint make PUT request with empty value of endpoint_sid parameter to /accounts/{accountSID}/numbers/{numberSID};