I'm trying to use this dialpad plugin for Twilio Flex to make phone calls. I'm newbie on this so maybe I'm forgetting something to do in the process. I will detail the steps I made:
git clone https://github.com/lehel-twilio/plugin-dialpad.git
npm install
cp public/appConfig.example.js public/appConfig.js
appConfig.js file code:
// your account sid
var accountSid = 'ACXXxxxxXXXXxxxxxxXXXXXXxxxx35'; //my accountSid
// set to /plugins.json for local dev
// set to /plugins.local.build.json for testing your build
// set to "" for the default live plugin loader
var pluginServiceUrl = '/plugins.json';
var appConfig = {
pluginService: {
enabled: true,
url: pluginServiceUrl,
},
sso: {
accountSid: accountSid
},
ytica: false,
logLevel: 'debug',
showSupervisorDesktopView: true,
};
I deploy functions according to github docs: Hold Call (/hold-call), Create New Task (/create-new-task), Cleanup Rejected Task (/cleanup-rejected-task), Flex Dialpad Add Conference Participant (/add-conference-participant)
According to plugin-dialpad documentation, all these functions have the option Check for valid Twilio signature unchecked:
Configuring Functions :
Task channel 'custom1' is created:
I added my phone number as an attribute value to every Worker:
And finally, I added the filter:
At the beginning it displayed this error when I tried to make a phone call:
I could fix it applying CORS headers in Create New Task function which It's showing the error, I changed this line: "Access-Control-Allow-Origin":"https://flex.twilio.com":
But now it shows me an error in dialpad-plugin.js and I still can't make phone calls:
- Flex version 1.11.1 (same happens with 1.10.0)
- plugin-dialpad version 4.0
How can I fix it? I'd like your help.