Uniconnect Enterprise & 3CX Ecosystem
Overview
The integration between Uniconnect Enterprise, Uniconnect Edge, and 3CX provides a seamless communication experience. Uniconnect Enterprise Core Services and Uniconnect Edge interact with 3CX using various mechanisms for authentication, call control, reporting, and event notifications.
Architecture Diagram
Components
3CX Server
- 3CX Cloud PBX: The core telephony system.
- PostgreSQL Database: Stores call records, configurations, and other essential data.
- NGINX with 3CX Web: Provides web-based access to 3CX functionalities.
- Custom 3CX Wrapper: A custom-built module to facilitate Uniconnect integration.
Uniconnect Server
- Uniconnect Enterprise Core Services: The central system that manages integration with 3CX.
- PostgreSQL Database: Stores Uniconnect-specific data and reporting information.
- Cube.js: A data analytics service used for reporting.
Uniconnect Edge
- Uniconnect Edge: Provides an additional interface for users to interact with Uniconnect and 3CX.
Integration Mechanisms
Uniconnect Enterprise
- Authentication
- Uniconnect Enterprise calls the 3CX web login API for authentication.
- Call Control
- Uniconnect Enterprise interacts with the 3CX wrapper via HTTP REST API for call control functions.
- The 3CX wrapper communicates with 3CX Cloud PBX via the Call Control C# API.
- Reporting
- Cube.js aggregates reporting data from both the 3CX PostgreSQL database and Uniconnect PostgreSQL database.
- Uniconnect Enterprise queries Cube.js for analytics and reporting.
- 3CX Cloud PBX sends call data to the 3CX PostgreSQL database.
- Event Notifications
- The 3CX wrapper sends real-time event notifications to Uniconnect Enterprise using a TCP socket connection.
Uniconnect Edge
- REST APIs
- Connects to Uniconnect Enterprise for authentication, configuration, and call transfer/conference functionalities.
- Handles call control via the PBX over the Call Control API.
- WebSockets
- Listens for event notifications, including status changes and conference participant updates.
- SIP Connection
- Directly connects to 3CX PBX over SIP for call handling.
API Specifications
Uniconnect - 3CX API Integrations
-
Sign In
- Description: Authenticates a user by extension and password to obtain an access token.
- URL: /webclient/api/Login/GetAccessToken (V20_3CX)
- Method: POST
-
Get User Details
- Description: Retrieves details of the authenticated user using a token.
- URL: /xapi/v1/MyUser (V20_3CX)
- Method: GET
-
Get User Details by Extension
- Description: Fetches user details by extension from the local 3CX server.
- URL: /users/{extension} (IP_3CX)
- Method: GET
-
Get Call Logs
- Description: Retrieves call logs for a specified period and optional call history ID.
- URL: /xapi/v1/ReportCallLogData/Pbx.GetCallLogData (V20_3CX)
- Method: GET
-
Super Admin Sign In
- Description: Authenticates as super admin using client credentials to obtain a system token.
- URL: /connect/token (V20_3CX)
- Method: POST
-
Get User Meta Details
- Description: Fetches meta details (AuthID, AuthPassword, etc.) for a user extension.
- URL: /xapi/v1/Users?$filter=Number eq '{extension}' (V20_3CX)
- Method: GET
-
Get Current Caller
- Description: Retrieves all current calls from the local 3CX server.
- URL: /showallcallsjson (IP_3CX)
- Method: GET
-
Get Current Call ID
- Description: Finds the current call ID for a user and destination extension.
- URL: Uses getCurrentCaller internally (IP_3CX)
- Method: GET
-
Blind Transfer
- Description: Transfers a call to another extension without consultation.
- URL: /transferbyid/{callId}/{destinationExtension} (IP_3CX)
- Method: GET
-
Attended Transfer
- Description: Transfers a call to another extension with consultation.
- URL: /join/{extension}/{fromCallId}/{toCallId} (IP_3CX)
- Method: GET
-
Conference Call
- Description: Transfers multiple calls to a conference room.
- URL: /transferbyid/{callId}/{conferenceRoomId}**{userExtension} (IP_3CX)
- Method: GET
-
Get All Conferences
- Description: Retrieves all conference logs for a user.
- URL: /logconference (IP_3CX)
- Method: GET
-
Get Conference By ID
- Description: Fetches conference details by conference ID.
- URL: /confparty/show/{id} (IP_3CX)
- Method: GET
-
Drop Conference
- Description: Drops all participants from a conference.
- URL: /confparty/dropall/{id} (IP_3CX)
- Method: DELETE
-
Update Conference
- Description: Updates conference actions for a participant.
- URL: /confparty/{action}/{id}/{participantId} (IP_3CX)
- Method: POST
-
Add Participant
- Description: Adds a participant to a conference.
- URL: /confparty/add/{id}/{number} (IP_3CX)
- Method: POST
-
Get 3CX Agent Status
- Description: Retrieves the status of a 3CX agent by extension.
- URL: /getstatus/{extension} (IP_3CX)
- Method: GET
-
Set Agent Status on 3CX
- Description: Sets the status of a 3CX agent.
- URL: /setstatus/{extension}/{status} (IP_3CX)
- Method: GET
-
Get All 3CX Status
- Description: Retrieves the status of all 3CX agents.
- URL: /getallstatuses (IP_3CX)
- Method: GET
-
User Update Non-Tunnel Connection
- Description: Updates user's tunnel connection settings.
- URL: /xapi/v1/Users({userId}) (V20_3CX)
- Method: PATCH
-
Group User Add/Remove
- Description: Adds or removes agents from ring groups or queues.
- URL: /xapi/v1/RingGroups({groupId}) or /xapi/v1/Queues({groupId}) (V20_3CX)
- Method: PATCH
-
Get 3CX Config
- Description: Retrieves system parameters from 3CX.
- URL: /xapi/v1/Defs/Pbx.GetSystemParameters() (V20_3CX)
- Method: GET
-
Add IP Phone Config
- Description: Updates IP phone configuration for a user.
- URL: /xapi/v1/Users({userId}) (V20_3CX)
- Method: PATCH
-
Make Call
- Description: Initiates a call from an extension to a number, optionally using a device.
- URL: /makecallptop/{extension}/{number} or /makecallwithdevice/{extension}/{number}/{deviceId} (IP_3CX)
- Method: GET
-
Active Call Count
- Description: Retrieves the count of active calls.
- URL: /callcount (IP_3CX)
- Method: GET
-
Write Audio to Stream
- Description: Pushes audio buffer to a participant's stream.
- URL: /callcontrol/{v20ClientId}/participants/{participant_id}/stream (V20_3CX)
- Method: POST
-
Listen Stream
- Description: Listens to a participant's audio stream.
- URL: /callcontrol/{v20ClientId}/participants/{participant_id}/stream (V20_3CX)
- Method: GET
-
Set Ring My Mobile
- Description: Enables or disables mobile ringing for an extension.
- URL: /enablemobilering/{extension}/{enableRingingValue} (IP_3CX)
- Method: GET
-
Set 3CX Presence Status
- Description: Sets the presence status for an extension.
- URL: /setstatus/{extension}/{status} (IP_3CX)
- Method: GET
-
Set Queue Login Status
- Description: Sets login status for a queue agent.
- URL: /queueloginout/{extension}/{isLogin} (IP_3CX)
- Method: GET
-
Get Live Calls With User
- Description: Retrieves live calls with user information.
- URL: /callslistwithusers (IP_3CX)
- Method: GET
-
Set External Call Enable/Disable
- Description: Enables or disables external call capability for an extension.
- URL: /setexternalcall/{extension}/{isEnabled} (IP_3CX)
- Method: GET
-
Get User Devices
- Description: Retrieves devices associated with a user extension.
- URL: /getdevicesbyextension/{extension} (IP_3CX)
- Method: GET
-
Queue Stats
- Description: Retrieves queue statistics for an extension.
- URL: Uses getLiveCallsWithUser internally (IP_3CX)
- Method: GET
-
Get Trunks
- Description: Retrieves trunk information for campaigns.
- URL: /xapi/v1/Trunks?$select=Id,Gateway,IsOnline,DidNumbers (V20_3CX)
- Method: GET
-
Save Outbound Rule
- Description: Creates or updates outbound rules for campaigns.
- URL: /xapi/v1/OutboundRules (V20_3CX)
- Method: POST or PATCH
-
Delete Outbound Rule
- Description: Deletes outbound rules for campaigns.
- URL: /xapi/v1/OutboundRules({outboundRuleId}) (V20_3CX)
- Method: DELETE