Engineer's Corner

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.

Using OPBX Image for Orange Pi Zero

posted Feb 2, 2018, 10:23 AM by EICSS Engineering

For customers who have got access to OPBX image, please follow the steps below to get a fully working FreePBX+Asterisk on Orange Pi Zero:

1- Flash the image on to an SD card. The image can fit in a 4 GB card but that wouldn't left enough space for data. An 8 or 16 GB card would be better.

2- Boot from the card and resize the partition to span all available space using resize2fs utility.

3- Reboot and run following command to fix a little bug which prohibits saving configuration changes in FreePBX:

chown -R asterisk. /var/run/asterisk/

That's all. Access FreePBX in browser using IP address of the device and play around with it. You can use your tiny yet powerful PBX for all IP calls or if you are using one of our analog boards (IRIS3000 or IRIS4000), you can integrate our firmware with FreePBX as SIP trunk and have a fully working Asterisk appliance based on Orange Pi Zero.


Firmware configuration for IRIS4000

posted Jan 5, 2018, 10:24 AM by EICSS Info   [ updated Feb 2, 2018, 10:25 AM by EICSS Engineering ]

IRIS4000 is our latest telephony hardware with two FXO ports. The configuration file i.e. cpe.conf looks pretty much identical to that for IRIS2000/IRIS3000 with some minor changes. We will be discussing these changes here for proper configuration of IRIS4000 firmware.

Hardware specific configurations

Since IRIS4000 has two FXO ports instead of one FXS and one FXO on IRIS2000/IRIS3000, the section has configuration parameters to enable/disable the two ports. These look like this:

# Enable/disable FXO
fxo-device enable

# Enable/disable FXO2
fxo2-device enable

These configuration parameters allow you to enable/disable any or both FXO ports.

FXO port configurations

This section has call progress tones configurations as well caller ID related configurations which apply to both FXO ports. The last two configuration parameters tell the firmware where to forward the inbound calls on FXO ports:

# FXO forward - extension where inbound on FXO
# should be forwarded to
fxo-forward 101@

# FXO2 forward - extension where inbound on FXO2
# should be forwarded to
fxo2-forward 102@

In this case, inbound on FXO is being forwarded to an extension 101 on local network while inbound on FXO2 is being forwarded to extension 102. Remember, however, that if you are using Asterisk or similar software and it's running on the same hardware the firmware is running on, the IP addresses above should be replaced with local loopback address

Note: IRIS4000 firmware has a built-in call router. It keeps track of FXO port usage and routes outbound call to available FXO port. If no FXO port is available, the call is rejected.

Using IRIS2000/IRIS3000/IRIS4000 with OrangePi Zero

posted Mar 17, 2017, 11:28 PM by EICSS Engineering   [ updated Jan 5, 2018, 9:53 AM by EICSS Info ]

Last time, we discussed integrating IRIS2000 with Orange Pi with a focus on Orange Pi One. In the mean time, Orange Pi Zero has become available. This board is an ideal choice as low cost headless computer as it is even smaller footprint and there are two good additions. One, is that it has USB signals available on a connector, making it easy to develop production grade hardware which rely on USB - no more USB cables. Second, it has WiFi making it a real value for money.

Orange Pi Zero is based on Allwinner H2 SoC compared to H3 SoC on Orange Pi One. Besides similarities between the two, there are differences - GPIO mapping is different event though 26-pin GPIO connector is RPi compatible. This means a different variant of Linux distribution (armbian) as well as WiringOP.

For Orange Pi Zero, relevant armbian version can be downloaded here:

Relevant WiringOP version can be downloaded here:

That's all. IRIS2000/IRIS3000/IRIS4000 should now run flawlessly with Orange Pi Zero.

Note: This article is an addendum to a previous article about integration with Orange Pi One located here.

Using IRIS2000 with Orange Pi

posted Nov 23, 2016, 9:52 AM by EICSS Engineering   [ updated Dec 20, 2017, 7:28 AM by EICSS Info ]


Orange Pi is a low cost drop-on replacement of Raspberry Pi. As powerful as Raspberry Pi 2 and with a retail price tag of less than $10, it drives down product cost significantly. Keeping this in mind, we decided to get IRIS2000 working with Orange Pi. The model we choose was Orange Pi One which is by far lowest cost model:

Orange Pi One

The best thing about Orange Pi One is that its GPIO connector is compatible with Raspberry Pi thus making the transition painless. Once you have the board and other accessories (power supply, USB cable, SD card etc.), follow the steps below to get IRIS2000 working with this low cost computer.

