Skip to content

Commit e3fd2c1

Browse files
fmonsalvofabriziomoscon
authored andcommitted
iOS: Adds ability to handle DTMF codes in Callkit
1 parent c077903 commit e3fd2c1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ios/RNTwilioVoice/RNTwilioVoice.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,14 @@ - (void)provider:(CXProvider *)provider performSetMutedCallAction:(CXSetMutedCal
684684
}
685685
}
686686

687+
- (void)provider:(CXProvider *)provider performPlayDTMFCallAction:(CXPlayDTMFCallAction *)action {
688+
TVOCall *call = self.activeCalls[action.callUUID.UUIDString];
689+
if (call && call.state == TVOCallStateConnected) {
690+
RCTLogInfo(@"SendDigits %@", action.digits);
691+
[call sendDigits:action.digits];
692+
}
693+
}
694+
687695
#pragma mark - CallKit Actions
688696
- (void)performStartCallActionWithUUID:(NSUUID *)uuid handle:(NSString *)handle {
689697
if (uuid == nil || handle == nil) {

0 commit comments

Comments
 (0)