Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1165 closed defect (fixed)

Unable to create SDP answer for new offer with SRTP duplicated m line (thanks Arie Velthoen for the report and patch)

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

Description

Original report can be found here.

The scenario is:

  1. SRTP is set to disabled/0 for the account.
  2. SDP initial offer/answer agrees that SRTP is not being used.
  3. Then a new offer comes and tries to activate SRTP using duplicated m line (SRTP mode 3).
  4. As the active media/audio index is 0 and the first media line in the new offer uses RTP/SAVP transport type, PJSUA-LIB fails to generate the answer because of invalid media transport type.

So, on such case PJSUA-LIB should be able to choose a media appropriately depending on the SRTP setting (in the account setting). And it should also handle SRTP status changes, e.g: from inactive to active and perhaps to inactive again and so on.

Change History (2)

comment:1 Changed 9 years ago by nanang

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

(In [3376]) Fix #1165:

  • Fixed pjsua_media_channel_create_sdp() to re-calculate audio index of the remote offer, instead of using existing audio index calculated by pjsua_media_channel_init(), as for subsequent SDP offer/answer, pjsua_media_channel_init() may not be called.
  • Fixed SRTP transport to be able to switch SRTP status from active to inactive/by-passed and vice versa.

comment:2 Changed 9 years ago by nanang

(In [3384]) Re #1165: fixed SRTP transport to not update the SRTP activation flag, i.e: bypass_srtp, in transport_encode_sdp(), as it shouldn't change the media session states.

Note: See TracTickets for help on using tickets.