Getting Started with Asterisk/FreePBX

This guide gives a guideline on setting up outbound calling via SureVoIP. It is recommended you use a GUI for setting up Asterisk, such as FreePBX, as it makes setting up a lot easier, and minimises potential for mistakes, which can be very costly if your PBX is compromised.

Please note that this set up guide is for guidance only - it is up to yourself to ensure your phone system has been correctly configured.

SureVoIP can not be held responsible for any damages or losses caused by using this set up guide.

If you would like for SureVoIP to look over your settings and to help get set up then please get in touch. Depending on what is required this may be a chargeable service.

Setting Up The Outbound SIP Trunk

Log into Asterisk FreePBX Administration

Go to Trunks → Add Trunk

Trunk Name: SureVoIP SIP or something meaningful Outbound Caller ID: Your supplied phone number

Dialled Number Manipulation Rules

Prepend Prefix Match Pattern Notes
9 112 Emergency Dialling
9 999 Emergency Dialling
9 101 Police Non-emergency
9 105 National power cut and electricity network safety service
9 111 NHS Non-emergency
9 119 COVID-19 Response
9 118XXX 118 directory enquiries (note: this can be expensive to call)
9 116XXX Euopean 116 helpline
44 90 ZXXXXXXXX National Dialling, 10 digits
44 90 ZXXXXXXXXX National Dialling, 11 digits
900 ZXXX. International Dialling
112 Emergency Dialling
999 Emergency Dialling
101 Police Non-emergency
105 National power cut and electricity network safety service
111 NHS Non-emergency
119 COVID-19 Response
118XXX 118 directory enquiries (note: this can be expensive to call)
116XXX Euopean 116 helpline
44 0 ZXXXXXXXX National Dialling, 10 digits
44 0 ZXXXXXXXXX National Dialling, 11 digits
00 ZXXX. International Dialling

Under PEER Details (Outgoing):

username=xxxxxxxxxxx
type=peer
secret=xxxxxxxxxxxxxxxxx
host=xxx.xxxxxxxx.xx.xx
fromdomain=xxx.xxxxxxxx.xx.xx
fromuser=xxxxxxxxxxx
canreinvite=no
disallow=all
allow=alaw

Where xxxxxxxx is provided in your welcome email. username and fromuser are the same. host is the SureVoIP SIP address. fromdomain is the same as host.

Note: your PEER Details may vary than that described above, such as the codecs.

This is optional. This information is only required if you prefer not to set Allow Anonymous Inbound SIP Calls.

type=friend
host=x.x.x.x
context=from-trunk
insecure=very
disallow=all
allow=alaw

You will need to create multiple trunks with the User details.

where x.x.x.x is the IP address we supply. Contact us for this information.

Be sure to set the context relevant to your particular configuration.

:!: SureVoIP does not support SIP trunk registration.

Incoming calls to your SIP numbers will go to the SIP URI specified on your account portal.

You will need to go to Settings → Asterisk SIP Settings and set Allow Anonymous Inbound SIP Calls to Yes.

This is required as incoming calls to your Asterisk system will originate from various servers in the SureVoIP network. Please configure your firewall to only allow incoming VoIP traffic from our IP address ranges. Contact us for this info.

Note: if you have configured the USER details (Incoming) settings above then you can leave Allow Anonymous Inbound SIP Calls disabled.

Setting up the Inbound Route

Go to Inbound Routes → Add Incoming Route

Give it a meaningful description, such as SureVoIP Inbound

DID Number can be left blank or be your provided phone number. If you have multiple phone numbers (DIDs), then put it in here with 01234987654 format (STD with number).

Enter CID Prefix and Music on Hold if required.

Set Destination should be set to where the incoming call should go.

Click Submit

Setting up the Outbound Route

Go to Outbound Routes → Add Route

Give it a meaningful name, such as SureVoIP Outbound

Dialed Number Manipulation Rules:

Prepend Prefix Match Pattern Notes
ZXXXXX. 6 digits or more, first digit 1-9 as validated on outbound route

Under Trunk Sequence, select the SureVoIP Trunk previously created.

Click Submit.

Do not forget to click Apply Configuration.

Testing and Troubleshooting

If you require technical support, please be sure to provide a SIP trace to the technical support team. Guidance on obtaining this can be found at SIP Traces.

Your router may also need to be configured, and SIP ALG may need to be disabled depending on which router you are using. See SIP ALG for guidance on which routers may need adjusting.

Don't forget to configure your firewall correctly - see NAT and Firewall Settings for guidance.