Skip to content

Releases: twilio/twilio-voice.js

2.10.0

05 Jan 17:37
Compare
Choose a tag to compare

2.10.0 (January 5, 2024)

Improvements

  • Added tags to client logs for easier filtering
  • Added log statements to API calls and events for debugging purposes

Bug Fixes

  • Fixed an issue where updating token after signaling connection has gone offline causes an Invalid State error.
  • Fixed an issue where Device.Options.logLevel is only accepting a number type. With this release, strings are now also allowed. See Device.Options.logLevel for a list of possible values.
  • Fixed an issue where call.mute() does not have an effect while the call.status() is either ringing or connecting. Thank you @zyzmoz for your contribution.

2.9.0

28 Nov 20:21
Compare
Choose a tag to compare

2.9.0 (November 28, 2023)

New Features

Audio Processor APIs

The SDK now includes Audio Processor APIs, enabling access to raw audio input and the ability to modify audio data before sending it to Twilio. With this new feature, the following use cases can now be easily achieved on the client side:

  • Background noise removal using a noise cancellation library of your choice
  • Music playback when putting the call on hold
  • Audio filters
  • AI audio classification
  • ... and more!

Please visit this page for more details about the Audio Processor APIs.

2.8.0

16 Oct 18:15
Compare
Choose a tag to compare

2.8.0 (October 16, 2023)

New Features

  • Added a new feature flag enableImprovedSignalingErrorPrecision to enhance the precision of errors emitted by Device and Call objects.

    const token = ...;
    const device = new Device(token, {
      enableImprovedSignalingErrorPrecision: true,
    });

    The default value of this option is false.

    When this flag is enabled, some errors that would have been described with a generic error code are now described with a more precise error code. With this feature, the following errors now have their own error codes. Please see this page for more details about each error.

    • Device Error Changes

      const device = new Device(token, {
        enableImprovedSignalingErrorPrecision: true,
      });
      device.on('error', (deviceError) => {
        // the following table describes how deviceError will change with this feature flag
      });
      Device Error Name Device Error Code with Feature Flag Enabled Device Error Code with Feature Flag Disabled
      GeneralErrors.ApplicationNotFoundError 31001 53000
      GeneralErrors.ConnectionDeclinedError 31002 53000
      GeneralErrors.ConnectionTimeoutError 31003 53000
      MalformedRequestErrors.MissingParameterArrayError 31101 53000
      MalformedRequestErrors.AuthorizationTokenMissingError 31102 53000
      MalformedRequestErrors.MaxParameterLengthExceededError 31103 53000
      MalformedRequestErrors.InvalidBridgeTokenError 31104 53000
      MalformedRequestErrors.InvalidClientNameError 31105 53000
      MalformedRequestErrors.ReconnectParameterInvalidError 31107 53000
      SignatureValidationErrors.AccessTokenSignatureValidationFailed 31202 53000
      AuthorizationErrors.NoValidAccountError 31203 53000
      AuthorizationErrors.JWTTokenExpirationTooLongError 31207 53000
      ClientErrors.NotFound 31404 53000
      ClientErrors.TemporarilyUnavilable 31480 53000
      ClientErrors.BusyHere 31486 53000
      SIPServerErrors.Decline 31603 53000
    • Call Error Changes

      const device = new Device(token, {
        enableImprovedSignalingErrorPrecision: true,
      });
      const call = device.connect(...);
      call.on('error', (callError) => {
        // the following table describes how callError will change with this feature flag
      });
      Call Error Name Call Error Code with Feature Flag Enabled Call Error Code with Feature Flag Disabled
      GeneralErrors.ConnectionDeclinedError 31002 31005
      AuthorizationErrors.InvalidJWTTokenError 31204 31005
      AuthorizationErrors.JWTTokenExpiredError 31205 31005

    IMPORTANT: If your application logic currently relies on listening to the generic error code 53000 or 31005, and you opt into enabling the feature flag, then your applicaton logic needs to be updated to anticipate the new error code when any of the above errors happen.

2.7.3

06 Oct 18:00
Compare
Choose a tag to compare

2.7.3 (October 6, 2023)

Bug Fixes

  • Fixed an issue where, sometimes a TypeError is raised while handling an incoming call under the following circumstances:
    • Network interruptions
    • updating the token before accepting the call

2.7.2

21 Sep 19:46
Compare
Choose a tag to compare

2.7.2 (September 21, 2023)

Changes

  • Fixed an issue where audio in the Chrome browser is choppy when another application is also using the audio devices.
  • Added missing documentation for the following events:
    • call.on('ringing', handler)
    • call.on('warning', handler)
    • call.on('warning-cleared', handler)
    • device.on('destroyed', handler)

2.7.1

03 Aug 23:00
Compare
Choose a tag to compare

2.7.1 (August 3, 2023)

Bug Fixes

  • Fixed an issue where call.sendMessage() API throws an error if the SDK is imported as an ECMAScript Module (ESM) using the @twilio/voice-sdk/esm path.

2.7.0

01 Aug 20:51
Compare
Choose a tag to compare

2.7.0 (August 1, 2023)

ECMAScript Module Support

Currently, the SDK is imported as a CommonJS Module (CJS) using the root path @twilio/voice-sdk. With this release, the SDK contains an experimental feature that allows it to be imported as an ECMAScript Module (ESM) using the @twilio/voice-sdk/esm path. As this is an experimental feature, some frameworks using bundlers like Vite and Rollup may not work. Full support for ESM will be available in a future release and will become the default import behavior of the SDK.

Example:

import { Device } from '@twilio/voice-sdk/esm';

2.6.1

07 Jul 17:24
Compare
Choose a tag to compare

2.6.1 (July 7, 2023)

Changes

  • Fixed some security vulnerabilities shown by npm audit.
  • Removed unused dependencies.
  • Replaced deprecated dependencies.

Bug Fixes

  • Fixed an issue where custom DTMF sounds would not play. With this release, custom DTMF sounds should now play when configured during device initialization.

    const device = new Device(token, {
      sounds: {
        dtmf8: 'http://mysite.com/8_button.mp3',
        // Other custom sounds
      },
      // Other options
    });
  • Fixed an issue where calling device.updateOptions would reset the device.audio._enabledSounds state.

2.6.0

20 Jun 21:55
Compare
Choose a tag to compare

2.6.0 (June 20, 2023)

Changes

  • The SDK now builds on NodeJS versions 16 and above without the --legacy-peer-deps flag.
  • Removed usage of NodeJS modules from the SDK and some dependencies. With this change, the SDK should now work with some of the latest frameworks that use the latest versions of bundlers such as Vite and Webpack.
  • The AudioPlayer dependency has been incorporated into the SDK as part of a migration. This change fixes an issue where source maps are not properly loaded.
  • Removed unnecessary files from the generated npm package.
  • Links to source maps are now included in the generated npm package.
  • The ws package has been moved to devDependencies.
  • The SDK no longer depends on the xmlhttprequest npm package.

2.5.0

09 May 21:12
Compare
Choose a tag to compare

2.5.0 (May 9, 2023)

New Features

WebRTC API Overrides (Beta)

The SDK now allows you to override WebRTC APIs using the following options and events. If your environment supports WebRTC redirection, such as Citrix HDX's WebRTC redirection technologies, your application can use this new beta feature for improved audio quality in those environments.