[Beta-testers] New channel driver for Huawei GSM modems by Odicha

Ramón Lozano solidpc at gmail.com
Fri May 15 20:49:52 ECT 2009

Dear friends,

I think you should have a look at this.


Odicha has developed a new driver to use Huawei modems as asterisk
trunks. This is really cool, as you don't need to buy a gateway and a
fxo port, and it is great for demos with a laptop, for example.
This modems are cheap, and even Vodafone gives them for free to many
companies here.

Huawei E169 and K3520 are the only models that support voice, so other
models just work for sms.

First I needed to upgrade my modem to the latest firmware, which you
can get here:


Then you need to download chan_sebi.zip, extract it, copy the
sebi.conf file to /etc/asterisk and the chan_sebi.c file to the source
asterisk-addons-xxx/channels directory. Then recompile and install.
After that you need to detect the data port. You can do it with
minicom, or use this small script:

# This is how you get the dataport
for i in `ls -1 /dev/ttyUSB*`;  do
stty -F $i |grep intr &>/dev/null
if [  $res -eq 0 ]; then
echo $dataport

then you have to put your imei, pin, and your right data port in sebi.conf
you can also remove the pin from your sim, as I did, and then comment
out the pin line in sebi.conf

And last, you need to give asterisk user permissions to use the serial ports:

chmod 660 /dev/ttyUSB*
chown asterisk:uucp /dev/ttyUSB*
echo 'KERNEL=="ttyUSB[0-9*]", MODE="0660", OWNER="asterisk",
GROUP="uucp"'  >>  /etc/udev/rules.d/92-sebi.rules

Then you create a custom trunk in freePBX like:  sebi/huawei1/$OUTNUM$

Restart asterisk and you are ready to go.
You can see the connected devices from asterisk console with:

sebi show devices

You can see the logs with:
cat /var/log/asterisk/full |grep sebi

I still haven't tried the sms part, but I've been reported it works
fine.  SebiSendSMS  tech/channel|number|"message blabla"  it works as
the sms part in chan_mobile.

The driver is still in a beta stage, but I've just tried it and it
works very well and looks quite stable. Odicha is still working for
automatic detection when you have several modems and with udev rules
to make it work without problems, as when you reboot sometimes the
ports get changed and need to hand edit sebi.conf for the modems to
load. He has tried with 4 usb modems at a time without problems.

The cpu consumption is very low, less than 0.7% in a P4 1700MHz in my tests.

I hope you enjoy this as much as I do. We might integrate this into
Elastix soon.

Best regards

Ramon Lozano

More information about the Beta-testers mailing list