Asterisk PBX SIP Trunk Configuration

Our service is 100% compatible with Asterisk using either standard SIP registration or IP authentication where SIP trunks are configured as such. Asterisk is the base software behind many open-source PBX distributions, including FreePBX, Trixbox and Elastix, and is also the enabler behind many other ITSPs and commercial PABX manufacturers.

Please Note: Chan SIP is now deprecated in favor of PJSIP
https://www.asterisk.org/asterisk-21-module-removal-chan_sip/

Suitable for Asterisk versions >13, you should have the following in your pjsip.conf file:

This configuration is for authentication based on a registration with username and password. The protocol can be changed as desired. TLS and SRTP will require additional configuration.

[transport-udp] ; Configures res_pjsip transport layer interaction.
type = transport
protocol = udp
bind = 0.0.0.0

[voicehost]  ; Contains information about an outbound SIP registration
type=registration
transport=transport-udp
outbound_auth=voicehost_auth
server_uri=sip:[sip-trunk-username]@[hostname]:5060
client_uri=sip:[hostname]:5060
retry_interval=20
expiration=3600

[voicehost_auth] ; Stores inbound or outbound authentication credentials for use by trunks, endpoints, registrations.
type=auth
password=[sip-trunk-password]
username=[sip-trunk-username]

[voicehost_aor] ; Stores contact information for use by endpoints.
type=aor
contact=sip:[sip-trunk-username]@[hostname]

[voicehost] ; Configures core SIP functionality related to SIP endpoints.
type=endpoint
context=voicehost-in
dtmf_mode=rfc4733
disallow=all
allow=alaw
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
timers=yes
from_user=[sip-trunk-username]
from_domain=[domain]
language=en
outbound_auth=voicehost_auth
aors=voicehost_aor

[voicehost] ; Maps a host directly to an endpoint
type=identify
endpoint=voicehost
match=[hostname]
Comms Council UK Members
Mutually Agreed Norms for Routing Security (MANRS)
The Internet Services Providers' Association (ISPA UK) is the UK's Trade Association for providers of Internet services
RIPE NCC is the regional Internet registry for Europe