Asterisk

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]:

register => Your-Voyced-DID:YourServicePassword@sip.voyced.eu/Your-Voyced-DID

This tells Asterisk to register your trunk with Voyced and accept calls to your DID.

 

B. Define the Voyced SIP trunk

Recommended (modern format)

[Your-Voyced-DID]
type=peer
qualify=yes
nat=force_rport,comedia
dtmfmode=rfc2833
insecure=port,invite
directmedia=no
secret=YourServicePassword
username=Your-Voyced-DID
fromdomain=sip.voyced.eu
host=sip.voyced.eu
transport=udp
disallow=all
allow=alaw
allow=ulaw
allow=g729

 

Still works (older format, if you're on older Asterisk)

[Your-Voyced-DID]
type=friend
nat=yes
canreinvite=no

 

Note:

  • type=peer is now preferred for SIP trunks

  • directmedia=no replaces canreinvite=no

  • nat=force_rport,comedia replaces nat=yes for clearer NAT handling

 

Step 2: Handle Inbound Calls in extensions.conf

Open /etc/asterisk/extensions.conf

Example:

[from-voyced]
exten => Your-Voyced-DID,1,Answer()
same => n,Playback(demo-abouttotry)
same => n,Dial(SIP/1001)
same => n,Playback(demo-nogo)
same => n,Hangup()

 

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:

 

[default]
exten => _0X.,1,Dial(SIP/${EXTEN}@Your-Voyced-DID)
same => n,Hangup()

 

Adjust the dial pattern (_0X.) to match how your users dial out.

 

Step 4: Reload Asterisk

After saving your changes, reload Asterisk:

 

asterisk -rx "sip reload"
asterisk -rx "dialplan reload"

 

Or inside the Asterisk CLI:

 
sip reload
dialplan reload

 

Testing & Debugging

Check if the trunk is registered:

 

asterisk -rvvv
sip show registry
sip show peers

 

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 and extensions.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.

  • Asterisk, Asterisk interoperability, setup, setup manual, setup instructions, setup details, IP PBX, IPPBX
  • 0 användare blev hjälpta av detta svar
Hjälpte svaret dig?

Relaterade artiklar

3CX

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

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...

Sangoma IP PBX

SIP Trunk Setup for Voyced – Sangoma IP PBX This guide explains how to set up a SIP trunk for...