react-native-pjsip icon indicating copy to clipboard operation
react-native-pjsip copied to clipboard

Unable to successfully redirectCall and xferCall on both iOS and Android

Open bryanfarris opened this issue 7 years ago • 2 comments

Hi - we are struggling with the redirect/transfer call features.

This issue occurs both when we attempt to redirect an incoming call (prior to answering it) and when we attempt to transfer a call after it has been answered.

Here is our code for calling the PJSIP endpoint:

Redirects:

redirectCall = destination => {
  const { activeCallId, incomingCallId, calls, endpoint, accounts } = this.state
  const call = calls[activeCallId || incomingCallId]
  endpoint.redirectCall(accounts[call.getAccountId()], call, destination);
};

Transfers:

xferCall = destination => {
  const { activeCallId, calls, endpoint, accounts } = this.state
  const call = calls[activeCallId]
  endpoint.xferCall(accounts[call.getAccountId()], call, destination);
};

Is there something you see that we are doing wrong?

bryanfarris avatar Jan 22 '18 17:01 bryanfarris

Let me re-check, as I remember transfers was working fine :)

datso avatar Jan 22 '18 18:01 datso

Hi - we are struggling to implement redirect/transfer call feature.

What will be the format of destination ? destination="sip:1111@ipAddress";?

endPointObj.xferCall(account,callInfo, "<sip:1111@ipAddress>").then((data: any) => {
  console.log("xferCall", data, this.callInfo);
}).catch((error: any) => {
  console.error('xferCall error:', error);
});

Betechmate avatar Jun 03 '20 16:06 Betechmate