SIP trunk setup guide for asterisk

SIP trunk setup guide for asterisk

Log into FreePBX.

  1. Click the Setup link at the top of the page, then “Trunks”, to the left of the page.
  2. Click “Add SIP Trunk”
  3. Scroll down to “Outgoing Settings”.
  4. Type King SIP into “Trunk Name”
  5. Enter the following into PEER Details (add fromuser=EXTN if you have multiple SIP trunks on the same Asterisk box):

context=from-trunk
fromdomain=sip.kingcomputer.com.au
user=EXTN
host=sip.kingcomputer.com.au
insecure=very
secret=EXTNPASSWORD
type=peer
username=EXTN

  1. Type your EXTN into “User Context”
  2. Enter the following into USER Details:

context=from-trunk
insecure=very
secret=EXTNPASSWORD
type=user

  1. Enter this into your register string:

EXTN:EXTNPASSWORD@sip.kingcomputer.com.au/EXTN

  1. To the right is an example with EXTN 70001, and password 12345.
  2. The same example details in an example sip.conf (if just using asterisk, not trixbox):

register=70001:12345@sip.kingcomputer.com.au/70001

[70001]
type=user
secret=12345
insecure=very
context=from-trunk

[King]
username=70001
type=peer
secret=12345
insecure=very
host=sip.kingcomputer.com.au
fromuser=70001
fromdomain=sip.kingcomputer.com.au

Be sure to reload asterisk after making changes to configuration files. You will have to then setup your dial plan in extensions.conf so that when you dial a number, it goes out through SIP/King/number_to_dial

Leave a Comment