| Line 9... |
Line 9... |
| 9 |
import org.springframework.beans.factory.annotation.Autowired;
|
9 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 10 |
import org.springframework.http.MediaType;
|
10 |
import org.springframework.http.MediaType;
|
| 11 |
import org.springframework.http.ResponseEntity;
|
11 |
import org.springframework.http.ResponseEntity;
|
| 12 |
import org.springframework.stereotype.Controller;
|
12 |
import org.springframework.stereotype.Controller;
|
| 13 |
import org.springframework.ui.Model;
|
13 |
import org.springframework.ui.Model;
|
| 14 |
import org.springframework.web.bind.annotation.RequestBody;
|
14 |
import org.springframework.web.bind.annotation.ModelAttribute;
|
| 15 |
import org.springframework.web.bind.annotation.RequestMapping;
|
15 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| 16 |
import org.springframework.web.bind.annotation.RequestMethod;
|
16 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| 17 |
|
17 |
|
| 18 |
import javax.servlet.http.HttpServletRequest;
|
18 |
import javax.servlet.http.HttpServletRequest;
|
| 19 |
import javax.transaction.Transactional;
|
19 |
import javax.transaction.Transactional;
|
| Line 40... |
Line 40... |
| 40 |
// model.addAttribute("response1", mvcResponseSender.createResponseString("GODBLESSYOU"));
|
40 |
// model.addAttribute("response1", mvcResponseSender.createResponseString("GODBLESSYOU"));
|
| 41 |
// return "response";
|
41 |
// return "response";
|
| 42 |
// }
|
42 |
// }
|
| 43 |
|
43 |
|
| 44 |
@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
44 |
@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
| 45 |
public ResponseEntity<?> click2callReportHandlerPost(HttpServletRequest request, Model model, @RequestBody CallDetailModel callDetail) throws Exception {
|
45 |
public ResponseEntity<?> click2callReportHandlerPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
| 46 |
LOGGER.info("first event call detail {}", callDetail);
|
46 |
LOGGER.info("first event call detail {}", callDetail);
|
| 47 |
smartPingService.createAgentRecording(callDetail);
|
47 |
smartPingService.createAgentRecording(callDetail);
|
| 48 |
|
48 |
|
| 49 |
return responseSender.ok(true);
|
49 |
return responseSender.ok(true);
|
| 50 |
}
|
50 |
}
|
| 51 |
|
51 |
|
| 52 |
|
52 |
|
| 53 |
@RequestMapping(value = "/click2call/report-handler/recording-url", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
53 |
@RequestMapping(value = "/click2call/report-handler/recording-url", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
| 54 |
public ResponseEntity<?> click2callReportHandlerUpdateRecordingUrlPost(HttpServletRequest request, Model model, @RequestBody CallDetailModel callDetail) throws Exception {
|
54 |
public ResponseEntity<?> click2callReportHandlerUpdateRecordingUrlPost(HttpServletRequest request, Model model, @ModelAttribute CallDetailModel callDetail) throws Exception {
|
| 55 |
LOGGER.info("update call detail {}", callDetail);
|
55 |
LOGGER.info("update call detail {}", callDetail);
|
| 56 |
smartPingService.updateAgentRecordingUrl(callDetail);
|
56 |
smartPingService.updateAgentRecordingUrl(callDetail);
|
| 57 |
return responseSender.ok(true);
|
57 |
return responseSender.ok(true);
|
| 58 |
}
|
58 |
}
|
| 59 |
}
|
59 |
}
|