使用recordingStatusCallback将twilio录音保存到数据库

问题描述 投票:0回答:1

我需要在拨打电话时将包括音频文件在内的通话记录详细信息保存到数据库中。

这是我的twiML文件。

<Response>
    <Dial record="record-from-ringing-dual" recordingStatusCallback="https://example.com/record_data.php" action="https://example.com/test.php" callerId="xxxxxxxxxx">
          xxxxxxxxxx
    </Dial>
</Response>

我应该在record_data.php文件中做什么来将记录的详细信息保存到数据库中?

谁可以帮我这个事?提前致谢。

php twilio twilio-api twilio-php
1个回答
0
投票

Twilio开发者传道者在这里。

当你收到recordingStatusCallback webhook时,Twilio将发送following parameters in the body of the request

AccountSid          The unique identifier of the Account responsible for this recording.
CallSid             A unique identifier for the call associated with the recording. This will always refer to the parent leg of a two leg call.
RecordingSid        The unique identifier for the recording.
RecordingUrl        The URL of the recorded audio.
RecordingStatus     The status of the recording. Possible values are: completed.
RecordingDuration   The length of the recording, in seconds.
RecordingChannels   The number of channels in the final recording file as an integer. Possible values are 1, 2.
RecordingSource     The type of call that created this recording. For recordings initiated when record is set on <Dial>, DialVerb is returned.

RecordingUrl是您可以从自己的服务器上下载录音的地方。

如果有帮助,请告诉我。

© www.soinside.com 2019 - 2024. All rights reserved.