[jitsi-dev] jitsi rejects SDP media description without media format description


#1

Hi all,
when trying to establish a call from jitsi 2.2 to csipsimple on Android via SIP, jitsi rejects the call with "There was an error parsing the SDP description of ...".

What happens, is that csipsimple sends the following SDP OK message:

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.3.2:5060;branch=z9hG4bK-323330-a4dbfebd946736e4c495ce0ff8d14280
Record-Route: <sip:217.10.79.9;lr;ftag=8da6be98>,<sip:172.20.40.1;lr>,<sip:217.10.79.9;lr;ftag=8da6be98>
Call-ID: 1fb7a6b6fb8b93c141abc703677d73af@0:0:0:0:0:0:0:0
CSeq: 2 INVITE
Allow: PRACK,INVITE,ACK,BYE,CANCEL,UPDATE,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,OPTIONS
Contact: <sip:1649539@79.243.192.80:33585;ob>
Supported: replaces,100rel,timer,norefersub
Content-Type: application/sdp
Content-Length: 338

v=0
o=- 3580747049 3580747051 IN IP4 79.243.192.80
s=pjmedia
c=IN IP4 79.243.192.80
t=0 0
m=audio 4020 RTP/AVP 97 101
c=IN IP4 79.243.192.80
a=rtcp:4005 IN IP4 192.168.3.2
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:97 SILK/24000
a=fmtp:97 useinbandfec=0
m=video 16 RTP/AVP
c=IN IP4 79.243.192.80

Note that there is no media format description in the media description, that is there no field following the "RTP/AVP" in the "m=video" line.

RFC 4566 says:
       If the <proto> sub-field is "RTP/AVP" or "RTP/SAVP" the <fmt>
       sub-fields contain RTP payload type numbers. When a list of
       payload type numbers is given, this implies that all of these
       payload formats MAY be used in the session, but the first of these
       formats SHOULD be used as the default format for the session. (...)

Not the "when" in "when a list of payload type numbers is given". To me, this indicates that indeed the media format description can be left out, which practically invalidates the whole "m=video" line.

This looks like sloppiness on csipsimple's side, but on the other hand, jitsi could indeed be more foregiving here.

Could somebody please have a look at this?

Thanks,
Christian

jitsi0.log.0 (27.3 KB)

jitsi0.pcap (22.2 KB)

···

From: "1709641" <sip:1709641@sipgate.de>;tag=8da6be98
To: <sip:1649539@sipgate.de>;tag=qrT.Q23oSLGB1BC6svZ1w.b4gGa-cZu-


#2

Hey Christian,

Hi all,
when trying to establish a call from jitsi 2.2 to csipsimple on Android
via SIP, jitsi rejects the call with "There was an error parsing the SDP
description of ...".

What happens, is that csipsimple sends the following SDP OK message:

SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.3.2:5060;branch=z9hG4bK-323330-a4dbfebd946736e4c495ce0ff8d14280
Record-Route:
<sip:217.10.79.9;lr;ftag=8da6be98>,<sip:172.20.40.1;lr>,<sip:217.10.79.9;lr;ftag=8da6be98>
Call-ID: 1fb7a6b6fb8b93c141abc703677d73af@0:0:0:0:0:0:0:0
From: "1709641" <sip:1709641@sipgate.de>;tag=8da6be98
To: <sip:1649539@sipgate.de>;tag=qrT.Q23oSLGB1BC6svZ1w.b4gGa-cZu-
CSeq: 2 INVITE
Allow:
PRACK,INVITE,ACK,BYE,CANCEL,UPDATE,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,OPTIONS
Contact: <sip:1649539@79.243.192.80:33585;ob>
Supported: replaces,100rel,timer,norefersub
Content-Type: application/sdp
Content-Length: 338

v=0
o=- 3580747049 3580747051 IN IP4 79.243.192.80
s=pjmedia
c=IN IP4 79.243.192.80
t=0 0
m=audio 4020 RTP/AVP 97 101
c=IN IP4 79.243.192.80
a=rtcp:4005 IN IP4 192.168.3.2
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:97 SILK/24000
a=fmtp:97 useinbandfec=0
m=video 16 RTP/AVP
c=IN IP4 79.243.192.80

Note that there is no media format description in the media description,
that is there no field following the "RTP/AVP" in the "m=video" line.

