@telnyx/webrtc 2.26.3 → 2.26.4

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.
@@ -11,6 +11,7 @@ export declare const TELNYX_ERROR_CODES: {
11
11
  readonly INVALID_CALL_PARAMETERS: 44002;
12
12
  readonly BYE_SEND_FAILED: 44003;
13
13
  readonly SUBSCRIBE_FAILED: 44004;
14
+ readonly PEER_CLOSED_DURING_INIT: 44005;
14
15
  readonly WEBSOCKET_CONNECTION_FAILED: 45001;
15
16
  readonly WEBSOCKET_ERROR: 45002;
16
17
  readonly RECONNECTION_EXHAUSTED: 45003;
@@ -33,9 +34,10 @@ export declare const TELNYX_WARNING_CODES: {
33
34
  readonly ICE_GATHERING_EMPTY: 33003;
34
35
  readonly PEER_CONNECTION_FAILED: 33004;
35
36
  readonly ONLY_HOST_ICE_CANDIDATES: 33005;
37
+ readonly ANSWER_WHILE_PEER_ACTIVE: 33006;
36
38
  readonly TOKEN_EXPIRING_SOON: 34001;
37
39
  readonly SESSION_NOT_REATTACHED: 35001;
38
40
  };
39
- export declare const SDP_CREATE_OFFER_FAILED: 40001, SDP_CREATE_ANSWER_FAILED: 40002, SDP_SET_LOCAL_DESCRIPTION_FAILED: 40003, SDP_SET_REMOTE_DESCRIPTION_FAILED: 40004, SDP_SEND_FAILED: 40005, MEDIA_MICROPHONE_PERMISSION_DENIED: 42001, MEDIA_DEVICE_NOT_FOUND: 42002, MEDIA_GET_USER_MEDIA_FAILED: 42003, HOLD_FAILED: 44001, INVALID_CALL_PARAMETERS: 44002, BYE_SEND_FAILED: 44003, SUBSCRIBE_FAILED: 44004, WEBSOCKET_CONNECTION_FAILED: 45001, WEBSOCKET_ERROR: 45002, RECONNECTION_EXHAUSTED: 45003, GATEWAY_FAILED: 45004, LOGIN_FAILED: 46001, INVALID_CREDENTIALS: 46002, AUTHENTICATION_REQUIRED: 46003, NETWORK_OFFLINE: 48001, UNEXPECTED_ERROR: 49001;
40
- export declare const HIGH_RTT: 31001, HIGH_JITTER: 31002, HIGH_PACKET_LOSS: 31003, LOW_MOS: 31004, LOW_BYTES_RECEIVED: 32001, LOW_BYTES_SENT: 32002, ICE_CONNECTIVITY_LOST: 33001, ICE_GATHERING_TIMEOUT: 33002, ICE_GATHERING_EMPTY: 33003, PEER_CONNECTION_FAILED: 33004, ONLY_HOST_ICE_CANDIDATES: 33005, TOKEN_EXPIRING_SOON: 34001, SESSION_NOT_REATTACHED: 35001;
41
+ export declare const SDP_CREATE_OFFER_FAILED: 40001, SDP_CREATE_ANSWER_FAILED: 40002, SDP_SET_LOCAL_DESCRIPTION_FAILED: 40003, SDP_SET_REMOTE_DESCRIPTION_FAILED: 40004, SDP_SEND_FAILED: 40005, MEDIA_MICROPHONE_PERMISSION_DENIED: 42001, MEDIA_DEVICE_NOT_FOUND: 42002, MEDIA_GET_USER_MEDIA_FAILED: 42003, HOLD_FAILED: 44001, INVALID_CALL_PARAMETERS: 44002, BYE_SEND_FAILED: 44003, SUBSCRIBE_FAILED: 44004, PEER_CLOSED_DURING_INIT: 44005, WEBSOCKET_CONNECTION_FAILED: 45001, WEBSOCKET_ERROR: 45002, RECONNECTION_EXHAUSTED: 45003, GATEWAY_FAILED: 45004, LOGIN_FAILED: 46001, INVALID_CREDENTIALS: 46002, AUTHENTICATION_REQUIRED: 46003, NETWORK_OFFLINE: 48001, UNEXPECTED_ERROR: 49001;
42
+ export declare const HIGH_RTT: 31001, HIGH_JITTER: 31002, HIGH_PACKET_LOSS: 31003, LOW_MOS: 31004, LOW_BYTES_RECEIVED: 32001, LOW_BYTES_SENT: 32002, ICE_CONNECTIVITY_LOST: 33001, ICE_GATHERING_TIMEOUT: 33002, ICE_GATHERING_EMPTY: 33003, PEER_CONNECTION_FAILED: 33004, ONLY_HOST_ICE_CANDIDATES: 33005, ANSWER_WHILE_PEER_ACTIVE: 33006, TOKEN_EXPIRING_SOON: 34001, SESSION_NOT_REATTACHED: 35001;
41
43
  export declare const HAS_NON_HOST_ICE_CANDIDATE_REGEX: RegExp;
@@ -55,6 +55,13 @@ export declare const SDK_ERRORS: {
55
55
  readonly causes: readonly ["Browser error", "Device in use by another application"];
56
56
  readonly solutions: readonly ["Close other applications using the microphone", "Retry"];
57
57
  };
58
+ readonly 44005: {
59
+ readonly name: "PEER_CLOSED_DURING_INIT";
60
+ readonly message: "Call was closed during setup";
61
+ readonly description: "The PeerConnection was closed (e.g. by hangup()) while peer.init() was still running. This is a race condition: an async operation such as setRemoteDescription, getUserMedia, or the media recovery flow yielded control, and close() ran during that gap. The init() cannot continue because the underlying RTCPeerConnection has been destroyed.";
62
+ readonly causes: readonly ["call.hangup() or call.close() was called while the call was still setting up", "A WebSocket Bye message arrived during getUserMedia prompt or SDP negotiation", "User clicked hangup/decline before media permissions were granted"];
63
+ readonly solutions: readonly ["This is expected if the user intentionally hung up during setup — no action needed", "If this happens frequently without user action, check for automatic hangup triggers that may fire too early"];
64
+ };
58
65
  readonly 44001: {
59
66
  readonly name: "HOLD_FAILED";
60
67
  readonly message: "Failed to hold the call";
@@ -89,6 +89,13 @@ export declare const SDK_WARNINGS: {
89
89
  readonly causes: readonly ["STUN/TURN servers unreachable", "Firewall blocking UDP traffic to STUN/TURN servers", "Incorrect TURN server configuration or credentials", "Restrictive corporate network or VPN"];
90
90
  readonly solutions: readonly ["Verify STUN/TURN server URLs and credentials", "Ensure UDP traffic to STUN/TURN ports is not blocked", "Check firewall or VPN settings", "Try using TCP-based TURN as a fallback"];
91
91
  };
92
+ readonly 33006: {
93
+ readonly name: "ANSWER_WHILE_PEER_ACTIVE";
94
+ readonly message: "Call answer ignored because a peer connection is already active";
95
+ readonly description: "answer() was called on a call that already has an active or connecting peer connection. Creating a second peer connection for the same call would duplicate media negotiation, confuse the remote party, and break call reporting. This is typically caused by application code invoking answer() multiple times (e.g. from multiple event handlers).";
96
+ readonly causes: readonly ["Application called answer() twice on the same call object", "Multiple click handlers or event listeners triggering answer()"];
97
+ readonly solutions: readonly ["Ensure answer() is called only once per call", "Disable the answer button after the first click", "Check that answer() is not invoked from multiple event handlers"];
98
+ };
92
99
  readonly 34001: {
93
100
  readonly name: "TOKEN_EXPIRING_SOON";
94
101
  readonly message: "Authentication token expiring soon";
@@ -37,6 +37,7 @@ export interface IVertoOptions {
37
37
  callReportInterval?: number;
38
38
  debugLogLevel?: 'debug' | 'info' | 'warn' | 'error';
39
39
  debugLogMaxEntries?: number;
40
+ skipLastVoiceSdkId?: boolean;
40
41
  mediaPermissionsRecovery?: {
41
42
  enabled: boolean;
42
43
  timeout: number;
@@ -31,6 +31,7 @@ export interface IClientOptions {
31
31
  rtcIp?: string;
32
32
  rtcPort?: number;
33
33
  useCanaryRtcServer?: boolean;
34
+ skipLastVoiceSdkId?: boolean;
34
35
  env?: Environment;
35
36
  iceServers?: RTCIceServer[];
36
37
  mutedMicOnStart?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telnyx/webrtc",
3
- "version": "2.26.3",
3
+ "version": "2.26.4",
4
4
  "description": "Telnyx WebRTC Client",
5
5
  "keywords": [
6
6
  "telnyx",