Step 1: Mount the iris2000 on Orange Pi

IRIS2000 mates with first 26 pins of Orange Pi One GPIO while for audio interface, a M-M USB type A cable is used to connect IRIS2000 USB port to one and only USB port on Orange Pi One.

Step 2: Setting up Linux environment

Get a good Linux distro. We tried various but found debian jessie from armbian to be the best. You can download it from this page:

Extract the image, burn it to an 8 GB SD card and insert it into micro SD card slot in Orange Pi board. Power up the board. If everything goes well, you should be able to SSH to the board with following default credentials:

Login: root
Password: 1234

You will be asked to change password on first boot as well as create a user account.

Note: You should be able to use keyboard and mouse if you have connected HDMI display. However, we didn't see any activity on LCD and assumed either cable was faulty or the interface on the board itself was to blame.

Step 3: Installing required libraries

As for Raspberry Pi, you need to install two libraries required by iris2000 firmware:
  • libasound2-dev
  • wiringPi

libasound2-dev is standard ALSA library and can be installed with apt-get. For Orange Pi, a modified version of wiringPi called WiringOP is available here:

The installation process is quite straight forward, just clone the repository and build:

git clone -b h3 && cd WiringOP

chmod +x ./build

sudo ./build

That's it. The library will be installed and you can run all wiringPi tests.

From here on, you can verify ALSA device number of USB codec and update cpe.conf accordingly.


Getting IRIS2000 working with Orange Pi One was difficult but fun. We had to try a number of Linux distros before we settled down on armbian. The efforts paid up and we have a even lower cost supported platform.

That's all for now. Good luck with your next Pi (Raspberry or Orange) project. Feel free to ask questions!

sk400vop demo for ARM Linux based platforms (armphone)

posted Sep 28, 2016, 11:35 AM by EICSS Engineering   [ updated Dec 20, 2017, 7:31 AM by EICSS Info ]

This CLI based demo allows initiating and receiving SIP calls. The demo binary is licensed to both individual and commercial customers free of cost. Please read through the license terms before you download and use the demo.

We intend to keep the demo updated as we add new features and fix bugs. Limited number of feature requests can be entertained provided they feel fit in general for all audience. Please send your feature request to

Tested platforms

Raspbian Jessie (Raspberry Pi 1/2/3)


  • USB audio dongle
  • ALSA run-time libraries

Running the demo

Please follow steps below to run the demo in popular ARM based platforms.

Step 1: Extract the archive

Extract the archive to a temporary folder:

tar xvf armphone.tar.gz

Following two files will be extracted:

armphone - executable

armphone.conf - Configuration file

Configure the phone

Edit the configuration file and change following configurations to your local settings:

audio-device - Provide USB audio device card and subdevice

net-device - Network interface to bind to

sip - SIP account info

bind - Local SIP port to bind to

avpf - Enable if your service requires AVPF instead of AVP in SDP

Run the executable

Run armphone with configuration file as parameter:

sudo ./armphone ./armphone.conf

If executable runs without any errors, it should produce an output as shown below:

You can find out current registration status using command ippconfig:

Or type help to list available commands.

That's all for now. Most of the commands are self explanatory. The phone also offers UDP based API which can be used to hook it up to a custom UI. Details of the API will be provided in another session.

Integrating IRIS2000 with FreePBX on Raspberry Pi

posted Aug 15, 2016, 11:28 AM by EICSS Engineering   [ updated Jan 5, 2018, 10:29 AM by EICSS Info ]

There are two aspects to integration with Asterisk:
  • PSTN to VoIP call
  • VoIP to PSTN call

Both the scenarios require configuration either in IRIS2000 configuration, Asterisk configuration or both. These are discussed below.

Configuration for PSTN to VoIP call

For an inbound analog call on FXO, fxo-forward command in cpe.conf needs to be configured to an extension where analog call can be routed. For example, if 101 is the extension where analog call should land, fxo-forward would look like

fxo-forward 101@

Please note assumption that Asterisk is running on same RPi. If Asterisk is running on a different machine on your network, replace loopback address with IP address of your Asterisk machine.

Configuration for VoIP to PSTN call

To let Asterisk route dialed numbers matching preset dial rules, we need to add custom trunk in Asterisk and point it to IRIS2000. To do this in FreePBX, select 'Trunks' from 'Connectivity':

Select 'Add Custom Trunk' from list of trunk types:

The most important part is the dial string which should point to IRIS2000 on localhost. In case FreePBX is running on a different machine, change to IP address of that machine.

