Clarification on Twilio's Record and Transcribe Feature - twilio

I'm looking at Twilio's API documentation for Record and wanted some clarification.
1) I saw that transcribe currently is limited to recordings of 2 minutes, so if I set Transcribe to true, if the call goes on longer than 2 minutes there won't be a transcript but the recording will be saved?
2) Is it possible to just dial a number and record the audio without having to be connected to an "agent"?

Twilio developer evangelist here.
Yes, you're right. The recording will still be saved and you will receive a warning written to your debug log. You can transcribe entire calls up to 4 hours long using a couple of add-ons that are available in the Twilio add-on marketplace.
There are a number of ways to record a call.
<Record> in TwiML
<Dial record> in TwiML
<Conference record> in TwiML
Record=true in Outbound REST API
Enabling recording on elastic SIP Trunk in Console
If you are looking to record a whole call, then setting Record=true when creating a call.
If you are doing this for an incoming call, then you can't record the entire call, but that's where setting record on <Dial> or <Conference> or using the <Record> element comes into play. <Dial> or <Conference> likely include an agent, so <Record> is still what you're looking for here.
Let me know if that helps at all.

Related

Twilio Stream only when the call has been received

I am using twiml bin attached to one of my twilio numbers.
When a person calls that number it should be able to dial multiple numbers. I want to stream the call only when the call has been picked up. There can be multiple ongoing streams associated with a twilio number.
<Response>
<Start>
<Stream track="both_tracks" url="wss://XXXX.ngrok.io /twilio-stream">
</Stream>
</Start>
<Dial answerOnBridge="true" >
<Number>+91XXXXXXXXX</Number>
<Number>+91XXXXXXXXX</Number>
</Dial>
</Response>
The above twiml starts the stream as soon as the number is dialed. I want it to start the stream only when the call is received at the other end.
Unfortunately, there isn't a way to do this today, without REST API endpoint control.
You can use the REST API Calls resource to initiate calls intead. The approach you are taking doesn't work very well when the dialed parties are mobile end-points in poor coverage areas and/or devices with voicemail enabled.

Dual-Channel Recording Using Twilio?

I have been trying to record 2 channels using Twilio by setting up a conference call. This is what I have implemented:
<Response>
<Say>Your call is being recorded</Say>
<Dial record="record-from-answer-dual" timeLimit="330" trim="trim-silence">
<Conference waitUrl="">
Conference Room
</Conference>
</Dial>
</Response>
How it works is that I will call the twilio number first. then add another number to the call so its 3 way, with the twilio number being silence. I found I am not getting 2 separate channel between the 2 speaker. Instead, I think Twilio is using itself as one of the channel, and the original caller as the other. Is there a way to configure so that we can get triple channel to include or a way to set it so it doesn't consider itself as a channel?
Twilio developer evangelist here.
When you use record-from-answer-dual with a <Conference> the documentation says:
If a dual-channel recording option is used for a <Dial> with a nested <Conference>, the resulting recording file will have two channels. The parent leg (inbound caller) is represented in the first channel. The second channel includes the audio coming downstream from the conference.
There is not currently a way to make a triple channel recording.

Problems with verb Record timeout when calling an IVR

We're trying to use Twilio to create an automated test framework for those IVRs.
We do an outbound call from Twilio to the IVR, use the verb Say/Play to interact with the IVR and we're using Record to capture what the IVR is saying, latter we transcribe it and make the assertions.
When I ask Twilio to call a phone number and I pretend to be the IVR, everything works perfectly. But when I ask Twilio to call the real IVR, apparently the Record verb can't recognize the pauses, when the IVR stops talking and is waiting for some input.
We tried tweak the timeout attribute but no luck, it records everything and only when the IVR ends the call, Twilio give me the callback with the entire recording. We want each interaction with the IVR in a separate audio, the way we have when I'm pretending.
Here is an example of the TwiML with the Record verb:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Record action="http://foo/nextStep"
method="POST"
playBeep="false"
recordingStatusCallback="http://foo/recordStatus"
timeout="2"
transcribe="false"
trim="do-not-trim" />
</Response>
Twilio developer evangelist here.
Rather than using <Record> for this, I would recommend using <Gather input="speech">. The intention of speech input with <Gather> is to react to input to build a voice enabled IVR, but I can only imagine that it will work better in this testing scenario too. It will live transcribe the results for you in place of returning the recordings for you.
Let me know if that helps.

Is there any way to retrieve multiple records from a Twilio call?

I would like to know if there is anyway to retrieve multiple record from a twilio call. What I am trying to do is to get voice responses records from my users.Once I have those I would apply my own NLP software to do some Speech to text.For now what I got is a TWIml bin doing then a then in action url I would like to do something to do a new and a new everything in the same call.
Twilio developer evangelist here.
Every time you use <Record> during a call and the recording completes, the URL of that recording is sent to the recordingStatusCallback attribute that you can set on the TwiML.
Once the call is complete, you can also use the Twilio REST API to retrieve all the recordings for a call.
I'm not sure what else you were asking. I hope this helps.

Twilio: pro-actively initiate daily, pre-scheduled conference calls?

Scenario is this (I think #2 below is the key question/unknown):
User1 & User2 have provided a mutual daily scheduled time (and their phone numbers of course) for when they want to initiate a phone call between each other.
Twilio calls User1 & User2 to initiate the daily conference call each day at the designated time
Conference call is initiated once both parties pick up.
Conference call ends after either hangs up.
FYI: conference call is only a maximum of 5 minutes.
Thanks!
Twilio developer here.
You can definitely build outbound conference calls like this with Twilio.
Building an application like this is a two step process:
First, you need to initiate an outbound call to each participant using the Twilio REST API. This page in our documentation has instructions and code samples for most popular programming languages:
https://www.twilio.com/docs/api/rest/making-calls
When you make that outbound call, you will need to supply a url parameter in your POST request to https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls.
That URL should point to a part of your application that responds with TwiML, Twilio's markup language. The TwiML you need is pretty simple:
<Response>
<Dial>
<Conference>Daily call</Conference>
</Dial>
</Response>
You can find more sample TwiML responses for conference calls in our official docs:
https://www.twilio.com/docs/api/twiml/conference#examples
I hope that helps!

Resources