我在Rails 4应用程序中有以下代码
call = client.account.calls.create(
from: Rails.application.secrets.twilio_voice_number,
to: phone_number,
url: NGROK + question_path(question.id, @questionaire.notification.id),
method: 'GET',
statusCallback: NGROK + call_status_path(@questionaire.notification.id),
statusCallbackEvent: [:ringing, :answered, :completed]
)
这一切都有效。我的statusCallback
正在解雇,我可以阅读params[:CallStatus]
来获取状态。我在Twilio文档中读到,我还可以确定是否发生了以下任何一种情况
busy
,no-answer
,cancelled
或failed
我该怎么做?