[asterisk-bugs] [JIRA] (ASTERISK-28648) chan_sip/chan_pjsip copy_via_headers() function not RFC 3261 compliant

Bill Mandra (JIRA) noreply at issues.asterisk.org
Mon Dec 9 10:30:32 CST 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249011#comment-249011 ] 

Bill Mandra commented on ASTERISK-28648:
----------------------------------------

George, surprisingly yes. When trunking with Colt, they use the OPTIONS function to check if host on other end is alive and blacklist the IP (preventing all calls) if they don't receive a response. In this case, they do not recognize the response since the Via header is invalid.

Here's what they send:
> OPTIONS sip:10.232.232.38:5060 SIP/2.0
> Via: SIP/2.0/UDP 10.232.232.33:5060;branch=z9hG4bK0aBc7c920a6936de302

Here's what they receive:
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 10.232.232.33:5060;rport=5060;received=10.232.232.33;branch=z9hG4bK0a

Here's what Colt expects:
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 10.232.232.33:5060;branch=z9hG4bK0a;rport=5060;received=10.232.232.33

While I personally think  whatever implementation they are using is too strict, it's technically correct and the Asterisk response is not RFC compliant.

> chan_sip/chan_pjsip copy_via_headers() function not RFC 3261 compliant
> ----------------------------------------------------------------------
>
>                 Key: ASTERISK-28648
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28648
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip, Channels/chan_sip/General
>    Affects Versions: 16.6.1
>            Reporter: Bill Mandra
>            Severity: Minor
>
> Per RFC 3261 8.2.6.2 Headers and Tags:
> The Via header field values in the response MUST equal the Via header field values in the request and MUST maintain the same ordering.
> However, the copy_via_headers function inserts "received=" or "received=;rport=" potentially into the middle of the header which does not maintain ordering of the field values.
> To be RFC 3261 compliant, received and rport should always be appended to the end of the via header.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list