A simple react based Web UI that uses Twilio Voice SDK to place calls over the net
- A Twilio account
- Someone to call :)
Check out this blog for a step by step guide on settings this up from scratch
- In Console, open Account > API Keys
- Create a new API key
- Put the values in the
serverless/.env
file
- Create a Studio flow, add logic as required, if the call is sent to Flex, pass through a "from" value in the task payload for a Twilio number to be used in the case of an outbound call
- Add logic to send calls to Flex or Forward or to a bot etc
- From the "Trigger" block copy the WebHook URL
- In Twilio Console > Phone Numbers > Manage > Twiml Apps. Create a new application
- Paste the URL from Studio into the Voice Configuration Request URL. Press create
- Open the newly created App and copy the TwiML App SID, e.g.
APe2e49959e28d111f9b7e2b064111abd8
- Put the application SID in the
serverless/.env
file, this will be used when minting tokens
In the serverless
folder create an .env
file using the .env.example
, populate the required values (from above)
In the client-ui
folder, run yarn build
or npm run build
. This will create the next app and move the output to the ../serverless/dist/assets
folder
Deploy the application to Twilio serverless
serverless $ twilio serverless deploy