Opened 8 years ago

Closed 8 years ago

#1347 closed defect (fixed)

Various cases of bad SDP answer generated when receiving offer with multiple media.

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.0-alpha
Component: pjsua-lib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

Sample cases (note that video is disabled and max_audio_cnt is 1/default):

  1. Rejected all media offer while it should accept one (scripts-sendto/125_sdp_with_multi_audio_2.py and scripts-sendto/320_srtp_with_unknown_transport_2.py).
    • offer:
      m=audio 4000 UNKNOWN 0
      m=audio 5000 RTP/AVP 0
      
    • answer generated:
      m=audio 0 UNKNOWN 0
      m=audio 0 RTP/AVP 0
      
    • answer should be:
      m=audio 0 UNKNOWN 0
      m=audio 4000 RTP/AVP 0
      
  1. Selected unsecured media over secured media in SRTP optional mode (scripts-sendto/330_srtp_prefer_rtp_savp.py).
    • offer:
      m=audio 4000 RTP/AVP 0
      m=audio 5000 RTP/SAVP 0
      a=crypto:1 aes_cm_128_hmac_sha1_80 inline:WnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQ
      
    • answer generated:
      m=audio 4000 RTP/AVP 0
      m=audio 0 RTP/SAVP 0
      
    • answer should be:
      m=audio 0 UNKNOWN 0
      m=audio 4000 RTP/AVP 0
      
  1. Rejected both unsecured media and secured media offered in SRTP disabled mode (scripts-sendto/331_srtp_prefer_rtp_avp.py).
    • offer:
      m=audio 4000 RTP/SAVP 0
      a=crypto:1 aes_cm_128_hmac_sha1_80 inline:WnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQ
      m=audio 5000 RTP/AVP 0
      
    • answer generated:
      SIP/2.0 406 Not Acceptable
      
    • answer should be:
      m=audio 0 RTP/SAVP 0
      m=audio 5000 RTP/AVP 0
      

Change History (2)

comment:1 Changed 8 years ago by nanang

(In [3714]) Re #1347: Fixed case 1, 2, and 3 above:

  • Generating a deactivated pre-answer media by cloning remote media. There was a case that the media transport in the offer is bad/unrecognized, PJSUA still generated the preanswer with RTP/AVP.
  • When generating answer, it should apply max media count (max_audio/video_cnt in account setting) after SDP negotiation instead of in the pjsua_media_channel_init()). This will require PJSUA to perform SDP re-negotiation when the SDP answer get changed.
  • Fixed media priority/acceptibility sorting, e.g: media with RTP/SAVP transport still got acceptable score in SRTP disabled mode, this messed up the algorithm of applying max media count setting.
  • Fixed SDP negotiator to skip format match in generating answer when the pre-answer provided is deactivated (port 0).

comment:2 Changed 8 years ago by nanang

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