我有一個用戶呼叫我的Twilio號碼,然後Twilio嘗試連接呼叫者與代理的用例。當代理人#拿起我使用ScreenCall過程,以確保它是一個人,他們必須按數字。問題是,只要進入ScreenCall過程,一切都在代理端工作,但是當他們按下一個數字時,調用者就不會連接到它們。ScreenCall進程不連接呼叫
我錯過了什麼?只要代理人應答,我一旦刪除屏幕呼叫,呼叫者和座席就會立即連接。
public ActionResult CallAgents(string From, string To, string CallSid)
{
var response = "<Response><Dial action = '" + Url.Action("EndCall", "Call") + "'>
<Number action = '" + Url.Action("ScreenCall", "Call") + "'>1231231234</Number></Dial></Response>";
return new TwiMLResult(response);
}
public ActionResult ScreenCall(string From, string To, string CallSid)
{
var response = new TwilioResponse();
response.BeginGather(new { action = "AnswerCall", numDigits = 1 })
.Say("Press any key to accept the call.")
.EndGather();
return new TwiMLResult(response);
}
public ActionResult AnswerCall(string From, string To, string CallSid)
{
var response = new TwilioResponse().Say("Thank you, you are now being connected.").Record();
return new TwiMLResult(response);
}
我試着開關了這一點,但沒有更改。 – ToddB
發現問題。一旦screenCall處理完畢並且有人接受了該呼叫,它就會發出「記錄」命令。通過支持樣本做的事情來證明我不是。 – ToddB