Open ofito opened 5 years ago
Use endpoint.hangCall(call) method
I have same this problem. I have used to endpoint.hangupCall(call) but not working. I think, it's an error of pjsip. Anyone can help me?. Thank you so much.
I have resolved this problem with endpoint.unholdCall(call). You only use unholdCall function before call endpoint.declineCall(call). It worked for me. My code: static suspendCall() { try { const endpoint = CallCenter.endpoint ? CallCenter.endpoint : new Endpoint(); const call = CallCenter.curCallInfo; if (call) { if (!CallCenter.outgoingCallBack) { CallCenter.acceptCall(call); } endpoint.unholdCall(call); endpoint.declineCall(call); }
} catch (error) {
}
}
Hi, I have a problem trying to decline an incoming call, I use the same actions and reducer function that the demo app:
export function declineCall(call) { return async function (dispatch, getState) { const endpoint = getState().pjsip.endpoint; endpoint.declineCall(call); } }
But after decline the call you can check that the declined call is correctly disconnected but it created a new incoming call and the phone from where I'm calling still waiting to accept or decline the call. I don't know if I'm missing something. Hang up, after accept the call, works perfectly.
I appreciate it your help.