If it's about VoIP, SIP or Internet Telephony but it doesn't seem to fit anywhere else, post it here.

Advertisement

By Sponsor
User avatar
By WelshPaul
#4810
All I know from reading the description is that the cable is a 2 pin BT to RJ11. Nowhere in the description does it say if it's cross-wired or straight-through? It just rambles on about how you can get 2, 4 and 6 pin cables etc.
BT to RJ11 2 Pin Fax / Modem Cable. Simple to install. Plugs into a standard BT wall socket and will connect with most telephones and modems. PLEASE NOTE: - There are 2, 4 and 6 pin cables, both straight-wired and cross-wired. Please check the original cable for the number of gold pins, both on the BT (white) plug and the RJ11 (clear) plug. Most cables have the same number of gold pins at both ends. However, some may have four pins at one end, and two at the other. A simple continuity test should reveal that two of the four pins are not connected. Most devices use a straight-wired cable, but some use a cross-wired cable. Again, a simple continuity test on the original cable may reveal the type of cable required. As an example, a Sky, Sky+ and SkyHD box currently use a cross-wired cable. Simple to Install, No Wiring Required, Connector A: BT 2 Pin Plug, Connector B: RJ11 2 Pin Plug, Length: 2 Metres
Have you asked them? I found a 2 pin BT to RJ11 straight wired for sale on ebay, £2.50 with free p&p.

Advertisement

By Sponsor
User avatar
By PaulRB
#4815
OK, new cable arrived purchased from your link and it works OK, incoming and outgoing calls tested.

Time to think about that FreePBX installation.

An alternative to a Pi might be to install onto a server PC? Currently my server is running Win XP, but given the recent security issues with XP, I'm thinking I should get around to replacing XP with Ubuntu server or something. So maybe I could install FreePBX on that.
User avatar
By wotzit
#4816
PaulRB wrote: Sat 29th July 2017, 12:47An alternative to a Pi might be to install onto a server PC?
You sure can! FreePBX can be installed on most PC's with ease.
Easy Install? (Complete CD, with Linux and FreePBX)
The easiest way to install FreePBX is to download one of our ISOs, burn it to a CD, and then boot your system off the ISO. Your system will then reformat the disk, and upon completion, you will have a fully functioning FreePBX Distro ready to configure your phones and trunks.
You can download the latest distro here:
https://www.freepbx.org/downloads/freepbx-distro/
User avatar
By PaulRB
#4817
Thanks @wotzit, but this server won't be dedicated to running pbx, so a ready-made distro won't be suitable. I will need to install it as a package.

My server rebuild is going ok, I have Ubuntu server 17.04, samba, LAMP, Open-ssh and miniDLNA all working ok, although there are still a few niggles to iron out.

I'm reading this page and it looks complex and error-prone. Has anyone on this forum installed freepbx this way?
User avatar
By WelshPaul
#4818
PaulRB wrote: Sun 30th July 2017, 08:02I'm reading this page and it looks complex and error-prone. Has anyone on this forum installed freepbx this way?

Not installed FreePBX this way in a long time, i'm a CentOS user. When it comes to FreePBX, I have always used a dedicated PC, VPS or PI myself. That being said...

1. You can also safely ignore the "**** COMMERCIAL MODULES CANNOT BE INSTALLED ON THIS OS ****" because you won't need them.

2. If you're running php7 then you need to install FreePBX 14, and not FreePBX 13 as instructed in the guide you linked to. Failure to do so will result in multiple errors being displayed when accessing the FreePBX admin GUI.

Other than that, it should go smoothly. Then again, considering how much hassle you had trying to obtain the correct BT to RJ11 cable, I'm guessing everything that can go wrong will go wrong! :-D :laugh:
User avatar
By PaulRB
#4819
WelshPaul wrote: Sun 30th July 2017, 12:02 I'm guessing everything that can go wrong will go wrong!
I don't doubt it!

First stumble:

