IRIS4000 board is shipped mounted with two rows of female connectors to plug-in Orange Pi Zero as drop down module. However, Orange Pi Zero only comes with one row of DIL male header. Before mounting Orange Pi Zero on IRIS4000, please make sure you have soldered a 13-pin SIL male header on available space on bottom side of the board. After mounting Orange Pi Zero on IRIS4000 and connecting to LAN, power it on using DC-pin power connector on IRIS4000. Caution: don’t power the board using Orange Pi Zero micro USB connector. For a smoother trouble free operation, use a high quality 5V DC power supply rated at 2A. Once the board boots up, SSH to Orange Pi using provided credentials and proceed as follows to configure and run the firmware:
Hardware Specific Configurations
Enabling FXO ports
You can enable/disable individual ports by setting corresponding parameters in cpe.conf:
# Enable/disable FXO
fxo-device enable
# Enable/disable FXO2
fxo2-device disable
Configuring USB Audio
IRIS4000 uses on-board USB voice codec for voice communication. First, make sure that the audio device has been successfully detected by Linux, using lsusb command:
The entry with PCM2900C is the entry you are looking for. If you don’t see such an entry, the power supply is noisy. Use a good quality, preferably filtered, power supply and reboot the board.
If USB device is there, run aplay -l command to find out card number of the device.
In the above example, the USB device is mapped to card 2, device 0. Therefore, set audio device in cpe.conf:
# Audio device
audio-device plughw:2,0
SIP Configuration
IRIS4000 integrates with FreePBX as PJSIP trunk. To be able to pass original caller ID to Asterisk, device authentication is disabled in the trunk as mentioned in subsequent section. Therefore, the firmware doesn’t need to register with Asterisk as a SIP client. However, there has to be an inactive entry to satisfy the firmware. The default entry in cpe.conf looks like this and should not be changed:
# user password server port enable
sip 0 0 127.0.0.1 5060 0
The last parameter indicates that no registration message will ever be sent to Asterisk.
FXO Ports Configurations
These are setting for call progress tones and CID for both FXO ports. The settings are self explanatory and default settings are for the US. You may want to change these to match your regional settings. You may also want to change CID settings to match your land line configuration. Default CID settings are for the US are:
# CID detection standard (dtmf, bell, etsi, none)
fxo-cid-standard bell
# CID detection alert (ring, dt, lr, none)
fxo-cid-alert ring
# CID detection wait time
# Value 0-30. Change it to tune to CID on your line
fxo-cid-wait 15
Please pay attention to last configuration item fxo-cid-wait. This is delay in 20 ms units which CID detector should use before starting decoding CID. You may have to tweak this value to match your service provider CID signaling.
Last items in FXO configuration are fxo-forward & fxo2-forward. These are for forwarding incoming call on FXO ports to DID 2000. If you have configured a different DID value in FreePBX as described in subsequent section, change the value accordingly. The default configurations look like:
# FXO forward
fxo-forward 2000
# FXO2 forward
fxo2-forward 2000
Troubleshooting
You may want to turn on debug messages in the CLI if things are not working as expected. This can be done by entering trace command in the CLI. You may want to report the trace messages when reaching out for support.
Integrating IRIS4000 firmware with FreePBX/Asterisk
To avoid dependency on complex kernel modules, IRIS4000 firmware is user space application which integrates IRIS4000 with Asterisk as a PJSIP 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.