Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1526 closed defect (fixed)

Assertion when receiving INVITE with no SDP and video is deactivated (thanks Bogdan Krakowski for the report)

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

Description (last modified by nanang)

Reproducing steps with pjsua:

  1. build pjsua with video feature
  2. run the pjsua without --video param, so video is deactivated
  3. send INVITE to pjsua without SDP
  4. answer the call, e.g: "a" then "200", there will be video in the SDP (which should not!)
  5. send ACK to pjsua with SDP answer with video in the answer is enabled too

After investigation, after receiving incoming call, PJSUA will immediately start media channel init and create SDP with default call setting, i.e: audio and video count both set to 1, and when application call pjsua_call_answer() with different call setting, e.g: video count set to 0, the media channel update doesn't like such inconsistency when we are as SDP offerer and will trigger an assertion.

The solution should consider the requirements below:

  • be able to initialize media with the settings based on user confirmation
  • should avoid excessive/repeated initialization (e.g: multiple SDP or transport creation)
  • simple and minimal changes is prefered

Change History (3)

comment:1 Changed 12 years ago by nanang

  • Description modified (diff)

comment:2 Changed 12 years ago by nanang

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

In 4175:

Fix #1526:

  • Fix incoming call without SDP by delaying media init in on_incoming_call() until call setting is set i.e: via call answer. Note that there is no need to delay the media init in the case of call replace request, the call setting is already set in the incoming call callback, i.e: via on_call_replace_request2() callback or just the current setting of the replaced call.
  • Fix processing call replace request when the media init is performed asynchronously.

comment:3 Changed 12 years ago by nanang

In 4176:

Re #1526: r4175 missed PJSUA_UNLOCK() on some failure cases in pjsua_call_answer2().

Note: See TracTickets for help on using tickets.