FreePBX Installation

Updated 14 June 2017

 

In our previous Blog we introduced FreePBX. Here we are with Installation of FreePBX 12 on Ubuntu Server 14.04 LTS.

Before proceed installation make sure your machine has OpenSSH server and LAMP Packages.

Here are installation steps.

Switch to the Root User

Install Required Dependencies

Reboot server

Install Dependencies for Google Voice (Optional)

Install iksemel

Install and Configure Asterisk

Download Asterisk source files

 Compile and install DAHDI

Only required if using a physical server and installing telecom hardware.


 Compile and install pjproject

Asterisk 12 and later versions contain two SIP stacks: one, the original chan_sip SIP channel driver that has been present in all previous releases of Asterisk, and a new SIP stack that is based on this pjproject.

Compile and Install jansson

Jansson is a C library for encoding, decoding and manipulating JSON data.

Compile and install Asterisk

You will be prompted at the point to pick which modules to build. Most of them will be enabled, but if you want to have MP3 support, you need to manually turn on ‘format_mp3’ on the first page.

Turn on cdr_mysql, as Asterisk store CDRs into mysql server database.

Turn off chan_pjsip in Channel Drivers if you want only chan_sip channel to be on. Otherwise, it will create confliction of ports.

Incase, you are getting duplicate rows for one call in CDR Reports then, go to Call Detail Recording and Turn off cdr_adaptive_odbc and cdr_odbc respectively.

After selecting ‘Save & Exit’ you can then continue.

Install Asterisk-Extra-Sounds

this installs the (8khz) ‘wav’ soundfiles. If you’re running G722 (High Definition ‘Wideband’) audio, you also want to download the 722 codec pack. If you’re not planning on using Wideband, you can skip that part.

Wideband Audio download

Install and Configure FreePBX

 Download and extract FreePBX

Now create the Asterisk user and set ownership permissions.

A few small modifications to Apache.

Change webserver default user and group from apache to asterisk.

Change default “upload_max_filesize” to 120M to allow larger music on hold files.


Configure ODBC

Edit /etc/odbcinst.ini and add the following.

  • NOTE : this command assumes you are installing to a new machine, and that the file is empty. If this is not a freshly installed machine, please manually verify the contents of the file, rather than just copying and pasting the lines below. The ‘EOF’ does no go in the file, it simply signals to the ‘cat’ command that you have finished pasting.


You may need to verify these paths, if you’re not on a x86_64 machine.

Edit or create /etc/odbc.ini and add the following section. Note that, again, this command assumes you are installing to a new machine, and the file is empty. Please manually verify the contents of the files if this is not the case.



Prepare MySQL

now you need to generate a secure password for FreePBX to use to talk to MySQL.

That will generate a quasi-random 16 character long password, which should be secure enough for most things. If you had set the MySQL ‘root’ password to be something when you were installing the machine, you will need to add a -pyourpassword flag to the following lines.

Configure Asterisk database in MYSQL.

Set permissions on MYSQL database

 Restart Asterisk and install FreePBX

You may get errors such as:

 Please wait…

  /usr/local/sbin/amportal: line 47: [FATAL]: command not foun

/var/lib/asterisk/bin/freepbx_engine: line 98: [FATAL]: command not found

****WARNING: ERROR IN CONFIGURATION ***

astrundir in '/etc/asterisk' is set to but the directory does not exists. Attempting to create it with: 'mkdir -p ' mkdir: missing operand Try 'mkdir --help' for more information. **** ERROR: COULD NOT CREATE **** Attempt to execute 'mkdir -p ' failed with an exit code of 1 You must create this directory and the try again.

We would suggest you to enter all passwords carefully. Incase, you are getting such error or You may have to manually set the password in /etc/freepbx.conf if you will get errors during the freepbx installation, specifically, when you run the command:

 Finally, one last mod to Make a link to file and start FreePBX

Start FreePBX

Navigate:

Now FreePBX is installed, it will be available via Apache. Open up your web browser and visit:

http://Address.Of.FreePBX.Server/admin

A Browser of FreePBX will open. Then, it will ask for creation of an account for admin. Create an account as admin who will have all the authority of  freePBX browser.

that’s all are installation part , will be here soon with modules setup like extensions etc.

 

      IN CASE OF ANY QUERY, CONTACT US

Category(s) Uncategorized
author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project




    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home