RFC 4566 says:
        If the <proto> sub-field is "RTP/AVP" or "RTP/SAVP" the <fmt>
        sub-fields contain RTP payload type numbers. When a list of
        payload type numbers is given, this implies that all of these
        payload formats MAY be used in the session, but the first of these
        formats SHOULD be used as the default format for the session. (...)

Not the "when" in "when a list of payload type numbers is given". To me,
this indicates that indeed the media format description can be left out,
which practically invalidates the whole "m=video" line.

I'd be more inclined to believe that the "when" here actually means "when a list is provided and not just a single format"

Having a look at the BNF shows this:

    media-field = %x6d "=" media SP port ["/" integer]
                          SP proto 1*(SP fmt) CRLF

http://tools.ietf.org/html/rfc4566#page-40

So, lack of formats is not allowed.

This looks like sloppiness on csipsimple's side, but on the other hand,
jitsi could indeed be more foregiving here.

I don't see how. Even if we assume that we tweak the parser not to freak out at the absence of formats, we end up with an active m= line that has a valid non-0 port number ... but nothing to send on it.

Could somebody please have a look at this?

How about pinging the CSipSimple team to have a look at what appears to be a bug? :wink:

Cheers,
Emil

···

On 20.06.13, 22:14, Christian Kühnke wrote:

--
https://jitsi.org


#3

You are right. I did not look at the grammar. I will file this problem with the csipsimple team...

···

Am 20.06.2013 22:41, schrieb Emil Ivov:

Hey Christian,

On 20.06.13, 22:14, Christian K�hnke wrote:

Hi all,
when trying to establish a call from jitsi 2.2 to csipsimple on Android
via SIP, jitsi rejects the call with "There was an error parsing the SDP
description of ...".

What happens, is that csipsimple sends the following SDP OK message:

SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.3.2:5060;branch=z9hG4bK-323330-a4dbfebd946736e4c495ce0ff8d14280
Record-Route:
<sip:217.10.79.9;lr;ftag=8da6be98>,<sip:172.20.40.1;lr>,<sip:217.10.79.9;lr;ftag=8da6be98>

Call-ID: 1fb7a6b6fb8b93c141abc703677d73af@0:0:0:0:0:0:0:0
From: "1709641" <sip:1709641@sipgate.de>;tag=8da6be98
To: <sip:1649539@sipgate.de>;tag=qrT.Q23oSLGB1BC6svZ1w.b4gGa-cZu-
CSeq: 2 INVITE
Allow:
PRACK,INVITE,ACK,BYE,CANCEL,UPDATE,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,OPTIONS

Contact: <sip:1649539@79.243.192.80:33585;ob>
Supported: replaces,100rel,timer,norefersub
Content-Type: application/sdp
Content-Length: 338

v=0
o=- 3580747049 3580747051 IN IP4 79.243.192.80
s=pjmedia
c=IN IP4 79.243.192.80
t=0 0
m=audio 4020 RTP/AVP 97 101
c=IN IP4 79.243.192.80
a=rtcp:4005 IN IP4 192.168.3.2
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:97 SILK/24000
a=fmtp:97 useinbandfec=0
m=video 16 RTP/AVP
c=IN IP4 79.243.192.80

Note that there is no media format description in the media description,
that is there no field following the "RTP/AVP" in the "m=video" line.

RFC 4566 says:
        If the <proto> sub-field is "RTP/AVP" or "RTP/SAVP" the <fmt>
        sub-fields contain RTP payload type numbers. When a list of
        payload type numbers is given, this implies that all of these
        payload formats MAY be used in the session, but the first of
these
        formats SHOULD be used as the default format for the session.
(...)

Not the "when" in "when a list of payload type numbers is given". To me,
this indicates that indeed the media format description can be left out,
which practically invalidates the whole "m=video" line.

I'd be more inclined to believe that the "when" here actually means
"when a list is provided and not just a single format"

Having a look at the BNF shows this:

    media-field = %x6d "=" media SP port ["/" integer]
                          SP proto 1*(SP fmt) CRLF

http://tools.ietf.org/html/rfc4566#page-40

So, lack of formats is not allowed.

This looks like sloppiness on csipsimple's side, but on the other hand,
jitsi could indeed be more foregiving here.

I don't see how. Even if we assume that we tweak the parser not to freak
out at the absence of formats, we end up with an active m= line that has
a valid non-0 port number ... but nothing to send on it.

Could somebody please have a look at this?

How about pinging the CSipSimple team to have a look at what appears to
be a bug? :wink:

Cheers,
Emil