Class CallController

java.lang.Object
com.bytedesk.call.config.CallController

@RestController @RequestMapping("/test/api/freeswitch") @ConditionalOnProperty(prefix="bytedesk.call.freeswitch", name="enabled", havingValue="true", matchIfMissing=false) public class CallController extends Object
Call REST API控制器
  • Field Details

    • freeSwitchService

      private final CallService freeSwitchService
  • Constructor Details

    • CallController

      public CallController()
  • Method Details

    • getStatus

      @GetMapping("/status") public org.springframework.http.ResponseEntity<Map<String,Object>> getStatus()
      http://127.0.0.1:9003/test/api/freeswitch/status 获取Call状态
    • originate

      @PostMapping("/call/originate") public org.springframework.http.ResponseEntity<Map<String,Object>> originate(@RequestParam String caller, @RequestParam String destination, @RequestParam(defaultValue="default") String context)
      http://127.0.0.1:9003/test/api/freeswitch/call/originate?caller=sip:1001@14.103.165.199&amp;amp;destination=sip:1002@14.103.165.199 发起呼叫
    • hangup

      @PostMapping("/call/hangup") public org.springframework.http.ResponseEntity<Map<String,Object>> hangup(@RequestParam String uuid, @RequestParam(required=false) String cause)
      挂断呼叫
    • answer

      @PostMapping("/call/answer") public org.springframework.http.ResponseEntity<Map<String,Object>> answer(@RequestParam String uuid)
      应答呼叫
    • transfer

      @PostMapping("/call/transfer") public org.springframework.http.ResponseEntity<Map<String,Object>> transfer(@RequestParam String uuid, @RequestParam String destination, @RequestParam(defaultValue="default") String context)
      转接呼叫
    • playback

      @PostMapping("/call/playback") public org.springframework.http.ResponseEntity<Map<String,Object>> playback(@RequestParam String uuid, @RequestParam String filePath)
      播放语音
    • startRecord

      @PostMapping("/call/record/start") public org.springframework.http.ResponseEntity<Map<String,Object>> startRecord(@RequestParam String uuid, @RequestParam String filePath)
      开始录音
    • stopRecord

      @PostMapping("/call/record/stop") public org.springframework.http.ResponseEntity<Map<String,Object>> stopRecord(@RequestParam String uuid, @RequestParam String filePath)
      停止录音
    • sendDtmf

      @PostMapping("/call/dtmf") public org.springframework.http.ResponseEntity<Map<String,Object>> sendDtmf(@RequestParam String uuid, @RequestParam String digits)
      发送DTMF
    • getChannels

      @GetMapping("/channels") public org.springframework.http.ResponseEntity<Map<String,Object>> getChannels()
      获取活动通道
    • getCallsCount

      @GetMapping("/calls/count") public org.springframework.http.ResponseEntity<Map<String,Object>> getCallsCount()
      获取活动呼叫数量
    • executeCommand

      @PostMapping("/api/execute") public org.springframework.http.ResponseEntity<Map<String,Object>> executeCommand(@RequestParam String command, @RequestParam(required=false) String args)
      执行自定义API命令