Today we will install Asterisk PBX on the Asus RT-N66U router. Himself. The router we previously stitched with Merlin firmware and installed Entware repositoryNow we will install digital telephone Asterisk and connect the Huawei E1550 3G modem to dial up a mobile phone when calling a sip or connected city number.
Update the repository by executing the command:
opkg update
Start installing Asterisk and the necessary packages for telephony:
opkg install asterisk11 asterisk11-app-authenticate asterisk11-app-disa asterisk11-app-mixmonitor asterisk11-app-playtones asterisk11-app-record asterisk11-app-senddtmf asterisk11-app-system asterisk11-app-verbose asterisk11-chan-dongle asterisk11-codec-alaw asterisk11-func-base64 asterisk11-func-channel asterisk11-func-db asterisk11-func-shell asterisk11-mysql asterisk11-res-monitor asterisk11-res-musiconhold asterisk11-res-srtp asterisk11-res-timing-timerfd asterisk11-sounds asterisk11-voicemail
Configure Asterisk autorun in the file:
vi /etc/default/asterisk ## startup options for /etc/init.d/asterisk ENABLE_ASTERISK="yes" OPTIONS=""
Add to the file. /etc/rc.local team:
vi /etc/rc.local mkdir -p /var/lib/asterisk/ && /etc/init.d/asterisk restart ... exit 0
Huawei 3G modem connection
Commando:
ls /dev/ttyUSB*
The answer of the system when the modem is seen correctly:
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2
We see or don't see the Asus RT-N66U wifi router our Huawei 3G modem.
File in. /etc/asterisk/dongle.conf You need to add settings for our modem.
was:
... [dongle0] audio=/dev/ttyUSB1 ; tty port for audio connection; no default value data=/dev/ttyUSB2 ; tty port for AT commands; no default value ... imei=123456789012345 imsi=123456789012345 ...
became:
... [modem1] 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 resetdatacard=yes ; reset datacard during initialization u2diag=256 ; set U2DIAG parameter (256 = modem+card_reader) usecallingpres=yes ; use the caller ID presentation or not callingpres=allowed_passed_screen ; set caller ID presentation
Reboot Asterisk by executing the command:
/etc/init.d/asterisk restart
We enter the Asterisk console by following the command:
asterisk -rvvvvv
System response:
Asterisk 1.8.10.1, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <[email protected]> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found Connected to Asterisk 1.8.10.1 currently running on ATC-001 (pid = 12086) Verbosity was 0 and is now 5 ATC-001*CLI>
Check if the modem is visible in the telephony by executing the command dongle show devices In the console:
ATC-001*CLI>dongle show devices ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number modem1 1 Free 18 3 3 UA-KYIVSTAR E1550 11.609.18.00.00 358811XXXXXXXXX 255030XXXXXXXXX +38067XXXXXXX
Modem visible, number identified.
If you have multiple modems connected, then in the configuration file. /etc/asterisk/dongle.conf in block [modem1], amend:
was:
[modem1] audio=/dev/ttyUSB1 ; tty for audio connection data=/dev/ttyUSB2 ; tty for AT commands
became:
[modem1] imei=358811XXXXXXXXX imsi=255030XXXXXXXXX
At this, the installation of Asterisk on the router RT-N66U is performed and Huawei’s 3G modem is connected.
I was with you. Sergey Lazarenko.
Let’s take a short break and watch a little video of how to throw lasso:



comment