根据可编程语音文档; if Twilio receives an empty recording, it will not make a request to the 'action' URL. The current call flow will continue with the next verb in the current TwiML document.
我已经(尝试)编写了我的代码,以便提示用户进行录音,如果在录音期间没有检测到语音,他们会收到另一个提示,根据以下代码:
[HttpPost]
public ActionResult Index()
{
var response = new VoiceResponse();
response.Say("hello, how can I help you today?");
response.Record(action: Url.ActionUri("Show", "Voice"), playBeep: false, finishOnKey:"1");
response.Say("please try again")
return TwiML(response);
}
[HttpPost]
public ActionResult Show(string RecordingUrl)
{
...
}
但是,即使用户在通话录音时不说话,它也会 POST 到,ActionResult Show()
尽管文档说明它应该这样做response.Say("please try again")
。我是否错误地解释了文档?我怎样才能解决这个问题?
谢谢