/
SIP trunks

SIP trunks

SIP trunking allows Link devices to make and forward calls to external mobile numbers via Twilio. You can assign multiple trunks to different groups within your project and define routing behavior per group.

Let’s go step by step — from setting up your project structure to configuring outbound call routing:

Define the project structure

  1. Make sure BAS-IP Link is installed and running.

  2. Log in directly to your instance with administrative access and create administrator profiles manually.

  3. Navigate to User management → Object groups.

  4. Create the hierarchy:

If the Enable restrictions checkbox is not selected in group settings, SIP trunk functionality becomes available to users immediately after the trunk is assigned to their group.

  1. Go to Profiles, define and assign roles.

  2. Add users, assign them to roles and apartment groups.

 

Activate the Plus license

  1. Make sure your self-host license includes SIP Trunk support.

  2. Navigate to Licenses and verify that SIP Trunks is Enabled.

Знімок екрана 2025-04-19 о 22.32.05.png

 

Register a Twilio account

  1. Go to Twilio.

  2. Register using 2FA/two-factor authentication — it keeps your account safe and lets you use real phone numbers for calling.

  3. Verify your mobile number.

    Знімок екрана 2025-04-15 о 11.52.12.png
  4. Top up your balance with the minimum $20 USD — this upgrades the account from trial to production mode and allows calling.

 

Buy a phone number

  1. Go to Phone Numbers → Buy a number.

  2. Choose a local number with Voice capability.

  3. Price is usually around $1.15/month.

  4. This number will be used as Caller ID for outbound calls.

Знімок екрана 2025-04-15 о 17.54.01.png

 

Create an Elastic SIP Trunk in Twilio

  1. Use the Jump to… search in the top-right corner and enter Elastic SIP Trunks. Select it from the dropdown.

Знімок екрана 2025-04-15 175653.png
  1. Click Create new SIP Trunk button, name the trunk, and click Create.

  2. In the opened General tab, check the Friendly Name field and click Save at the bottom of the page.

  3. Go to the Termination tab and create any unique hostname in the Termination SIP URI field: example.pstn.twilio.com.

  4. Under Authentication click the ➕ button next to IP Access Control List:

    • If your server does NOT use NAT: add your external IP address as Proxy, with a /24 mask.

    • If your server uses NAT: add your external IP as Proxy, with a /24 mask, and add your internal IP as Node, also with a /24 mask.

  5. Repeat this process for both IPs: click ➕ again to add the second address.

If you’re hosting BAS-IP Link on your own server, make sure to enter your own public IP address in Twilio, so SIP traffic is routed correctly.

  1. Click the ➕ button next to Credential Lists.

  2. Create a username and secure password — this will be used later in Link.

Once created, credentials cannot be viewed again, so make sure to write them down.

  1. Click Save at the bottom of the page.

  1. Go to the Numbers tab, click Add a number → Add an Existing Number and attach the phone number you previously purchased.

Знімок екрана 2025-04-15 о 18.29.12 копія 2.png

After this, you now have: Termination URI, Login, Password, Assigned phone number. All ready to be copied into Link Cloud, — let’s go!

 

Add the SIP Trunk in Link

  1. Go to Telephony settings → SIP Trunks.

  2. Click ➕ in the lower-right corner to add a new trunk.

  3. Enter a display Name — this is just a label to help you identify the trunk.

  4. Paste the hostname you created in Twilio in Termination URI, e.g.: example.pstn.twilio.com.

  5. Paste the phone number you attached to the trunk into Outgoing number.

  6. Paste your Twilio credentials into Login and Password.

  7. Assign the trunk to the relevant groups, e.g.: Building #1, Unit #1.

Only one trunk can be assigned per group. If a group already has a trunk, it will be replaced.
The system uses the trunk assigned to the closest group in the hierarchy for outbound calls.

  1. Click 💾 Save icon in the lower-right corner.

Знімок екрана 2025-04-15 о 17.33.41 копія (1).png

Don’t forget to check your Twilio balance — calls won’t go through if there are insufficient funds.

 

Add forwarding rule with mobile number

  1. Go to User management → Object groups, then open the required apartment group where the call needs to be routed.

  2. Click the ••• next to the group and select Edit.

  3. In the Forwarding rule tab, choose: either a mobile number, or a virtual number.

If using a mobile number: enter it in international format, and make sure to check next to the entered number. Otherwise, the number won’t be added to the forwarding rule.

  1. Click 💾 Save icon in the lower-right corner.

 

App vs Mobile Number

Do not forward calls simultaneously to both the mobile number and the app

Why?

  • The Link app has priority over SIP/mobile;

  • If the user doesn’t answer in the app, and voicemail kicks in on the mobile phone:

    • the panel will consider the call answered by voicemail;

    • this disrupts the logic of forwarding entirely;

  • Even if you manually forward to the mobile, the app will always take precedence if installed and logged in on the same device.

Best practice: choose either app or mobile, not both at once.

 

Everything’s ready to go — make a quick test call and see how smoothly your SIP Trunk works.

 

 

Related content