Voice SDK Browser Call Components
The Voice JS SDK requires an installed web browser that supports WebRTC, and an internet connection. Before placing and receiving browser calls using the SDK, the following will also need to be configured:
- A UI page for placing and receiving calls in your browser.
- An Access Token containing your Twilio account credentials, and the inbound and outbound calling capabilities granted.
- Outbound: A TwiML App is required for placing outgoing calls. This is configured with a voice webhook url that responds with a TwiML <Dial> verb for calling.
- Inbound: An
identityis required for receiving incoming calls. This is used for forwarding incoming calls to the user instance with
<Dial>and the <Client> noun.
Here’s how these components work together on an outgoing call:
- Upon loading the UI page, it should automatically request an Access token.
- Your application responds with the token, at which point the UI page is ready to be used.
- A valid E.164 phone number is submitted to dial in the UI page, which opens an active connection to Twilio, and sends the number to the TwiML App in your token.
- The TwiML App forwards this request to the voice webhook that responds with
- Twilio bridges your Client call to the new outbound call to the submitted phone number.
A Voice SDK app can be built from the ground-up, or built in to your existing application. For full details, please see the the following Twilio Docs resources:
How Much Does a Voice SDK Call Cost?