Reputation: 11944
Trying to use Twilio to receive an incoming call and ask the caller to leave a message.
For the most part, this is working fine. However, the documentation eludes to being able to receive a webhook callback that will contain details of the recorded call - I want this so I can download the audio file and do what I need with it.
I've installed the Twilio.AspNet.Mvc
nuget package (version 5.0.2), and my a call comes in
webhook points to an MVC controller action that does this:
[HttpPost]
public ActionResult Index()
{
var response = new VoiceResponse();
response.Say("Thank you for calling. Please leave a message.");
response.Record(playBeep: true);
response.Hangup();
return new TwiMLResult(response);
}
So far, so good. I call the number, and leave the message.
Now, in some of the documentation, the Record
is supposed to take in a recording status callback URL, but there is no parameter available in response.Record()
.
I've also set the call status changes
webhook and captured the detail that is returned, but it only gives me details about the call (e.g. who from and duration) - there is no URL from where I can download the recording.
I know I can return a formatted TwiML document to do this (https://www.twilio.com/docs/api/twiml/record) via the recordingStatusCallback
attribute, but is something missing from the nuget library, or am I missing something?
Upvotes: 2
Views: 424
Reputation: 73075
Twilio developer evangelist here.
You say that you're using Twilio.AspNet.Mvc
version 5.0.2, but that has a dependency on the Twilio
nuget package. You'll need to make sure you're using the latest version of the Twilio package too, that is 5.5.0, which includes the recordingStatusCallback
parameter for response.Record()
.
Let me know if that helps at all.
Upvotes: 1