All articles
3 November 2026 VoxioTelecom

Asterisk PJSIP SIP Trunk Setup: Working Config for Wholesale Voice (2026)

Copy-paste PJSIP configuration to connect Asterisk to a wholesale SIP trunk: registration or IP auth, endpoint, dialplan with route prefixes, codecs and fixes for 401/403.

To connect Asterisk (PJSIP) to a wholesale SIP trunk you need four blocks in pjsip.conf — registration, auth, aor and endpoint — plus one dialplan line that sends the full international number. If you use IP authentication, skip registration and auth.

What you need

  • An active VoxioTelecom account with balance
  • A SIP trunk created in the portal (username/password or your server IP)
  • Gateway: sip.voxiotelecom.com, port 5060 UDP

pjsip.conf (username/password)

[voxio-reg]
type=registration
outbound_auth=voxio-auth
server_uri=sip:sip.voxiotelecom.com:5060
client_uri=sip:USERNAME@sip.voxiotelecom.com:5060

[voxio-auth]
type=auth
auth_type=userpass
username=USERNAME
password=PASSWORD

[voxio]
type=aor
contact=sip:sip.voxiotelecom.com:5060

[voxio]
type=endpoint
context=from-voxio
disallow=all
allow=ulaw,alaw,g729
outbound_auth=voxio-auth
aors=voxio
from_user=USERNAME
direct_media=no

For IP authentication, remove the registration and auth sections and outbound_auth. Your public IP must match the IP saved on the trunk exactly.

Dialplan

[from-internal]
exten => _X.,1,Set(CALLERID(num)=4930123456789)
 same => n,Dial(PJSIP/${EXTEN}@voxio,60)
 same => n,Hangup()

Dial the full international number without + or 00 (for example 4930123456789). For a specific route, put the route prefix in front — see route prefixes explained.

Caller ID

Set a real number in international format. Free text such as letters or random strings is passed as-is and many carriers reject or replace it. See how to change caller ID.

Quick fixes

  • 401 Unauthorized — wrong username/password, or outbound_auth missing on the endpoint.
  • 403 Forbidden — IP not registered, balance too low, or the route refused the call. See SIP 403 and 480 errors.
  • No audio — set direct_media=no and check NAT (external_media_address, external_signaling_address).
  • Check registration with pjsip show registrations.

Need help? Open a ticket from your portal.

See the live rate deck

Create an account to browse the full A-Z deck in your portal — Premium CLI and Standard clearly labelled, searchable by prefix or destination.

Create account