FreeSWITCH

Setting up a SIP Trunk with Voyced in FreeSWITCH

Supports inbound and outbound calling using Voyced as an external provider.


What You’ll Need

Before starting, make sure you have:

  • FreeSWITCH server admin/root access

  • Your Voyced SIP credentials:

    • Account / DID: Your-Voyced-DID

    • Service password: YourServicePassword

    • SIP server: sip.voyced.eu

  • An internet connection with SIP (UDP) ports open in your firewall


Requirements Before You Begin

  1. Ensure your FreeSWITCH server has a public IP or is correctly NAT configured.

  2. Allow inbound/outbound SIP traffic on UDP port 5060 and RTP ports (usually 16384–32768).

  3. Disable any SIP ALG on your router/firewall.

  4. Confirm DNS resolution works so your PBX can resolve sip.voyced.eu.

  5. Have a basic understanding of editing FreeSWITCH XML configuration files.


Step 1: Locate the External SIP Profile

FreeSWITCH uses SIP profiles located in:

bash
 
/etc/freeswitch/sip_profiles/external/

(or /usr/local/freeswitch/conf/sip_profiles/external/ depending on your install).

 

Step 2: Create the Voyced Gateway File

Create a new XML file called:

bash
 
voyced.xml

inside the /external/ directory.

 

Step 3: Add Voyced Gateway Configuration

Paste the following into voyced.xml:

xml
 
<include>
<gateway name="Voyced">
<param name="username" value="Your-Voyced-DID"/>
<param name="password" value="YourServicePassword"/>
<param name="proxy" value="sip.voyced.eu"/>
<param name="realm" value="sip.voyced.eu"/>
<param name="register" value="true"/>
<param name="from-user" value="Your-Voyced-DID"/>
<param name="from-domain" value="sip.voyced.eu"/>
<param name="expire-seconds" value="3600"/>
<param name="retry-seconds" value="30"/>
<param name="extension-in-contact" value="true"/>
</gateway>
</include>

 

Step 4: Set Codec Preferences

Voyced supports:

  • PCMA (alaw)

  • PCMU (ulaw)

In /etc/freeswitch/vars.xml, make sure:

xml
 
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMA,PCMU"/>
<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMA,PCMU"/>

 

Step 5: Outbound Route (Dialplan)

In /etc/freeswitch/dialplan/public/ create a file, for example:

bash
 
voyced_outbound.xml

Add:

xml
 
<extension name="voyced_outbound">
<condition field="destination_number" expression="^\+?(\d+)$">
<action application="bridge" data="sofia/gateway/Voyced/$1"/>
</condition>
</extension>

 

Step 6: Inbound Route (Dialplan)

In /etc/freeswitch/dialplan/public/ create or edit:

bash
 
voyced_inbound.xml

 

Example:

xml
 
<extension name="voyced_inbound">
<condition field="destination_number" expression="^Your-Voyced-DID$">
<action application="answer"/>
<action application="bridge" data="user/1000@domain.com"/>
</condition>
</extension>

Replace 1000@domain.com with your local FreeSWITCH user/extension.

 

Step 7: Apply and Reload

Run:

bash
 
fs_cli -x "reloadxml"
fs_cli -x "sofia profile external rescan"

 

Step 8: Testing

  • Make an outbound call to verify your gateway is working.

  • Call your Voyced DID from a mobile/landline to test inbound routing.


Troubleshooting

  • Gateway not registering → Check username/password and firewall rules.

  • No audio → Check NAT/RTP port forwarding.

  • 404 inbound → Ensure the inbound route matches the exact DID format Voyced sends.


Tip:
Once working, you can duplicate the gateway for multiple Voyced DIDs by creating new XML gateway files with different names but the same proxy and unique credentials.

 

 

Last updated: 10/08/2025

 

 


© Voyced
All information provided is copyrighted and purely informative in nature. It is maintained by Voyced with the greatest of care using reliable sources only.
Given the fast evolution of the telecom sector, Voyced does not offer any guarantee about the accuracy and completeness of the information offered. 
We explicitly do not give anyone permission to use this information in any other way than to inform themselves about what (legal) requirements there may be and they need to comply with when registering Services and/or DIDs with Voyced.

  • FreeSWITCH, setup manual, setup instructions, setup, IP PBX, setup details, IPPBX
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

3CX

Voyced SIP Trunk Setup for 3CX (Manual Configuration) Works for inbound and outbound calls using...

Asterisk

Voyced SIP Trunk Setup for Asterisk Supports inbound and outbound calling using Voyced as an...

FreePBX

SIP Trunk Setup for Voyced – FreePBX Manual Use this guide to connect your FreePBX system to...

Elastix

SIP Trunk Setup for Voyced – Elastix Manually configure a SIP trunk to connect your Elastix...

Issabel

SIP Trunk Setup for Voyced – Issabel This manual explains how to connect your Issabel PBX system...