Twilio:会议结束后获取RecordingDuration

时间:2016-03-20 11:38:35

标签: twilio

我正在努力获得会议聊天的记录持续时间。

这就是我想要做的事情:

我有以下View()开始会议:

@{
    var nextPageUrl =  "https://api.mySite.com/ConferenceFinished/"
}

<Response>
   <Dial timeLimit="600">
        <Conference  record="record-from-start"  eventCallbackUrl="@nextPageUrl" endConferenceOnExit="true">
           Room123
        </Conference>
    </Dial>       
</Response>

ConferenceFinished()我正在尝试接收会议记录持续时间:

 public ActionResult ConferenceFinished(int userRequestId, Guid shopUserId)
        {
            var recUrl = Request["RecordingUrl"]; //  successfully received!
            var recordingDuration = Request["RecordingDuration"]; // I am getting nothing!


         }

我收到RecordingUrl,但RecordingDuration为空!

1 个答案:

答案 0 :(得分:0)

Twilio开发者传道者在这里。

会议结束后,实际上并未发送RecordingDuration参数。 The documentation shows that only the RecordingUrl is sent

您可以尝试从文件本身获取录制的长度。对于how to get the length of an audio file,StackOverflow有很好的答案。