Integrating IRIS4000 firmware with FreePBX/Asterisk

posted May 19, 2018, 11:17 AM by EICSS Info   [ updated May 19, 2018, 11:22 AM by EICSS Engineering ]
IRIS4000 hardware, specifically designed for Orange Pi Zero, allows developing low cost, low power and compact 2 FXO Asterisk appliance. To avoid dependency on complex kernel modules, IRIS4000 is user space application which integrates IRIS4000 with Asterisk as a SIP trunk. Please follow instructions below to get a complete appliance up and running assuming you have already installed Asterisk and FreePBX on the device and have latest IRIS4000 firmware. Please note that these instructions are based on version 13 of both Asterisk and FreePBX.

FreePBX/Asterisk Configuration

For a fully capable appliance which can pass through incoming CID as it, you need to create a pjsip_trunk. Go to Connectivity->Trunks and create a pjsip trunk as shown below:

Go to pjsip Settings tab and enter data as shown below:

Submit the changes and you will have a pjsip trunk named IRIS4000_PJSIP.

Next, you need to create outbound route (Connectivity->Outbound Routes) as shown below:

The most important item here is 'Trunk Sequence for Matched Route' which should be set to IRIS4000_PJSIP trunk created in previous step. Another important thing is Dial Patterns as show below:

We have chosen to initiate all outbound calls over this trunk using prefix *81. The ',' in match pattern indicates that any number of digits are allowed and would be passed on to the trunk. Please feel free to chose any suffix that suites you.

Next, you need to create and inbound route (Connectivity->Inbound Routes):

We have named inbound route IRIS4000_INBOUND but feel free to name it anything. The most important item here is DID number which has been set to 2000. Again, this can be any number as long as the same is referred to in the firmware (discussed later). Another important item is 'Set Destination'. You can land incoming call to a number of destinations. Here, we opted an extension but it can be a ring group, IVR or any other option. Feel free to experiment.

Once these three items are configured, Apply the settings using red button in upper right corner and you are done preparing FreePBX for iris4000.

Firmware Configuration

The most important item in firmware configuration for integration with Asterisk is DID Number. If you chose to set to 2000 as shown above, you don't need to change anything in cpe.conf. If you did change it, just change fxo-forward and fxo2-forward configuration items to point to that DID.

That's all. Run the firmware with configuration file as parameter and you should be able to successfully route both inbound and outbound calls from/to IRIS4000.