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

Still incoming after call declined

Open ofito opened this issue 7 years ago • 3 comments

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.

ofito avatar Jan 07 '19 20:01 ofito

Use endpoint.hangCall(call) method

bensurachel avatar Mar 22 '19 06:03 bensurachel

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.

Soliy0u avatar Jun 11 '19 10:06 Soliy0u

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) {
    }

}

Soliy0u avatar Jun 24 '19 03:06 Soliy0u