You recommended installing FreePBX 14 if I have PHP 7. well, "php --version" gives:
Code: Select all
PHP 7.0.18-0ubuntu0.17.04.1 (cli) (built: Apr 26 2017 23:59:48) ( NTS )
So its FreePBX 14 I need. But there is no installation guide on that for Ubuntu!

I managed to find an installation guide for FreePBX on Debian 8.8 here. In the "Install Dependencies" step, the list of dependencies shown seems to contain various "PHP5" packages, just as it did in the FreePBX 13 on Ubuntu 14.04 page. So maybe Debian 8.8 has PHP5, not PHP7.

Do you think I should follow the instructions anyway, and install the PHP5 packages?
User avatar
By WelshPaul
#4820
To install FreePBX 14, I guess you would follow the original guide you linked to but replace:
Code: Select all
cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz
tar vxfz freepbx-13.0-latest.tgz
rm -f freepbx-13.0-latest.tgz
cd freepbx
./start_asterisk start
./install -n
With:
Code: Select all
cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-14.0-latest.tgz
tar vxfz freepbx-14.0-latest.tgz
rm -f freepbx-14.0-latest.tgz
cd freepbx
./start_asterisk start
./install -n
That should result in the successful installation of FreePBX 14. However, it might be easier in the long run rolling back from php 7 to php 5.6? That way, you can follow the original guide. Well providing of course that all the required dependancies are available and installed on the later Ubuntu builds.
PaulRB wrote: Sun 30th July 2017, 18:33 Do you think I should follow the instructions anyway, and install the PHP5 packages?
Can give it a try. Make a note of everything you install so you can (if need be) uninstall them later.
User avatar
By PaulRB
#4821
WelshPaul wrote: Sun 30th July 2017, 20:32 Can give it a try. Make a note of everything you install so you can (if need be) uninstall them later.
I got these errors trying to install the dependancies:
Code: Select all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libmyodbc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-curl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-mysql is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-gd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5' has no installation candidate
E: Package 'php5-curl' has no installation candidate
E: Package 'php5-cli' has no installation candidate
E: Package 'php5-mysql' has no installation candidate
E: Package 'php5-gd' has no installation candidate
E: Package 'libmyodbc' has no installation candidate
I also tried replacing each occurrence of php5 with php7:
Code: Select all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libmyodbc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package php7
E: Unable to locate package php7-curl
E: Unable to locate package php7-cli
E: Unable to locate package php7-mysql
E: Unable to locate package php7-gd
E: Package 'libmyodbc' has no installation candidate
Not sure what to try next... back to Google...
User avatar
By WelshPaul
#4823
As Ubuntu 16.04 LAMP stack and up now comes with php 7, you must replace:
Code: Select all
apt-get install -y build-essential linux-headers-`uname -r` openssh-server apache2 mysql-server\
  mysql-client bison flex php5 php5-curl php5-cli php5-mysql php-pear php5-gd curl sox\
  libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3\
  libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev\
  libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev\
  libspandsp-dev libmyodbc
With:
Code: Select all
apt-get install -y bison flex php-pear curl sox libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev libspandsp-dev
Because php 5 isn't available via apt-get update or apt-get upgrade. No need to replace php5 with php7 either, php7 will already be installed if you're running a LAMP stack.

I will give the install guide a try on a test VPS server running php 7 and FreePBX 14, lets see what happens...
User avatar
By PaulRB
#4824
WelshPaul wrote: Mon 31st July 2017, 21:09 you must replace...With:
Thanks, that all seemed to go OK.
WelshPaul wrote: Mon 31st July 2017, 21:09 I will give the install guide a try on a test VPS server running php 7 and FreePBX 14, lets see what happens...
Thanks yet again Paul. Will look forward to that with interest.
User avatar
By WelshPaul
#4825
The rain woke me up at 5.30am this morning and as I had nothing better to do, thought i'd give the install a try. As expected, I encountered error after error when using php 7.0, so I downgraded to php 5.6. This is what I did to get FreePBX 13 installed on a Ubuntu 16.04 LAMP stack...

