Run FreePBX on WiFi Connection

I have my RasPBX (Freepbx 13) running on my Raspberry Pi3 perfectly with Ethernet. I also have Wifi setup and it’s connecting properly and has an IP. I can access the Freepbx admin gui from either Lan or Wifi. I’m also able to disconnect my LAN, and soley on my WiFi browse the internet and download different repositories on the internet.
If I disconnect my LAN cable, I can still SSH and access the FreePBX admingui via WiFi IP. However my FreePBX will stop registering with my SIP Trunk. In the logs I will see “Registering with SIP…Timed out…retry” over and over until it gives up. If I plug my LAN cable back in, it immediately registers again. CallCentric also said they are not seeing my Sip Packets arrive on their end so I suspect it’s a network issue on my end which I confirmed by looking at my DD-WRT router outbound logs. I do not see any packets coming from my Wlan0 interface.

Sip Provider = Call Centric
SIP DEBUG below
-----------Retransmitting #5 (NAT) to 204.11.192.22:5080:
REGISTER sip:call centric:5080 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.128:5060;branch=z9hG4bK1b6a4062;rport
Max-Forwards: 70
From: ;tag=as1a4fab0f
To:
Call-ID: [email protected]
CSeq: 956 REGISTER
Supported: replaces
User-Agent: FPBX-13.0.190.19(13.13.1)
Authorization: Digest username=“12345678”, realm=“sip provider”, algorithm=MD5, uri=“sip:sip:sip provider”, nonce=“ddf539763eb270ddfd321e7abcbe01cd”, response="afcd499f24948c44fb47d562a1c7787e"
Expires: 120
Contact:
Content-Length: 0
[2017-03-28 18:54:30] NOTICE[1773]: chan_sip.c:15747 sip_reg_timeout: – Last Registration Attempt #10 failed, Giving up forever trying to register '[email protected]
Really destroying SIP dialog ‘[email protected]’ Method: REGISTER


I also setup a route
“route add 204.11.192.0 netmask 255.255.255.0 dev Wlan0”
When I put that route in, immediately I get those retransmission errors. When looking at my outbound router logs, I don’t see packets. But if I run this command
[email protected]#: nc -uv callcentric.com 5060
Connection to callcentric.com 5060 port [udp/sip] succeeded!
I will see packets from Wlan0 to callcentric. So it seems to be something up with Freepbx/Asterisk just doesn’t want to use Wlan0
I’ve also tried

  1. changing the binding ports as well as the binding address
  2. Disabling ETH0 and only using WLAN0
  3. Using IP address for SIP trunk instead of hostname
  4. Placing the RasPBX on the DMZ of my router
  5. Forwarding all ports to the Raspbx
    Is there some CLI I can do to so I can run my FreePBX/Asterisk on Wifi?

In SSH try to trace to the servers… Maybe look at DNS and the routing table with ethernet disconnected…

As always remember just because something can be done, doesn’t mean it should be done.

2 Likes

no issue tracerouting out to callcentric on wifi

first hop hits my router and out to the internet it goes arriving at alpha11.callcentric

It’s just strange I don’t any outbound traffic on my router on WiFi when I do a SIP Reload
But if I do something on the CLI like ping google then outbound packets show up on the router logs.

I think it has something to do with Asterisk itself won’t send SIP packets out when using Wlan0

Why would that seem strange?

A SIP Reload doesn’t update the ARP tables for your OS Routing Tables. Ping does.

Sounds like you need to set up the “old stand-by”.

In your “rc.local”, you need to add the following line:

ping -i 5 www.google.com >/dev/null &

Added the lines. here’s what my rc.local file looks like

_IP=$(hostname -I) || true
if [ “$_IP” ]; then
printf “My IP address is %s\n” "$_IP"
fi
ping -i 5 www.google.com >/dev/null &
exit 0

Rebooted the PBX and still getting transmission error and nothing on the outbound logs

Retransmitting #3 (NAT) to 204.11.192.169:5080:
REGISTER sip:callcentric.com:5080 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.128:5060;branch=z9hG4bK3f3ac738;rport
Max-Forwards: 70
From: sip:[email protected];tag=as0873561b
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 103 REGISTER
Supported: replaces
User-Agent: FPBX-13.0.190.19(13.13.1)
Expires: 120
Contact: sip:[email protected]:5060
Content-Length: 0

There’s something going on here that you’re not telling us about your local network.

You understand that once everything is up and running, it’s static. Nothing changes unless it’s told to change. You pretty much have to restart everything if things like the host IP address changes - which is what it sounds like your machine is going through.

Unless both addresses are up and running when Asterisk starts up and the network is active, the system will never be able to fail over to another route. This isn’t something that’s going to happen magically - you’re going to need to make this happen by careful settings and understanding the specifics of what you are doing and why you are doing it.

Not saying you can’t get it done - I’m just saying that this is Level 11 Network Wizard magic and I’m thinking you might still be level 8 or 9.

This won’t work you need to send the inbound call to an endpoint on YOUR network or at least something you can control the answer on but NEVER back to the sender unless they can handle properly the redirection and not just send it to back to you again
(look carefully at your ‘From:’ and your ’ To:’ headers)

this isn’t a call. This is the message I get when I’m trying to register my SIP trunk.

How do I change the From: and To:? I didn’t think I had control over that.