TelephonyManagerRpc
This RPC class provides a set of endpoints for managing telephony features, primarily focused on assigning and retrieving extensions for users and agents through the Omnix platform. It acts as a bridge to the OmnixConnectorService, ensuring that telephony features are available before processing requests.
Endpoints
POST /api/rpc (Method: TelephonyManagerRpc.getAvailableExtensions)
Description: Retrieves a list of available telephony extensions from Omnix.
Request Body:
{ "method": "TelephonyManagerRpc.getAvailableExtensions", "params": {} }Parameters:
Name Type Required Description This method takes no parameters. Response:
{ "success": true, "data": { // Example: ["101", "102", "201"] } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TelephonyManagerRpc.getAvailableExtensions", "params": {} }'
POST /api/rpc (Method: TelephonyManagerRpc.assignAgentExtension)
Description: Assigns a specified extension to an agent in Omnix.
Request Body:
{ "method": "TelephonyManagerRpc.assignAgentExtension", "params": { "agentContactId": "string", "extension": "string", "agentConfigId": "string" } }Parameters:
Name Type Required Description agentContactIdStringNo The internal contact ID of the agent. This parameter is optional and typically not used by the remote API, which requires agentConfigId.extensionStringYes The extension to assign. agentConfigIdStringNo The configuration ID of the agent in Omnix. This is the identifier used by the remote API for assignment. Response:
{ "success": true, "data": { // The response from Omnix, typically an acknowledgment of the assignment. } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TelephonyManagerRpc.assignAgentExtension", "params": { "agentConfigId": "agent_config_123", "extension": "101" } }'
POST /api/rpc (Method: TelephonyManagerRpc.assignUserExtension)
Description: Assigns a specified extension to an application user in Omnix.
Request Body:
{ "method": "TelephonyManagerRpc.assignUserExtension", "params": { "appUserId": "string", "extension": "string" } }Parameters:
Name Type Required Description appUserIdStringYes The ID of the application user. extensionStringYes The extension to assign. Response:
{ "success": true, "data": { // The response from Omnix, typically an acknowledgment of the assignment. } }**Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TelephonyManagerRpc.assignUserExtension", "params": { "appUserId": "user_abc", "extension": "202" } }'
POST /api/rpc (Method: TelephonyManagerRpc.disassociateUserExtension)
Description: Disassociates an extension from a user in Omnix.
Request Body:
{ "method": "TelephonyManagerRpc.disassociateUserExtension", "params": { "extension": "string" } }Parameters:
Name Type Required Description extensionStringYes The extension to disassociate. Response:
{ "success": true, "data": { // The response from Omnix, typically an acknowledgment of the disassociation. } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TelephonyManagerRpc.disassociateUserExtension", "params": { "extension": "202" } }'
POST /api/rpc (Method: TelephonyManagerRpc.disassociateAgentExtension)
Description: Disassociates an extension from an agent in Omnix.
Request Body:
{ "method": "TelephonyManagerRpc.disassociateAgentExtension", "params": { "extension": "string" } }Parameters:
Name Type Required Description extensionStringYes The extension to disassociate. Response:
{ "success": true, "data": { // The response from Omnix, typically an acknowledgment of the disassociation. } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TelephonyManagerRpc.disassociateAgentExtension", "params": { "extension": "101" } }'
POST /api/rpc (Method: TelephonyManagerRpc.getExtensionsForUser)
Description: Gets assigned extensions for a specific user from Omnix.
Request Body:
{ "method": "TelephonyManagerRpc.getExtensionsForUser", "params": { "appUserId": "string" } }Parameters:
Name Type Required Description appUserIdStringYes The ID of the application user. Response:
{ "success": true, "data": { // Example: ["202", "203"] } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TelephonyManagerRpc.getExtensionsForUser", "params": { "appUserId": "user_abc" } }'
POST /api/rpc (Method: TelephonyManagerRpc.getExtensionsForAgent)
Description: Gets assigned extensions for a specific agent from Omnix.
Request Body:
{ "method": "TelephonyManagerRpc.getExtensionsForAgent", "params": { "agentContactId": "string" } }Parameters:
Name Type Required Description agentContactIdStringYes The contact ID of the agent in Omnix. Response:
{ "success": true, "data": { // Example: ["101", "102"] } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TelephonyManagerRpc.getExtensionsForAgent", "params": { "agentContactId": "agent_contact_456" } }'