Add repository
Code: Select all
add-apt-repository ppa:ondrej/php
Update Your System
Code: Select all
apt-get update && apt-get upgrade -y 
Install Required Dependencies
Code: Select all
apt-get install -y build-essential linux-headers-`uname -r` openssh-server apache2 mysql-server mysql-client bison flex php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 php5.6-curl php5.6-gd php5.6-mcrypt php5.6-xml php5.6-xmlrpc php-pear curl sox libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev libspandsp-dev
Switch from php 7.0 to php 5.6
Code: Select all
sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php
Note: You can switch between php versions by running the following commands:

To switch from php 5.6 to php 7.0 you need to do two things:
Code: Select all
# For php in web apps
sudo a2dismod php5.6 && sudo a2enmod php7.0 && sudo service apache2 restart
# For php-cli in the command line
sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php
or from php7.0 to php5.6:
Code: Select all
# For php in web apps
sudo a2dismod php7.0 && sudo a2enmod php5.6 && sudo service apache2 restart
# For php-cli in the command line
sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php
You can also quickly check which yours is using by running php -v.

Install libmyodcb

The package was removed because it's not compatible with MySQL 5.7 which ships with 16.04 and up. As such, we need to manually add this package.

Using the following link, download and copy the file libmyodbc5a.so to /usr/lib/x86_64-linux-gnu/odbc/

Reboot server
Code: Select all
reboot
After the Reboot

Ensure that you re-run 'sudo -i', or log in as the root user. As mentioned above, the entire install process must be run as 'root', and failure to do so will cause unexpected problems.

Ensure mod_rewrite is enabled in apache

This is used to avoid potential attacks, and needs to be enabled.
Code: Select all
a2enmod rewrite
service apache2 restart
Install Legacy pear requirements
Code: Select all
pear install Console_Getopt
Install and Configure Asterisk

Download Asterisk source files.
Code: Select all
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.7.tar.gz
wget http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2
Compile and install DAHDI.

If you don't have any physical PSTN hardware attached to this machine, you don't need to install DAHDI (For example, a T1 or E1 card, or a USB device). Most smaller setups will not have DAHDI hardware, and this step can be safely skipped.
Code: Select all
cd /usr/src
tar xvfz dahdi-linux-complete-current.tar.gz
rm -f dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-*
make all
make install
make config
cd /usr/src
tar xvfz libpri-current.tar.gz
rm -f libpri-current.tar.gz
cd libpri-*
make
make install
Compile and install pjproject
Code: Select all
cd /usr/src
tar -xjvf pjproject-2.4.tar.bz2
rm -f pjproject-2.4.tar.bz2
cd pjproject-2.4
CFLAGS='-DPJ_HAS_IPV6=1' ./configure --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr
make dep
make
make install
Compile and Install jansson
Code: Select all
cd /usr/src
tar vxfz jansson.tar.gz
rm -f jansson.tar.gz
cd jansson-*
autoreconf -i
./configure
make
make install
Compile and install Asterisk
Code: Select all
cd /usr/src
tar xvfz asterisk-13-current.tar.gz
rm -f asterisk-13-current.tar.gz
cd asterisk-*
contrib/scripts/install_prereq install
./configure
contrib/scripts/get_mp3_source.sh
make menuselect
You will be prompted at the point to pick which modules to build. Most of them will already be enabled, but if you want to have MP3 support (eg, for Music on Hold), you need to manually turn on 'format_mp3' on the first page.
ubuntu-2.jpg
ubuntu-2.jpg (59.95 KiB) Viewed 228 times
After selecting 'Save & Exit' you can then continue
Code: Select all
make
make install
make config
ldconfig
update-rc.d -f asterisk remove
Install Asterisk Soundfiles.

