For router running LEDE/OpenWrt and based on Broadcom 6358 SoC, this project aims to add support for telephony.
Now it supports :
my router, a Huawei HW553, that has two FXS lines managed by a Legerity/Zarlink/Microsemi Le88221 device. The Broadcom 6358 SoC interfaces with Le88221 using PCM and SPI buses.
in theory, the Huawei HW556, that has also two FXS lines managed by a Legerity/Zarlink/Microsemi Le88266 this time. Once again the Broadcom 6358 SoC interfaces with Le88266 using PCM and SPI buses.
BUT as I don't have a Huawei HW556, I never made tests with this router (only with my HW553).
the Pirelli FastWeb DRG A226M, that has also two FXS lines managed by a Legerity/Zarlink/Microsemi Le88266. Once again the Broadcom 6358 SoC interfaces with Le88266 using PCM and SPI buses.
I don't have this router, but it's reported to work (see https://github.com/pgid69/bcm63xx-phone/issues/5)
There are three subdirectories :
Both kernel drivers use the Microsemi Voice Path API Lite SDK, so adding support for other Microsemi devices should be quite easy. I think that support for routers based on Broadcom 6368 SoC should be quite easy too but of course it needs testing.
WARNING : by default the two kernel drivers manage SPI bus themselves in a way more efficient than bcm63xx-spi/spi-bcm63xx kernel driver (because Le88221/Le88266 requires that CS signal toggles between each byte transferred on the SPI bus and that incurs big overhead if using bcm63xx-spi/spi-bcm63xx kernel driver), so it conflicts with bcm63xx-spi/spi-bcm63xx.
bcm63xx-phone-test : a basic test program for the kernel driver bcm63xx-phone.
bcm63xx-ast-chan : an Asterisk channel, to connect Asterisk with the kernel driver bcm63xx-phone. It can be compiled for Asterisk version 1.8, 11 and 13.
Compilation is simple : just define the directory containing the three subdirectories as custom-feed in LEDE/OpenWrt (http://wiki.openwrt.org/doc/devel/feeds) and compile the packages as any other LEDE/OpenWrt packages.
Configuration is shared between two files
The first is /etc/asterisk/bcm3xx_phone.conf. It eventually needs to be adapted to your specific needs. By default only line 1 is enabled.
The second is /etc/asterisk/extensions.conf.
Here's an example of lines added to file extensions.conf. Section [sip-provider-in] is for calls coming from outside. Here calls should be answered by phone connected to line 1 of modem.
Section [bcmph-line-1] (name of the section is configured in bcm63xx_phone.conf, parameter context) is for calls originating from phone connected to line 1 of modem. Here calls are forwarded to sip-provider.
[sip-provider-in]
exten => s,1,Dial(Bcm63xxPhone/1,120,t)
same => n,Hangup(16)
[bcmph-line-1]
exten => _X.,1,Dial(SIP/sip-provider/${EXTEN})
same => n,Hangup(16)