Skip to content

Instantly share code, notes, and snippets.

@recluze
Created June 25, 2018 12:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save recluze/a643e0ab6cccd649a96ed68d9ecacf51 to your computer and use it in GitHub Desktop.
Save recluze/a643e0ab6cccd649a96ed68d9ecacf51 to your computer and use it in GitHub Desktop.
asterisk-installation
First, update and upgrade all packages:
sudo apt-get update
sudo apt-get upgrade
sudo -i # Change to root
cd /usr/local/src
Main docs:
https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source
Get Asterisk:
wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-14-current.tar.gz
tar zxvf asterisk-14-current.tar.gz
cd <whatever-folder>
cd contrib/scripts
./install_prereq install
cd -
./configure
make menuconfig # then exit without making any changes
make
make install
# this is the point where we left off
make samples
make config # creates init.d scripts
# check status
/etc/init.d/asterisk status # shouldn't be running yet. Don't start it.
# Details from: https://wiki.asterisk.org/wiki/display/AST/Hello+World
cd /etc/asterisk
mv extensions.conf extensions.sample # backup file
vi extensions.conf # and put the following in the file:
[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
mv sip.conf sip.sample # backup
vi sip.conf # and put the following in the file
[general]
context=default
[6001]
type=friend
context=from-internal
host=dynamic
secret=temp123
disallow=all
allow=ulaw
[6002]
type=friend
context=from-internal
host=dynamic
secret=temp123
disallow=all
allow=ulaw
# start asterisk on the console
asterisk -cvvvvvv # start with lots of verbosity (many messages)
# then install twinkle and connect
User: 6001
Password: temp123
Server: (the ip address of the machine where you installed asterisk)
# the connect another instance of twinkle on another machine. Use 6002 this time.
Dial 100 from either one and then dial one from the other.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment