-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Cancel Event Not Triggered When Ignoring Call #92
Comments
Can you share the code you're using to produce this behavior (specifically where you're adding the "cancel" event listener for the incoming call, and where you're invoking call.ignore)? |
I'm adding the event listener to the incoming call immediately after receiving it via the incoming event. I'm using the events to listen for status changes: const events = [
'accept',
'cancel',
'disconnect',
'error',
'mute',
'reconnected',
'reconnecting',
'reject',
'ignore',
];
let prevStatus = call.status();
for (const event of events) {
call.on(event, () => {
const status = call.status();
if (prevStatus !== status) {
prevStatus = status;
win.postMessage({ type: 'status', status });
}
});
} The EDIT: You can view full file here https://gist.github.com/JAD3N/1623da78ab9aeba055d053161e1bbcbc |
Hi all, thanks for bringing this issue up, we've created a ticket to track this one internally. |
I am facing the same issue. When calling
the cancel event listener does not get triggered. I am registering it in the following manner:
I can confirm that all other event listeners are properly working, e.g. calling
is triggering the cancel event listener. As per the Twilio Voice SDK documentation, the cancel event listener should be called when either
As per the description above, #2 gets properly invoked while #1 does not. Happy to provide a more elaborate example in case it helps 😊 |
In our case, it is the opposite. Number 1 from that list - We are using |
It mentions here that they no longer do this by design. |
Nice find, then some of docs must be out-of-date then for the JavaScript SDK. Since this appears to be intentional, should I raise a separate issue (feature request) for perhaps adding an |
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Expected behavior:
When receiving an incoming call, using a button I call the
ignore
method on the call. I am expecting the cancel event to be emitted as a result of that.This is mentioned on this page here:
https://www.twilio.com/docs/voice/sdks/javascript/twiliocall#cancel-event
Actual behavior:
No event is triggered but the call is ignored successfully.
Software versions:
The text was updated successfully, but these errors were encountered: