Log into FreePBX.
- Click the Setup link at the top of the page, then “Trunks”, to the left of the page.
- Click “Add SIP Trunk”
- Scroll down to “Outgoing Settings”.
- Type King SIP into “Trunk Name”
- 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
- Type your EXTN into “User Context”
- Enter the following into USER Details:
context=from-trunk
insecure=very
secret=EXTNPASSWORD
type=user
- Enter this into your register string:
EXTN:EXTNPASSWORD@sip.kingcomputer.com.au/EXTN
- To the right is an example with EXTN 70001, and password 12345.
- 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=usersecret=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