Permanently modify accept header

My SIP provider sends OPTIONS after it has detected one of my trunks is down. Asterisk is responding with a SIP/200 OK but the provider has told me that the “Accept” header is too long. As a result, the Accept-header is truncated.

Is it possible to shorten it permanently from this:

to this?

I was thinking about doing it in the dialplan, but PJSIP_HEADER doesn’t seem to be able to remove the original one.

Modify the source code and recompile. You may break the features that require the other types if any of your peers use them an actually check the Accept header.

I was also thinking about that but I couldn’t find the exact piece in the PJSIP source code. Unfortunately, that doesn’t allow to do it for one specific trunk.

Since the header “Accept” was truncated (according to wireshark) and Asterisk was a default install along with PJSIP, could this imply some kind of bug?