Giter VIP home page Giter VIP logo

bcm63xx-phone's Introduction

bcm63xx-phone

For router running 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 pgid69#5)

There are three subdirectories :

  • bcm63xx-phone : the kernel driver. It uses 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.
    There are mainly three limitations of the kernel driver :
    • no handling of caller id (this is a limitation of Microsemi Voice Path API Lite SDK)
    • no detection of DTMF digits (and neither the Le88221 nor the Le88266 can do it in hardware). As Asterisk can do it, i just add an option in the Asterisk channel bcm63xx-ast-chan to enable or disable DTMF detection.
    • no echo cancellation. Maybe Asterisk can do it, but i never take time to try to configure Asterisk.

WARNING : the kernel driver manages SPI bus itself in a way more efficient than bcm63xx-spi 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 kernel driver), so it conflicts with bcm63xx-spi.
- With OpenWrt 12.09 (AA) you must rmmod bcm63xx-spi if you want to insmod bcm63xx-phone.
- With OpenWrt above 12.09, you must change the default config of Linux kernel and recompile it.
So you must apply patch located in one of the sub-folder of patches, at the root of OpenWrt source tree, remove the build directory of the Linux kernel (eg for OpenWrt 15.05 this is build_dir/target-mips_mips32_uClibc-0.9.33.2/linux-brcm63xx_generic/linux-3.18.23/) if it exists, and recompile OpenWrt.

  • bcm63xx-phone-test : a basic test program for the kernel driver.

  • bcm63xx-ast-chan : an Asterisk channel, to connect Asterisk with the kernel driver. It can be compiled for Asterisk version 1.8, 11 and 13.

Compilation

Compilation is simple : just define the directory containing the three subdirectories as custom-feed in OpenWrt (http://wiki.openwrt.org/doc/devel/feeds) and compile the three packages as any other OpenWrt packages.

Asterisk configuration

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.