Skip to contentSkip to navigationSkip to topbar
On this page

Connect Call To Widget


Studio uses Widgets to represent various parts of Twilio's functionality that can then be stitched together in your Studio Flow to build out robust applications that require no coding on your part. You can learn more about Widgets and building Studio Flows in the Studio Getting Started Guide.

(information)

Info

New to Twilio Studio? Check out our Getting Started guide!

The Connect Call To Widget allows you to bridge an in-progress call with another party. You can specify one of the following ways to connect to the other party:

  • Single phone number

  • Multiple phone numbers (simulring)

    • If you specify multiple phone numbers, all the numbers will be called simultaneously. Once one of the called parties connects, all the other calls will drop automatically.
  • Twilio Voice JavaScript SDK client identity

  • Programmable Wireless SIM SID

  • SIP endpoint

  • Twilio Voice Conference SID

Use this Widget as part of an Interactive Voice Response (IVR) menu, to connect your customer with a different department, or if they're looking to reach a specific operator.

You are not able to use parallel calling including both calls to a SIP Domain alongside calls to a phone number, Client user, or SIM.

Connect Call To Widget.

Required Configuration for Connect Call To Widget

required-configuration-for-connect-call-to-widget page anchor

The required fields for this Widget are Connect Call To and Caller ID, which can be variables or hard-coded entries. Select the Connect Call To type from the dropdown in the Inspector Panel, then set the field value to the number(s)/address of your intended recipient(s).

NameDescriptionExampleDefault
Connect Call ToThe phone number(s), Twilio Voice JavaScript SDK identity, SIM SID, SIP endpoint, or Conference SID to call.See Connect Call To configuration examples below.N/A
Caller IDThe phone number to use as the Caller ID when connecting the call.+13125555566{{contact.channel.address}}

Connect Call To configuration examples

connect-call-to-configuration-examples page anchor

You have several options when connecting a call to another party.

NameDescriptionExample
Single NumberSpecify a single phone number (in E.164 format) to dial and connect the caller to.+14157234000
Multiple Numbers (Simulring)Specify up to 10 numbers (in E.164 format) to potentially connect the call to. Each number will be dialed simultaneously. The first person to answer the call will be connected to the caller, and all other simultaneous calls will be dropped automatically. To specify multiple numbers, separate each number with commas.+14157234000, +14155551212, +14158675310
Client UserUse this to connect to a Twilio Voice JavaScript SDK client. Specify the client identifier.bob
SIMConnect to a Programmable Wireless SIM. Specify the SID of the SIM resource.DE8caa2afb9d5279926619c458dc7098a8
SIP Endpoint (non-Twilio SIP)Specify the SIP Endpoint address. There will also be an additional Username and Password field, which you should fill out if required by the destination.sip:jack@sample.com
SIP Endpoint (Twilio Programmable Voice SIP Domain)Put the fully qualified endpoint name in SIP Endpoint, and leave the additional Username and Password fields blank.sip:{user}@{domain}.sip.us1.twilio.com
ConferenceSpecify the SID of the Conference resource to connect to.CFe08c870b500f6e44a9ad184defd1f391
(warning)

Warning

Simultaneous dialing (simulring) is useful when you have several phones or several people that you could route a caller to. The first call that connects will cancel all the other simultaneous calls. If you dial an office phone system or a cellphone in airplane mode, it may pick up after a single ring, preventing the other phone numbers from ringing long enough for a human ever to answer. (Note that reaching a phone's voicemail or an automated message is considered to be a connected call.) Take care to use simultaneous dialing only in situations where you know the behavior of the called parties.

(information)

Info

Simulring is only available for phone numbers in Studio. However, the TwiML <Dial> verb allows you to simultaneously dial up to 10 Twilio Voice JavaScript SDK clients or SIP endpoints. You can build TwiML into a Studio Flow with the Add TwiML Redirect Widget or by creating a serverless function that runs the TwiML and using the Run Function Widget.


Optional Configuration for Connect Call To

optional-configuration-for-connect-call-to page anchor

The Connect Call To Widget also accepts a number of configuration options that you can use to toggle recording or specify a timeout duration.

NameDescriptionExampleDefault
RecordBoolean indicating whether to record the call and save it as an mp3 file.truefalse
TimeoutAn integer representing the number of seconds to wait for the dialed party to answer the call. The minimum allowed is 1 second, and the maximum value is 600 seconds.1030
Time LimitMaximum duration of the connected call in seconds. The connected call will automatically end when this limit is reached. If no value is provided, the default time limit on calls is 4 hours, unless you enable the "24-Hour Maximum Call Duration" feature in your Programmable Voice General Settings.3600Empty

Connect Call To Transitions

connect-call-to-transitions page anchor

These events trigger transitions from this Widget to another Widget in your Flow. For more information on working with Studio Transitions, see Studio's Getting Started guide.

NameDescription
Connected Call EndedThe connecting call ended. This could be because the connected caller ended the call, the timeout ended the call before the call was connected, or the call failed.
Caller Hung UpThe connecting call ended because the caller hung up.

Connect Call To Variables

connect-call-to-variables page anchor

After the Connect Call To Widget executes, it stores the following variables for use throughout your Studio Flow. For more information on working with Widget variables, see Studio's Getting Started guide.

Find definitions and examples for these variables at the Call Resource page.

NameLiquid Template Language
Dial Call Duration{{widgets.MY_WIDGET_NAME.variables.DialCallDuration}}
Dial Call SID{{widgets.MY_WIDGET_NAME.variables.DialCallSid}}
Dial Call Status{{widgets.MY_WIDGET_NAME.variables.DialCallStatus}}
Recording URL{{widgets.MY_WIDGET_NAME.variables.RecordingUrl}}

Example: Call Multiple Numbers

example-call-multiple-numbers page anchor

This example shows a user being connected to multiple contacts. The first contact to pick up the phone (even through answering machine) will be the official recipient of the call while the others will have their calls canceled.

Twilio Studio Connect Call To Widget Example.

Now that you are familiar with the Connect Call To Widget, you can start building it into Flows with other Widgets.

  • Check out the Split Based On... Widget to learn how to split your Flow based on user conditions. For example, using the Split Based On... Widget after the Connect Call To Widget, you could perform different actions depending on whether or not the call was answered (using the DialCallStatus variable from the Connect Call To Widget).
  • The Connect Call To Widget is commonly used in IVR menu applications. Check out the tutorial for building a full IVR using Studio.
  • Learn how to Forward Calls with Twilio Studio using this Widget

We can't wait to see what you build!

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.