Gateway unable to connect : FAIL_WAIT

Status
Not open for further replies.

Zobiniki

New Member
Jul 17, 2023
5
0
1
35
Edit : I decided to take a hammer to it and reinstalled everything. That "fixed" the issue.

Hello,
I am getting desperate. I have wasted entirely too much time attempting to set up a PBX, 11 days to be exact, and now I seem to be going backwards.

I got as far as getting outbound calls and calls between devices to work. Incoming call packets showed up on sngrep on the router at some point, then they stopped showing up.

In attempting to get this to work, I changed something, I can't even remember what at this point, then rebooted the Raspberry Pi that the PBX is sitting on. Now the Gateway won't register and devices cannot register with the PBX either even though they could just before the reboot.

sngrep shows that the PBX is not responding to messages at all.

The only clue I have is the state of the gateway being "FAIL_WAIT". I don't know how to further diagnose this.

In case it is relevant, the Pi is sitting behind a router running DD-WRT and UPnP is enabled. I set "ext-rtp-ip" and "ext-sip-ip" to "auto-nat" in the external SIP profile. The provider, Telnyx, is set to register to a FQDN and the Pi is set to automatically update the IP in the DNS record at Cloudflare because I have a dynamic IP.

Thank you for your help.

Edit :
/var/log/freeswitch/freeswitch.log shows the following :
2023-07-28 15:41:25.166892 98.60% [ERR] sofia_reg.c:2662 75b2cdbb-cd75-463e-8605-c32483f9db9a Failed Registration with status Service Unavailable [503]. failure #16
2023-07-28 15:41:26.166894 98.60% [WARNING] sofia_reg.c:520 75b2cdbb-cd75-463e-8605-c32483f9db9a Failed Registration [503], setting retry to 30 seconds.
 
Last edited:

gpetrom

New Member
May 6, 2021
20
0
1
47
Hi same thing is happening to me also.
Strange thing is when i am trying with vanilla freeswitch is registering ok.
2023-07-29 21:18:34.571887 99.10% [ERR] sofia_reg.c:2662 1440db74-c81b-447f-a7a6-41437ab3bd1b Failed Registration with status Forbidden [403]. failure #7
Maybe is something with the latest version of fusionpbx?
 

Zobiniki

New Member
Jul 17, 2023
5
0
1
35
It is not the same thing. I was getting Service Unavailable [503], you are getting Forbidden [403].
 

gpetrom

New Member
May 6, 2021
20
0
1
47
Yes you're right
I have managed to solve the problem for me. Fusionpbx does not like special characters in password.
I think that the problem is with @ character.
About your problem maybe is a dns issue
Can you ping the provider ip;
Another thing you can try is telnet provider_ip sip_port and see if it responds.
 

Zobiniki

New Member
Jul 17, 2023
5
0
1
35
I have solved the incoming call issue. The issue turned out to be a badly configured iptables ruleset. DD-WRT adds a set of default iptables rules which I assumed were overwritten the moment custom iptables rules were added to the UI. It turns out that they aren't. Those default rules contained
iptables -A INPUT -j logdrop
iptables -A FORWARD -j logdrop

and DD-WRT appended my custom rules after that. So obviously, the packets didn't make it to my custom ALLOW rules.
The solution was to wrap my custom rules in the following rules :

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -D INPUT -j logdrop # These delete the DROP rules added by default by DD-WRT
iptables -D FORWARD -j logdrop
[Custom INPUT rules]
iptables -A INPUT -j logdrop
[Custom FORWARD rules]
iptables -A FORWARD -j logdrop
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
 
Status
Not open for further replies.