Free pbx - vmware - server 2012r2 - nat

Hello community,
I have recently installed Freepbx 14.0.10.3.
It is installed through VMWARE on a win 2012 r2 server.
Here are the settings:
Win 2012 static IP: 192.168.0.10 with a ddns update client.
Freepbx static IP through VMware with bridged network: 192.168.0.62
router internal IP: 192.168.0.1
Ports forwarded from router :5060 to 192.168.0.62 | 10000 -11000 to 192.168.0.62
I have changed the sip bind port from 5160 to 5060 sip channel and from 5060 to 5160 for the pjsip so they do not conflict.
Firewall of Pbx is disabled
Win 2012 firewall has rules for 5060 and 10000-11000 for both tcp/udp
General sip settings:
NAT Settings:Detect network settings has found my public ip
and Local Networks also has identified the 192.168.0.0/24 local network setup.
RTP Settings are 10000-11000
Video is enabled
Chan SIP Settings:
NAT=yes
IP Configuration: dynamic ip and i inserted the ddns ip
Bind Port:5060

Another pc (not static ip) with X-LITE and android mobiles with mizudroid softphone
When i am connected through the network everything is working fine
When i am connected through mobile data and vpn from win 2012 also all is fine
When i am connected through mobile data only calls are established vice versa but no audio communication from either side.

What i want to achieve generally with my setup:
Create a home Voip server for up to 6 users on mobile softphones.
I want to be able to have audio-video calls and chat.
Please advice for what should i do to establish such a communication.

Thanks in advance guys

You need to have the NAT settings for the extension setup correctly. FreePBX assumes all extensions are local and since these are Chan_SIP extensions that means the NAT setting is set to No instead of Yes(force_rport,comedia). Change that to Yes, try to connect remotely and make a call to see if audio is there. Then do the same test from the local network to make sure audio is still there. Chan_SIP can be funky when you want it to be both local and remote.

Chan_PJSIP might be better for this since it has NAT detection/awareness built in.

1 Like

Hi Tom,
Forgot to mention that the NAT settings in the sip extensions was already changed to Yes(force_rport,comedia).No luck with that.
I will try with PJSIP and will let you know.
I assume that i have to create new type of extension for this protocol and also i believe that the softphones will offer that option too

Thanks for your reply.

HI Tom,

Unfortunately now nothing is working.I am getting errors of wrong username/password even though softphones are registered and calls do not go through or ring once and then fail.It happens either on data or local wifi network.

Did you either A) Change the port on the softphone or B) Change the port PJSIP listens on?

Chan_SIP and PJSIP listen on different ports. So you either need to tell the softphone/phone that or change the ports on the PBX side.

I changed the port forward in router from 5060 to 5160 for the Freepbx which i believe is equivalent to A or B of what you propose

If you mean that you are forwarding external 5060 to internal 5160, that won’t work. Asterisk knows it’s listening on 5160, so it will instruct the client (with a contact header) to reply to Asterisk’s public IP port 5160.

Sorry i was not clear,

PJSIP is assigned 5160.
So i port forward 5160-5160 for 192.168.0.62 which is the VMware freepbx
I left everything as it was ,added the PJSIP extensions and changed the portforward from 5060-5060 to 5160-5160

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.