Class CallCdrController

java.lang.Object
com.bytedesk.call.cdr.CallCdrController

@RestController @RequestMapping("/freeswitch/api/v1/cdr") @ConditionalOnProperty(name="bytedesk.call.freeswitch.enabled", havingValue="true") public class CallCdrController extends Object
Call通话详单REST API控制器
  • Field Details

  • Constructor Details

    • CallCdrController

      public CallCdrController()
  • Method Details

    • getCdrList

      @GetMapping public org.springframework.http.ResponseEntity<?> getCdrList(@RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="20") int size, @RequestParam(defaultValue="startStamp") String sort, @RequestParam(defaultValue="desc") String direction, @RequestParam(required=false) String callerNumber, @RequestParam(required=false) String destinationNumber, @RequestParam(required=false) @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") ZonedDateTime startTime, @RequestParam(required=false) @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") ZonedDateTime endTime, @AuthenticationPrincipal UserEntity currentUser)
      获取通话详单列表
    • getCdrById

      @GetMapping("/{id}") public org.springframework.http.ResponseEntity<?> getCdrById(@PathVariable Long id)
      根据ID获取CDR详情
    • getCdrByUid

      @GetMapping("/uuid/{uuid}") public org.springframework.http.ResponseEntity<?> getCdrByUid(@PathVariable String uid)
      根据UUID获取CDR详情
    • deleteCdr

      @DeleteMapping("/{id}") public org.springframework.http.ResponseEntity<?> deleteCdr(@PathVariable Long id, @AuthenticationPrincipal UserEntity currentUser)
      删除CDR记录
    • getCdrByCallerNumber

      @GetMapping("/caller/{callerNumber}") public org.springframework.http.ResponseEntity<?> getCdrByCallerNumber(@PathVariable String callerNumber)
      根据主叫号码查询通话记录
    • getCdrByDestinationNumber

      @GetMapping("/destination/{destinationNumber}") public org.springframework.http.ResponseEntity<?> getCdrByDestinationNumber(@PathVariable String destinationNumber)
      根据被叫号码查询通话记录
    • getRecentCalls

      @GetMapping("/recent") public org.springframework.http.ResponseEntity<?> getRecentCalls(@RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="20") int size)
      获取最近通话记录
    • getAnsweredCalls

      @GetMapping("/answered") public org.springframework.http.ResponseEntity<?> getAnsweredCalls()
      获取已应答的通话记录
    • getRecordedCalls

      @GetMapping("/recorded") public org.springframework.http.ResponseEntity<?> getRecordedCalls()
      获取有录音文件的通话记录
    • getCallStatistics

      @GetMapping("/statistics") public org.springframework.http.ResponseEntity<?> getCallStatistics(@RequestParam @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") ZonedDateTime startTime, @RequestParam @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") ZonedDateTime endTime)
      获取通话统计信息
    • cleanupOldCdr

      @DeleteMapping("/cleanup") public org.springframework.http.ResponseEntity<?> cleanupOldCdr(@RequestParam int daysToKeep, @AuthenticationPrincipal UserEntity currentUser)
      清理过期的CDR记录