Voyced SIP Trunk Setup for Asterisk
Supports inbound and outbound calling using Voyced as an external provider.
Requirements
Before you begin, make sure you have:
-
A working Asterisk installation (v16+ recommended)
-
SSH or terminal access
-
Your Voyced SIP trunk details:
Field | Value |
---|---|
SIP Username | Your-Voyced-DID |
SIP Password | YourServicePassword |
SIP Server | sip.voyced.eu |
Port | 5060 |
Codecs | alaw, ulaw, g729 |
Step 1: Configure sip.conf
Edit your /etc/asterisk/sip.conf
file. You'll need to modify two parts:
A. Global registration
Add this to the top under [general]
:
This tells Asterisk to register your trunk with Voyced and accept calls to your DID.
B. Define the Voyced SIP trunk
Recommended (modern format)
Still works (older format, if you're on older Asterisk)
Note:
-
type=peer
is now preferred for SIP trunks -
directmedia=no
replacescanreinvite=no
-
nat=force_rport,comedia
replacesnat=yes
for clearer NAT handling
Step 2: Handle Inbound Calls in extensions.conf
Open /etc/asterisk/extensions.conf
Example:
Replace 1001
with your internal SIP extension.
This setup answers the call, plays a welcome sound, tries to dial your extension, and then plays a fallback sound.
Step 3: Configure Outbound Calling
Add this to your default dial plan context:
Adjust the dial pattern (_0X.
) to match how your users dial out.
Step 4: Reload Asterisk
After saving your changes, reload Asterisk:
Or inside the Asterisk CLI:
Testing & Debugging
Check if the trunk is registered:
If you’re having issues:
-
Add
transport=udp
inside the trunk section -
Use
sip set debug on
to trace SIP packets
Recap of Modern Updates
Old | New |
---|---|
type=friend |
type=peer |
nat=yes |
nat=force_rport,comedia |
canreinvite=no |
directmedia=no |
Goto(s,6) |
Hangup() |
allow=ulaw first |
allow=alaw first (Europe) |
Final Tips
-
Always use
alaw
first if you're in Europe -
Only enable
g729
if your license allows it -
Keep your
sip.conf
andextensions.conf
backed up -
Make firewall exceptions for UDP 5060 and RTP ports (default: 10000–20000)
Last updated: 01/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.