Little adjustments for How to Install FreePBX 15 on Debian 10 with Asterisk 16, PHP 7.3


#1

I use the tuto How to Install FreePBX 15 on Debian 10 with Asterisk 16, PHP 7.3 of the wiki. Thanks for the guy who made this tuto!
It works well. I have only a few little problems.

First the git branch for mariadb connector odbc is no more active ( git checkout debian/3.1.4-1). What is the new one? I don’t find it on the mariadb web site.
For installing the FFMPEG, the version has changed : ffmpeg-4.2.1 -> ffmpeg-4.2.2. The solution is simple
change cd ffmpeg-4.2.1-amd64-static by cd ffmpeg-*/
And it will support new version changes!
When I want to install the webrtc module using fwconsole ma install webrtc there is an error Unable to install module webrtc
Last thing : Set symlinks to the correct sound files
The directory /usr/share/asterisk does not exists. The sounds are in /var/lib/asterisk/sounds. Then I don’t understand why the ln command?
Thanks for your help!


#2

https://downloads.mariadb.org/connector-odbc/

apt install ffmpeg

would always install the latest veriosn in the repos.

what errors with the webrtc?

You didn’t reference the source you followed so the “Last thing :” can’t yet be answered.


#3

Thanks for your fast answer.
For mariadb connector, after downloading the debian version how to install it? I see the libmaodbc.so file in the download. When having a look at the asterisk logfile, it hopes to find this file at /usr/lib/x86_64-linux-gnu. I just copy it? The web site of mariadb is not very clear.
For ffmpeg you are right, it is more simple but the version is older.
Using fwconsole ma install webrtc there is an error Unable to install module webrtc. No more information.
The source is the freepbx wiki : How to Install FreePBX 15 on Debian 10 with Asterisk 16, PHP 7.3
At the end of the wiki there is : Set symlinks to the correct sound files and no directory /usr/share/asterisk on the server.


#4

Its location is defined in

/etc/odbcinst.ini

so as long as that is satisfied, you should be good to go.

ffmpeg is pretty well just used for ogg and that has been rock solid in ffmpeg for donkey’s years.

Can’t help with the webrtc IWFM with no bitching, pm2 on the other hand is a pain but that’s another story but I don’t find UCP as useful as FOP2.


#5

That original wiki page was written by me, but I see that it has been modified a bit by someone else. So I can not vouch for its validity, but will say:

  • I preferred the static build of ffmpeg because it was simpler and smaller. You can use it or the repo version.

  • I wanted to use a .deb build for the ODBC connector because it puts files in the standard Debian locations. I just checked the repo and 3.1.4-1 is still the right version. Maybe the instructions were erroneously altered.

  • The original article used Asterisk from the Debian repo and when you do that the instructions for setting up the sound path is correct. But if you build it yourself, that doesn’t apply.

I wish that the person who updated the wiki had just made his own page as his additions and changes significantly modify what I originally intended. :-\


#6

Thanks BillSimon for your great job!
I have found on the community freepbx an article named FreePBX 15 on Buster. I suppose it is yours.
I will read it tomorrow to find the differences.
Thanks too dicko for your help!


#7

I made some more tests using the install.sh file.
I have some problèmes :

  • mariadb connector is not installed correctly
    res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Can’t open lib ‘/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so’
    I find this file at :

/usr/local/src/mariadb-connector-odbc/obj-i686-linux-gnu/libmaodbc.so
/usr/local/src/mariadb-connector-odbc/debian/odbc-mariadb/usr/lib/i386-linux-gnu/odbc/libmaodbc.so
The files are different. What is the right one?

Impossible to make fwconsole reload. I found the problem. It is the digium module that has a deprecated constructor. As I don’t use this kind of phone, I delete the module :
fwconsole ma delete digium_phones
I suppose that as Sangoma has bought digium, they won’t support the digium phones which are concurrent.
Another problem :: the module PM2 is not installed. I have this error related to npm
Node Package Manager is not installed
Unable to install module pm2:

  • Failed to run installation scripts
    The installation of Node has this error :Node.js 11.x is no longer actively supported!
    Then I install npm and after pm2 with fwconsole ma install pm2

The installation of npm solved some problems with the installation of many freepbx modules.

I have this warning when installing PM2
npm does not support Node.js v10.15.2
npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.

