Calls Hanging UP

Hi Everyone

I’m Still having a lot of Issues with our FreePbx, actually we’re running 16.0.10.42, we just had the Problem with any Type of calls Internal and external.

Everything was working fine until the systems stops processing calls, no internal calls and no external calls were Possible, I had Hangup Cause 41 and 16 on the Logs, someone has any idea why this happens??, after a “fwconsole restart” everything starts to work again.!

Here an Protokoll of one calls: Protokol - FreePBX Pastebin

If it is important the system is behind an Pfsense Firewall, with portforward on port 5060 (only from the Providers IP) and a General Portaforwar for from 10000-20000 for RTP.

I would be really thnankfull for any help

Regards
Chris

If you would have one-sided audio, then the firewall setting might play a role under certain circumstances. It looks as if a hangup handler gets called, which would indicate that there has been a SIP BYE message. A SIP trace would be helpful, either from the console as text or from the pfSense box (Diagnostics/Packet Capture).

I don’t have any Audio, my Problem is why i also unable to do internal calls, the FreePBX is in the Same Subnet as the Phone, there are no Firewalls (except Freepbx own one) between.

Yes, it can be only one thing, but it’s a secret. No, you have not given enough information that one could use to diagnose the problem.

Hello @jgttgns

I am sorry for my late response, i was not able to give you more information at this time, because the problem Diapered after the restart, now the Problem appeared again and i was able to make a Packet capture on the Pfsense.

Packet capture PfSense: CAP1 - FreePBX Pastebin

and again a Log of FreePBX: CAP2 - FreePBX Pastebin

Thanks a lot for your help

Are the phones online?

The decision to terminate was made by the Pfsense. It sends the BYE at line 126. It gives these reasons in the BYE, but doesn’t further explain them:

Reason: q.850;cause=41;text="CC_Q850_041_TEMPORARY_FAILURE"
Reason: sip;cause=503;text="Service Unavailable (1:223)"

These are basically catch all error statuses so say no more than something went wrong at its end.

Asterisk is behind NAT but is not properly configured to know its public address (both Contact and media addresses are on the private 192.168 sub-network), and there doesn’t seem to be a normal port forwarding rule in the Asterisk side router, as the router seems to be rewriting the port number. It is possible that the unrouteable media address is causing the Pfsense to abandon the call.

I’ll have a look at the traces later. Since your problem does not occur all the time, it could be a NAT timing problem, so you could have a look at the pfSense configuration System / Advanced / Firewall & NAT / Firewall Optimization Options

You could check whether switching from Normal to Conservative makes a difference. Ultimately, you do not need that, but the details depend on how the other side reacts. In short, you probably want some special Outbound NAT rules as explained here: Firewall Best Practices for VoIP on pfSense - YouTube

Most of the time, port forwarding is actually not needed. Maybe I can see something in your files, or you could just go for the safest approach and use forwarding and outbound rules. Also, setting the external IP is never a mistake.

To me it looks as if the call gets terminated by the calling side.

If I read your first pcap file correctly your scenario is as follows:
(1) You are calling a landline with an iPhone, that has a German Telekom contract. Let’s call this party iPhone.
(2) The landline is operated by a company called EWE Tel GmbH and their proxy server is in this case 85.16.254.56. From now on I call it Paderborn.
(3) Your WAN IP belongs to the EWE backbone structure and from now on I call it Hude.
(4) The phone gets terminated by Paderborn and not by whatever happens in Hude, which could be either the EWE telephony server or the calling party iPhone/German Telekom (timestamp 10:18:30.120776)

I haven’t figured out what the Sipgate/NetzQuadrat entries are about, but haven’t really studied the lines.

I think you are fine, if you can follow the pfSense video. You could also start with keeping track of when the terminations occur, which might indicate or not that it is a NAT related problem. At the same time you should monitor the router’s state table (Diagnostics / States). Of course you could also hire a consultant, :innocent:

@PitzKey
Yes most of our Phones are online and logged in into the queue

@david55
you´re right, I found an error on the Freepbx Configuration

@jgttgns
Thanks a lot for your help and the Video, i reconfigured the Pfsense in some points including the fixing of the outgoing ports.

In my Case a Port forward is necessary, but it was configured all ready, with the Video i make some adjustments to that. For the moment everything is working well, i hope it stays like that.

I only still a little annoyed why the internal Calls were blocked also if there was no Firewall between.

and Sipgate is only another Sipprovider who ist configured but not in use for now.!

Please delete the Pastebin files. You were not careful enough such that the company’s address, etc can easily be revealed. May not be a real problem in this case, but nevertheless…

I am just curious. Since most private households do not have a static IP address in Germany, I’d wonder whether comedia (connected media) works as expected. That’s not a problem if the router offers VoIP, because the router always knows its external IP address, but a PBX inside the LAN ist also a frequent setup and then one needs extra steps to get the external IP.

If you remove the setting for the external ip, does your setup still work? Do you still need port forwarding in this case? Do you need ICE or STUN or something like that, in case it doesn’t work? You either have to restart the router or delete all states (Diagnostics/States / Reset States) when you change the settings.

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