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

Make sure to backup your install before trying the git pull incase things dont work out.

Edit, nope, the issue was Codec Translators -> codec_opus (from make menuselect)

DO NOT INCLUDE THAT.

  1. If they are charging you for outbound calls to Toll Free destination, regardless of how many minutes you use they are ripping you off. ā€œToll Freeā€ numbers flip the charges so the carrier/user that the Toll Free is on are responsible for the charges.

The only time you are charged for a Toll Free call is when it is an inbound call to a Toll Free number you own.

  1. I never said Canada was free I said it was generally including in their standard rate. So if you have a provider that is charge you $0.009/minute for 1NXXNXXXXXX based calls, that includes Canada. As I said outside of the areas I mentioned most carriers include US/Canada at the same rate for outbound charges.

Again, this is all moot with GV in play and that is why weā€™re in this thread. When GV does completely go away and there is no further free alternative then other options will be looked at.

1 Like

I did the opus update and the lastest git pull updates. This is not a new issue for me but one I had hoped the latest updates would have taken care of. I sometimes (probably 1 in 4 times) get a busy tone. I notice this as the only error in my logs:

ERROR[1807]: pjproject:0 <?>: icess0x2242dd8568 ......Error sending STUN

I believe it has to do with NAT but not sure where I need to adjust something. Any ideas are appreciated.

@2devnull you can adjust this in the FreePBX GUI, I outline it as optional.

goto Settings -> Asterisk SIP Settings then
ā€œGeneral SIP Settingsā€-Tab

and enter Stun Server Address:

stun.l.google.com:19302

refer to the guide in the opening post, there is a picture.

ALSO, I had problems with enabling OPUS, and had to restore from backup, let me know how OPUS works out for you.

And if that does not work, and you have the time to try something different.

When following the guide you can try this:

sudo git clone https://github.com/naf419/asterisk.git --branch gvsip
cd asterisk
sudo git reset --hard 3d50b86c7d84d6cfab0b6d6566590e9385b3cd39
sudo sed -i 's/^MAINLINE_BRANCH=master/MAINLINE_BRANCH=15/' build_tools/make_version

If you insert the git reset with that commit hash, that will roll the repository back to that point in time.
I have tested that particular commit for a week straight and never had busy outbound.
Sorry if that does not work out for you, guess its just part of being on the bleeding edge of things and testing out these new features. I will of coarse try to help if I can think of anything based on what feedback you give me.

Thatā€™s a weird way to do it. Just run

sudo git checkout 3d50b86c7d84d6cfab0b6d6566590e9385b3cd39

Why do you insist on running every command prefixed with sudo. Just switch user to root so you dont have to run sudo on every command.

1 Like

Thanks! I just posted what works for me, next time I clone from a particular commit, I will try out this new one, thank you.

Because I am secretly hoping you will find time sooner or later to write up a new guide for Ubuntu, muahahaha, but seriously I do that out of habbit because that is how I normally do most things in the land of Ubuntu. I have tried running the entire guide as root user a few times, and I spent countless hours trying to avoid the sample config files. I have since gave up on that endevour and am hoping somebody else with more freepbx experience find the time to write up a new Ubuntu guide. (or point out to me what to do to avoid those sample files.)

booooo

Thatā€™s actually a good answerā€¦ I run a mac (losts of developers do actually!) and I have to sudoā€¦ occasionally

2 Likes

Update: I thought installing the Opus codec was what caused my no audio issue, and in a way it was.
However from a DIFFERENT extension the audio still worked fine.

One of my ATA devices (Grandstream HT802) has support for OPUS built in. It seems when I called a google hangouts number initially, the OPUS codec worked fine and sounded good. I then later called a phone that does not have OPUS support, and what happened is the HT802 went into a BROKEN state.

I am going to see if there is any later firmware updates for it, or possibly debug it later. for now I went back to just using ulaw, and power cycled the HT802. Will tinker with the Opus more later, atleast now I know somewhat why the audio quit working when I tried Opus.

I hope you are aware that in the advanced tab for an extension there is a line for ā€œDisallowed Codecsā€ and that you can use that to disallow Opus to that extension if the ATA has a buggy Opus implementation.

1 Like

Thank you! I did not even think to look for that yet! Will check it out. Currently I only own Linksys PAP2T which does not even have OPUS and Grandstream HT802 which does have opus but maybe its buggy.

I also occasionally use cSIPsimple which likely supports Opus, I still need to test it out.

Ideally I would like to get Opus on the HT802 working properly, and replace the remaining Pap2t that I am using, that way all extensions would support Opus. Otherwise I will probably be looking for a new affordable way to enable Opus for my extensions which currently use traditional cordless phones.

When I do that entry, it give me this error (also the reason I had omitted it originally):

ERROR[10639]: pjproject:0 <?>: icess422154543410dfa8 ......Error sending STUN request: Network is unreachable

