Permanently modify accept header

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Permanently modify accept header

Postby dr1esken » Mon Jan 11, 2016 7:38 am

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:
Code: Select all
Accept: application/sdp, application/simple-message-summary, application/xpidf+xml, application/cpim-pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/pidf+xml, application/dialog-info+xml, message/sipfrag;version=2.0

to this?
Code: Select all
Accept: application/sdp


I was thinking about doing it in the dialplan, but PJSIP_HEADER doesn't seem to be able to remove the original one.
dr1esken
Newsterisk
 
Posts: 13
Joined: Tue Apr 21, 2015 7:43 am

Re: Permanently modify accept header

Postby david55 » Mon Jan 11, 2016 7:41 am

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.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: Permanently modify accept header

Postby dr1esken » Mon Jan 11, 2016 7:44 am

david55 wrote: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.
dr1esken
Newsterisk
 
Posts: 13
Joined: Tue Apr 21, 2015 7:43 am

Re: Permanently modify accept header

Postby dr1esken » Mon Jan 11, 2016 1:23 pm

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?
dr1esken
Newsterisk
 
Posts: 13
Joined: Tue Apr 21, 2015 7:43 am


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 1 guest