Twilio: Can Sip be used to call a Twilio Conference? - twilio

I've been reviewing the Twilio Voice documentation, but I can't see if it would be possible for a sip communications infrastructure to join a Twilio Conference.
This would be the ideal scenario for us.
However, if this wasn't possible, having a conference dial or invite a sip address would be almost as good.
Obvious this is the basic sip dial from a pstn, but can't see how this could be used with the Twiml Conference verbs.
https://www.twilio.com/docs/voice/twiml/sip
<Response>
<Dial>
<Sip>
sip:jack#example.com
</Sip>
</Dial>
</Response>
Also I can see that the Api supports 'Create a Participant – Agent Conference only', however we don't use the Agent Conference Only conference type and we've concerned this would break existing functionality.
https://www.twilio.com/docs/voice/api/conference-participant-resource
I guess we're hoping this can be achieved with Twiml.

Since you are initiating a call out toward your SIP infrastructure (if I am understanding you correctly?), you would use the Twilio REST API Calls resource to do so, and the To: would be a SIP URI. The URL would be pointing toward TwiML which then join the SIP participant into the conference when they answer.
If you want them to dial into Twilio via SIP from your SIP infrastructure, you would set up a SIP Domain.
You actually have an incredible amount of flexibility with either approach.
Alan
Making Calls

Related

Twilio - Can I use a webhook, TwiML, Studio or Function to route Voice Calls to an elastic sip trunk

I want to setup Failover routing within Twilio phone numbers. If I can use a Webhook or other Twilio method that offers "Primary Handler Fails" then I can do this within specific numbers. I know how to create method for forwarding call to a different number that I can place in that failover field. Here is what I don't know:
How do I direct the first field "A Call Comes In" to my Elastic Sip Trunk?
Thank you!
Twilio developer evangelist here.
You can't setup calls to be forwarded to your SIP trunk in general, however you can have them forwarded to a SIP address that is registered on your trunk.
To do so, you need to use the <Dial> verb, nesting a <Sip> inside. Like this:
<Response>
<Dial>
<Sip>SIP_ADDRESS</Sip>
</Dial>
</Response>

A SIP provider with PSTN number and extension range for DID

I have a Twilio account with USA PSTN number like +11234567890. In my company all users have an internal SIP 4-digit number like 2001, 2002 etc.
Is somewhere a USA SIP provider which allows anyone USA client to call my number +11234567890 with extension directly, like +11234567890XXXX, and pass this full number into my PBX via SIP trunk call? With that number I can bridge a caller and callee directly (Direct Inward Call, DID), bypassing voice menu.
A Twilio techsupport says that i must buy another PSTN number, and they don't allowing such extensions. So, buying a external number per every user looks silly.
Is somewhere a USA SIP provider which allows anyone USA client to call my number +11234567890 with extension directly, like +11234567890XXXX, and pass this full number into my PBX via SIP trunk call?
No. This is impossible -- phone numbers in the US (as well as Canada and some countries in the Caribbean) must confirm to the North American Numbering Plan, which mandates that phone numbers be nine digits long. The US telephone network does not permit longer numbers to be dialed, no more than an IPv4 network would permit a five-octet IP address to be used.
Some devices will allow extra digits to be entered, e.g. to allow novelty "phonewords" to be dialed, but the extra digits are discarded. They are not sent to the phone network.
As George mentions in the comment , that is not the most intuitive way of dialing for the end users. You could achieve something similar with your Twilio number by using inbound PSTN or SIP call to invoke your application which can ask for extension and respond using the <Sip> noun of the <Dial> verb, to establish a call with your SIP endpoint.
A possible flow to achieve what you require is mentioned below :
Create a rest endpoint that does the following
Asks caller to enter extension number by <Say>-ing a message
Uses TwiML to <Gather> extension number from caller
<Dial> this extension on your sip infrastructure
Point your Twilio Number to above endpoint.
3 . Dont forget to whitelist Twilio's SIP address and media ports in your infrastructure
Sample TwiML to dial to your sip infrastructure is mentioned below (if extension is can be dialed directly as endpoint , do a direct sip to the extension , else pass extension as a header to your pbx and have pbx dial the extension)
<Response>
<Dial>
<Sip>
sip:stan#example.com?extensionNumber=2001&customeheader=xyz
</Sip>
</Dial>
</Response>

Understanding how twilio manages multiple numbers from same twilio account

My question is when we buy multiple numbers from same twilio account, what is the parameter that makes the numbers different? Is it the client name or is there something else? Suppose that I want my tablet and phone to be linked to same twilio number then they will have different client name, Is that right? Please can some one explain.
Twilio evangelist here.
Suppose that I want my tablet and phone to be linked to same twilio number then they will have different client name
To do this you could set the Voice request URL of your Twilio phone number to a URL that returns TwiML containing multiple <Client> nouns. you can set it up to eather dial sequentially:
<Response>
<Dial>
<Client>bob</Client>
</Dial>
<Dial>
<Client>alice</Client>
</Dial>
</Response>
In this scenario Twilio will dial Bob first. If Bob does not answer, Twilio will dial alice.
You can also simul-dial multiple clients:
<Response>
<Dial>
<Client>bob</Client>
<Client>alice</Client>
</Dial>
</Response>
In this scenario Twilio will dial Bob and Alice at the same time and Twilio will bridge the inbound PSTN call to which ever answers.
Hope that helps.

Issues with Twilio Transcription during recording within a Dial verb

I am Raj, an independent Twilio consultant for a customer.
As part of a solution implementation, we have a requirement to support the following -
"A Customer makes a call to a Twilio number which forwards the call to a business number and record the conversation".
We have configured the Twilio Number to route the request to our server and we send the following TwiML as a response :
<Response>
<Dial record="true">XXXXXXXXX</Dial>
</Response>
The above works fine for call forward and recording; but it does not seem to transcribe the recording.
If I send the following as a TwiML response; the recording & transcription does not seem to happen either.
<Response>
<Dial>XXXXXXXXXX</Dial>
<Record transcribe="true"/>
</Response>
Is there a limitation in the Dial verb that it can only record, but cannot transcribe?
Regards
Raj
Twilio Developer Evangelist here.
You are correct. Record is available as a dial verb attribute but transcribe is not.
If you want to transcribe in this scenario you could use a 3rd party transcription service like Rev.

Twilio Voice - Add a person to an exisiting confrence call

I am using Twilio Voice, Now what i want to do is, If i already created a conference call between 2 people, and then while they are talking, they decided to add a 3rd person to the call with them on the conference, Can someone please help me how to have this done with a sample or something ?
Thanks!
Twilio Developer Evangelist here. So, it depends on how this is setup. I presume your conference call TwiML looks like this:
<Response>
<Dial>
<Conference>someroom</Conference>
</Dial>
</Response>
In that case, you can just have another person dial the number and provide the same TwiML to add them to the same conference room. If you want the people on the call to invite someone in, you will need to use so that they can provide the other person's number, or have some sort of web interface. Then use the REST API to dial that person into the conference, again with the same TwiML.
Is this what you needed?

Resources