Opened 15 years ago

Closed 14 years ago

#1066 closed defect (fixed)

Invalid SDP answer does not cause SDP negotiation to fail (thanks Andrey Kovalenko for the report)

Reported by: bennylp Owned by: nanang
Priority: normal Milestone: release-1.7
Component: pjmedia Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

For example, we send and offer

v=0
o=- 234 123 IN IP4 192.168.1.1
s=-
c=IN IP4 192.168.1.1
t=0 0
m=audio 8510 RTP/AVP 111 0 101
a=rtpmap:111 SPEEX/16000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

Then answer arrives:

v=0
o=user1 53655765 2353687637 IN IP4 192.168.1.2
s=-
t=0 0
c=IN IP4 192.168.1.2
m=audio 5000 RTP/AVP 112
a=rtpmap:112 dpeex/8000
a=sendrecv

This obviously is an invalid answer, but this answer is accepted by the SDP negotiator, i.e. the negotiation status is returned as PJ_SUCCESS.

Having said that, with PJSUA-LIB, this would still cause the call to be terminated, as the invalid SDP answer would cause other failure to occur further down the processing chain.

Change History (5)

comment:1 Changed 15 years ago by bennylp

  • Summary changed from Invalid SDP answer does nto cause SDP negotiation to fail (thanks Andrey Kovalenko for the report) to Invalid SDP answer does not cause SDP negotiation to fail (thanks Andrey Kovalenko for the report)

Case II:

We send offer:

v=0
o=- 234 123 IN IP4 192.168.1.1
s=-
c=IN IP4 192.168.1.1
t=0 0
m=audio 16740 RTP/AVP 111 0 101
a=rtpmap:111 SPEEX/16000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv

and answer:

v=0
o=- 53655765 2353687637 IN IP4 192.168.1.2
s=-
t=0 0
c=IN IP4 192.168.1.2
m=audio 5000 RTP/AVP 111 0
a=rtpmap:111 speex/8000
a=rtpmap:0 PCMU/8000
a=sendrecv

After negotiation, codec with payload type 111 is removed from offer, but it's still exist in the answer.

comment:2 Changed 15 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed

(In [3160]) Fixed #1066:

  • Added check if the negotiation result of local-offer/remote-answer has no matching format.
  • Added routine to remove any unmatching formats in the remote-answer.

comment:3 Changed 15 years ago by nanang

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopened for:

  • bug in r3160: the fix "removing any unmatching formats in the remote-answer" only works for static payload types.
  • reordering formats priority in the offer based on the answer also only works for static payload types.

comment:4 Changed 15 years ago by nanang

(In [3187]) Re #1066, in process_m_answer() of sdp_neg.c:

  • Fixed removing any unmatching formats in the remote-answer to also work with dynamic payload type.
  • Updated reordering formats priority in the offer based on the answer to also work with dynamic payload type.

comment:5 Changed 14 years ago by nanang

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.