How-To Guide for Google Voice with Freepbx 14 & asterisk gvsip, Ubuntu 18.04

I have tested IAX to IAX for calls between servers+extensions at different locations, and the calls have worked fine.

Unfortunately I do not own a fax machine so it is not something I can test or tinker with, good luck, hope you get it figured out, if you do be sure to post back how you fixed it.

@xekon

FWIW…

=====

ZERO sample files are required. After cloning Asterisk (NAF’s or otherwise), FreePBX does require at least an empty modules.conf (and possible an empty ari.conf) or it gets upset. NAF’s Asterisk requires an empty statsd.conf, but that’s the extenit of it.

=====

I have no problems with UCP after installing FreePBX 14 and Asterisk straight from NAF’s repository:

Capture

And it comes up reliably after a reboot:

root@FreePBX:~# ps aux | grep node
asterisk 1575 1.8 4.5 126312 45172 ? Ssl 20:22 0:02 node /var/www/html/admin/modules/ucp/node/index.js

When I install nodejs, I also install libicu-dev (and use nodejs v9, but v8 works equally well):

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
apt-get -y install nodejs
apt-get -y install libicu-dev

1 Like

Thank you I appreciate this info. I did find out that modules.conf was required, I figured it out the hard way, removing a few .conf files at a time until I figured out which ones I needed to make it run. Going to look over what you’ve posted and try some stuff out.

EDIT: I included the sample file smdi.conf because without it, FreePBX ran, seemingly without issue, but voicemails did not work, I tried loading the voicemail.so file manually as per an example and found that it complained about smdi (a dependency) not yet being loaded, after copying the smdi.conf file from the samples and issuing a reboot, the voicemails started to function again.

EDIT2: seems I already have libicu-dev installed, so it either came with ubuntu or was installed alongside the other dependencies:

libicu-dev is already the newest version (60.2-3ubuntu3).

what does your ps aux | grep asterisk look like?

I don’t have an smdi.conf on any system and voicemail works fine. If you’ve installed SMDI (Simplified Message Desk Interface), then I suppose you may need smdi.conf.

root@FreePBX:~# ps aux | grep asterisk

asterisk 750 1.1 3.6 158056 36504 ? S 20:22 0:50 /usr/sbin/apache2 -k start
asterisk 751 1.1 3.6 158848 36660 ? S 20:22 0:50 /usr/sbin/apache2 -k start
asterisk 753 1.0 3.3 157624 33392 ? S 20:22 0:47 /usr/sbin/apache2 -k start
asterisk 1339 0.1 3.3 117644 33052 ? Ssl 20:22 0:07 PM2 v2.10.1: God Daemon (/home/asterisk/.pm2)
asterisk 1475 1.1 3.6 158448 35956 ? S 20:22 0:50 /usr/sbin/apache2 -k start
asterisk 1476 1.0 3.7 158060 37756 ? S 20:22 0:47 /usr/sbin/apache2 -k start
asterisk 2292 1.1 2.8 157128 28772 ? S 20:23 0:49 /usr/sbin/apache2 -k start
asterisk 3782 1.0 3.3 157980 33676 ? S 20:26 0:46 /usr/sbin/apache2 -k start
asterisk 10644 0.9 3.6 158996 36008 ? S 20:40 0:31 /usr/sbin/apache2 -k start
asterisk 23840 0.0 2.5 157192 25720 ? S 21:10 0:00 /usr/sbin/apache2 -k start
asterisk 23971 0.1 1.3 45424 13176 ? Ss 21:10 0:01 dirmngr --daemon --homedir /home/asterisk/.gnupg
asterisk 24277 0.0 2.7 157456 27028 ? S 21:11 0:00 /usr/sbin/apache2 -k start
root 24857 0.0 0.0 1900 112 pts/0 S 21:13 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 24859 1.1 5.5 166252 55216 pts/0 Sl 21:13 0:16 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
asterisk 25019 0.3 4.0 127348 40240 ? Ssl 21:13 0:05 node /var/www/html/admin/modules/ucp/node/index.js
asterisk 29220 0.0 0.0 1900 400 ? Ss 21:38 0:00 /bin/sh -c [ -x /var/www/html/admin/modules/dashboard/scheduler.php ] && /var/www/html/admin/modules/dashboard/scheduler.php > /dev/null 2>&1
asterisk 29223 8.7 2.7 90116 27652 ? S 21:38 0:00 php /var/www/html/admin/modules/dashboard/scheduler.php
root 29235 0.0 0.0 4372 552 pts/0 S+ 21:38 0:00 grep asterisk

