CallQueueRpc
CallQueueRpc exposes JSON-RPC methods for working with call queues via TelephonyConnectorService. The class initializes that service once per RPC instance and forwards each request to it with the validated request payload and request context.
Methods
initialize()
This lifecycle method runs the base RPC initialization and then resolves TelephonyConnectorService from the application server for later use by the RPC methods.
getData
This method lists call queues.
Description: Lists call queues through TelephonyManager.
Request Body:
{
"method": "CallQueueRpc.getData",
"params": {
"filter": {},
"sort": {},
"page": 1,
"pageSize": 25
}
}Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
filter |
Object |
No | Optional filter object. The schema accepts any object shape and preserves additional keys. |
sort |
Object |
No | Optional sort object. The schema accepts any object shape and preserves additional keys. |
page |
Number |
No | Page number. Must be a positive integer. Defaults to 1 when omitted. |
pageSize |
Number |
No | Page size. Must be a positive integer. Defaults to 25 when omitted. |
Response:
{
"success": true,
"data": {
"...": "Returned by TelephonyConnectorService.listCallQueues(params, context)"
}
}Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \
-H "Content-Type: application/json" \
-d '{
"method": "CallQueueRpc.getData",
"params": {
"page": 1,
"pageSize": 25
}
}'create
This method creates a new call queue.
Description: Creates a call queue through TelephonyManager.
Request Body:
{
"method": "CallQueueRpc.create",
"params": {
"name": "Support",
"description": "Customer support queue",
"strategy": "ringall",
"musicOnHold": "default",
"timeout": 20,
"members": ["1001", "1002"]
}
}Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
name |
String |
Yes | Call queue name. |
description |
String |
No | Optional description. Nullable. |
strategy |
String |
No | Optional queue strategy. |
musicOnHold |
String |
No | Optional music-on-hold identifier. Nullable. |
timeout |
Number |
No | Optional timeout value. |
members |
Array<String> |
No | Optional list of member identifiers. |
Response:
{
"success": true,
"data": {
"...": "Returned by TelephonyConnectorService.createCallQueue(data, context)"
}
}Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \
-H "Content-Type: application/json" \
-d '{
"method": "CallQueueRpc.create",
"params": {
"name": "Support",
"members": ["1001", "1002"]
}
}'update
This method updates an existing call queue.
Description: Updates a call queue through TelephonyManager.
Request Body:
{
"method": "CallQueueRpc.update",
"params": {
"_id": "queue-id",
"...": "Additional fields accepted by passthrough validation"
}
}Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
_id |
String |
Yes | Identifier of the call queue to update. |
Response:
{
"success": true,
"data": {
"...": "Returned by TelephonyConnectorService.updateCallQueue(data, context)"
}
}Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \
-H "Content-Type: application/json" \
-d '{
"method": "CallQueueRpc.update",
"params": {
"_id": "queue-id"
}
}'delete
This method deletes a call queue by identifier.
Description: Deletes a call queue through TelephonyManager.
Request Body:
{
"method": "CallQueueRpc.delete",
"params": {
"_id": "queue-id"
}
}Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
_id |
String |
Yes | Identifier of the call queue to delete. |
Response:
{
"success": true,
"data": {
"...": "Returned by TelephonyConnectorService.deleteCallQueue(_id, context)"
}
}Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \
-H "Content-Type: application/json" \
-d '{
"method": "CallQueueRpc.delete",
"params": {
"_id": "queue-id"
}
}'findById
This method retrieves a single call queue by identifier.
Description: Finds a call queue through TelephonyManager.
Request Body:
{
"method": "CallQueueRpc.findById",
"params": {
"_id": "queue-id"
}
}Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
_id |
String |
Yes | Identifier of the call queue to retrieve. |
Response:
{
"success": true,
"data": {
"...": "Returned by TelephonyConnectorService.getCallQueueById(_id, context)"
}
}Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \
-H "Content-Type: application/json" \
-d '{
"method": "CallQueueRpc.findById",
"params": {
"_id": "queue-id"
}
}'