diff --git a/icshttp/handler.go b/icshttp/handler.go index b37af73..bb2124e 100644 --- a/icshttp/handler.go +++ b/icshttp/handler.go @@ -181,7 +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" { + if request.Method == "INIT" { response.ResultCode = conf.ExceptTest.TestInfo.ResultCode response.Token = conf.ExceptTest.TestInfo.Token response.Action = conf.ExceptTest.TestInfo.Action @@ -198,7 +198,7 @@ func (s *ScenarioSession) BOTPFunc(w http.ResponseWriter, r *http.Request) { response.Data.BargeIn = "" response.Data.RecodingFile = "" response.Data.SttMaxTime = 10 - } else if request.TalkText == "" { + } else if request.Method != "INIT" && request.TalkText == "" { response.ResultCode = 200 response.Token = request.Token if s.session[request.Token].NotUnderstand == 3 {