root@FreePBX:~# ps cax | grep asterisk

24857 pts/0 S 0:00 safe_asterisk
24859 pts/0 Sl 0:16 asterisk

1 Like

cool thanks, interested to see the difference between an install done using root vs not, yours shows

root 24857 0.0 0.0 1900 112 pts/0 S 21:13 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 24859 1.1 5.5 166252 55216 pts/0 Sl 21:13 0:16 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c

while mine shows

asterisk 731 0.5 4.2 2046712 84696 ? Ssl 18:44 0:16 /usr/sbin/asterisk -U asterisk -G asterisk

I notice your safe process is run as root, but then you have another ran as asterisk, I think that is what they refer to as the process forking.

I also see that yours has these parameters that mine does not: -f -vvvg -c

I suspect you didn’t install a service (in init.d) that starts Asterisk using ‘fwconsole start’ and stops Asterisk using ‘fwconsole stop’.

usr/sbin/safe_asterisk should always be running and is used to automatically relaunch Asterisk if it crashes for some reason.

1 Like

FWIW, I have NAF’s GVSIP implemented on the Raspberry Pi and have no problems sending and receiving faxes at 14400 w/ECM through Google Voice using HylaFAX. I’ve never tried the FreePBX fax module.

Confirmed, I just did the install with zero sample files as well.

So I just installed this as Per the wiki (the freepbx install part with “sudo su”), and it seems that having an empty modules.conf file is the solution that I have been looking for from the start of all this samples file confusion.

Unfortunately nobody ever suggested trying this. I got to the point that I narrowed down the required sample files for my install method down to a couple files, and at that point you mentioned the empty modules.conf file needed (which is better than using the sample one) Also earlier in the thread you pointed out the required empty statsd.conf file.

I just tried this myself, and the entire issue when I was trying to install this following the wiki was because of the missing modules.conf file. A lot of time could have been saved had I realized this sooner.

I did learn some stuff in the process of working on this, so the time spent was not a complete waste. I also devised a very nice backup and restore solution, in which I can boot to another copy of ubuntu, issue a backup of a partition in about 30 seconds (or restore the partition in about 60 seconds) and then boot back to my main copy of ubuntu, all VIA SSH, without even touching the remote computer or any usb thumb drives.

I have updated the existing wiki and modified the touch line to include the other empty .conf files.

going to clean up this guide one more time.

Also, I appreciate you posting @reraikes it is helpful information :slight_smile:

After rereading my post, it seemed I was frustrated, and I just want to make sure you know I am not frustrated with you :slight_smile: It is just frustrating when the reason for something not working is not at all obvious.

FYI. Rob and I both wrote those guides and have never had to create modules.conf so we wouldn’t have been able to tell you to write out modules.conf. In the next month or so for freepbx 15 we will be updating the guides again.

2 Likes

Andrew,

It’s only a problem when cloning and compiling NAF’s branch of Asterisk. If using an official Asterisk release tarball, there’s no need to create modules.conf.

If you’re interested, I can send you a script that illustrates/reproduces the problem.

2 Likes

SMDI is not something I went out of my way to install, but yet it seems I have it, is that something that would have been installed or not installed during make menuselect?

the only thing I did on that step was select format_mp3, app_macro, and wav/ulaw for core sounds. (the rest was defaults.)

