Creates a Direct Inward Dial (DID) setup for Twilio Flex. Each agent can be assigned a number, and calls to that number will go directly to that agent. Outbound calls will come from that agent's assigned number.
Flex DID configures inbound phone numbers with a Studio Flow and TaskRouter Workflow that matches tasks to workers using a shared phone_number
attribute.
Not supported or maintained by Twilio. MIT License.
$ git clone https://github.com/cweems/flex-did.git
$ cd flex-did
$ npm install
$ cp .env.example .env
# Add your Twilio API Key and Secret to .env
Twilio Account configuration in one command:
$ npm run flex-did-setup-all
Run each command separately:
$ buy-numbers
$ workflow-setup
$ studio-setup
$ update-numbers
Add a phone_number
attribute to one of your TaskRouter workers with an e.164 phone number. Or, configure your SSO system to provide the phone_number
attribute when an agent logs in.
From the flex-did
directory, run the following to start your dev environment:
$ cd plugin-flex-did
$ npm install
$ twilio flex:plugins:start
To deploy the plugin, run:
$ twilio flex:plugins:deploy --changelog "Deploying flex-did"
$ twilio flex:plugins:release --plugin [email protected] --name "Flex DID" --description "Provides direct inward dial functionality."