Please note that in this example, IRIS2000 firmware was configured to listen on a different port (5091) than standard SIP port 5060 to avoid conflict with FreePBX which itself is configured for port 5060. You can use a port of your choice for IRIS2000 as long as there is no conflict.

That's all for integration with Asterisk. For more information about configuring dialing rules and trunks, please refer to FreePBX documentation.

Getting started with IRIS2000 on Raspberry Pi

posted Aug 13, 2016, 11:04 AM by EICSS Engineering   [ updated Dec 20, 2017, 7:34 AM by EICSS Info ]

You have received your board and now need to play around with it. Here are the items you need before you proceed:

  • USB power supply rated at 2A
  • USB Type A M-M cable
  • SD card with Linux distro (Wheeze/Jessie/Ubuntu) installed
  • A Raspberry Pi computer (Pi 1/2/3/Zero)

Here are the steps you need to follow:

Step 1: Mounting the board on Raspberry Pi

Being backward compatible, the board mates with first 26 pins of GPIO while for audio interface, a M-M USB type A cable is used to connect IRIS2000 USB port to one of USB ports on Raspberry Pi as shown below.

Step 2: Setting up Linux environment

Power on the board and let it boot to completion. I'm assuming the Pi is connected to your local network using Ethernet port or WiFi. Once you discover IP address of the device, you can connect to it using SSH. Alternatively, you can connect a display and keyboard to the Pi. Following libraries are required to run demo firmware:

  • libasound2-dev
  • wiringPi

Once these libraries are installed, you can run demo firmware but before you do that, check mapping of USB audio device using aplay -l:

This will list all ALSA compatible devices including IRIS2000 USB audio device. If you don't see the device in the list, verify that USB codec has indeed been enumerated by lsusb command in bash as shown below.

The entry with PCM2900C is the entry you are looking for. If you don't see such an entry, make sure USB cable is connected correctly, is not faulty and that you are using a high quality USB power supply as USB devices are not detected if power supply is noisy.

Step 3: Configuring firmware

We need to configure the firmware before running the firmware. Simply edit the configuration file named cpe.conf in any editor and follow the comments to configure the firmware to your requirements.

Step 4: Running firmware

We are now ready to run the firmware. The firmware file name is cpe and should be run with sudo. The firmware assumes that configuration file named cpe.conf resides in the same folder the firmware is being executed from.

All is well if the firmware runs successfully all the way to a command shell. Depending upon your configurations (standalone analog-to-VoIP call router or integrated with Asterisk), you can go ahead and test out analog-VoIP call bridging.

That's all for now. A separate post discusses IRIS20000 integration with Asterisk.

Adapting IRIS1000/2000 to other low cost computers

posted Aug 10, 2016, 10:01 AM by EICSS Engineering   [ updated Aug 15, 2016, 10:48 AM ]


IRIS series of telco hardware was originally designed for Raspberry Pi. IRIS1000 was designed for Raspberry Pi Model B Rev 2. Availability of I2S signals on a separate connector (P5) allowed use of I2S codec for audio. The board was eventually not directly compatible with later versions of Raspbery Pi and had to be redesigned. For full forward and backward compatibility, we decided to use USB codec. This gave birth to iris2000 which is compatible with all versions of Raspberry Pi.

Both versions of hardware can be used with other low cost computers. In fact, low cost products are probably more feasible with a sub USD 15 computer than RPi as this can substantially reduce product cost (RPi zero is another option but it has limited processing power to single core processor).

IRIS1000 hardware interface

Audio interface

Stereo I2S interface with following audio format:

PCM, signed, 16-bit

One channel of I2S is mapped to FXO while the other is mapped to FXS.

GPIO interface

Three GPIO pins are required for FXO while two GPIO pins are required for FXS interface. Thus a total of 5 GPIO pins are required for status/control of analog interfaces. A couple of more GPIOS may be used to indicate current status of the interface (used/unused etc.).

IRIS2000 hardware interface

Audio interface

USB audio interface with following audio format:

PCM, signed, 16-bit

One channel of I2S is mapped to FXO while the other is mapped to FXS.

GPIO interface

GPIO requirements are same as for IRIS1000.

IRIS1000/2000 software interface


In both cases, the audio interface can be accessed using Linux ALSA library.


GPIO can be accessed using platform specific GPIO library. In Raspberry Pi Linux distros, WiringPi library can be used to access GPIO.

Detailed information on exact GPIO mappings is available to hardware design licensees.

1-9 of 9