using only 1 sample file is not bad though :slight_smile:

Just for sake of completeness, I set the extension to go directly to the fax extension and I had no issues.

I also collected some verbose output. There’s no indication that it even tries to send the fax to the fax extension. I will open a new topic on this since I don’t think it’s related to this topic any more.

Does your script encompass compiling Nafs for the Raspberry Pi, also are you using Raspbian for the OS? I am assuming the install method would be close to the same for the Raspberry Pi as it is for a PC? just that you have to install Raspbian instead of Ubuntu.

Interested in your script for Raspberry Pi that clones & builds Nafs Asterisk, if you would share it please.

1 Like

Is there any way to install Naf’s Gvsip on Freepbx 14 without recompiling Asterisk? The reason I ask is because I have a fresh install of FreePBX V14 and Asterisk V13.19.0 with the usecallmanager.nz Cisco phone presence patch. Or, is there a way I can install Naf’s Gvsip and the Cisco presence patch concurrently, as in patching Asterisk with both Gvsip and Cisco presence together?

sorry, I have been gone all day, it is possible to apply the patch file.

I will be including patch instructions once I find the time to test them, but there are instructions on how to apply Naf’s patch file in the dslreports thread, scattered across different pages: http://www.dslreports.com/forum/r32067540-

I planned on creating patch instructions now that Rob has created an up to date Ubuntu Guide: https://wiki.freepbx.org/display/FOP/Installing+FreePBX+14+on+Ubuntu+18.04 I just need some free time before I can write it up and test it.

I am running into an issue when I run contrib/scripts/install_prereq install. This is on a new VPS with vultr. I can’t seem to find anyone else having this issue and I am not sure how to fix it.

root@pbx:/usr/src# cd asterisk
root@pbx:/usr/src/asterisk# sudo sed -i 's/MAINLINE_BRANCH=.*/MAINLINE_BRANCH=15/' build_tools/make_version
root@pbx:/usr/src/asterisk# contrib/scripts/install_prereq install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  aptitude-common libcwidget3v5 libsigc++-2.0-0v5 libxapian30
Suggested packages:
  aptitude-doc-en | aptitude-doc apt-xapian-index debtags libcwidget-dev xapian-tools
Recommended packages:
  libparse-debianchangelog-perl
The following NEW packages will be installed:
  aptitude aptitude-common libcwidget3v5 libsigc++-2.0-0v5 libxapian30
