Twilio phone call validation public numbers - twilio

I am using Twilio for the first time. It is implemented already, but I am trying to solidify the system.
My question is pretty simple. I would like to know if Twilio has integrated protections against trolls entering numbers such as 911-123-4567. I wouldn't want the company to get into troubles because someone decided to have the system make emergency calls on our name.
Otherwise, I could make an array of public numbers, for which, if the number given starts by said numbers, I throw an error.
Which one would be the best practice?
Thanks in advance!

Twilio doesn't have any automated blocks on dialling numbers. You might not want to call emergency numbers, for example, but some applications do.
You could certainly build your own blocklist for numbers you don't want your application to be able to call. Or for more security, your own allowlist.
One other option is verifying that the user owns the phone number that they are submitting, so that you know it is theirs. You could do this by implementing SMS or voice verification calls using the Twilio Verify API. It depends on your use case which of these three methods work with your use-case.

Related

Associating a Twilio number with a specific Frontline user

I'm trying to figure out how to associate a specific user with a Twilio number, so that when a call/text comes to that number it only goes to that user's Frontline app/account.
I'm writing the callbacks in Node.js, and I guess that I'm a bit confused to as to how to identify the target number (as the quickstart I'm using is more focused on the customerNumber and relationship with a specific worker).
Thank you.
I believe you should set up Custom Routing for this and, instead of using the customer number (the MessageBinding.Address from the webhook parameters) to do the routing as in the quick start, you can use the number the customer sent the message to, which I think is the MessageBinding.ProxyAddress.
Check out all the parameters that are sent to the onConversationRoute webhook URL. You might also want to test and just log out all the available parameters in order to match to the target number.
The best and the only option I see the Call Forwarding for that purpose and using Twilio's inbuilt TwiML Bins.
Complete info:
https://support.twilio.com/hc/en-us/articles/223179908-Setting-Up-Call-Forwarding

Options for combining multiple Amazon Lex bots

I work in a large enterprise where multiple teams are developing Lex bots (on separate accounts). Each bot supports a different domain or application,. In some cases, it would be nice for a single user interface to ask a question without needing to know which bot to ask. Is there a way to federate bots, or to forward un-recognized intentions to 'backup' bots?
I feel like what I really want to do is treat each bot as a skill is treated in Alexa, except I'm in the position (through entitlements) to know which 'skills' would be appropriate for a given user.
The answer here is that you would need to develop a custom application that delivers a user's input to each of your company's array of bots.
You'd need to look at the NLU Confidence score from each Bot's response to decide which response is the most accurate to return to the user. Would also be worthwhile keeping some state in your app to remember which Bot the user is currently interacting with and defaulting to that Bot for successive user inputs. Should you reach a point where the confidence score is low, it might present a signal to you to test the user's input across the other Bots.
What you'll need to be aware of here is that your costs will increase with each additional Bot that you add. So, assuming you have 5 area-specific Bots, one inbound message from your user could result in 5 Lex calls. As you start moving into significant volumes of interactions, this could start proving to be an obstacle.
An alternative would be to use a custom fallback intent to invoke a Lambda function that calls your Bot orchestration function. Assuming that you're able to find the correct Bot to handle the user's query, you'd need to remember that so succesive messages now get routed to that Bot.

Twilio custom caller ID

On a ride booking app, it is required communication between driver and user.
Now the case, if user A contacts the driver via website or app, call or sms can be achieved via Twilio, we don't want to expose their contact numbers to each other.
If three users A, B and C contacts the driver and driver has no app installed, in fact the driver wants call back and sms reply. How the driver can reach users on Caller ID.
There could be large number of users and we can't buy separate twilio number for each user.
Please advise the solution.
How many users are likely to need to contact each individual driver at any one time? Not many I wouldn't think.
Buy 10 Twilio numbers, assign them incrementally as users call/SMS their driver and save the assignment for user/driver numbers in your database.
If the driver calls/SMS a number in response query the database and route the call/SMS to the user it was assigned to when they called the driver.
Recycle the 1st assignment once the 11th user calls/SMS the driver, rinse and repeat.
Twilio developer evangelist here.
In order to maintain anonymous communications in this way you need as many numbers as the maximum number of relationships one person in your system has. The best explanation of this is in this article on masked text messaging with Twilio (though it applies to calls too).
Your comment on miknik's answer suggests you want to keep these relationships alive forever. This is not the way that most services build out this feature. They normally give a particular length to the relationship, Uber for example will recycle the phone number a number of minutes after a ride ends.
If you are looking for an easier way to manage this kind of number pooling and masking, check out Twilio Proxy, it handles a lot of the logic for you. It is still in developer preview right now, but you can apply for early access.

Twilio - Call another person during a call and setup a conference call

I'm using Twilio to build a service right now. Here's my use case:
In a web page, I input a phone number and call it using Twilio JS (already done). During the call, I want to input another number and call another person. The call with the first person will be forwarded to the conference. When the second person answer the call, he will join the conference too.
Is it possible to use Twilio to implement this case?
This is definitely possible with twilio. i have worked on that scenario directly and twilio api works excellently well.
When u initiate a call from the twilio number to the first number, use the call back url to connect the person to the another person you want.
This can be done using twiML, which has <Dial> which will be of great help to you.
This is the easiest way of implementation.
The other way, is pretty clean but takes time to implement.
The twilio api provides conference capability themselves.
So you can create a request of conference with all the numbers that need to be connected.
The down side of this is that, all number will be called and connected, if your requirement is to call the first number and then only connect him to another person, then i wouldnt recommend this solution.
I hope this helped you.

Restricting callerID choices in Twilio

I have a very simple Twilio setup for my company as our phone system. I've one specific problem: at the moment, anyone can use any of the numbers that have been associated with the company on the site for calling out. So Bob might accidentally use Alice's number, and that's unfortunate.
How do I change that? I would like to be able to set it so that each non-administrator user can only use one phone number for calling out, specifically the number associated with their user or device.
You could use subaccounts:
http://www.twilio.com/docs/api/rest/subaccounts
Alternatively, enforce the extra Caller ID logic in your own application and refuse calls if they don't match the correct params.

Resources