@telnyx/react-voice-commons-sdk 0.1.8-beta.1 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/lib/internal/calls/call-state-controller.js +3 -2
- package/lib/internal/voice-pn-bridge.d.ts +4 -4
- package/lib/internal/voice-pn-bridge.js +9 -4
- package/package.json +1 -1
- package/src/internal/calls/call-state-controller.ts +3 -2
- package/src/internal/voice-pn-bridge.ts +10 -5
- package/src/telnyx-voice-app.tsx +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# CHANGELOG.md
|
|
2
2
|
|
|
3
|
+
## [0.1.8](https://github.com/team-telnyx/react-native-voice-commons/releases/tag/0.1.8) (2026-03-09)
|
|
4
|
+
|
|
5
|
+
### Bug Fixing
|
|
6
|
+
|
|
7
|
+
• Fixed duplicate CXProvider overwrite causing `CXEndCallAction` error 4 (unknownCallUUID) — guard `setupCallKit()` to prevent async `setupAutomatically()` from overwriting the provider created by `setupSynchronously()` during VoIP push handling
|
|
8
|
+
• Fixed intermittent audio loss on push notification calls — defer `CXAnswerCallAction.fulfill()` until `reportCallConnected()` when the WebRTC peer connection is ready
|
|
9
|
+
• Aligned iOS audio session handling with native Telnyx iOS SDK pattern (`RTCAudioSessionConfiguration.webRTC()` with `lockForConfiguration`/`unlockForConfiguration`)
|
|
10
|
+
• Fixed endCall not dismissing CallKit UI — check `endCall()` return value and fallback to `reportCallEnded()` when CXEndCallAction fails
|
|
11
|
+
• Fixed push notification answer crash when voipClient is not yet initialized — defer to `checkForInitialPushNotification()` instead of failing the call
|
|
12
|
+
• Added `voipClient.queueAnswerFromCallKit()` call when handling push notification answer for auto-answer on INVITE arrival
|
|
13
|
+
• Fixed call ENDED state not received by subscribers
|
|
14
|
+
• Added platform guards for iOS-only VoIP bridge methods on Android
|
|
15
|
+
• Fixed push data race condition in Expo apps
|
|
16
|
+
|
|
3
17
|
## [0.1.8-beta.1](https://github.com/team-telnyx/react-native-voice-commons/releases/tag/0.1.8-beta.1) (2026-03-04)
|
|
4
18
|
|
|
5
19
|
### Bug Fixing
|
|
@@ -11,6 +25,12 @@
|
|
|
11
25
|
• Fixed push notification answer crash when voipClient is not yet initialized — defer to `checkForInitialPushNotification()` instead of failing the call
|
|
12
26
|
• Added `voipClient.queueAnswerFromCallKit()` call when handling push notification answer for auto-answer on INVITE arrival
|
|
13
27
|
|
|
28
|
+
## [0.1.8-beta.0](https://github.com/team-telnyx/react-native-voice-commons/releases/tag/0.1.8-beta.0) (2026-02-28)
|
|
29
|
+
|
|
30
|
+
### Bug Fixing
|
|
31
|
+
|
|
32
|
+
• Fixed push data race condition in Expo apps
|
|
33
|
+
|
|
14
34
|
## [0.1.7](https://github.com/team-telnyx/react-native-voice-commons/releases/tag/0.1.7) (2026-02-20)
|
|
15
35
|
|
|
16
36
|
### Enhancement
|
|
@@ -343,12 +343,13 @@ class CallStateController {
|
|
|
343
343
|
call.callState$.subscribe((state) => {
|
|
344
344
|
// CallKitCoordinator automatically updates CallKit via setupWebRTCCallListeners
|
|
345
345
|
console.log('CallStateController: Call state changed to:', state);
|
|
346
|
-
// Clean up when call ends
|
|
346
|
+
// Clean up when call ends - delay to next tick so external subscribers
|
|
347
|
+
// receive the ENDED/FAILED state before the call is disposed
|
|
347
348
|
if (
|
|
348
349
|
state === call_state_1.TelnyxCallState.ENDED ||
|
|
349
350
|
state === call_state_1.TelnyxCallState.FAILED
|
|
350
351
|
) {
|
|
351
|
-
this._removeCall(call.callId);
|
|
352
|
+
setTimeout(() => this._removeCall(call.callId), 0);
|
|
352
353
|
}
|
|
353
354
|
});
|
|
354
355
|
}
|
|
@@ -92,19 +92,19 @@ export declare class VoicePnBridge {
|
|
|
92
92
|
*/
|
|
93
93
|
static getVoipToken(): Promise<string | null>;
|
|
94
94
|
/**
|
|
95
|
-
* Get pending VoIP push from native storage
|
|
95
|
+
* Get pending VoIP push from native storage (iOS only)
|
|
96
96
|
*/
|
|
97
97
|
static getPendingVoipPush(): Promise<string | null>;
|
|
98
98
|
/**
|
|
99
|
-
* Clear pending VoIP push from native storage
|
|
99
|
+
* Clear pending VoIP push from native storage (iOS only)
|
|
100
100
|
*/
|
|
101
101
|
static clearPendingVoipPush(): Promise<boolean>;
|
|
102
102
|
/**
|
|
103
|
-
* Get pending VoIP action from native storage
|
|
103
|
+
* Get pending VoIP action from native storage (iOS only)
|
|
104
104
|
*/
|
|
105
105
|
static getPendingVoipAction(): Promise<string | null>;
|
|
106
106
|
/**
|
|
107
|
-
* Clear pending VoIP action from native storage
|
|
107
|
+
* Clear pending VoIP action from native storage (iOS only)
|
|
108
108
|
*/
|
|
109
109
|
static clearPendingVoipAction(): Promise<boolean>;
|
|
110
110
|
/**
|
|
@@ -128,6 +128,7 @@ class VoicePnBridge {
|
|
|
128
128
|
* Get VoIP token from native storage
|
|
129
129
|
*/
|
|
130
130
|
static async getVoipToken() {
|
|
131
|
+
if (react_native_1.Platform.OS !== 'ios') return null;
|
|
131
132
|
try {
|
|
132
133
|
return await NativeBridge.getVoipToken();
|
|
133
134
|
} catch (error) {
|
|
@@ -136,9 +137,10 @@ class VoicePnBridge {
|
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
/**
|
|
139
|
-
* Get pending VoIP push from native storage
|
|
140
|
+
* Get pending VoIP push from native storage (iOS only)
|
|
140
141
|
*/
|
|
141
142
|
static async getPendingVoipPush() {
|
|
143
|
+
if (react_native_1.Platform.OS !== 'ios') return null;
|
|
142
144
|
try {
|
|
143
145
|
return await NativeBridge.getPendingVoipPush();
|
|
144
146
|
} catch (error) {
|
|
@@ -147,9 +149,10 @@ class VoicePnBridge {
|
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
151
|
/**
|
|
150
|
-
* Clear pending VoIP push from native storage
|
|
152
|
+
* Clear pending VoIP push from native storage (iOS only)
|
|
151
153
|
*/
|
|
152
154
|
static async clearPendingVoipPush() {
|
|
155
|
+
if (react_native_1.Platform.OS !== 'ios') return true;
|
|
153
156
|
try {
|
|
154
157
|
return await NativeBridge.clearPendingVoipPush();
|
|
155
158
|
} catch (error) {
|
|
@@ -158,9 +161,10 @@ class VoicePnBridge {
|
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
163
|
/**
|
|
161
|
-
* Get pending VoIP action from native storage
|
|
164
|
+
* Get pending VoIP action from native storage (iOS only)
|
|
162
165
|
*/
|
|
163
166
|
static async getPendingVoipAction() {
|
|
167
|
+
if (react_native_1.Platform.OS !== 'ios') return null;
|
|
164
168
|
try {
|
|
165
169
|
return await NativeBridge.getPendingVoipAction();
|
|
166
170
|
} catch (error) {
|
|
@@ -169,9 +173,10 @@ class VoicePnBridge {
|
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
/**
|
|
172
|
-
* Clear pending VoIP action from native storage
|
|
176
|
+
* Clear pending VoIP action from native storage (iOS only)
|
|
173
177
|
*/
|
|
174
178
|
static async clearPendingVoipAction() {
|
|
179
|
+
if (react_native_1.Platform.OS !== 'ios') return true;
|
|
175
180
|
try {
|
|
176
181
|
return await NativeBridge.clearPendingVoipAction();
|
|
177
182
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telnyx/react-voice-commons-sdk",
|
|
3
|
-
"version": "0.1.8
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "A high-level, state-agnostic, drop-in module for the Telnyx React Native SDK that simplifies WebRTC voice calling integration",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -405,9 +405,10 @@ export class CallStateController {
|
|
|
405
405
|
// CallKitCoordinator automatically updates CallKit via setupWebRTCCallListeners
|
|
406
406
|
console.log('CallStateController: Call state changed to:', state);
|
|
407
407
|
|
|
408
|
-
// Clean up when call ends
|
|
408
|
+
// Clean up when call ends - delay to next tick so external subscribers
|
|
409
|
+
// receive the ENDED/FAILED state before the call is disposed
|
|
409
410
|
if (state === TelnyxCallState.ENDED || state === TelnyxCallState.FAILED) {
|
|
410
|
-
this._removeCall(call.callId);
|
|
411
|
+
setTimeout(() => this._removeCall(call.callId), 0);
|
|
411
412
|
}
|
|
412
413
|
});
|
|
413
414
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeModules, DeviceEventEmitter, EmitterSubscription } from 'react-native';
|
|
1
|
+
import { NativeModules, DeviceEventEmitter, EmitterSubscription, Platform } from 'react-native';
|
|
2
2
|
|
|
3
3
|
export interface CallActionEvent {
|
|
4
4
|
action: string;
|
|
@@ -183,6 +183,7 @@ export class VoicePnBridge {
|
|
|
183
183
|
* Get VoIP token from native storage
|
|
184
184
|
*/
|
|
185
185
|
static async getVoipToken(): Promise<string | null> {
|
|
186
|
+
if (Platform.OS !== 'ios') return null;
|
|
186
187
|
try {
|
|
187
188
|
return await NativeBridge.getVoipToken();
|
|
188
189
|
} catch (error) {
|
|
@@ -192,9 +193,10 @@ export class VoicePnBridge {
|
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
/**
|
|
195
|
-
* Get pending VoIP push from native storage
|
|
196
|
+
* Get pending VoIP push from native storage (iOS only)
|
|
196
197
|
*/
|
|
197
198
|
static async getPendingVoipPush(): Promise<string | null> {
|
|
199
|
+
if (Platform.OS !== 'ios') return null;
|
|
198
200
|
try {
|
|
199
201
|
return await NativeBridge.getPendingVoipPush();
|
|
200
202
|
} catch (error) {
|
|
@@ -204,9 +206,10 @@ export class VoicePnBridge {
|
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
/**
|
|
207
|
-
* Clear pending VoIP push from native storage
|
|
209
|
+
* Clear pending VoIP push from native storage (iOS only)
|
|
208
210
|
*/
|
|
209
211
|
static async clearPendingVoipPush(): Promise<boolean> {
|
|
212
|
+
if (Platform.OS !== 'ios') return true;
|
|
210
213
|
try {
|
|
211
214
|
return await NativeBridge.clearPendingVoipPush();
|
|
212
215
|
} catch (error) {
|
|
@@ -216,9 +219,10 @@ export class VoicePnBridge {
|
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
/**
|
|
219
|
-
* Get pending VoIP action from native storage
|
|
222
|
+
* Get pending VoIP action from native storage (iOS only)
|
|
220
223
|
*/
|
|
221
224
|
static async getPendingVoipAction(): Promise<string | null> {
|
|
225
|
+
if (Platform.OS !== 'ios') return null;
|
|
222
226
|
try {
|
|
223
227
|
return await NativeBridge.getPendingVoipAction();
|
|
224
228
|
} catch (error) {
|
|
@@ -228,9 +232,10 @@ export class VoicePnBridge {
|
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
/**
|
|
231
|
-
* Clear pending VoIP action from native storage
|
|
235
|
+
* Clear pending VoIP action from native storage (iOS only)
|
|
232
236
|
*/
|
|
233
237
|
static async clearPendingVoipAction(): Promise<boolean> {
|
|
238
|
+
if (Platform.OS !== 'ios') return true;
|
|
234
239
|
try {
|
|
235
240
|
return await NativeBridge.clearPendingVoipAction();
|
|
236
241
|
} catch (error) {
|
package/src/telnyx-voice-app.tsx
CHANGED
|
@@ -437,7 +437,9 @@ const TelnyxVoiceAppComponent: React.FC<TelnyxVoiceAppProps> = ({
|
|
|
437
437
|
voipClient.currentConnectionState === TelnyxConnectionState.CONNECTED ||
|
|
438
438
|
voipClient.currentConnectionState === TelnyxConnectionState.CONNECTING
|
|
439
439
|
) {
|
|
440
|
-
log(
|
|
440
|
+
log(
|
|
441
|
+
`SKIPPING - Already ${voipClient.currentConnectionState}, preventing duplicate processing`
|
|
442
|
+
);
|
|
441
443
|
return;
|
|
442
444
|
}
|
|
443
445
|
|