Hello,
During the testing my app I found a problem with easyprocess. Let me describe it.
The purpose of my app is to accept the incoming call from one phone number (phone-number-1) to vox phone number (vox-phone-number) and to connect this call with another phone number (phone-number-2), so:
incoming call: phone-number-1 -> vox-phone-number
outgoing call: vox-phone-number -> phone-number-2
The VoxEngine.easyProcess(incomingCall, outgoingCall) works fine until I need to collect the information from both calls. The screenshot below shows the log output when phone-number-1 hangup the outgoing call.
- incoming CallEvents.Disconnected comes first and I can extract the event data and pass it to my API inside the terminating event
- Outgoing CallEvents.Failed with event data comes after I send a request to my API

NOTE: If I hangup phone-number-2, then I will be able to get outgoing event data but incoming event data comes after the terminating event
During the investigation I got the desired behavior, instead the following code
const defaultHangupHandler = (e) => {
JSession.close();
};
...
call1.addEventListener(CallEvents.Failed, defaultHangupHandler);
call1.addEventListener(CallEvents.Disconnected, defaultHangupHandler);
call2.addEventListener(CallEvents.Failed, defaultHangupHandler);
call2.addEventListener(CallEvents.Disconnected, defaultHangupHandler);
I use the following
let finished1 = false;
let finished2 = false;
const terminate = () => {
if (finished1 && finished2) {
VoxEngine.terminate()
}
}
const call1HangupHandler = (e) => {
finished1 = true;
call2.hangup();
terminate();
}
const call2HangupHandler = (e) => {
finished2 = true;
call1.hangup();
terminate();
}
call1.addEventListener(CallEvents.Failed, call1HangupHandler);
call1.addEventListener(CallEvents.Disconnected, call1HangupHandler);
call2.addEventListener(CallEvents.Failed, call2HangupHandler);
call2.addEventListener(CallEvents.Disconnected, call2HangupHandler);
The questions I have are pretty simple:
- Is this OK solution? (during my tests it worked OK)
- If this solution is good enough, is there any chance to patch the lib?
Hello,
During the testing my app I found a problem with easyprocess. Let me describe it.
The purpose of my app is to accept the incoming call from one phone number (
phone-number-1) to vox phone number (vox-phone-number) and to connect this call with another phone number (phone-number-2), so:incoming call:
phone-number-1->vox-phone-numberoutgoing call:
vox-phone-number->phone-number-2The
VoxEngine.easyProcess(incomingCall, outgoingCall)works fine until I need to collect the information from both calls. The screenshot below shows the log output whenphone-number-1hangup the outgoing call.During the investigation I got the desired behavior, instead the following code
I use the following
The questions I have are pretty simple: