Skip to content

Commit

Permalink
Merge pull request #1 from agent515/twilio-call-error-31600
Browse files Browse the repository at this point in the history
Return CallEvent.declined on 31600 Twilio Call Error (Busy Everywhere).
  • Loading branch information
agent515 authored Dec 12, 2024
2 parents fc9cfa1 + 1d70117 commit 7ef6ded
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 7ef6ded

Please sign in to comment.