Open florindumitru opened 5 years ago
Its in the readme to listen for events
endpoint.addListener("call_changed", (newCall) => { if (call.getId() === newCall.getId()) { // Our call changed, do smth. } }
Look at the sample app, it pretty much does most functionality: https://github.com/datso/react-native-pjsip-app/blob/master/app/modules/pjsip.js#L48
I already tried that and the state not change. GetState and _state remains in ringing state
Did you try the other events? If so which ones did you try and which event are you exactly looking for that is not working?
I want to know when the call is established. I makeCall and after I need too check when deatination answer to the call to can stop the ringing
Why are you not using SIP ringing?
You probably want to use call.getState() and look for PJSIP_INV_STATE_CONFIRMED. Mostly all are in the example app. Please take the time to go through and understand how that works
Hi @cmendes0101, I have a different problem: when calling to pjsip, the other party is not able to hear a ring. I am however able to answer the call from pjsip no problem. Here's a related issue, I'd greatly appreciate your help on this.
@platonish Probably should open a separate issue instead of linking tickets that are possible not related since this was knowing call state. The other ticket sounds closer to your issue
Hi, I need to know which event can detect the call state changes. For example when a call is active or not, if destination answered .
Thanks