[jitsi-users] Invalid SDP: a=imageattr:96 send * recv [x=[0-1920], y=[0-1080]]


#1

Using a build from commit 005efc59c547adc56d0f8a6f192dc3b796407807 on OS X
10.9.5 with Homebrew-installed java and ant, Jitsi sends INVITEs that
include a=imageattr lines like:

    a=imageattr:96 send * recv [x=[0-1920],y=[0-1080]]

A sample INVITE is pasted at the end of this message. As far as I can tell
from the grammar in RFC 6236, the "[0-1920]" and "[0-1080]" portions of
this line are malformed. There are two problems:

1. The dashes should be replaced with colons, because xyrange is defined as
follows:

       xyrange = ( "[" xyvalue ":" [ step ":" ] xyvalue "]" )
                  ; Range between a lower and an upper value
                  ; with an optional step, default step = 1
                  ; The rightmost occurrence of xyvalue MUST have a
                  ; higher value than the leftmost occurrence.

2. The range cannot start with 0, because xyvalue is defined as follows

       xyvalue = onetonine *5DIGIT
                  ; Digit between 1 and 9 that is
                  ; followed by 0 to 5 other digits

I noticed this when I tried to call a web-based UA running in Firefox,
which fails to parse the SDP and prints the following error:

    DOMException [InvalidSessionDescriptionError: "Failed to parse SDP: SDP
Parse Error on line 21: Value too small at column 20" code: 0 nsresult: 0x0]

I was able to get Firefox to parse the SDP by mangling the invalid
a=imageattr lines to read:

    a=imageattr:96 send * recv [x=[1:1920],y=[1:1080]]

Ideally, Jitsi would send valid SDP in the first place, so I'd like to have
this issue confirmed so I can move it to GitHub and work on fixing it.

Thanks,
Joseph

···

-----------

Sample INVITE with bad a=imageattr lines:

INVITE sip:joseph@jmf.onsip.com SIP/2.0
Call-ID: d0ff6df8c166e931b5914ab155bf2225@0:0:0:0:0:0:0:0
CSeq: 1 INVITE
From: "joseph 2 jitsi" <sip:joseph.2@jmf.onsip.com>;tag=54a15e73
To: <sip:joseph@jmf.onsip.com>
Via: SIP/2.0/UDP 192.168.1.65:5060
;branch=z9hG4bK-373139-bed8b53f7010b4e73c54f0bb9dbb00be
Max-Forwards: 70
Contact: "joseph 2 jitsi" <sip:joseph.2@192.168.1.65:5060
;transport=udp;registering_acc=jmf_onsip_com>
User-Agent: Jitsi2.9.0.build.by.SVNMac OS X
Content-Type: application/sdp
Content-Length: 551

v=0
o=joseph.2-jitsi.org 0 0 IN IP4 192.168.1.65
s=-
c=IN IP4 192.168.1.65
t=0 0
m=audio 5000 RTP/AVP 9
a=rtpmap:9 G722/8000
a=extmap:1 urn:ietf:params:rtp-hdrext:csrc-audio-level
a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=rtcp-xr:voip-metrics
m=video 5002 RTP/AVP 96 99
a=recvonly
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=4DE01f;packetization-mode=1
a=imageattr:96 send * recv [x=[0-1920],y=[0-1080]]
a=rtpmap:99 H264/90000
a=fmtp:99 profile-level-id=4DE01f
a=imageattr:99 send * recv [x=[0-1920],y=[0-1080]]