Register by 10/16 for $250 off the on-site price.

3.x Changelog

3.0.0-preview3

September 4th, 2018

Enhancements

API Changes:
  • Nullability annotations have been added. Methods that expect @NonNull parameters throw NullPointerException. Methods that validate parameters for a specified input throw IllegalStateException if invalid.
  • Moved CallState to Call.State
  • Provide a stateless mechanism for processing push messages related to call invites and call invite cancellations. This API no longer raises errors when processing invalid messages, instead a boolean value is returned when handleMessage(context, data) is called. The boolean value is true when the provided data results in a CallInvite or CancelledCallInvite. If handleMessage(context, data) returns false it means the data provided was not a Twilio Voice push message. The CallInvite has an accept() and reject() method. While the CancelledCallInvite simply provides the to, from, and callSid fields also available in the CallInvite. The method getCallSid() can be used to associate a CallInvite with a CancelledCallInvite.
  • Migrated the API CallInvite to CallInvite and CancelledCallInvite.
       // Processing push messages in 2.X
       handleMessage(context, data, new MessageListener() {
           @Override
           void onCallInvite(CallInvite callInvite) {
                 // Check state and process invite
                 if (callInvite.getState().equals(PENDING)) {
                     // Show notification to answer or reject call
                 } else if(callInvite.getState().equals(CANCELLED)) {
                     // Hide notification
                 }
           }

           @Override
           void onError(MessageException messageException) {
               // Invalid data was provided
           }
       });

       // Processing push messages in 3.X
       boolean handled = handleMessage(context, data, new MessageListener() {
           @Override
           void onCallInvite(CallInvite callInvite) {
               // Show notification to answer or reject call
           }

           @Override
           void onCancelledCallInvite(CancelledCallInvite callInvite) {
               // Hide notification
           }
       });

       if(!handled) {
           // This message is not a Twilio voice push message
       }
  • Introduced call.getStats() method that returns a list of StatsReport with metrics for all the audio tracks in a call.
    call.getStats(new StatsListener() {
        @Override
        public void onStats(@NonNull List<StatsReport> statsReports) {
            // Process statsReports
        }
    });

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a PSTN number may not get connected when answerOnBridge is set to true.
  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4698 Params that are passed to your TwiML Application while making calls are not URL encoded
  • CLIENT-4547 Insights is not published
  • CLIENT-4672, CLIENT-4673 Error codes 20157 and 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117

3.0.0-preview2

August 27th, 2018

Enhancements

API Changes:
  • Introduced CallState.RINGING
  • Introduced a new callback method Call.Listener.onRinging(). This callback is emitted once before the Call.Listener.onConnected() callback when the callee is being alerted of a Call. The behavior of this callback is determined by the answerOnBridge flag provided in the Dial verb of your TwiML application associated with this client. If the answerOnBridge flag is false, which is the default, the Call.Listener.onConnected() callback will be emitted immediately after Call.Listener.onRinging(). If the answerOnBridge flag is true, this will cause the call to emit the onConnected callback only after the call is answered. See answeronbridge for more details on how to use it with the Dial TwiML verb. If the twiML response contains a Say verb, then the call will emit the Call.Listener.onConnected callback immediately after Call.Listener.onRinging() is raised, irrespective of the value of answerOnBridge being set to true or false

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a PSTN number may not get connected when answerOnBridge is set to true.
  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4698 Params that are passed to your TwiML Application while making calls are not URL encoded
  • CLIENT-4547 Insights is not published
  • CLIENT-4672, CLIENT-4673 Error codes 20157 and 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117

3.0.0-preview1

August 15th, 2018

This is the first WebRTC based release using Chromium WebRTC 57.

This SDK introduces ConnectOptions and AcceptOptions to allow developers to make behavioral changes associated with a Call.

This SDK allows multiple active Calls to be managed by the application.

Enhancements

API Changes:
  • Migrated the enum PJSIP in LogModule to a more granular set of enums (CORE, PLATFORM, SIGNALING and WEBRTC)
  • Introduced ConnectOptions to allow developers to make behaviorial changes associated with the call
  • Migrated the API to make a Call from Voice.call(...) to Voice.connect(...)
// Making a call in 2.X
 Voice.call(context, accessToken, params, listener);

// Making a call in 3.X
ConnectOptions connectOptions = new ConnectOptions.Builder(accessToken)
            .setParams(params)
                    .build();
Voice.connect(context, connectOptions, listener);
  • Migrated the API to accept a CallInvite using AcceptOptions
// Accepting a call in 2.X
CallInvite.accept(context, listener);

// Accepting a call in 3.X
AcceptOptions acceptOptions = new AcceptOptions.Builder()
            .build();
CallInvite.accept(context, acceptOptions, listener);
  • Introduced call holding via Call.hold(boolean) feature
  • Migrated Voice.setRegion(String) to ConnectOptions.Builder.region(String) and AcceptOptions.Builder.region(String)
  • Migrated Voice.getRegion() to ConnectOptions.getRegion() and AcceptOptions.getRegion()

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a PSTN number may not get connected when answerOnBridge is set to true.
  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4698 Params that are passed to your TwiML Application while making calls are not URL encoded
  • CLIENT-4547 Insights is not published
  • CLIENT-4672, CLIENT-4673 Error codes 20157 and 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.