Skip to content

Commit 1d70117

Browse files
authored
Return CallEvent.declined on 31600 Twilio Call Error (Busy Everywhere).
1 parent fc9cfa1 commit 1d70117

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/_internal/method_channel/twilio_voice_method_channel.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,15 @@ class MethodChannelTwilioVoice extends TwilioVoicePlatform {
331331
printDebug(tokens[1]);
332332
}
333333

334+
// https://www.twilio.com/docs/api/errors/31600
335+
// Busy Everywhere. All possible destinations are busy.
336+
//
334337
// source: https://www.twilio.com/docs/api/errors/31603
335338
// The callee does not wish to participate in the call.
336339
//
337340
// https://www.twilio.com/docs/api/errors/31486
338341
// The callee is busy.
339-
if (tokens[1].contains("31603") || tokens[1].contains("31486")) {
342+
if (tokens[1].contains("31600") || tokens[1].contains("31603") || tokens[1].contains("31486")) {
340343
call.activeCall = null;
341344
return CallEvent.declined;
342345
} else if (tokens.toString().toLowerCase().contains("call rejected")) {

0 commit comments

Comments
 (0)