Connecting a Huawei E173 3G USB modem to MikoPBX via chan_dongle
lsusb
Bus 001 Device 002: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubdmesg | grep 12d1
[ 2.828272] usb 1-1: New USB device found, idVendor=12d1, idProduct=1001, bcdDevice= 0.00dmesg | grep 'usb 1-1'
[ 2.262750] usb 1-1: new high-speed USB device number 2 using ehci-pci
[ 2.828272] usb 1-1: New USB device found, idVendor=12d1, idProduct=1001, bcdDevice= 0.00
[ 2.828479] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[ 2.828641] usb 1-1: Product: HUAWEI Mobile
[ 2.828754] usb 1-1: Manufacturer: HUAWEI Technology
[ 2.856994] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 2.861194] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 2.864265] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2minicom -D /dev/ttyUSB0Welcome to minicom 2.8
OPTIONS: I18n
Compiled on Apr 26 2021, 18:06:16.
Port /dev/ttyUSB0, 12:30:42
Press CTRL-A Z for help on special keysload => chan_dongle.so[general]
interval=15
[defaults]
context=public-direct-dial
group=0
rxgain=0
txgain=0
autodeletesms=yes
resetdongle=yes
u2diag=-1
usecallingpres=yes
callingpres=allowed_passed_screen
disablesms=no
language=en
smsaspdu=yes
mindtmfgap=45
mindtmfduration=80
mindtmfinterval=200
callwaiting=auto
disable=no
initstate=start
dtmf=relax
[dongle0]
audio=/dev/ttyUSB1
data=/dev/ttyUSB2[dongle-incoming-ussd]
exten => ussd,1,Noop(Incoming USSD: ${BASE64DECODE(${USSDBASE64})})
exten => ussd,n,Hangup()
[dongle-incoming-sms]
exten => sms,1,Noop(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,Hangup()asterisk -rmikopbx*CLI> dongle show devices
ID Group State RSSI Model Firmware IMEI IMSI Number
dongle0 0 Free 12 E173 11.126.15.00.209 *** *** 79255283744dongle cmd dongle0 AT+CPBS="ON"
dongle cmd dongle0 AT+CPBW=1,"79255283744",145[SIP-TRUNK-C4153448-outgoing-custom]
exten => _[0-9*#+]!,1,Set(DIAL_COMMAND=Dongle/dongle0/${number})
same => n,return




