I recently purchased a 2x FXO and 2x FXS adapter board that fits onto a Raspberry Pi.
It is called the PiTDM and is made in China by SwitchPi.com
Here is a photo of the board with 4 RJ11 ports, all configured as FXO ports using dual-port modules.
The PiTDM from SwitchPi uses standard FXO and FXS modules like the PCI or PCI-Express cards used on desktop PCs and there is a modified DAHDI driver so it works with Asterisk and with FreePBX
The FXO port works well. The dahdi driver accepts the pulsedial=yes command and the FXO port can be heard pulsing out phone number when I make the FXO dial out.
(For testing I connected the Pi’s FXO port to a Grandstream HT802 which was acting as the FXS interface of a Central Office PBX)
The Grandstream recognised the PiTDM’s Pulse Dial (Loop Disconnect dial) properly.
The FXO port also recognised incoming calls and the Pi detected the alarm state if the FXO port cable was disconnected.
Next step is to try this on the Strowger Exchange and have the Pi connected to a Strowger extension and make the Pi go off-hook and pulse dial Strowger extensions.
The PiTDM board also supports FXS ports which also work via their dahdi driver with Asterisk (and FreePBX)
The FXS port accepts DTMF dial tones properly and can also be configured to accept Loop Disconnect dialling (Pulse Dial).
To work with UK rotary dial phones, the file /etc/modprobe.d/dahdi.conf needs to be edited and the following line added
options wctdm dialdebounce=32
I believe the driver defaults to a 64 milliseconds debounce filter and does not work with UK phones. This changes the driver 32ms.
So the Good Points for the PiTDM (4xRJ11 port model)
– really compact FXS and FXO board supporting 4 x RJ11 ports and a mix of FXO and FXS modules. It is slightly larger than a Pi.
– One 9V 1Amp power supply powers the SwitchPi PiTDM board, the FXO and FXS modules and the Raspberry Pi too (that’s just 9 Watts)
– Works with DAHDI and Asterisk and FreePBX (or the Digium GUI)
– FXO supports Pulse Dial when dialling out with a config file setting (pulsedial=yes)
– FXS supports Pulse dialling from telephones with a config file setting (dialdebounce=32)
– They have been really helpful via email. Thank you Xin for all your help.
– No idea what the warranty is (I never asked)
– No certification documentation (like CE or approvals for connection to a PSTN) (but that’s OK for now as I’m using this on a private exchange)
– Closed source driver so slight worry about keeping it running if the linux kernel API changes. (although SwitchPi tell me they are planning to make the driver open source)
– Would be nice if they sold a case too (and SwitchPi tell me they are looking into it)
Next steps it to take it over to the Strowger exchange and test the FXO module dialling Strowger extensions and to continue working with SwitchPi on the FXS Pulse Dial speed issue.
*updated with latest Pulse dial information – all working now.
*updated again to add that it was the PiTDM 4 Port model I was testing
We have now deployed a Raspberry Pi running Asterisk and FreePBX at Parkend.
This uses the RaspPBX build to make installation easier.
The Pi is linked via Ethernet to 6 x Grandstream HT802 ATAs. These are dual port ATAs that accept DTMF and Pulse Dialling so can be used with new phones and old heritage phones.
The Pi also connects to some Avaya Desktop SIP phones over the network.
Finally the Pi has an IAX2 trunk to the main Asterisk Server in Norchard which is running over broadband internet.
The Pi is a tiny little thing, but it works very well.
The FreePBX GUI was fine adding extensions. It needed some lower level knowledge to get the IAX2 trunk working.
Calls between local extensions stay local to Parkend (so it all works if the broadband internet is down).
Calls to other extensions are forwarded to Norchard for the Asterisk box there to work out what to do. This means Parkend can call local SIP numbers, Norchard SIP Numbers or any of the Stronger Exchange numbers (routing via Norchard’s Asterisk<->Strowger link)
A PBX that fits in the palm of your hand. Amazing.
The railway came by a load of Avaya 4602SW, 4602SW+ and 4610SW phones. All came with the standard H323 firmware and we have upgraded some to the Avaya SIP firmware and linked them to our Asterisk server.
The upgrade to SIP firmware needs a standard HTTP server (you can use TFTP if you wish) and does not require any special Avaya software or tools.
The Avaya phones use DHCP for their IP address and if the DHCP does not deliver a ‘FileServer’ address (i.e. the HTTP server address) they ask the user to enter the IP address of the HTTP server from the numeric keypad.
After doing this the phone goes to Command Mode where you can tell it that you want SIP signalling firmware. To do this press Mute-S-I-G-# (that’s Mute-7-4-4-#) to go into the Signal Type setting and select SIP.
The phone now restarts and fetches various files from the HTTP server.
First the phone requests 46xxupgrade.scr from the HTTP server which is a script processed by the phone which allows the phone to work out what firmware images it needs based on the phone’s model, the phone’s current firmware and most importantly the ‘SIG’ Signal Type setting we just changed via Mute-S-I-G#. Then the phone requests the latest boot firmware (if needed) from the HTTP server and then request the latest application firmware from the HTTP server.
It takes a few reboots as each part is upgraded and once the firmware is upgraded the phone requests 46xxsettings.txt from the HTTP server. This is a config file where you put the SIP Server’s IP address. This was set to point to our Asterisk machine.
Our 46xxsettings.txt looks like this
SET DIALPLAN xxxx
SET SIG 2
SET SIPDOMAIN avaya.phone
SET SIPPROXYSRVR 192.168.1.68
SET SIPREGISTRAR 192.168.1.68
SET SIPSIGNAL 0
Some of these may not actually be needed.
Once 46xxsettings.txt has been loaded the phone asks for the SIP Extension Number and Password which have to match the entries in the Asterisk sip.conf file. Note that the password is digits only and limited to 8 digits.
The phone then registers with Asterisk and can start making and receiving calls.
Footnote – Avaya stopped doing firmware updates for these phones back in 2011 and they are all End-Of-Life. The support.avaya.com site does have excellent manuals and tutorials on what put in 46xxsettings.txt
The Avaya support page that describe the latest firmware download is broken. It tells you what the firmware versions are but the download link points to a folder on their FTP server that does not exist any more. Drop us a line if you need a copy.
I tested some Ethernet over Mains adapters at Parkend today and used the TP Link PA-411 adapters which follow the Homeplug AV500 standard.
There are 3 buildings on site (Station, Goods Shed and Signal Box) and the site is 3 phase (each building is on a different mains phase) but the Neutral wire that Homeplug uses is common to all 3 phases so this was not a problem.
Testing was carried out by accessing the web based speedtest.net service from a laptop.
When connecting the laptop directly to the broadband router my laptop had the full 80Mbps download and 20Mbps upload. (The FTTC broadband cabinet is less than 100 metres)
From the Goods Shed (where the telephone exchange is) I got a download speed of 25 Mbps.
From the Signal Box I got a download speed of 37 Mbps.
The adapters deliver a good throughput over the 3 phase mains to allow internet access and VoIP data.
Manufacturer refurbished PA-411’s are £11 on eBay at the current time so are very cheap.
I had to disable SIP ALG on my Netgear DGN2200v4 ADSL Router to fix a SIP problem.
In my office I have a Grandstream HT802 ATA. This is a 2 port (2xFSX) ATA.
It connects to the internet via a Netgear DGN2200v4 ADSL router. Elsewhere across the internet is our Asterisk server, also behind a NAT broadband router.
Both FSX ports have SIP accounts linked to the Asterisk box and I had a phone on each FSX port. I’ll call these extension 401 and extension 402.
If ext 401 calls ext 402 then extension 402 will start ringing. (OK so far),
My problem was that if 401 then hung up the call before 402 answered, 402 would keep ringing and ringing so something was going wrong.
If I did this test the other way around then everything was fine.
i.e. Ext 402 calls Ext 401 and 401 starts to ring. If I then hangup on ext 402 the call clears down properly and ext 401 stops ringing.
The fix turned out to be disabling the SIP ALG support in the Netgear DGN2200 v4.
It is found in Advanced -> Settings -> WAN Setup
I’ve been looking at the Grandstream HT800 series ATAs to allow analogue telephones to connect to the asterisk server. Based on cost ‘per FXS port’ we settled on the HT802 which is a 2 port ATA (2xFXS ports). They are about £35 (so £17.50 per port) and a couple were ordered.
The HT802 is a fairly new ATA which is still being manufactured and still receives firmware updates and has technical support.
Pulse Dialling (Loop Disconnect Dialling)
Firmware 22.214.171.124 for the HT802 adds “Enable Pause Dialing:” to the web config page. We have tested it with an old BT phone with the ‘rotary dial’ and some newer phones that support DTMF and Pulse Dial (Loop Disconnect Dial) with a MF/LD switch. It all worked well and we can make calls from all the old analogue phones we tried to the asterisk extensions.
Pulse Dialling needs to be enabled on each FXS port in the web config page
Also in the web config menu is “Enable Hook Flash:”
Then it is enabled you can flash the hook (press the hook button down and let it go quickly, putting your first call on hold and allowing you to make a 2nd call. This is handy as it allows you to use call holding and do call transfers. But in practice users just end up having two active calls without realising.
Hook Flash can be disabled on each FXS port in the web config page.
There are settings for SLIC (which we set to UK) and settings for “Enable High Power Ring” which we have not tested yet but may help with long lines.