Skip to content

Commit 95f653f

Browse files
authored
Merge pull request #254 from agent515/twilio-call-error-31600
Return CallEvent.declined on Twilio Call Error 31600 (Busy Everywhere).
2 parents 8897efb + 1d70117 commit 95f653f

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

+4-1
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)