Package com.bytedesk.call.gateway
Class CallGatewayController
java.lang.Object
com.bytedesk.call.gateway.CallGatewayController
@RestController
@RequestMapping("/freeswitch/api/v1/gateways")
@ConditionalOnProperty(name="bytedesk.call.freeswitch.enabled",
havingValue="true")
public class CallGatewayController
extends Object
Call网关管理REST API控制器
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<JsonResult<?>>
checkGatewayNameExists
(String gatewayName) 检查网关名称是否存在org.springframework.http.ResponseEntity<JsonResult<?>>
createGateway
(@Valid CallGatewayRequest request) 创建网关org.springframework.http.ResponseEntity<JsonResult<?>>
deleteGateway
(Long id) 删除网关org.springframework.http.ResponseEntity<JsonResult<?>>
disableGateway
(Long id) 禁用网关org.springframework.http.ResponseEntity<JsonResult<?>>
enableGateway
(Long id) 启用网关org.springframework.http.ResponseEntity<JsonResult<?>>
获取启用的网关列表org.springframework.http.ResponseEntity<JsonResult<?>>
getGateway
(Long id) 获取网关详情org.springframework.http.ResponseEntity<JsonResult<?>>
getGatewayByName
(String gatewayName) 根据名称获取网关org.springframework.http.ResponseEntity<JsonResult<?>>
getGateways
(int page, int size, String sortBy, String sortDir) 获取网关列表(分页)org.springframework.http.ResponseEntity<JsonResult<?>>
getGatewaysByStatus
(String status) 根据状态获取网关列表org.springframework.http.ResponseEntity<JsonResult<?>>
获取网关统计信息org.springframework.http.ResponseEntity<JsonResult<?>>
获取在线的网关列表org.springframework.http.ResponseEntity<JsonResult<?>>
updateGateway
(Long id, @Valid CallGatewayRequest request) 更新网关org.springframework.http.ResponseEntity<JsonResult<?>>
updateGatewayStatus
(Long id, String status) 更新网关状态
-
Field Details
-
gatewayService
-
-
Constructor Details
-
CallGatewayController
public CallGatewayController()
-
-
Method Details
-
createGateway
@PostMapping public org.springframework.http.ResponseEntity<JsonResult<?>> createGateway(@Valid @RequestBody @Valid CallGatewayRequest request) 创建网关 -
getGateway
@GetMapping("/{id}") public org.springframework.http.ResponseEntity<JsonResult<?>> getGateway(@PathVariable Long id) 获取网关详情 -
getGatewayByName
@GetMapping("/name/{gatewayName}") public org.springframework.http.ResponseEntity<JsonResult<?>> getGatewayByName(@PathVariable String gatewayName) 根据名称获取网关 -
getGateways
@GetMapping public org.springframework.http.ResponseEntity<JsonResult<?>> getGateways(@RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="20") int size, @RequestParam(defaultValue="id") String sortBy, @RequestParam(defaultValue="desc") String sortDir) 获取网关列表(分页) -
getEnabledGateways
@GetMapping("/enabled") public org.springframework.http.ResponseEntity<JsonResult<?>> getEnabledGateways()获取启用的网关列表 -
getOnlineGateways
@GetMapping("/online") public org.springframework.http.ResponseEntity<JsonResult<?>> getOnlineGateways()获取在线的网关列表 -
getGatewaysByStatus
@GetMapping("/status/{status}") public org.springframework.http.ResponseEntity<JsonResult<?>> getGatewaysByStatus(@PathVariable String status) 根据状态获取网关列表 -
updateGateway
@PutMapping("/{id}") public org.springframework.http.ResponseEntity<JsonResult<?>> updateGateway(@PathVariable Long id, @Valid @RequestBody @Valid CallGatewayRequest request) 更新网关 -
enableGateway
@PutMapping("/{id}/enable") public org.springframework.http.ResponseEntity<JsonResult<?>> enableGateway(@PathVariable Long id) 启用网关 -
disableGateway
@PutMapping("/{id}/disable") public org.springframework.http.ResponseEntity<JsonResult<?>> disableGateway(@PathVariable Long id) 禁用网关 -
updateGatewayStatus
@PutMapping("/{id}/status") public org.springframework.http.ResponseEntity<JsonResult<?>> updateGatewayStatus(@PathVariable Long id, @RequestParam String status) 更新网关状态 -
deleteGateway
@DeleteMapping("/{id}") public org.springframework.http.ResponseEntity<JsonResult<?>> deleteGateway(@PathVariable Long id) 删除网关 -
getGatewayStats
@GetMapping("/stats") public org.springframework.http.ResponseEntity<JsonResult<?>> getGatewayStats()获取网关统计信息 -
checkGatewayNameExists
@GetMapping("/exists/{gatewayName}") public org.springframework.http.ResponseEntity<JsonResult<?>> checkGatewayNameExists(@PathVariable String gatewayName) 检查网关名称是否存在
-