Sample Asterisk Configuration Steps for use with SIP Trunks
Â
1. Modify Asterisk generic UA for better support -Â *(Recommended but not necessary)Â
a. Copy and paste the following into sip.conf: useragent='customer-name'
b. Replace 'customer-name' with your customers name
Â
2. Allow Asterisk to route inbound calls based on DNIS from To: in INVITE - *(This will also allow you to have 10 digit inbound routes)
a. Copy and paste the following into extensions_custom.conf:
[from-outside-redir]
;Dialed Number routing according to SIP To: header
exten => s,1,Goto(from-trunk,${CUT(CUT(SIP_HEADER(To),@,1),:,2):1},1)
Â
3. Create the SIP Trunk. You may create one 2-way trunk or individual inbound/outbound trunks.
Outgoing Settings
type=peer
insecure=invite,port
dtmfmode=auto
host=sip.sipresource.com
context=from-outside-redir
username='ACCOUNT-ID'
trustrpid=yes
sendrpid=yes
secret='SIP-PASSWORD'
allow=all
canreinvite=no
Incomming Settings
type=user
insecure=invite,port
dtmfmode=auto
host=sip.sipresource.com
context=from-outside-redir
allow=all
Register String
ACCCOUNT-ID:SIP-PASSWORD@sip.sipresource.com:5060
Â
Screen shot provides a visual example.