Skip to content

Commit 2a3c1e7

Browse files
authored
Merge pull request #131 from agent515/fix-call-direction-when-ringing
Fix: CallDirection.outgoing even for Incoming Calls and Active Call is not null after the call is declined.
2 parents 470cea6 + f5750b8 commit 2a3c1e7

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
* Fix: [Web] Multiple missed call notifications
44
* Fix: [Android] `openPhoneAccountsSettings` not always opening on various Android (mainly Samsung) devices
5+
* Fix: Showing `CallDirection.outgoing` instead of `CallDirection.incoming` when Incoming call is ringing in `CallEventsListeners`.
6+
* Fix: `ActiveCall` is not null even after the Call is declined.
57

68
## 0.1.0
79

lib/_internal/method_channel/twilio_voice_method_channel.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,15 +315,19 @@ class MethodChannelTwilioVoice extends TwilioVoicePlatform {
315315
// https://www.twilio.com/docs/api/errors/31486
316316
// The callee is busy.
317317
if (tokens[1].contains("31603") || tokens[1].contains("31486")) {
318+
call.activeCall = null;
318319
return CallEvent.declined;
319320
} else if (tokens.toString().toLowerCase().contains("call rejected")) {
320321
// Android call reject from string: "LOG|Call Rejected"
322+
call.activeCall = null;
321323
return CallEvent.declined;
322324
} else if (tokens.toString().toLowerCase().contains("rejecting call")) {
323325
// iOS call reject from string: "LOG|provider:performEndCallAction: rejecting call"
326+
call.activeCall = null;
324327
return CallEvent.declined;
325328
} else if (tokens[1].contains("Call Rejected")) {
326329
// macOS / web call reject from string: "Call Rejected"
330+
call.activeCall = null;
327331
return CallEvent.declined;
328332
}
329333
return CallEvent.log;

lib/twilio_voice.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ class TwilioVoice extends MethodChannelTwilioVoice {
1212
static TwilioVoicePlatform get instance => MethodChannelTwilioVoice.instance;
1313
}
1414

15-
class Call extends MethodChannelTwilioCall {}
15+
class Call extends MethodChannelTwilioCall {}

0 commit comments

Comments
 (0)