The 'make install' above installs a standard low-quality base sound file by default. This is suitable if you are on a small, underpowered system (such as a Rasberry Pi), but on a larger system you should install higher quality soundfiles. Note that this installs the (8khz) 'wav' soundfiles and G722 (High Definition 'Wideband') audio.
Code: Select all
cd /var/lib/asterisk/sounds
wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-wav-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-g722-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-g722-current.tar.gz
tar xvf asterisk-core-sounds-en-wav-current.tar.gz
rm -f asterisk-core-sounds-en-wav-current.tar.gz
tar xfz asterisk-extra-sounds-en-wav-current.tar.gz
rm -f asterisk-extra-sounds-en-wav-current.tar.gz
tar xfz asterisk-extra-sounds-en-g722-current.tar.gz
rm -f asterisk-extra-sounds-en-g722-current.tar.gz
tar xfz asterisk-core-sounds-en-g722-current.tar.gz
rm -f asterisk-core-sounds-en-g722-current.tar.gz
Install and Configure FreePBX

Create the Asterisk user and set base file permissions.
Code: Select all
useradd -m asterisk
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib/asterisk
rm -rf /var/www/html
A few small modifications to Apache.
Code: Select all
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/5.6/apache2/php.ini
cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
service apache2 restart
Configure ODBC

Edit /etc/odbcinst.ini and add the following. Note that 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.
Code: Select all
cat >> /etc/odbcinst.ini << EOF
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc5a.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
 
EOF
You may need to verify these paths, if you're not on a x86_64 machine. You can use the command `find / -name libmyodbc.so` to verify the location

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.
Code: Select all
cat >> /etc/odbc.ini << EOF
[MySQL-asteriskcdrdb]
Description=MySQL connection to 'asteriskcdrdb' database
driver=MySQL
server=localhost
database=asteriskcdrdb
Port=3306
Socket=/var/run/mysqld/mysqld.sock
option=3
 
EOF
Download and install FreePBX.
Code: Select all
cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz
tar vxfz freepbx-13.0-latest.tgz
rm -f freepbx-13.0-latest.tgz
cd freepbx
./start_asterisk start
./install -n
This worked for me, and I now have asterisk 13 / FreePBX 13 successfully installed on a VPS running UBUNTU 16.04 LAMP stack. I warn you though, it's a basic install and I haven't tested every function or feature, so there might be other issues that need addressing. If your server is accessible to the world then you also need to make sure that you secure it!

EDIT: Tested this on Ubuntu 17.04 x64 just now and although it does install, i'm seeing the following error on the dashboard:
You have 17 tampered files
Tried runing:
Code: Select all
fwconsole chown
fwconsole ma refreshsignatures
fwconsole reload
No joy! Something, somewhere within the Operating System permissions setup is screwed up. The only way i'm going to solve this is to start reading up on using permissions, home directories, and environment inheritance to try to figure out which one thing out of literally hundreds of possible settings/options/commands is set incorrectly. :-/
User avatar
By PaulRB
#4826
Thanks for tremendous efforts on this Paul. I'm starting to think maybe that the ready made distro on a Pi may be the only option in the short/medium term, until the experts get FreePBX running with PHP7. Then I could transfer the function to the server PC and "re-cycle" the Pi.

Question: does using the Obi110 mean that I have "any physical PSTN hardware attached to this machine"?
User avatar
By WelshPaul
#4827
PaulRB wrote:Thanks for tremendous efforts on this Paul. I'm starting to think maybe that the ready made distro on a Pi may be the only option in the short/medium term, until the experts get FreePBX running with PHP7. Then I could transfer the function to the server PC and "re-cycle" the Pi.
If you go down the route of getting a PI, purchase a decent memory card. Avoid eBay, full of cheap fakes! I purchased two of these and so far so good!
PaulRB wrote:Question: does using the Obi110 mean that I have "any physical PSTN hardware attached to this machine"?
Nope because the Obi110 doesn't technically physically connect to the FreePBX server. Are you asking because you wanted to know if you need to compile and install DAHDI? If so, no there is no need to compile and install DAHDI. :)

Advertisement

By Sponsor

Just found out that the latest firmware build for …

Supported Products: OBi504vs OBi508vs Firm…

Supported Products: OBi200 OBi202 OBi300 OB…

These are unlocked and unbranded Snom 760 IP Phone…