0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.
Need to get 3,212 kB of archives.
After this operation, 13.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 aptitude-common all 0.8.10-6ubuntu1 [1,014 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsigc++-2.0-0v5 amd64 2.10.0-2 [10.9 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libcwidget3v5 amd64 0.5.17-7 [286 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxapian30 amd64 1.4.5-1ubuntu0.1 [631 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 aptitude amd64 0.8.10-6ubuntu1 [1,269 kB]
Fetched 3,212 kB in 1s (4,002 kB/s)
Selecting previously unselected package aptitude-common.
(Reading database ... 113010 files and directories currently installed.)
Preparing to unpack .../aptitude-common_0.8.10-6ubuntu1_all.deb ...
Unpacking aptitude-common (0.8.10-6ubuntu1) ...
Selecting previously unselected package libsigc++-2.0-0v5:amd64.
Preparing to unpack .../libsigc++-2.0-0v5_2.10.0-2_amd64.deb ...
Unpacking libsigc++-2.0-0v5:amd64 (2.10.0-2) ...
Selecting previously unselected package libcwidget3v5:amd64.
Preparing to unpack .../libcwidget3v5_0.5.17-7_amd64.deb ...
Unpacking libcwidget3v5:amd64 (0.5.17-7) ...
Selecting previously unselected package libxapian30:amd64.
Preparing to unpack .../libxapian30_1.4.5-1ubuntu0.1_amd64.deb ...
Unpacking libxapian30:amd64 (1.4.5-1ubuntu0.1) ...
Selecting previously unselected package aptitude.
Preparing to unpack .../aptitude_0.8.10-6ubuntu1_amd64.deb ...
Unpacking aptitude (0.8.10-6ubuntu1) ...
Setting up libxapian30:amd64 (1.4.5-1ubuntu0.1) ...
Setting up aptitude-common (0.8.10-6ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up libsigc++-2.0-0v5:amd64 (2.10.0-2) ...
Setting up libcwidget3v5:amd64 (0.5.17-7) ...
Setting up aptitude (0.8.10-6ubuntu1) ...
update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Hit https://deb.nodesource.com/node_10.x bionic InRelease
Hit http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit http://archive.ubuntu.com/ubuntu bionic InRelease
Hit http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Hit http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit http://archive.ubuntu.com/ubuntu bionic-backports InRelease




The following NEW packages will be installed:
  binutils{a} binutils-common{a} binutils-dev binutils-x86-64-linux-gnu{a} bison
  build-essential comerr-dev{a} cpp{a} cpp-7{a} doxygen dpkg-dev{a} flex freetds-common{a}
  freetds-dev g++{a} g++-7{a} gcc{a} gcc-7{a} gcc-7-base{a} gir1.2-gmime-2.6{a}
  gir1.2-harfbuzz-0.0{a} graphviz icu-devtools{a} krb5-multidev{a} libann0{a} libasan4{a}
  libasound2-dev libatomic1{a} libbinutils{a} libbison-dev{a} libbluetooth-dev libbluetooth3{a}
  libbsd-dev{a} libc-client2007e{a} libc-client2007e-dev libcc1-0{a} libcdt5{a} libcfg-dev
  libcfg6{a} libcgraph6{a} libcilkrts5{a} libclang1-6.0{a} libcodec2-0.7{a} libcodec2-dev
  libcorosync-common-dev libcorosync-common4{a} libcpg-dev libcpg4{a} libct4{a}
  libcurl4-openssl-dev libdb-dev{a} libdb5.3-dev{a} libdpkg-perl{a} libedit-dev
  libexpat1-dev{a} libfftw3-bin{a} libfftw3-dev libfftw3-long3{a} libfftw3-quad3{a}
  libfftw3-single3{a} libflac-dev{a} libgcc-7-dev{a} libglib2.0-bin{a} libglib2.0-dev{a}
  libglib2.0-dev-bin{a} libgmime-2.6-0{a} libgmime-2.6-dev libgpgme11{a} libgraphite2-dev{a}
  libgsm1-dev libgssrpc4{a} libgts-0.7-5{a} libgvc6{a} libgvpr2{a} libharfbuzz-dev{a}
  libharfbuzz-gobject0{a} libharfbuzz-icu0{a} libical-dev libical3{a} libicu-dev{a}
  libicu-le-hb-dev{a} libicu-le-hb0{a} libiculx60{a} libiksemel-dev libiksemel3{a} libisl19{a}
  libitm1{a} libjack-jackd2-dev libjansson-dev libjansson4{a} libjbig-dev{a} libjpeg-dev{a}
  libjpeg-turbo8-dev{a} libjpeg8-dev{a} libkadm5clnt-mit11{a} libkadm5srv-mit11{a} libkdb5-9{a}
  liblab-gamut1{a} libldap2-dev liblsan0{a} libltdl-dev{a} liblua5.2-dev liblzma-dev{a}
  libmpc3{a} libmpx2{a} libncurses5-dev{a} libneon27{a} libneon27-dev libnewt-dev libogg-dev
  libosptk-dev libosptk4{a} libpam0g-dev{a} libpathplan4{a} libpcap0.8-dev{a} libpci-dev{a}
  libpcre16-3{a} libpcre3-dev{a} libpcre32-3{a} libpng-dev{a} libpopt-dev libportaudiocpp0{a}
  libpq-dev libpq5{a} libpython-dev{a} libpython-stdlib{a} libpython2.7-dev{a} libqb-dev{a}
  libqb0{a} libquadmath0{a} libradcli-dev libradcli4{a} libreadline-dev{a} libresample1{a}
  libresample1-dev libsensors4-dev{a} libserf-1-1{a} libslang2-dev{a} libsndfile1-dev
  libsnmp-base{a} libsnmp-dev libsnmp30{a} libspandsp-dev libspandsp2{a} libspeex-dev
  libspeexdsp-dev libspeexdsp1{a} libsqlite3-dev libsrtp0{a} libsrtp0-dev libsrtp2-1{a}
  libsrtp2-dev libssl-dev libstdc++-7-dev{a} libsvn1{a} libsybdb5{a} libtiff-dev{a}
  libtiff5-dev{a} libtiffxx5{a} libtinfo-dev{a} libtsan0{a} libubsan0{a} libudev-dev{a}
  libunbound-dev libunbound2{a} liburiparser-dev liburiparser1{a} libvorbis-dev libvpb-dev
  libvpb1{a} libwrap0-dev{a} libxaw7{a} libxml2-dev libxmu6{a} libxslt1-dev m4{a} make{a}
  mlock{a} pkg-config pkgconf{b} portaudio19-dev python{a} python-dev python2.7{a}
  python2.7-dev{a} python3-distutils{a} python3-lib2to3{a} subversion unixodbc-dev uuid-dev
  xmlstarlet
The following packages are RECOMMENDED but will NOT be installed:
  fakeroot fakeroot:i386 fonts-liberation libalgorithm-merge-perl libfile-fcntllock-perl
  libfl-dev libgts-bin libgts-bin:i386 libpng-tools libpng-tools:i386 libssl-doc libtool
  libtool-bin pseudo pseudo:i386 vpb-driver-source
0 packages upgraded, 191 newly installed, 0 to remove and 3 not upgraded.
Need to get 119 MB of archives. After unpacking 437 MB will be used.
The following packages have unmet dependencies:
 pkgconf : Breaks: pkg-config (>= 0.29-1) but 0.29.1-0ubuntu2 is to be installed
           Breaks: pkg-config:i386 (>= 0.29-1) but it is not going to be installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     pkgconf [Not Installed]



The following NEW packages will be installed:
  binutils{a} binutils-common{a} binutils-dev binutils-x86-64-linux-gnu{a} bison
  build-essential comerr-dev{a} cpp{a} cpp-7{a} doxygen dpkg-dev{a} flex freetds-common{a}
  freetds-dev g++{a} g++-7{a} gcc{a} gcc-7{a} gcc-7-base{a} gir1.2-gmime-2.6{a}
  gir1.2-harfbuzz-0.0{a} graphviz icu-devtools{a} krb5-multidev{a} libann0{a} libasan4{a}
  libasound2-dev libatomic1{a} libbinutils{a} libbison-dev{a} libbluetooth-dev libbluetooth3{a}
  libbsd-dev{a} libc-client2007e{a} libc-client2007e-dev libcc1-0{a} libcdt5{a} libcfg-dev
  libcfg6{a} libcgraph6{a} libcilkrts5{a} libclang1-6.0{a} libcodec2-0.7{a} libcodec2-dev
  libcorosync-common-dev libcorosync-common4{a} libcpg-dev libcpg4{a} libct4{a}
  libcurl4-openssl-dev libdb-dev{a} libdb5.3-dev{a} libdpkg-perl{a} libedit-dev
  libexpat1-dev{a} libfftw3-bin{a} libfftw3-dev libfftw3-long3{a} libfftw3-quad3{a}
  libfftw3-single3{a} libflac-dev{a} libgcc-7-dev{a} libglib2.0-bin{a} libglib2.0-dev{a}
  libglib2.0-dev-bin{a} libgmime-2.6-0{a} libgmime-2.6-dev libgpgme11{a} libgraphite2-dev{a}
  libgsm1-dev libgssrpc4{a} libgts-0.7-5{a} libgvc6{a} libgvpr2{a} libharfbuzz-dev{a}
  libharfbuzz-gobject0{a} libharfbuzz-icu0{a} libical-dev libical3{a} libicu-dev{a}
  libicu-le-hb-dev{a} libicu-le-hb0{a} libiculx60{a} libiksemel-dev libiksemel3{a} libisl19{a}
  libitm1{a} libjack-jackd2-dev libjansson-dev libjansson4{a} libjbig-dev{a} libjpeg-dev{a}
  libjpeg-turbo8-dev{a} libjpeg8-dev{a} libkadm5clnt-mit11{a} libkadm5srv-mit11{a} libkdb5-9{a}
  liblab-gamut1{a} libldap2-dev liblsan0{a} libltdl-dev{a} liblua5.2-dev liblzma-dev{a}
  libmpc3{a} libmpx2{a} libncurses5-dev{a} libneon27{a} libneon27-dev libnewt-dev libogg-dev
  libosptk-dev libosptk4{a} libpam0g-dev{a} libpathplan4{a} libpcap0.8-dev{a} libpci-dev{a}
  libpcre16-3{a} libpcre3-dev{a} libpcre32-3{a} libpng-dev{a} libpopt-dev libportaudiocpp0{a}
  libpq-dev libpq5{a} libpython-dev{a} libpython-stdlib{a} libpython2.7-dev{a} libqb-dev{a}
  libqb0{a} libquadmath0{a} libradcli-dev libradcli4{a} libreadline-dev{a} libresample1{a}
  libresample1-dev libsensors4-dev{a} libserf-1-1{a} libslang2-dev{a} libsndfile1-dev
  libsnmp-base{a} libsnmp-dev libsnmp30{a} libspandsp-dev libspandsp2{a} libspeex-dev
  libspeexdsp-dev libspeexdsp1{a} libsqlite3-dev libsrtp0{a} libsrtp0-dev libsrtp2-1{a}
  libsrtp2-dev libssl-dev libstdc++-7-dev{a} libsvn1{a} libsybdb5{a} libtiff-dev{a}
  libtiff5-dev{a} libtiffxx5{a} libtinfo-dev{a} libtsan0{a} libubsan0{a} libudev-dev{a}
  libunbound-dev libunbound2{a} liburiparser-dev liburiparser1{a} libvorbis-dev libvpb-dev
  libvpb1{a} libwrap0-dev{a} libxaw7{a} libxml2-dev libxmu6{a} libxslt1-dev m4{a} make{a}
  mlock{a} pkg-config portaudio19-dev python{a} python-dev python2.7{a} python2.7-dev{a}
  python3-distutils{a} python3-lib2to3{a} subversion unixodbc-dev uuid-dev xmlstarlet
The following packages are RECOMMENDED but will NOT be installed:
  fakeroot fakeroot:i386 fonts-liberation libalgorithm-merge-perl libfile-fcntllock-perl
  libfl-dev libgts-bin libgts-bin:i386 libpng-tools libpng-tools:i386 libssl-doc libtool
  libtool-bin pseudo pseudo:i386 vpb-driver-source
0 packages upgraded, 190 newly installed, 0 to remove and 3 not upgraded.
Need to get 119 MB of archives. After unpacking 437 MB will be used.
[ ERR] Writing extended state information
E: Failed to fork process for dpkg selections.
E: failed to save selections to dpkg database
root@pbx:/usr/src/asterisk#

It is working now. Instead of loading the vultr ubuntu image, I uploaded the ubuntu ISO and installed it directly from there.

Is it possible to add multiple gvsip trunks to freepbx14? I edited the pjsip_custom.conf file by adding basically a duplicate copy of each section [gvsip1] with [gvsip2] with the correct info oauth info etc… and created a second trunk for my other gv account and in/out routes etc… but no matter what I do when I sign into a sip client with 702 it always uses gvsip1.

Thanks,

~SOL