如何停止异步更新调用完全中断该调用?我希望response.Say("Let me think about that.")
在进行异步调用之前完成,目前它只是停止Say()
动词中间句。
[HttpPost]
public ActionResult Intermediate(string RecordingUrl)
{
recordingUrl = RecordingUrl;
var response = new VoiceResponse();
response.Say("Let me think about that.");
//Asynchronously POST
var call = CallResource.UpdateAsync(
method: Twilio.Http.HttpMethod.Post,
url: new Uri("http://123456789/voice/show"),
pathSid: sessionIdentifier, fallbackUrl: new Uri("http://123456789/voice/Fallback"));
return TwiML(response);
}
答案 0 :(得分:0)
这里是Twilio开发人员的传播者。
为什么不使用对API的请求来更新调用,为什么不直接使用<Redirect>
TwiML element。您可以在<Say>
之后通过以下方式实现重定向:
[HttpPost]
public ActionResult Intermediate(string RecordingUrl)
{
recordingUrl = RecordingUrl;
var response = new VoiceResponse();
response.Say("Let me think about that.");
response.Redirect(new Uri("http://123456789/voice/show"));
return TwiML(response);
}
让我知道这是否有帮助。