Skip to content
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

Return CallEvent.declined on Twilio Call Error 31600 (Busy Everywhere). #254

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,15 @@ class MethodChannelTwilioVoice extends TwilioVoicePlatform {
printDebug(tokens[1]);
}

// https://www.twilio.com/docs/api/errors/31600
// Busy Everywhere. All possible destinations are busy.
//
// source: https://www.twilio.com/docs/api/errors/31603
// The callee does not wish to participate in the call.
//
// https://www.twilio.com/docs/api/errors/31486
// The callee is busy.
if (tokens[1].contains("31603") || tokens[1].contains("31486")) {
if (tokens[1].contains("31600") || tokens[1].contains("31603") || tokens[1].contains("31486")) {
call.activeCall = null;
return CallEvent.declined;
} else if (tokens.toString().toLowerCase().contains("call rejected")) {
Expand Down
Loading