Asterisk SIP Trunk Setup
Table of Contents
Scope
Intended Audience: WLPs and Above
The following template will be used to set up our hosted SIP trunk with your Asterisk server.
Requirements
- Administrator privileges to the web console
- SIP trunk information (see Create a SIP Trunk)
Please use this template and paste it into the /etc/asterisk/pjsip_custom.conf file. Once the file has been updated with the relevant information for the SIP trunk, you will need to restart asterisk using the following command sudo systemctl restart asterisk.
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
; ---------- AUTH ----------
[provider-auth]
type=auth
auth_type=userpass
username=<sip username>
password=<sip password>
; ---------- AOR ----------
[provider-aor]
type=aor
qualify_frequency=60
contact=sip:<sip username>@<domain name>:5060
outbound_proxy=sip:<outbound proxy>
; ---------- ENDPOINT ----------
[provider-endpoint]
type=endpoint
transport=0.0.0.0-udp
context=from-pstn
disallow=all
allow=ulaw,g729,g722
aors=sip:<sip username>@<domain name>
send_connected_line=no
rtp_keepalive=0
language=en
outbound_proxy=sip:<outbound proxy>
outbound_auth=provider-auth
from_domain=<domain name>
from_user=<sip username>
user_eq_phone=no
t38_udptl=no
t38_udptl_ec=none
fax_detect=no
trust_id_inbound=no
t38_udptl_nat=no
direct_media=no
rtp_symmetric=yes
dtmf_mode=rfc4733
; ---------- REGISTRATION ----------
[provider-reg]
type=registration
transport=0.0.0.0-udp
outbound_auth=provider-auth
retry_interval=60
fatal_retry_interval=10
forbidden_retry_interval=10
max_retries=10000
expiration=3600
auth_rejection_permanent=no
line=yes
endpoint=<unique name of trunk>
server_uri=sip:<sip username>@<domain name>
client_uri=sip:<sip username>@<domain name>:5060
outbound_proxy=sip:<outbound proxy>