-
Java 8 installed for your operative system.
-
A Twilio account with a verified phone number. (Get a free account here.) If you are using a Twilio Trial Account, you can learn all about it here.
-
Clone the repository and
cd
into it. -
The application uses Gradle to manage dependencies.
-
Copy the sample configuration file and edit it to match your configuration.
cp .env.example .env
You can find your
TWILIO_ACCOUNT_SID
andTWILIO_AUTH_TOKEN
in your Twilio Account Settings. You will also need aTWILIO_NUMBER
, which you may find here. -
Configure Twilio to call your webhooks
You will also need to configure Twilio to call your application when calls are received on your
TWILIO_NUMBER
. The voice URL should look something like this:http://9a159ccf.ngrok.io/conference/connect/client
-
Run the application using Gradle Gretty plugin.
./gradlew appRun
This will run the embedded Jetty application server that uses port 8080.
-
Navigate to
https://<ngrok_subdomain>.ngrok.io
in two different browser tabs or windows.Notes:
-
In one window/tab click
Connect as Agent 1
and in the other one clickConnect as Agent 2
. Now both agents are waiting for an incoming call. -
Dial your Twilio Number to start a call with
Agent 1
. YourTWILIO_NUMBER
environment variable was set when configuring the application to run. -
When
Agent 1
answers the call from the client, he/she can dialAgent 2
in by clicking on theDial agent 2 in
button. -
Once
Agent 2
answers the call all three participants will have joined the same call. After that,Agent 1
can drop the call and leave both the client andAgent 2
having a pleasant talk.
This application uses this Twilio helper library.
Run at the top-level directory.
./gradlew test
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.