1

您如何建议将 Twilio 通话录音与通话相关联?

是否有显示录音适用于哪个呼叫的参数?这是文档:https ://www.twilio.com/docs/api/twiml/record

或者在设置下面的记录时,有没有办法从我的应用程序中传递自定义参数,例如“event_id”?

    <Dial hangupOnStar="true">
        <Conference record="record-from-start" eventCallbackUrl="/twilio/receive_recording_url">custom_conference_id from my app</Conference>
    </Dial>
4

1 回答 1

1

Twilio 会将录制 URL 及其请求传递给“操作”URL

<?xml version="1.0" encoding="UTF-8"?>
<!-- page located at http://example.com/voicemail_record.xml -->
<Response>
    <Say>
        Please leave a message at the beep. 
        Press the star key when finished. 
    </Say>
    <Record
        action="http://foo.edu/handleRecording.php"
        method="GET"
        maxLength="20"
        finishOnKey="*"
        />
    <Say>I did not receive a recording</Say>
</Response> 

http://foo.edu/handleRecording.php将通过 GET 接收:

  • RecordingUrl:录制音频的 URL
  • RecordingDuration:录制音频的持续时间(以秒为单位)
于 2015-04-20T21:27:18.857 回答