|
|
@ -181,13 +181,39 @@ func (s *ScenarioSession) BOTPFunc(w http.ResponseWriter, r *http.Request) {
|
|
|
|
if conf.ExceptTest.TestInfo.Value {
|
|
|
|
if conf.ExceptTest.TestInfo.Value {
|
|
|
|
// eType := conf.ExceptTest.TestInfo.Type
|
|
|
|
// eType := conf.ExceptTest.TestInfo.Type
|
|
|
|
|
|
|
|
|
|
|
|
response.ResultCode = conf.ExceptTest.TestInfo.ResultCode
|
|
|
|
if request.Method != "INIT" {
|
|
|
|
response.Token = conf.ExceptTest.TestInfo.Token
|
|
|
|
response.ResultCode = conf.ExceptTest.TestInfo.ResultCode
|
|
|
|
response.Action = conf.ExceptTest.TestInfo.Action
|
|
|
|
response.Token = conf.ExceptTest.TestInfo.Token
|
|
|
|
response.AnounceMents = conf.ExceptTest.TestInfo.Announcement
|
|
|
|
response.Action = conf.ExceptTest.TestInfo.Action
|
|
|
|
response.Data.BargeIn = conf.ExceptTest.TestInfo.Bargein
|
|
|
|
response.AnounceMents = conf.ExceptTest.TestInfo.Announcement
|
|
|
|
response.Data.RecodingFile = conf.ExceptTest.TestInfo.Recodingfile
|
|
|
|
response.Data.BargeIn = conf.ExceptTest.TestInfo.Bargein
|
|
|
|
response.Data.SttMaxTime = conf.ExceptTest.TestInfo.Sttmaxtime
|
|
|
|
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 {
|
|
|
|
// switch eType {
|
|
|
|
// case "sizeup":
|
|
|
|
// case "sizeup":
|
|
|
|
// response.ResultCode = 200
|
|
|
|
// response.ResultCode = 200
|
|
|
|