Introduction


At the end of this article, you will be able to configure a SIP trunk from your Asterisk PBX to the VoIPcloud network. Should you need any assistance, feel free to contact our support department.

 

Configuring a SIP trunk to Asterisk PBX


The first process to getting your Asterisk PBX online is to log into your customer portal, then select the order services tab. From here expand the SIP trunk menu, add the number of channels you require and add a new SIP trunk, as outlined in the screenshot below. Ensure you accept the service terms and conditions then submit the order before continuing.

 

asterisk_sip_img1.png

 

Next, click on the PBX tab located in the top menu bar, drag and drop the SIP trunk object onto the main screen from the left-hand toolbox. Now, click on the settings icon and change the mode to create SIP registration. After that, the SIP trunk details will be displayed as shown below. Please note the "allow override existing contact" checkbox. When enabled, any new SIP trunk registration will replace the old connection, preventing multiple registration attempts. This feature is useful when changes are made often to the SIP trunk. However, be aware that it might compromise security.

 

asterisk_sip_img2.png

 

Now you are ready to configure the SIP trunk on your Asterisk PBX. For this, you should edit the sip.conf file using your preferred text editor.

 

asterisk_sip_img3.png

 

In the sip.conf file, you should use the following code with the information collected from the SIP trunk details, as shown in the image below. Please note that it is important to specify the port in the host field.

 

[voipcloud wholesale sip trunk]
username=[SIP username]
type=peer
secret=[YOURPASS]
qualify=yes
nat=force_rport
host=sipm6.au.voipcloud.online:7060 (or 103.242.182.115 depending on if you have DNS configured in your PBX)
port=7060
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=g722
allow=ulaw
insecure=port,invite

 

You will also need to configure the registration string as shown below.

 

sipusername:sippassword@sipm3.au.voipcloud.online:7060

 

asterisk_sip_img4.png

 

Once you have edited your sip.conf file reload the configuration to force the new changes. The status of the SIP trunk on inside your customer portal should change to reachable. The final process is to test inbound and outbound calls to ensure they are working correctly, should you have issues with calls it is important you check you have configured the inbound and outbound routes correctly on your Asterisk PBX.

 

asterisk_sip_img5.png

 

Watch this in action


The video below will show you a visual representation of the areas covered throughout this knowledge base guide.

 

callerid.gif