D Setting up a SIP server with Asterisk » History » Version 4

piat, charles ugo, 03/21/2015 11:21 AM

1 1 VEILLARD GAROZ, Loïc
h1. D Setting up a SIP server with Asterisk
2 1 VEILLARD GAROZ, Loïc
3 4 piat, charles ugo
---
4 4 piat, charles ugo
5 4 piat, charles ugo
{{>toc}}
6 4 piat, charles ugo
7 1 VEILLARD GAROZ, Loïc
In order to set up the asterisk server we will use the Intel NUC.
8 1 VEILLARD GAROZ, Loïc
9 1 VEILLARD GAROZ, Loïc
We have proposed, installed and studied the following operative systems:
10 1 VEILLARD GAROZ, Loïc
11 4 piat, charles ugo
-FreePBX 13
12 1 VEILLARD GAROZ, Loïc
-FreePBX 12
13 1 VEILLARD GAROZ, Loïc
-FreePBX 6
14 1 VEILLARD GAROZ, Loïc
-Elastix 2.5
15 1 VEILLARD GAROZ, Loïc
-Elastix 3 (MT)
16 1 VEILLARD GAROZ, Loïc
-AsteriskNow 6.12
17 1 VEILLARD GAROZ, Loïc
-Debian server (20/02/2015)
18 1 VEILLARD GAROZ, Loïc
-Ubuntu server 14.04.2
19 1 VEILLARD GAROZ, Loïc
20 1 VEILLARD GAROZ, Loïc
After an exhaustive analysis of the hardware supported by each operative system and the specifications of our Intel NUC we have obtained the next limitations:
21 1 VEILLARD GAROZ, Loïc
22 1 VEILLARD GAROZ, Loïc
h2. Limitations:
23 1 VEILLARD GAROZ, Loïc
24 1 VEILLARD GAROZ, Loïc
h3. USB 3.0 problems
25 2 VEILLARD GAROZ, Loïc
26 1 VEILLARD GAROZ, Loïc
Most of the operative systems based on CentOs 6.5 or lower had problems of compatibly with the USB 3.0 ports of our NUC. As the installation may be achieved by USB (both with a pendrive or an usb DVD player). THis generates a frozen state of the kernel while loading at the first set up of the system. Lower versions of CentOS don't have this problem. A workaround is to disable from grub with the following command:
27 1 VEILLARD GAROZ, Loïc
28 1 VEILLARD GAROZ, Loïc
 enable.xchi_hcd=0
29 1 VEILLARD GAROZ, Loïc
30 1 VEILLARD GAROZ, Loïc
h3. Ethernet Card:
31 1 VEILLARD GAROZ, Loïc
32 1 VEILLARD GAROZ, Loïc
Most of the Cent OS 6.5 based distributions were incompatible with the Ethernet of our NUC. A manual upgrade of the drivers were not a solution. We discarded most of the O.S due to this limitation.
33 1 VEILLARD GAROZ, Loïc
34 1 VEILLARD GAROZ, Loïc
h3. CPU:
35 1 VEILLARD GAROZ, Loïc
36 1 VEILLARD GAROZ, Loïc
The CPU of our Intel NUC wasn't sopported by CentOS 6.5, while it managed to control it without known issues. 
37 1 VEILLARD GAROZ, Loïc
38 1 VEILLARD GAROZ, Loïc
An upgrade of the BIOS have been performed during the installation of the server to the version 35.
39 1 VEILLARD GAROZ, Loïc
40 1 VEILLARD GAROZ, Loïc
h3. FreePBX
41 1 VEILLARD GAROZ, Loïc
42 1 VEILLARD GAROZ, Loïc
Due to this limitations the native CentOS 6.5 distribution didn't work. As FreePBX presented some advantages (easy configuration through web) we managed to install it over a debian and an ubuntu server. However, the limitations that it adds to the manual configuration of Asterisk, and the several bugs that we have spotted forced us to avoid it.
43 1 VEILLARD GAROZ, Loïc
44 1 VEILLARD GAROZ, Loïc
h2. Conclusion and set up of the server
45 1 VEILLARD GAROZ, Loïc
46 1 VEILLARD GAROZ, Loïc
After the study, Ubuntu 14.04.2 has been chosen to hold an asterisk server.
47 1 VEILLARD GAROZ, Loïc
48 1 VEILLARD GAROZ, Loïc
h3. 1.Installation of the ubuntu server and dependencies:
49 1 VEILLARD GAROZ, Loïc
50 1 VEILLARD GAROZ, Loïc
Ubuntu server with openssh have been installed using the DVD lector.
51 1 VEILLARD GAROZ, Loïc
52 1 VEILLARD GAROZ, Loïc
After that, the following dependencies and upgrades have been carried out:
53 1 VEILLARD GAROZ, Loïc
 
54 1 VEILLARD GAROZ, Loïc
 sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade -y; sudo apt-get install -y build-essential git-core pkg-config subversion libjansson-dev sqlite autoconf automake libtool libxml2-dev libncurses5-dev unixodbc unixodbc-dev libasound2-dev libogg-dev libvorbis-dev libneon27-dev libsrtp0-dev libspandsp-dev libmyodbc uuid uuid-dev sqlite3 libsqlite3-dev;sudo shutdown -r now
55 1 VEILLARD GAROZ, Loïc
56 1 VEILLARD GAROZ, Loïc
h3. 2.Installation of Asterisk 13:
57 1 VEILLARD GAROZ, Loïc
58 1 VEILLARD GAROZ, Loïc
We downloaded it with wget and compiled it:
59 1 VEILLARD GAROZ, Loïc
60 1 VEILLARD GAROZ, Loïc
  wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
61 1 VEILLARD GAROZ, Loïc
tar xvfz asterisk-13-current.tar.gz
62 1 VEILLARD GAROZ, Loïc
cd asterisk-*
63 1 VEILLARD GAROZ, Loïc
./configure
64 1 VEILLARD GAROZ, Loïc
make menuselect
65 3 VEILLARD GAROZ, Loïc
make && make install && make config && make samples
66 3 VEILLARD GAROZ, Loïc
ldconfig
67 1 VEILLARD GAROZ, Loïc
68 1 VEILLARD GAROZ, Loïc
In our case wgetrc file have been configured to deal with the proxy of our internet provider (before the satellite connection)
69 1 VEILLARD GAROZ, Loïc
70 3 VEILLARD GAROZ, Loïc
An extensive and clear guide to add more modules can be found in the following link: http://www.mikeslab.net/?p=330
71 1 VEILLARD GAROZ, Loïc
72 3 VEILLARD GAROZ, Loïc
h3. 3.Start asterisk
73 1 VEILLARD GAROZ, Loïc
74 3 VEILLARD GAROZ, Loïc
In order to run asterisk we only need to run:
75 3 VEILLARD GAROZ, Loïc
76 3 VEILLARD GAROZ, Loïc
 asterisk
77 3 VEILLARD GAROZ, Loïc
78 3 VEILLARD GAROZ, Loïc
or: 
79 3 VEILLARD GAROZ, Loïc
 
80 3 VEILLARD GAROZ, Loïc
 astrisk -rvvvvvv
81 3 VEILLARD GAROZ, Loïc
82 3 VEILLARD GAROZ, Loïc
If we want to get some feedback from the running server.