Hi. I hope someone can help. I’ve spent days trying to get this to work.
I started with a clean Debian 12 install and clean FreePBX on a Linode(Akamai) VPS with no firewall other than the Sangoma within FPBX and a public IP address. I configured the trunk to Clone Line / VOISIP using the pjsip module per normal. I configured outbound routes and inbound routes.
I setup a GXP2160 Grandstream phone with a configured OpenVPN to the server. The server has 10.8.0.1 & the phone 10.8.0.2.
The very first time I dialed out, it dialed and has not done so since. It also will not ring on a dial in, just disconnects immediately.
From sngrep I can see the invite (SDP), a 401 unauthorized response, followed by an ACK. The Invite is being sent sip:[email protected] (openvpn server IP).
And that’s all it does until it eventually releases the line.
I have assumed that the use of OpenVPN should circumvent any natting and double natting issues (it does for everything else I use it for) and the FreePBX should treat the OpenVPN network as local (it looks that way in the configuration) and should use the assigned trunk route per the outbound routes.
It did just once when I first set it up. Now nothing. I’ve tried about everything I can think of at this point.
That typically means that the what is sending the INVITE has no password to give. If it shouldn’t be being asked for a password, what is supposed to be accepting the INVITE either has failed to identify the requester, or has been misconfigured to require a password.
Note that 401 is not a rejection, it is a way of giving information on how to authenticate, and also of giving a unique challenge that protects against replay attacks.
So, I installed ZOIPER on my Ubuntu desktop and created an extension for it and dials out fine. I did not try dialing in because it is not running through the VPN, just over my (definitely natted) ISP.
The thing that I notice is different is that ZOIPER responds to the initial INVITE (SDP), 401 Unauthorized, ACK with another INVITE (SDP) which is followed by a 100 Trying and then session in progress, but the Grandstream phone does not.
I’ve been trying to figure out how to get the GXP to respond with another INVITE but so far no luck. I did also try the GXP over my natted connection and it still does not authorize so whatever is coming back from the asterisk is not triggering the GXP to resend the INVITE (SDP).
I tried to keep “custom” configuration to a minimum so I am going to look into that password issue. If FPBX is requiring a password and ZOIPER is providing it but the GXP doesn’t think it has to send one is a good place to start.
Just guessing, the INVITE with the Authorization header is too big and there is a fragmentation issue.
Try enabling only ulaw (PCMU, g.711u) and alaw (PCMA, g.711a) codecs in the Grandstream.
OK. That fixed the outward dialing ! Thanks very much. I just took out all the other codecs and set the phone to use first matching codec (PCMU) and set the only alternative to PCMA.