Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
Twilio Reject Call not working- Studio Flow

so I have it like this but not sure how this will work;

Widget Config

Widget Config 2

Studio flow

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Twilio developer evangelist here.

That's weird, because that worked for me when I was answering your previous question.

What you can do instead is return a string that determines whether the caller is blocked and the use a split widget to choose.

So your code could look like this:

exports.handler = function(context, event, callback) {
  // List all blocked phone numbers in quotes and E.164 formatting, separated by a comma
  let numberBlock =["+17171234567"];
  let blocked = true;
  if (numberBlock.length > 0) {
    if (numberBlock.indexOf(event.From) === -1) {
      blocked = false;
    }
  }
  if (blocked) {
    callback(null, "blocked");
  }
  else {
    callback(null, "accepted");
  }
};

Then the studio flow would look like this:

enter image description here

That is, if the function returns "accepted" then the call moves on, otherwise that's the end of the flow.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!