Specific callers get refused by FreePBX

Hello All,

I have come to a recent (= 3 months) issue I am not able to figure out.
Since last month a single customer got denied a phonecall. When she calls in
I get a e-mail Trunk notification from my provider, stating we did not answer the call.

(Same message when the server is unreachable).

When checking I found out 3 different customers (since May) have been consistently denied.

  • We can call these three specific customers outbound.
  • We do not use blacklists.
  • Everything else worked fine 80 calls in/outbound a day.
  • No server related (latency) issues found.

FreePBX 16.0.45
Asterisk Version: 18.20.0 (Use Call Manager) patched.

Refused calls:
“Jackson Potferen Training & coaching” <+316325xxxxx>
“Von Chasjik Career- & Job application a.” <+31661xxxxxx>
“Sutis Cowherst Career advice & Coaching” <+31622xxxxxx>

(Names and numbers are Anonymized but kept same characters).

My working theory is the CNAM with the Ampersand (& character),
is the problem, that is what all these callers have in common.

Please let me know if Ampersand is allowed in freePBX CNAM inbound.
Or do you have a direction of search.

Thanks

Some logs would sure help but the ampersand isn’t a valid CNAM/LIDB character…so their provider is just letting them pass what they want and your provider is just accepting it.

But logs would really show what is happening.

& is valid in a quoted string, in SIP, so Asterisk should accept it. Note that SIP does not use the term CNAM. The field in question is called display-name.

We definitely need the logs. If FreePBX is mishandling it, rather than just deleting it, there could be a code injection issue.

Are you sure that it is FreePBX, and not the phone, that is rejecting it?

These names are also rather long; are similarly long ones getting through? If you are using UDP, it is possible that you are being pushed into IP fragmentation, if already close to the limit, and a firewall is not able to cope with that.

My understanding is that a valid CNAM is limited to 15 characters, and only numbers and CAPS allowed. That was the standard with POTS, PRI-NI2, and I know it works with SIP.

As a test make an inbound route as below and have one of them call you:

Then check the CDR Report to see what happened. Make sure you can answer whatever destination you have the route set for.

Thank you all for idea’s and where to look.

So today I had my customer in and she made a call on my request, so I could pull and see the log.
To my surprise there is NOTHING in the log. Not a single entry.
At the providers side (trunk) the call is logged, and marked as not answered by us.

So I am going to give them a call and see what they have to say, because it seems their system is acting up on these numbers and not FreePBX.
(A administrative person had a call with them earlier when this started, there response was “You just wanted the trunk so for these questions you are one you’re own”)

About to hear what they Say.

You need to do a packet capture outside of any firewall. I suspect the message is being fragmented, and the firewall is rejecting the second fragment.

I considered the idea, and for educational purpose it would be good.

But I am not willing to expose FreePBX at the DMZ or outside the firewall anyway. So if this is what happends, I might consider having the Trunk provider pass me the phonenumber CID and let them strip the CNAM. I overwrite CID/CNAM anyway with a match from the database or when unmatched just the plain callerID.

I will have to look at routeroptions, because the settings of the current build-in firewall are very limited

First, capture traffic on the WAN interface of your router/firewall to confirm that the problem is indeed caused by fragmentation.

If so, there may be a settings change in the router that will cause fragmentation to be handled properly. You might be able to change a setting in the provider portal (such as reducing the number of codecs offered) to avoid fragmentation. If they support it, SIP over TCP or TLS will avoid fragmentation.

Are you in the Netherlands? If so, +3166 is weird, as those numbers are reserved for pagers.
If you are in the Wichita area, the provider should be sending +1316 rather than +316. And the Wichita lineman is still on the line.

So for the details.

The Provider returned my call with the information that the 3 phonenumbers had 3 INVITES send and that FreePBX(Asterisk) did not acknowledge or respond. So the firewall was the next check.
The provider did not have a solution at hand, they gave me another port to connect to (5060 to 6060), and like above adviced to check the Firewall router settings.

6 months ago the router was swapped for a identical model. I took a backup from the old one restored on the new one. However some settings (I notice earlier) did not transfer properly and were manually set. However I seem to have missed SIP ALG. Turning it off solved the problem.

In the mean time I took more solutions to heart.

  • Disabled provider based calledId lookup, to fill CNAM fields.
  • Reduced the number of allowed codecs to the phones supported only.

Thanks for helping out.