In this tutorial, I'm going to show you how to install and fully configure Asterisk 13 (or 16) Voip server on OpenWRT 18.xx.xx (19.xx.xx), I commented out all parts that need to be modified with your actual configuration data.
-
Features: SIP channels, Jingle/XMPP client channel, GSM and SMS channel (chan_dongle), Blacklist, IVR (interactive voice reponse), Call-back, Wakeup call, Voicemail, Voicemail messages to email, Chanspy, Ring groups, Call diversion, Call Forwarding, Music on hold, shell script execution from a phone call (IVR choice) or from a SMS or XMPP message received (on part three of this how-to).
-
References
my previous Asterisk_11_on_OpenWrt_14.04 guide: https://forum.archive.openwrt.org/viewtopic.php?id=53874&p=1#p253590
Baresip Openwrt (14.04) SIP client: see previous link at post 4
chan_dongle project: https://github.com/bg111/asterisk-chan-dongle
Important NOTE: USB external /overlay is needed, minimum 128 Mbytes of free space available is needed
Minimum of 64 Mbytes RAM is needed for full features server, CPU 400 Mhz or better
First part: packages installation
- Prerequisites:
opkg update
opkg install nano
opkg install zram-swap
opkg install msmtp
opkg install sox lame mpg123 # optional
- mailsend SMTP configuration (gmail):
nano /etc/msmtprc
note: if you haven't installed nano (opkg install nano) use vi
account default
host smtp.gmail.com
port 587
auth on
user usename@gmail.com
password your-gmail-password
auto_from off
from username@gmail.com
tls on
tls_starttls on
tls_certcheck off
logfile
syslog LOG_MAIL
- create Asterisk13 install script (for Asterisk 16 see below):
nano /root/asterisk-install.sh
insert the following lines:
opkg update
opkg install asterisk13 asterisk13-app-authenticate asterisk13-app-chanisavail asterisk13-app-chanspy asterisk13-app-confbridge asterisk13-app-controlplayback asterisk13-app-disa asterisk13-app-dumpchan asterisk13-app-exec asterisk13-app-followme asterisk13-app-ices asterisk13-app-ivrdemo asterisk13-app-minivm asterisk13-app-mixmonitor asterisk13-app-mp3 asterisk13-app-originate asterisk13-app-playtones asterisk13-app-read asterisk13-app-readexten asterisk13-app-record asterisk13-app-saycounted asterisk13-app-sayunixtime asterisk13-app-senddtmf asterisk13-app-sendtext asterisk13-app-sms asterisk13-app-stack asterisk13-app-system asterisk13-app-transfer asterisk13-app-url asterisk13-app-userevent asterisk13-app-verbose asterisk13-app-waitforring asterisk13-app-waitforsilence asterisk13-app-waituntil asterisk13-app-while asterisk13-app-zapateller asterisk13-bridge-builtin-features asterisk13-bridge-holding asterisk13-bridge-native-rtp asterisk13-bridge-simple asterisk13-bridge-softmix asterisk13-cdr asterisk13-cel-custom asterisk13-cel-manager asterisk13-chan-alsa asterisk13-chan-bridge-media asterisk13-chan-console asterisk13-chan-dongle asterisk13-chan-mobile asterisk13-chan-motif asterisk13-chan-oss asterisk13-chan-phone asterisk13-chan-rtp asterisk13-chan-sip asterisk13-codec-a-mu asterisk13-codec-alaw asterisk13-codec-g722 asterisk13-codec-gsm asterisk13-codec-lpc10 asterisk13-codec-resample asterisk13-codec-ulaw asterisk13-curl asterisk13-format-g723 asterisk13-format-g726 asterisk13-format-gsm asterisk13-format-ilbc asterisk13-format-ogg-vorbis asterisk13-format-pcm asterisk13-format-siren14 asterisk13-format-siren7 asterisk13-format-sln asterisk13-format-wav asterisk13-format-wav-gsm asterisk13-func-base64 asterisk13-func-blacklist asterisk13-func-callcompletion asterisk13-func-channel asterisk13-func-config asterisk13-func-cut asterisk13-func-dialgroup asterisk13-func-dialplan asterisk13-func-groupcount asterisk13-func-hangupcause asterisk13-func-holdintercept asterisk13-func-iconv asterisk13-func-jitterbuffer asterisk13-func-module asterisk13-func-periodic-hook asterisk13-func-pitchshift asterisk13-func-shell asterisk13-func-sysinfo asterisk13-func-talkdetect asterisk13-func-uri asterisk13-func-version asterisk13-func-vmcount asterisk13-func-volume asterisk13-pbx-loopback asterisk13-pbx-spool asterisk13-pjsip asterisk13-res-adsi asterisk13-res-agi asterisk13-res-clialiases asterisk13-res-clioriginate asterisk13-res-convert asterisk13-res-hep asterisk13-res-hep-pjsip asterisk13-res-hep-rtcp asterisk13-res-limit asterisk13-res-manager-presencestate asterisk13-res-monitor asterisk13-res-musiconhold asterisk13-res-mutestream asterisk13-res-parking asterisk13-res-phoneprov asterisk13-res-pjproject asterisk13-res-pjsip-phoneprov asterisk13-res-realtime asterisk13-res-rtp-asterisk asterisk13-res-rtp-multicast asterisk13-res-security-log asterisk13-res-smdi asterisk13-res-sorcery asterisk13-res-speech asterisk13-res-srtp asterisk13-res-timing-timerfd asterisk13-res-xmpp asterisk13-sounds asterisk13-util-smsq asterisk13-util-streamplayer asterisk13-voicemail
- give the right permissions to the script:
chmod 755 /root/asterisk-install.sh
- launch the script and wait for packages installation to be completed:
sh /root/asterisk-install.sh
- when finished reboot the router