[asterisk-bugs] [JIRA] (ASTERISK-26911) chan_sip should test case-insensitive for occurence of "RTP/AVP" in SDP RTP profile

mgrobecker (JIRA) noreply at issues.asterisk.org
Thu Mar 30 16:48:10 CDT 2017


mgrobecker created ASTERISK-26911:
-------------------------------------

             Summary: chan_sip should test case-insensitive for occurence of "RTP/AVP" in SDP RTP profile
                 Key: ASTERISK-26911
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26911
             Project: Asterisk
          Issue Type: Improvement
      Security Level: None
          Components: Channels/chan_sip/CodecHandling
    Affects Versions: 14.3.0, 13.14.0, 13.11.2, 12.8.2, 11.25.1
            Reporter: mgrobecker
            Severity: Minor


There are PBXes outside which are sending SDP offers with lowercase strings in the protocol description.
Example from Swyx:

-----------------------
v=0
o=- 3699694938 3699694939 IN IP4 192.168.0.10
s=pjmedia
c=IN IP4 192.168.0.10
b=AS:84
t=0 0
a=X-nat:0
m=audio 15028 rtp/avp 8 101
b=TIAS:64000
a=rtcp:50013 IN IP4 192.168.0.10
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
-----------------------


With "m=audio 15028 rtp/avp 8 101" in lowercase letters, Asterisk is unable to use this offer:

-----------------------
chan_sip.c:10353 process_sdp: Unknown RTP profile in audio offer: audio 15028 rtp/avp 8 101
-----------------------

This is because Asterisk is using "strcmp" in process_sdp() and is checking against an uppercase "RTP/AVP" only.

The corresponding RFC 4317 (page 7) states, that the value of an SDP element is considered case-sensitive, so IMHO Asterisk is not behaving wrong at this point.
But it would be a compatibility improvement at a low cost when searching for "RTP/AVP" case-insensitive with "strcasecmp".




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



More information about the asterisk-bugs mailing list