User Tools

Site Tools


Action disabled: revisions
kb:iax:trunk.info

IAX2 Trunk setup in FreePBX

This write-up will show you how to set up an IAX2 Trunk provided by Hamshack Hotline. It will include how to manually set a DID on the trunk which will enable you to create a single inbound route based on DID and route that to an IVR, extension, etc.

Security

Hamshack Hotline allows users to connect their PBX to our system with sole purpose for YOU ONLY (our direct HH customer) to place calls to HH extensions. However, you may not provide 3rd party carriage of call traffic via your trunk.

In other words, if your trunk allows others a means to connect or call into your PBX (from a source not HH) those callers are not allowed onto our system, as we have no means to positively identify them as a properly licensed amateur radio operator.

HH trunks fully support bi-directional traffic with this rule in mind. HH users may call your trunk to reach you. You, as an HH user, may use your trunk to call other HH users. You are not allowed to have others use your trunk to call HH users.

This is to eliminate the potential of unauthenticated traffic (we try to do our best to keep traffic compliant since we have interconnected RF systems - we take that responsibility very seriously).

Please note, that if at any time we detect that your trunk is in violation of this policy, we will terminate your trunk extension.

Trunks

Before setting up a Trunk connection to HH, you will need to request an IAX2 Trunk extension number from HHOPS. Sorry, we do not do SIP Trunks. Your PBX must be capable of IAX2 trunking.

The HHOPS helpdesk can be reached at: https://hd.hamshackhotline.com/

You will also need to have a Fully Qualified Domain Name [FQDN] already established that resolves to the IP address of your Trunk. We will not accept IP addresses directly, PERIOD !

Once the IAX2 Trunk extension is created, HHOPS will email you with the extension number and your secret password. Once you have that information, you can then setup the corresponding IAX2 Trunk in your PBX.

Now, Log into your FreePBX, and go to the Connectivity and then Trunks menu.



Click the Add Trunk button and then choose the Add IAX2 Trunk option.



Under the General tab, Set the Trunk Name (all Trunk Names must be unique) and
your Outbound CallerID. (The HH Extension # that was emailed to you)



Next, click on the iax Settings tab.

Under Outgoing set the Trunk Name (Must be a unique name).

Under PEER Details you want to enter the following:

username=your_extension_number
secret=your_password
type=peer
host=hhus.hamshackhotline.com

Be sure to change the username to your HH Extension number, and obviously change the secret to the password that was provided to you. If you were provided a host other than hhus.hamshackhotline.com, replace the host with whatever host was outlined in the email you received from HHOPS.



Click on the Incoming tab. Delete everything that is prefilled for you.

In the USER Context box, enter something you designate to identify this incoming connection. Usually just placing your HH extension number here is adequate.

In the User Details section, enter the following details

type=user
context=from-trunk

And lastly, in the Register String box, LEAVE THAT TOTALLY BLANK !


Click submit to set the trunk settings.



Inbound Route

Now click on Connectivity followed by Inbound Routes.



Click Add Inbound Route.



In the General tab. Set the Description to name the route (example: HH TRUNK)

Set the DID to match your Trunk extension number that was assigned from HHOPS.

Leave the CID blank. (Which should default to the word ANY)



On the same screen. scroll all the way to the bottom to the Set Destination box.

Click on == choose one == to select your desired destination.

This is obviously not a “one size fits all” option. It depends on your system setup, and your preferences. Hopefully if you have an existing system, you have an idea on this.

You can set this to an 'IVR' menu, or an extension number that exists on your server, or what ever option that works for your setup.

In the example below, we show that we've chosen the “IVR (Interactive Voice Response)” menu, and then further selected the “Incoming - What Extension Please” response menu that we created elsewhere.
(Note: creating IVR menus is not covered in this guide)

EXAMPLE

Click Submit to save your changes.


Outbound Route

NOTE: This outbound route setup is for a basic setup. It will make it so in order to call some other HH number, you will have to dial an 8 first. There are many ways to do the Outbound Route, but this will provide a basic working setup.

Click Connectivity and then select Outbound Routes



Then click Add Outbound route.



Under the Route Settings Tab, enter a Route Name and your Route CID. The “Route CID” is your HH Extension number.



On the same screen, scroll down to Trunk Sequence for Matched Routes
Locate the trunk you created earlier (however you named it) and set it here.

Example:



Next, scroll back to the top and click the Dial Patterns tab.



Set the prefix for each entry to 8, and use the following dial patterns (one row created for each pattern) .You will need a minimum of four rows, as HH uses 3 digit extensions, 4 digit extension, 5 digit extension and 10 digit extensions.

Note: The 'X's are wild cards. So any 3, 4, 5, or 10 digit number dialed (when first prefixed with the number '8') will match the pattern scheme we just created.


Click Submit and then finally click Apply to apply all Changes.

Lastly, you will need to port forward UDP Port 4569 in your router to the LAN IP address of your PBX.

At this point, you should be set up and operational.

I hope this works for you and makes it an easy setup!

kb/iax/trunk.info.txt · Last modified: 2023/10/05 06:15 by kg6baj