File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ let Twilio = {
3838 setMuted ( isMuted ) {
3939 TwilioRCT . setMuted ( isMuted ) ;
4040 } ,
41+ sendDigits ( digits ) {
42+ TwilioRCT . sendDigits ( digits ) ;
43+ } ,
4144 addEventListener ( type , handler ) {
4245 _eventHandlers [ type ] . set ( handler , NativeAppEventEmitter . addListener (
4346 type , rtn => {
Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ @implementation RCTTwilio {
6262 }
6363}
6464
65+ RCT_EXPORT_METHOD (sendDigits:(NSString *) digits) {
66+ if (_connection && _connection.state == TCConnectionStateConnected) {
67+ [_connection sendDigits: digits];
68+ }
69+ }
70+
6571#pragma mark - TCDeviceDelegate
6672
6773-(void )device : (TCDevice *)device didReceiveIncomingConnection : (TCConnection *)connection {
@@ -104,7 +110,7 @@ -(void)connectionDidDisconnect:(TCConnection *)connection {
104110 if (connection == _connection) {
105111 _connection = nil ;
106112 }
107-
113+
108114 if (connection == _pendingConnection) {
109115 _pendingConnection = nil ;
110116 }
You can’t perform that action at this time.
0 commit comments