Skip to content

Instantly share code, notes, and snippets.

@steve-ng
Last active June 18, 2020 10:37
Show Gist options
  • Save steve-ng/556deeeeb1239126aa21 to your computer and use it in GitHub Desktop.
Save steve-ng/556deeeeb1239126aa21 to your computer and use it in GitHub Desktop.
Environment Ubuntu 64bit. This setup will allow SIPML5 to connect to your Asterisk server. Refer to the comment in gist for the location of the configuration files
Asterisk set up step by step guide
1) sudo apt-get update && sudo apt-get upgrade && sudo reboot
2) sudo apt-get install ntp
3) sudo apt-get install build-essential subversion libncurses5-dev libssl-dev libxml2-dev libsqlite3-dev uuid-dev vim-nox
4) Install uuid sudo apt-get install uuid uuid-dev uuid-runtime libuuid1 libjansson-dev
Install srtp
1) mkdir ~/src
2) wget http://srtp.sourceforge.net/srtp-1.4.2.tgz
3) tar xfzv srtp-1.4.2.tgz
4) cd srtp
5) sudo ./configure CFLAGS=-fPIC --prefix=/usr/local/lib
6) sudo make && sudo make runtest && sudo make install
Install pjproject
1) sudo apt-get install git
2) git clone https://github.com/asterisk/pjproject pjproject
3) sudo ./configure --enable-shared --prefix=/usr
4) sudo make dep && sudo make && sudo make install
5) sudo ldconfig
6) sudo ldconfig -p | grep pj (verify there's output)
Installing asterisk
1) mkdir ~/src/asterisk
2) cd ~/src/asterisk
3) wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-12-current.tar.gz
4) tar xfzv asterisk-12-current.tar.gz
5) ./configure --libdir=/usr/lib64 --with-crypto --with-ssl --with-srtp=/usr/local/lib
6) sudo make && sudo make install && sudo make config
Starting Asterisk
1) asterisk -cvvv (-c starts in foreground, -vvv verbose level 3)
Note: You would have to have another 2 files sip.conf (for users account) and extensions.conf (if you want to route the call around). The conf files should be located inside /etc/asterisk
[directories](!)
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
; The modules.conf file, used to define which modules Asterisk should load (or
; not load).
;
[modules]
autoload=yes
; Resource modules
noload => res_speech.so
noload => res_phoneprov.so
noload => res_ael_share.so
noload => res_clialiases.so
noload => res_adsi.so
; PBX modules
noload => pbx_ael.so
noload => pbx_dundi.so
; Channel modules
noload => chan_oss.so
noload => chan_mgcp.so
noload => chan_skinny.so
noload => chan_phone.so
noload => chan_unistim.so
noload => chan_alsa.so
; Application modules
noload => app_nbscat.so
noload => app_amd.so
noload => app_minivm.so
noload => app_zapateller.so
noload => app_ices.so
noload => app_sendtext.so
noload => app_speech_utils.so
noload => app_mp3.so
noload => app_flash.so
noload => app_getcpeid.so
noload => app_setcallerid.so
noload => app_adsiprog.so
noload => app_forkcdr.so
noload => app_sms.so
noload => app_morsecode.so
noload => app_followme.so
noload => app_url.so
noload => app_alarmreceiver.so
noload => app_disa.so
noload => app_dahdiras.so
noload => app_senddtmf.so
noload => app_sayunixtime.so
noload => app_test.so
noload => app_externalivr.so
noload => app_image.so
noload => app_dictate.so
noload => app_festival.so
[general]
stunaddr=stun.l.google.com:19302
@tonyjacobk
Copy link

I am getting asterisk: error while loading shared libraries: libasteriskssl.so.1: cannot open shared object file: No such file or directory
when I start asterisk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment