Opened 6 years ago

Closed 6 years ago

#2158 closed enhancement (fixed)

Avoid shared PJSUA2 Call instance in call transfer scenario

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

Description

Current PJSUA2 call transfer scenario, when incoming transfer request (i.e: REFER) is received, the new outgoing call will share the same Call instance (with its call ID is switched back and forth between callbacks) until the transfer process is completed.

This ticket will allow application to instantiate a new Call for the new outgoing call in transfer scenario:

class MyCall : public Call
{
private:
  MyAccount *myAcc; // Account derived class

...
public:
  void onCallTransferRequest(OnCallTransferRequestParam &prm)
  {
    ...
    /* Create new Call for call transfer */
    prm.newCall = new MyCall(*myAcc);
  }
};

Thanks Ryan Wallach for the feedback.

Change History (1)

comment:1 Changed 6 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed
  • Type changed from defect to enhancement

In r5899:

  • Added OnCallTransferRequestParam.newCall to allow application to instantiate a new Call object for the new outgoing call in transfer scenario.
  • Also added OnCallReplacedParam.newCall mainly for informational purpose (that app should instantiate new Call object for the replacing call in replace scenario).
Note: See TracTickets for help on using tickets.