Calls drop after 30 seconds if the phone is on WiFi

Hi,

I’ve only been using FreePBX for a few weeks and I’m still in the testing phase. So far everything is set up and running. I use the Groundwire iPhone App.

But when my cell phone is on my WiFi, incoming and outgoing calls stop after 30 seconds.

If my cell phone is not on my own WiFi, I can make calls as normal. Even if I’m on someone else’s WiFi, I can make phone calls normally.

Do you have any idea what that could be?

It looks to me like a routing problem if the cell phone uses the FQDN and it is in the same network. But what could I change in the settings?

Make sure the subnet of your wifi is part of Local networks under Asterisk SIP settings.

i have done this. All Subnets are in Asterisk SIP Settings.

The FreePBX is in the Subnet 10.10.40.254/24. My Phone is in the Subnet 10.10.50.254/24. Is this a problem?

I had the same configuration before with another PBX-System without any problem.

Have you restarted asterisk after configuring these subnets? I’ve never seen anything else but the correct subnet not being configured in the Local Network settings be a problem when a call drops after 30 seconds.

it looks like the restart solved the problem.

now i discovered another strange thing. The call is not drop anymore.

But with some destinations i have the problem that i hear nothing. And if i deactivate my WIFI on the phone and call again the number i can talk with them.

And with other destinations i can talk also via WIFI without any problems. Is this a codec problem?

After intensive testing it is as follows: Incoming calls also work in WIFI. Outgoing calls stop after 30 seconds. This seems to apply to all conversations.

The subnets are configured. I made several restarts of the PBX.

This is typically caused by the router/firewall not handling ‘hairpinning’ correctly, or by forwarding an external SIP port to a different internal port on the PBX.

If you can’t easily find the trouble, paste the Asterisk log (with pjsip logger on) for a failing call at pastebin.com and post the link here. If an internal call fails, use that, otherwise call a number you don’t have to redact, such as a local McDonald’s.

1 Like

it is a hairpinning / NAT Loopback problem between the 2 subnet.

You shouldn’t be NATting between 2 private subnets that are behind an address translator. Your router has 1 private subnet on it’s ethernet port/ports and a different one on it’s wifi bridge. Traffic flow between those subnets should be routed not natted.

Is your router a cable modem supplied by the ISP or something? What you need to do if that is the case is:

  1. Turn off wifi on your router
  2. Setup a wifi access point
  3. Plug it into the router’s ethernet port

Wif AP’s bridge between their ethernet port and the wifi. So your wifi will now have the same subnet IP as the ethernet.

You can easily make a wifi AP from one of many “wifi routers” out there using dd-wrt or openwrt firmware. Some of the commercial firmware will also allow you to do this. And there’s tons of “wifi routers” people have junked available for next to nothing - because they have gone to ISP-supplied devices that work exactly like the piece of junk you currently have. Except they don’t know any better and now you do!

thx for this tips.

In my case i use a Firewall/Router with some different vlans for different tasks. The FreePBX is on a different vlan as my phone. The problem was a configuration problem of the firewall rules.

I got that. The issue is making sure you aren’t NATTing between your VLANs.

Glad you figured it out and thanks for updating the thread with the problem resolution.

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