To properly connect the Grandstream UCM61xx Line of PBX’s with a FreePBX based Asterisk system was something not that straight forward and most people where facing issues in doing so. There is also no proper guideline or manual except Grandstream’s manual that is only for certain use cases as well we had Ward Mundy’s from NerdVittles guide,  this is also where this guide here is based off from.

 

First we have to understand that both systems although using Asterisk as its base use a slightly different approach in trunking thus we have to create more or less 2 trunks to achieve in and outbound call capabilities on both sides.

Lets Start with the UCM61xx and make sure that outbound can be achieved to your provider or your other office

First Create a VoIP Trunk:

create_new_trunk

1. Choose Register SIP Trunk

2. Choose a Name for your Provider (Trunk Name) and under host name the Providers IP Address.

3. Make Sure that the “Need Registration” checkbox is ticked

4. Fill out the Username and Password (either given by provider) or create one and we will later use the same username and password in your freepbx settings.

5. press Save

 

Edit the SIP Trunk as we have some additional settings to add.

additional_configuration_trunk

i choose as Provider name Astervox in this example.

what is still missing is the from domain and from user setting as well arrange the codecs based on your requirements and enable Qualify (so we can monitor the trunk)

press save

 

in addition we need to make sure that our NAT settings are set properly as well we have to create an outbound route

nat_settings

 

make sure to set this properly for the external and the internal ip address of your system. (i recommend in any case to have a FIX IP Address)

and now just create an Outbound route:

outbound_rule

in this case i create an outbound route for international calls (it could of course also be internal route between the pbx’s

Grandstream need before an outbound route always a _ (underscore) .

as well set the privilege level and choose your trunk that you configured.

 

this is it for now on the Grandstream site but we will come back to create an inbound extension for the Freepbx System (or lets do that now immediately to create inbound call capabilities)

just create a regular extension with password like here:

create_extension

no special settings for now.

 

log into your freepbx system and go to -> connectivity -> trunks.

create a new sip trunk to receive the calls from the UCM61xx

freepbx_in_setting

 

you need to give the trunk a name (this are the incoming from your site office settings,

normally this settings would be under incoming and not in the perr settings if you have a freepbx to freepbx trunk, with the UCM61xx we need to create the settings in the peer details.

use the username as set in your SIP trunk and the same password of course.

settings can vary slightly when it comes to the insecure settings (it can also be port,invite for example)

make sure you set the host to host=dynamic (even if you have a fix ip)

set the real to Grandstream and make sure to choose your inbound context properly (can be also from-trunk or whatever you have specified.

 

now we confirm the settings and create a secondary sip trunk (this will be the siptrunk to send traffic back to the UCM61xx.)

freepbx_out

 

here we add again the same data but have to add the Extension number and password of the extension into the Peer Details.

furthermore we have to add the register string. (example if your extension created is 3000 and the host is voip.mysiteoffice.com it would look like: 3000:secretpassword@voip.mysiteoffice.com/3000

last but not least create an Inbound route for this trunk.

and you should see the trunk registered like so:

trunk_registered

hope this little tutorial helped you to get your trunk properly up.

of course there are other ways to achieve it but so far for me this worked very well.

cheers

marco