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

They are in the office of a client, I do not have the setting here. I know that when asterisk was upgraded to 13 this happened and after scratching my head a while , changed NAT settings to something it should NOT have been sett to for the situation, then they started working. Try all the “wrong” settiings in extension for NAT

While they were in the “correct” setting asterisk acted as if the SIP messages were invisible but I was looking at them on wireshark.

Also, very well disguised on many cisco phones is also a NAT setting there too.

Well, using CSipSimple, it fails to register. “Service Unavailable”. Tried port 5060 and 5161. Must be something in my install I guess.

I will try to do a fresh install. Do I need to follow the guide again from scratch, or can I just re-install Asterisk and FreePBX on top of what I have? Is there a way to delete everything and start over? Install all dependencies again?

The easiest way to delete everything and start over is to put the Ubuntu thumb drive back and and let ubuntu format and reinstall.

in my install guide I make a note

(excellent point to create a backup image)

The reason for that is I have probably installed this 30+ times experimenting with different settings, mostly involving the sample config files. There are lots of ways you can create a backup image, but sometimes creating a backup image could take just as long as starting over at square one if your not familiar with the process, and there are lots of different ways to go about making a backup that you can restore from.

A graphical approach would be to use RedoBackup, the easiest way to make use of it would be to format the drive using less than half the drive space during install (in server this has to be done manually, if i recall correctly, the automatic methods are usually something like use all available space or use entire drive, so the manual option has to be selected) With half the drive available, you launch RedoBackup, use the partition tool to create a second partition with the rest of the available drive space (the other half of the drive) then RedoBackup can backup partition 1 to partition 2.

Once the backup is in place, you can at any time stick the RedoBackup thumb drive in the computer and restore from partition 2 back to partition 1.

with CsipSimple you tried port 5160? (That is the default chan_sip port set by FreePBX)

my extensions are configured as PJSIP extensions in Freepbx, but I connect using the chan_sip port of 5160

Sounds good. I will start from scratch and re-do everything. At least I have some experience now.

you configured your extensions in Freepbx as PJsip right?

In yours, this would show 701 instead of 5001 obviously.

EDIT: for CsipSimple it should work as chan_sip or PJsip, but for my ATA devices I had to configure them as PJSip or they would not register.

But yes, I would start over, because the CRITICAL AMI error should not be happening, and could be related.

I have 20+ ATAs registered as SIP (not PJSIP) to this build right now on port 5060 and the only issue is I turned off UDP on PJSIP, or it would try to take over 5060 even though it was not set to 5060

I prefer old school SIP for ATAs and softphopnes it just seems to always work for me.

@markosjal no luck on getting the device to play nice when you configure them to 5160 instead of 5060?

Naf made it sound like the UDP was important for PJSIP for google voice to work properly?

Maybe turning off UDP only affects the extensions since the trunk has its options set explicitly in the _custom file.

I just tried that, working for me as well.

Disable UDP on PJSIP, and then configure the chan_sip port to 5060.

Then delete and recreate the extensions as chan_sip instead of PJSIP

Going to test for a while with my system configured the same way.

EDIT: I may need to update the guide to do it this way by default, it seems like it would be less error prone when setting up extensions. It does seem to work either way though.

I had a post about it here: https://community.asterisk.org/t/help-how-to-get-device-to-register-as-chan-sip-on-non-standard-port-while-pjsip-is-also-active-works-for-softphone-but-both-ata-try-to-use-pjsip-despite-being-configured-to-use-chan-sip-port/75487

Without even reading your link, it works perfectly. Configure your ATAs with 1.2.3.4:5061 as the server address. The port your specify in the ATAs is the port THEY listen on, not the port they connect to.

On a Fresh FreePBX install the default ports for chan_sip are 5160 and 5161.

would I configure the ATAs with 1.2.3.4:5061 as the server address if I am trying to get the ATAs to work as chan_sip while PJsip is also active on the system?

If you want your ATA to talk to pjsip, you would use 1.2.3.4. If you want your ATA to talk to chan_sip, you would use 1.2.3.4:5160.

Ah that is what I thought. I tried configuring the ATA devices to use port 5160, but they would not register as chan_sip while PJsip was active. My solution was to create the extension as PJsip in Freepbx and have the ATA devices connect to the server at port 5160, that works, but is not chan_sip like I wanted.

@markosjal discovered that if you disable UDP on pjsip that the devices would then register and this appears to work for me as well after telling chan_sip to go back to using port 5060, I am going to see if I can leave the chan_sip port configured as 5160 while UDP is disabled and see if that works as well.

EDIT: The problem I am running into may simply be an issue with the ATAs in question because the Softphone appears to work properly.

You don’t configure the device to use 5160. That is setting the SIP port on the ATA. You configure the DESTINATION port in the proxy/server/whatever address, by adding :andtheportnumber. This works, and will always work, because being able to connect to a non-standard port is an extremely common thing to do.

OH! so in my HT802 I would leave the field Local SIP port: set as the default of 5060

and set the Primary SIP Server: as 192.168.5.240:5160 instead of just 192.168.5.240

correct?

Yes. That is what I said in my original post 8)

1 Like

sweet gonna give it a shot, then I would not have to disable UDP.

The confusing part of it was that the ATA phone device has a field for SIP port, so at first glance you don’t think to specify it in the server address field.

1 Like

Well. It does say ‘Local SIP Port’… How could it be phrased better? Most things say that. I just had a quick look at our phones, and they say the same:

image

2 Likes

I tested it just now, and used port 5160, and left UDP enabled. Works perfectly. Appreciate you pointing that out, LOL!

For whatever reason it was not obvious to me. Thank you for spelling it out, I suppose its just part of the learning curve.

1 Like

Here is what I found

I set up an ATA to register to xyz@IP:5060

I had :
Chan_SIP UDP & TCP Configured for 5060
Chan_PJSIP UDP at 5160

When the ATA went to register Chan_PJSIP generated a message saying that no account for xyz . I recongnized this was a PJSIP message , so I disabled PJSIP UDP (supposedly on 5160) and Chan_SIP then worked perfectly and xyz was able to register to chan SIP on 5060.

“local port” on ATA is independent of server port

The server was supposed to be listening for PJSIP on 5160 but it was (also?) listening for PJSIP on 5060 and preventing Chan_SIP from having 5060