I would enter the value, and then I would ignore the error. If you look at Nafā€™s wiki at the bottom of Errors to ignore: Home Ā· naf419/asterisk Wiki Ā· GitHub

It is likely only the IPV6 that is failing, and the IPV4 is probably working just fine. There might be a way you can diagnose what is actually working with some network debugging depending on your network environment.

(One way I could think to test is to find a way to disable the IPV6 interface, reboot, and then see if you still have the error or not. If the Stun request is working through the other network interfaces and only having a problem for the IPV6 then that error can just be ignored as NAF says.)

It would be nice if that error message indicated the interface it had the problem on.

All,

Just wanted to make something clear. Iā€™ve seen in passing that some users think we (I guess me) are being stubborn because we are saying donā€™t use make samples and are insisting that our installer doesnā€™t work for open source and we want to keep it broken on purpose.

Let me assure you all. The distro itself uses the installer to install FreePBX. We use the installer regularly. If the installer was broken FreePBX Distro itself would be broken.

We donā€™t clone images we dont clone drives or databases. We run the installer, just like you do through the open source installer. Itā€™s the same installer. There is no difference.

Please understand that our staff (including myself) donā€™t have time to check each type of distro weekly. We update our guides when a new release of FreePBX comes out. 15 is coming out soon and we will update our guides at that time.

Again, we use the installer regularly. No changes are made to the installer. It really irks me when people assume that just because Sangoma is a corporation that we wish to stifle or prevent open source. If that were true weā€™d have shutdown the forums and github long ago, we could still call FreepBX GPL and open source at that point because it would be, GPL only means that you have to give the source when asked. It doesnt mean you need to make it clearly visible for all to see and use.

The fact that we host our source not only on our own site at git.freepbx.org but also on github and the fact we keep the forums running and provide tons of (free) help shows Sangomaā€™s commitment to open source. So work with us and please try not to think of Sangoma as stopping open source. We arenā€™t.

Hereā€™s part of our docker image that downloads AND builds freepbx. No ā€˜make samplesā€™ used.

# Download FreePBX
cd /usr/src
if [ "$EDGE" == "true" ]; then
	URL="http://mirror1.freepbx.org/modules/packages/freepbx/5.6/freepbx-freepbxdistro-$FVERSION-EDGE.tgz"
else
	URL="http://mirror1.freepbx.org/modules/packages/freepbx/5.6/freepbx-freepbxdistro-$FVERSION.tgz"
fi
echo "Downloading and extracting $URL"
curl $URL | tar -zvxf -

if [ "$?" != "0" ]; then
	echo Something failed
	exit 1
fi

# If MySQL didn't start, die because something's wrong
if [ ! -e /var/lib/mysql/mysql.sock ]; then
	l ERROR: MySQL did not start
	exit 3
fi

# Remove the 'TTY' line from /usr/sbin/safe_asterisk so it doesn't
# leak file descriptors
sed -i '/^TTY/d' /usr/sbin/safe_asterisk

# Start asterisk
cd /usr/src/freepbx
cbg ./start_asterisk start
sleep 1

# And NOW we can install freepbx
mkdir -p /var/lib/asterisk/sounds/custom/
c ./install -n
2 Likes

Thank you for the update on that tm1000. I was wondering why the guide in the wiki hadnā€™t been updated since August 2017. I did not realize that guides only got updated when a new version of FreePBX came out.

I mostly just assumed that since only the FreePBX distro includes the commercial modules that other distros were not a priority and so nobody cared to keep any of the guides up to date. I also understand that the guides in the wiki are a bonus, and that they donā€™t even have to be offered, so I appreciate whatever we can get.

We like supporting open source. When Sangoma was in the process of buying our former company Schmoozecom our CEO (Now COO of Sangoma @tonyclewis ) made sure that FreePBX would stay open source.

Keeping up to date with all the distros out there is time consuming. I started a FreeBSD installation guide but had to stop because their package manager was shutdown at the time due to being hacked. When a package manager is down you have to not only build Asterisk from source, but all binaries, like text editors, srtp, etc. We put a lot of time into the wiki when releases come out.

And on top of that people can add new guides all the time, but they often donā€™t because itā€™s a painful process. FreePBX 16 will probably require PHP 7.3 as well which is easy for me to say on the distro but when I go to something like Debian or Ubuntu who knows if they will support PHP 7.3 or not. Which means trying to find a third party repo. Each guide can take a full day to do. Iā€™m thankful that Sangoma (@GameGamer43 my direct boss) allows me to do that when the time comes. Itā€™s why Iā€™m proud to work for this company.

Weā€™re coming up on our yearly developer conference (22 people coming together from all over the world) for Sangoma and during this time itā€™s a lot of coding and flying and traveling where we can all talk. I hope that weā€™ll have FreePBX 15 out soon and can then work on some updated guides.

1 Like