Skip to content

Forward calls to wherever I am in the world, at local rates.

Notifications You must be signed in to change notification settings

binzcodes/twilio-serverless-ivr

Repository files navigation

Serverless & Twilio - IVR

Twilio allows developers to easily integrate phone calls, SMS and more into using TwiML.

This project deploys a serverless function using Twilio serverless runtime as the provider. The function responds with TwiML instructions to forward the phone call to any overseas number.

Install

Install Twilio Node.js Provider Plugin & Service Dependencies

npm i -g serverless
npm i

Set environment variables locally (Twilio account credentials can be found here).

  • TWILIO_ACCOUNT_SID
  • TWILIO_AUTH_TOKEN
  • MY_PHONE_NUMBER

Deploy

Deploy directly with sls deploy

Ensure the function responds with expected Twiml with sls invoke -f forward-call Expected response

<?xml version="1.0" encoding="UTF-8"?><Response><Say>Hello...</Say><Dial>+441...</Dial></Response>

Configure phone numbers in Twilio Console selecting Function and this service

TODO:

Further reading

About

Forward calls to wherever I am in the world, at local rates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published