Calls not hanging up

Hello,

Fresh install of FreeBPX 14.0.1.20 with Asterisk 13.18.3 and have a weird problem.

Calls are being received just fine and audio is both ways.
The problem is that on the caller’s end, the call does not hangup.
Also, after working hours, we have a small announcement after which the PBX should terminate the call with hangup. But the call is never hangup.
When this happens, from CLI if I issue: core show channels I can see that there are no active calls.
0 active channels
0 active calls

The provider replied to my query saying that (sanitized):

The invite header is not the same as BYE
INVITE To: sip:[email protected]:5060
BYE From: sip:[email protected]

Any hints as to what might be the problem?

Thank you

Additional info.
When the PBX should hangup, CLI shows:

ERROR[2211]: pjproject:0 <?>: sip_endpoint.c Error processing packet from ProviderSIP-IP:5060: Missing required header(s) (PJSIP_EMISSINGHDR) CSeq [code 171050]:
SIP/2.0 400 Bad From Header
Via: SIP/2.0/UDP LocalPublic-IP:5060;rport=5060;branch=z9hG4bKPj0e43e49a-e2e5-4baa-87c3-6ea0546b2b11
Content-Length: 0

Still cannot get to the bottom of this.
Any hints please?

Breiefly change to chan-sip and see if that still pertains.

This is the first thing I tried.
I have tried again, just in case and the same situation.

It seems it might be from the SIP provider’s end.
I setup another PJSIP account from another provider and this one does not exhibit the problem, calls being hangup cleanly.
As a side note, the problematic account also shows:
WARNING[8267][C-0000000e]: chan_sip.c:22961 func_header_read: This function can only be used on SIP channels.
While the 2nd test account that works, does not show that error.

Now I just need to get the provider to fix this somehow…

As I expected, the provider blames asterisk incompatibility and suggested 13.x is not good.
So I tried 11,14 and 15. All resulting in the same error.

I am out of ideas…that is if any ideas can help in my situation.