Twilio 通话录音时如何添加自定义参数?
How to Add Custom Parameters when Recording Twilio Call?
您建议如何将 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>
Twilio 会将录音 URL 及其请求传递给 "action" 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:录制音频的持续时间(以秒为单位)
您建议如何将 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>
Twilio 会将录音 URL 及其请求传递给 "action" 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:录制音频的持续时间(以秒为单位)