Then it is not finished but better!


#8

It looks like some things have changed since I last ran through this script. When I have some time, I will go through it again and try to fix these problems.

By the way, what platform are you installing on? It looks like i386 / i686? I have only tested on x64. If you are using 32-bit you should move to a newer system.


#9

It is a Debian 10 64 bits


#10

Then these are not the libraries you want - how did you install those?


#11

Also using Debian 10 64 bit. Using the lib/libmaodbc.so from

https://downloads.mariadb.org/connector-odbc/

(mariadb-connector-odbc-3.1.6-ga-debian-x86_64.tar.gz)

with

md5sum = 6b254335e02cc95f18a574385e5d1d74

moved as needed to match

/etc/odbcinst.ini
.
.
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
.
.

In my script i have

mariaodbc

cd /usr/src
wget https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.1.6/mariadb-connector-odbc-3.1.6-ga-debian-x86_64.tar.gz
tar -zxvf mariadb-connector-odbc-3.1.6*.tar.gz
cp lib/libmaodbc.so /usr/lib/x86_64-linux-gnu/odbc/

cat > /etc/odbcinst.ini << EOF
[MySQL]
Description = ODBC for MariaDB
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1

EOF

cat > /etc/odbc.ini << EOF
[MySQL-asteriskcdrdb]
Description = MariaDB connection to ‘asteriskcdrdb’ database
driver = MySQL
server = localhost
database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
option = 3

EOF


#12

Hello Dicko,

Your script is very good. I have just changed the 3.1.6 by 3.1.7.

Why do you write this line ?

Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so

Hello BillSimon,
I compile the source following Building MariaDB Connector/ODBC from Source with :
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCONC_WITH_MSI=OFF -DCMAKE_INSTALL_PREFIX=/usr/local .
cmake --build . --config RelWithDebInfo
I have then two files with two differents sizes!


#13

You need the Driver defined either in odbcinst.ini or odbc.ini , fuller notes :-

http://www.unixodbc.org/unixODBCsetup.html


#14

@dicko is being thorough in his guide.

The setup line is not strictly needed if manually setting up the data source. It is used by the gui (x-windows) tools (and maybe unixodbc CLI tool?) when setting up a new data source.

I omit it out of laziness.

I guess you could stumble upon a need for it, but curious if @dicko has found it needed anywhere in a console only environment?


#15

My servers are not console only, in this day and age even a raspberry can walk and chew gum at the same time, many end users are happier with a gooey than a shell, and it is “just one line”


#16

Fair enough, I’m the type that manages Windows from the CLI.

I don’t hesitate to fire up the gui if a tool is needed, but rarely boot into it for a Linux server context.


#17

(I still have a couple of windoze XP boxes for legacy reasons.)


#18

Hello,

Things are going better and better.
I keep on with a problem with the mariadb connector
[2020-04-10 16:43:53] WARNING[3686] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Can’t open lib ‘/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so’ : file not f
[2020-04-10 16:43:53] WARNING[3686] cel_odbc.c: No such connection ‘asteriskcdrdb’ in the ‘cel’ section of cel_odbc.conf. Check res_odbc.conf.
If I check the directory I get
root@debian:/etc# ls -l /usr/lib/x86_64-linux-gnu/odbc
total 2244
-rw-r–r-- 1 asterisk asterisk 2295400 avril 10 13:45 libmaodbc.so
I don’t know why asterisk does not find libmaodbc.so

Something less important, when instakling freepbx 15 I have this message
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf


#19

First off, happy birthday,otherwise, “maybe you should start over”, many have used one of the variations of this recipe on everything from cloud vm’s to raspberry’s, (me personally dozens of times). 99% of cases of frustration are of the user missing a step or mis typing.

Again, please try the recipe again from step one, at ANY point in time when you don’t see what is expected, suspect first that you made a mistake, and it is not the recipe.

Just to eliminate one possible awkwardness, please do this over a real ssh shell and NOT over putty under windows. (Linux subsystem for windows (WSL) will get you cleanly there)


#20

Thanks for the answer. After a long time, I finally found that the problem was coming from the rights of the directory.

Now in the Asterisk logfile I have this error

ERROR[10936] loader.c: Module ‘libmaodbc.so’ did not register itself during load

What am I doing wrong?