问题描述
我正在对此路由发出请求,当我尝试将呼叫从另一条路由重定向到此路由时,这给我应用程序错误,我不知道为什么。
app.post("/en/name",(request,response) => {
const twiml = new twilio.twiml.VoiceResponse();
console.log(request.body.Digits);
if(id == request.body.Digits){
// Create TwiML response
const gather = twiml.gather({
numDigits: 1,action: "https://stormy-everglades-64562.herokuapp.com/en/name/verify",});
gather.say(
`Does your name starts with ${name.charat(0)},if yes,press 1. if no,press 2`
);
// If the user doesn't enter input,loop
twiml.redirect("https://stormy-everglades-64562.herokuapp.com/en/name");
}else{
const gather = twiml.gather({
numDigits: 8,action: "https://stormy-everglades-64562.herokuapp.com/en/name",});
gather.say("id number you entered was incorrect. Please,enter your 8 digit id number.");
}
// res.set('Content-Type','text/xml');
response.type("text/xml");
response.send(twiml.toString());
});
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)