以下是我对这两种方法的代码 -
GatherCall正在返回 Twiml 仍然我得到 HTTP 415 和相同的StatusCallback方法。有人可以在这里帮忙吗?我什至无法使用 ngrok 对此进行测试,因为隧道工具在我的组织网络中不起作用。我正在使用 Azure 通过记录所有内容来测试这个。
public TwiMLResult GatherCall([FromRoute] string id, [FromBody] VoiceRequest voiceRequest )
{
_logger.LogInformation("*****************GatherCall - Start****************");
var response = new VoiceResponse();
try
{
_logger.LogInformation("Gather call back for -" + id);
_logger.LogInformation("VoiceRequest parameters-------------------------");
_logger.LogInformation("CallSid : " + voiceRequest.CallSid);
_logger.LogInformation("CallStatus : " + voiceRequest.CallStatus);
_logger.LogInformation("AccountSid : " + voiceRequest.AccountSid);
_logger.LogInformation("From : " + voiceRequest.From);
_logger.LogInformation("To : " + voiceRequest.To);
_logger.LogInformation("Digits : " + voiceRequest.Digits);
_logger.LogInformation("Direction : " + voiceRequest.Direction);
_logger.LogInformation("TranscriptionText …Run Code Online (Sandbox Code Playgroud)