[asterisk-bugs] [JIRA] (ASTERISK-29165) res_pjsip: malformed header Accept-Encoding in OPTIONS response
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Wed Oct 13 06:13:57 CDT 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-29165:
-------------------------------------
Target Release Version/s: 19.0.0
> res_pjsip: malformed header Accept-Encoding in OPTIONS response
> ---------------------------------------------------------------
>
> Key: ASTERISK-29165
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29165
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_pjsip
> Affects Versions: 18.0.1
> Reporter: Alexander Greiner-Baer
> Severity: Trivial
> Target Release: 16.16.0, 18.2.0, 19.0.0
>
>
> When establishing a SIP Trunk between Asterisk PJSIP and Alcatel OmniPCX,
> the Alcatel periodically logs this:
> {noformat}
> Warning alarm [sip_acceptIncorrectHeader] Header Accept-Encoding is malformed => unknown header
> {noformat}
> Logging SIP packets in Asterisk shows, that the Accept-Encoding Header
> is set to "text/plain":
> {noformat}
> <--- Received SIP request (455 bytes) from UDP:X.X.X.X:5060 --->
> OPTIONS sip:Y.Y.Y.Y SIP/2.0
> Route: <sip:Y.Y.Y.Y;lr>
> Accept: application/sdp
> User-Agent: OmniPCX Enterprise R12.3.1 m4.501.15
> To: sip:Y.Y.Y.Y
> From: sip:X.X.X.X;tag=c8743b616cc43ff1aa259447ed513231
> Contact: <sip:alcatel;transport=UDP>
> Call-ID: d5207489e2a0e69e8a31ac261d9500f2 at X.X.X.X
> CSeq: 1384889626 OPTIONS
> Via: SIP/2.0/UDP X.X.X.X;branch=z9hG4bKb4a6eabaa38a16a64588e74aef74d88b
> Max-Forwards: 70
> Content-Length: 0
> <--- Transmitting SIP response (856 bytes) to UDP: X.X.X.X:5060 --->
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP X.X.X.X;rport=5060;received= X.X.X.X;branch=z9hG4bKb4a6eabaa38a16a64588e74aef74d88b
> Call-ID: d5207489e2a0e69e8a31ac261d9500f2@ X.X.X.X
> From: <sip: X.X.X.X >;tag=c8743b616cc43ff1aa259447ed513231
> To: <sip:Y.Y.Y.Y>;tag=z9hG4bKb4a6eabaa38a16a64588e74aef74d88b
> CSeq: 1384889626 OPTIONS
> Accept: application/dialog-info+xml, application/pidf+xml, application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/sdp, message/sipfrag;version=2.0
> Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REFER, MESSAGE
> Supported: 100rel, timer, replaces, norefersub
> Accept-Encoding: text/plain
> Accept-Language: en
> Server: Asterisk
> Content-Length: 0
> {noformat}
> RFC 3261 says that Accept-Encoding SHOULD be present in an options
> response. So setting it is fine, but the value "text/plain" seems
> wrong here. Permitted values according to RFC 2616 are only compression
> algorithms like gzip or the default identity encoding.
> I have patched my installation with the following and the log messages
> on the Alcatel gone away.
> Patch (Asterisk 16.2.1, Debian 10):
> {noformat}
> -- a/res/res_pjsip_dlg_options.c
> +++ b/res/res_pjsip_dlg_options.c
> @@ -33,7 +33,7 @@
> #include "asterisk/res_pjsip_session.h"
> #define DEFAULT_LANGUAGE "en"
> -#define DEFAULT_ENCODING "text/plain"
> +#define DEFAULT_ENCODING "identity"
> static int options_incoming_request(struct ast_sip_session *session, pjsip_rx_data *rdata)
> {
> --- a/res/res_pjsip/pjsip_options.c
> +++ b/res/res_pjsip/pjsip_options.c
> @@ -94,7 +94,7 @@
> */
> #define DEFAULT_LANGUAGE "en"
> -#define DEFAULT_ENCODING "text/plain"
> +#define DEFAULT_ENCODING "identity"
> /*! \brief These are the number of buckets to store AORs in */
> #ifdef LOW_MEMORY
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list