매장연결

main
JungJun 2 years ago
parent bcc608a580
commit fccbaadf9d

@ -181,6 +181,7 @@ func (s *ScenarioSession) BOTPFunc(w http.ResponseWriter, r *http.Request) {
if conf.ExceptTest.TestInfo.Value {
// eType := conf.ExceptTest.TestInfo.Type
if request.Method != "INIT" {
response.ResultCode = conf.ExceptTest.TestInfo.ResultCode
response.Token = conf.ExceptTest.TestInfo.Token
response.Action = conf.ExceptTest.TestInfo.Action
@ -188,6 +189,31 @@ func (s *ScenarioSession) BOTPFunc(w http.ResponseWriter, r *http.Request) {
response.Data.BargeIn = conf.ExceptTest.TestInfo.Bargein
response.Data.RecodingFile = conf.ExceptTest.TestInfo.Recodingfile
response.Data.SttMaxTime = conf.ExceptTest.TestInfo.Sttmaxtime
s.session[conf.ExceptTest.TestInfo.Token] = ResStatus{Count: 1, Status: scnarioConf.Order[0], NotUnderstand: 0}
} else if request.TalkText == "ERROR_TTS" || request.TalkText == "ERROR_STT" {
response.ResultCode = 200
response.Token = request.Token
response.AnounceMents = "서비스에 문제가 발생하여 매장으로 연결해드릴게요."
response.Action = "TRANSFER"
response.Data.BargeIn = ""
response.Data.RecodingFile = ""
response.Data.SttMaxTime = 10
} else if request.TalkText == "" {
response.ResultCode = 200
response.Token = request.Token
if s.session[request.Token].NotUnderstand == 3 {
response.AnounceMents = "잘 이해하지 못했습니다. 정확한 상담을 위해 매장으로 연결해드릴게요."
response.Action = "END"
} else {
response.AnounceMents = "잘 이해하지 못했습니다. 다시 말씀해주세요."
response.Action = "STT"
s.session[request.Token] = ResStatus{Count: 1, Status: scnarioConf.Order[0], NotUnderstand: s.session[request.Token].NotUnderstand + 1}
}
response.Data.BargeIn = ""
response.Data.RecodingFile = ""
response.Data.SttMaxTime = 10
}
// switch eType {
// case "sizeup":
// response.ResultCode = 200

Loading…
Cancel
Save