0% found this document useful (0 votes)
666 views7 pages

VoIP-GSM USB Gateway HUAWEI E1550

The document provides instructions for configuring an Asterisk server to use a Huawei E1550 USB modem for voice calls. It includes steps to download and install Asterisk, libusb, usb_modeswitch, and usb_modeswitch-data packages. It also shows configuration of udev rules to give the Asterisk user access to the USB modem tty ports, editing datacard.conf to configure the modems, and testing the modems using minicom.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
666 views7 pages

VoIP-GSM USB Gateway HUAWEI E1550

The document provides instructions for configuring an Asterisk server to use a Huawei E1550 USB modem for voice calls. It includes steps to download and install Asterisk, libusb, usb_modeswitch, and usb_modeswitch-data packages. It also shows configuration of udev rules to give the Asterisk user access to the USB modem tty ports, editing datacard.conf to configure the modems, and testing the modems using minicom.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.

2-curre
nt.tar.gz
# tar zxvf asterisk-1.6.2-current.tar.gz
# cd asterisk-1.6.2-current.tar.gz
# apt-get install g ++ libncurses-dev libxml2-dev subversion
# ./configure
# make install
# make config
# make samples
# svn co http://www.makhutov.org/svn/chan_datacard/trunk/ chan_datacard
# cd ~ / chan_datacard /
# ./configure
# make install
# cp ~ / chan_datacard / etc / datacard.conf / etc / asterisk

# apt-get install libusb libusb-dev

# wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-1.1.4.tar.bz2
# tar -jxvf usb-modeswitch-1.1.4.tar.bz2
# cd ~ / usb-modeswitch-1.1.4
# make install

# wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20100826.tar
.bz2
# tar -jxvf usb-modeswitch-data-20100826.tar
# cd ~ / usb-modeswitch-data-20100826
# make install

# rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.e


l6.rf.i686.rpm

# yum install usb_modeswitch

# yum install usb_modeswitch-data

# yum install usbutils


# lsusb
Bus 001 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b: 0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 1a81: 1004 Holtek Semiconductor, Inc.
Bus 001 Device 003: ID 12d1: 1446 Huawei Technologies Co., Ltd. E1552 / E1800 /
E173 (HSPA modem)

# ls -al / dev | grep ttyS


crw-rw ---- 1 root dialout 4, 64 Sep 23 15:14 ttyUSB0
crw-rw ---- 1 root dialout 4, 65 Sep 23 15:14 ttyUSB1
crw-rw ---- 1 root dialout 4, 66 Sep 23 15:14 ttyUSB2

chan_dongle.c: unable to open / dev / ttyUSB1: Permission denied

nano /etc/udev/rules.d/e173.rules

KERNEL == "ttyUSB [012]", OWNER = "asterisk", GROUP = "asterisk", MODE = "0660"


# / sbin / start_udev
# ls = la / dev | grep ttyUSB
crw-rw-- 1 asterisk asterisk 4, 64 Sep 23 15:25 ttyUSB0
crw-rw-- 1 asterisk asterisk 4, 65 Sep 23 15:25 ttyUSB1
crw-rw-- 1 asterisk asterisk 4, 66 Sep 23 15:25 ttyUSB2

[datacard0]
audio = / dev / ttyUSB1; tty for audio connection
data = / dev / ttyUSB2; tty for AT commands

context = datacard-incoming; context for incoming calls


group = 1; calling group

rxgain = 3; increase the incoming volume


txgain = 3; increase the outgoint volume

[datacard1]
context = datacard-incoming; context for incoming calls
audio = / dev / ttyUSB4; tty port for audio connection
data = / dev / ttyUSB5; tty port for AT commands
group = 2; calling group
rxgain = 3; increase the incoming volume
txgain = 3; increase the outgoint volume
autodeletesms = yes; auto delete incoming sms
resetdatacard = yes; reset datacard during initialization
u2diag = 0; set U2DIAG parameter (0 = disable everything except modem function)
usecallingpres = yes; use the caller ID presentation or not
callingpres = allowed_passed_screen; set caller ID presentation
asterisk * CLI> datacard show devices
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number
datacard1 2 Free 13 3 3 MTS RUS E1550 11.608.12.00.143 352 ...... 25 ....... Unkn
own
datacard0 1 Free 15 3 3 TELE2 E1550 11.608.14.15.311 359 ...... 25 ....... Unknow
n

[datacard-incoming]
exten => sms, 1, Verbose (Incoming SMS from $ {CALLERID (num)} $ {SMS})
exten => sms, n, System (echo '$ {STRFTIME ($ {EPOCH} ,,% Y-% m-% d% H:% M:% S)}
- $ {DATACARD} - $ {CALLERID (num )}: $ {SMS} '>> /var/log/asterisk/sms.txt)
exten => sms, n, Hangup ()

exten => ussd, 1, Verbose (Incoming USSD: $ {USSD})


exten => ussd, n, System (echo '$ {STRFTIME ($ {EPOCH} ,,% Y-% m-% d% H:% M:% S)}
- $ {DATACARD}: $ {USSD}' >> /var/log/asterisk/ussd.txt)
exten => ussd, n, Hangup ()

exten => s, 1, Dial (SIP / 100 ,,)


exten => s, n, Hangup ()

exten => _X., 1, Dial (Datacard / g1 / $ {EXTEN})


or
exten => _X., 1, Dial (Datacard / datacard0 / $ {EXTEN})
# minicom -s

+ ----- [configuration] ------ +


| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as .. |
| Exit |
| Exit from Minicom |
+ -------------------------- +

+ ------------------------------------------------- ---------------------- +
| A - Serial Device: / dev / ttyUSB0 |
| B - Lockfile Location: / var / lock |
| C - Callin Program: |
| D - Callout Program: |
| E - Bps / Par / Bits: 115200 8N1 |
| F - Hardware Flow Control: Yes |
| G - Software Flow Control: No |
| |
| Change which setting? |
+ ------------------------------------------------- ---------------------- +
| Screen and keyboard |
| Save setup as dfl |
| Save setup as .. |
| Exit |
| Exit from Minicom |
+ --------------------------
Welcome to minicom 2.4

OPTIONS: I18n
Compiled on Jan 25 2010, 06:49:09.
Port / dev / ttyUSB0

Press CTRL-A Z for help on special keys

AT S7 = 45 S0 = 0 L1 V1 X4 & c1 E1 Q0
Ok
AT ^ U2DIAG = 0
Ok

You might also like