0

如何阻止异步更新调用完全中断调用?我想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);
    }
4

1 回答 1

0

Twilio 开发人员布道者在这里。

与其使用对 API 的请求来更新调用,不如只使用<Redirect>TwiML 元素。您可以在<Say>with 之后实现重定向:

[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);
}

让我知道这是否有帮助。

于 2018-07-16T04:54:39.803 回答