Twilio: Change caller ID based on number called? - twilio

I have two numbers that forward to a single phone, one work number (A), and one personal number (B).
(A) was setup using Twilio to forward to my phone.
Is there anyway to have some sort of caller ID indicator letting me know which number is being called? That way I can distinguish whether the incoming call was for my work or personal number.
Any help would be deeply appreciated.
Thank you,

This depends on how you have it set up.
If you have your office and personal line ring a twilio number you would do something like this
First you would add a verified outbound caller ID with twilio
https://support.twilio.com/hc/en-us/articles/223180048-Adding-a-verified-outbound-caller-ID-with-Twilio
Then you on an inbound call you would grab the id of the number called. It will be listed as the To number.
https://www.twilio.com/docs/api/rest/call
Then when they call the phone you are forwarding it to you would just specify the To number from before as the From number.
https://www.twilio.com/docs/api/rest/making-calls
If you have a different set up or would like to have twilio make an announcement instead of showing that caller ID there are other work arounds for those methods too. Just let me know and I can edit my answer.

Related

Twilio phone call validation public numbers

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.

Twilio- using webhook to a second phone number to dialogue with customer

I'm using Twilio Studio and have two phone numbers.
I want to start a text conversation (A) with the customer and after a certain event (like keyword "manager") occurs, I want to alert a second text conversation (B) from a new phone number with that same customer.
I was thinking it might work to forward a message from (A) to (B), but I'm not sure how to give B the phone number that (A) was texting.
First off, I'm a newbie so take what I say with a grain of salt...
I'm almost positive there are 3 or 4 tutorials that you can link together to solve your issue. I think I've read/watched all of them 4x in the last 3 days trying to self learn.
To be honest, from what I've gathered in my self teachings your answers lie within their YouTube channel and their help docs on Functions, Webhooks, HTTP Requests and maybe even TwiML Redirects. But again, I'm a new guy.
If someone who is more knowledgeable doesn't respond back then I'll try to help you because I think I can if you can bear with me. Just reply with a tag so I'll get an alert. Good Luck (to us both!)
you can retrieve the phone number of the customer by referencing off any text you sent/received from the costumer in the flow.
For instance a if you texted them it would be {{widgets.your_widgets_name_here.outbound.To}}
Then just type in this syntax {{widgets.your_widgets_name_here.outbound.To}} in the message body of the widget you are using to alert conversation (B).
It will display the Number of the costumer.
You could then put that in the send message field of any widget in that conversation by refrencing the same way {{widgets.your_widgets_name_here.inbound.body}}

How to record when Make a call between two numbers not registered in twilio

I did when Make a call between two numbers not registered in Twilio using following link "Make a call between two numbers not registered in twilio" in C#. But I need to record while pressing 1 during the call at any time.Thanks in advance.
Twilio developer evangelist here.
You cannot nest a <Gather> within a <Dial>, so you can't interrupt a call between two people by pressing 1.
You could place your callers in a <Conference> (in fact, according to that SO question you linked to, it looks like you might have already). Then you can use <Dial>'s hangupOnStar attribute to end the conference for the moderator and allow them to record the call.
You'd then need to direct the moderator into a new <Conference> with the record attribute set to record-from-start. And then you'd need to redirect the original caller from their original conference to the conference that is being recorded.
Let me know if that helps at all.

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