如何使用 twilio 记录来电
how to record inbound calls with twilio
可以通过将传递给 client.calls.create() API method to have a <Conference>
tag with the record attribute set to true. If recordingStatusCallback 的 TwiML 设置为 URL 来记录 Twilio 中的出站呼叫,它会 post 通知 URL当录音可用时。
如何处理呼入电话?
对于我的特定 phone 号码,对于语音和传真,我已在 twilio.com、"Accept Incoming" 设置为 "Voice Calls"、"Configure With" 设置为"TwiML App" 和 "TwiML App" 设置为我的自定义应用程序。对于该应用程序,我将语音请求 URL 设置为给定的 URL.
当有来电时,我的 TwiML 应用程序会收到一个 HTTP POST,它的响应 <Enqueue>
. Later, a Conference Instruction Reservation is made in the client side javascript with ConferenceRecord set to true and ConferenceRecordingStatusCallback 设置为与 [=13= 相同的 URL ] 用于外呼。
这是我的 "Conference Instruction Reservation" 请求负载的样子:
stdClass Object
(
[url] => https://taskrouter.twilio.com/v1/Workspaces/.../Tasks/.../Reservations/...
[method] => POST
[token] => ...
[params] => stdClass Object
(
[Instruction] => conference
[From] =>
[PostWorkActivitySid] =>
[Timeout] => 10
[To] =>
[EndConferenceOnExit] => true
[EndConferenceOnCustomerExit] => true
[ConferenceStatusCallback] => https://my.domain.tld/twilio/conference
[ConferenceStatusCallbackMethod] => POST
[ConferenceStatusCallbackEvent] => start,end,join,leave,mute,hold
[ConferenceRecord] => true
[ConferenceRecordingStatusCallback] => https://my.domain.tld/twilio/conference/recording
[ConferenceRecordingStatusCallbackMethod] => POST
[ConferenceRecordingStatusCallbackEvent] => completed
)
)
因此,Twilio 多次调用 ConferenceStatusCallback
URL,但从未调用 ConferenceRecordingStatusCallback
URL。
有什么想法吗?
我想知道为什么 "Conference Instruction Reservation" 请求方法不起作用,但调用 client.calls.recordings.create() 就成功了
可以通过将传递给 client.calls.create() API method to have a <Conference>
tag with the record attribute set to true. If recordingStatusCallback 的 TwiML 设置为 URL 来记录 Twilio 中的出站呼叫,它会 post 通知 URL当录音可用时。
如何处理呼入电话?
对于我的特定 phone 号码,对于语音和传真,我已在 twilio.com、"Accept Incoming" 设置为 "Voice Calls"、"Configure With" 设置为"TwiML App" 和 "TwiML App" 设置为我的自定义应用程序。对于该应用程序,我将语音请求 URL 设置为给定的 URL.
当有来电时,我的 TwiML 应用程序会收到一个 HTTP POST,它的响应 <Enqueue>
. Later, a Conference Instruction Reservation is made in the client side javascript with ConferenceRecord set to true and ConferenceRecordingStatusCallback 设置为与 [=13= 相同的 URL ] 用于外呼。
这是我的 "Conference Instruction Reservation" 请求负载的样子:
stdClass Object
(
[url] => https://taskrouter.twilio.com/v1/Workspaces/.../Tasks/.../Reservations/...
[method] => POST
[token] => ...
[params] => stdClass Object
(
[Instruction] => conference
[From] =>
[PostWorkActivitySid] =>
[Timeout] => 10
[To] =>
[EndConferenceOnExit] => true
[EndConferenceOnCustomerExit] => true
[ConferenceStatusCallback] => https://my.domain.tld/twilio/conference
[ConferenceStatusCallbackMethod] => POST
[ConferenceStatusCallbackEvent] => start,end,join,leave,mute,hold
[ConferenceRecord] => true
[ConferenceRecordingStatusCallback] => https://my.domain.tld/twilio/conference/recording
[ConferenceRecordingStatusCallbackMethod] => POST
[ConferenceRecordingStatusCallbackEvent] => completed
)
)
因此,Twilio 多次调用 ConferenceStatusCallback
URL,但从未调用 ConferenceRecordingStatusCallback
URL。
有什么想法吗?
我想知道为什么 "Conference Instruction Reservation" 请求方法不起作用,但调用 client.calls.recordings.create() 就成功了