Skip to main content

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

  1. Authentication
    • Uniconnect Enterprise calls the 3CX web login API for authentication.
  2. 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.
  3. 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.
  4. Event Notifications
    • The 3CX wrapper sends real-time event notifications to Uniconnect Enterprise using a TCP socket connection.

Uniconnect Edge

  1. 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.
  2. WebSockets
    • Listens for event notifications, including status changes and conference participant updates.
  3. SIP Connection
    • Directly connects to 3CX PBX over SIP for call handling.

API Specifications

Uniconnect - 3CX API Integrations

  1. Sign In

    • Description: Authenticates a user by extension and password to obtain an access token.
    • URL: /webclient/api/Login/GetAccessToken (V20_3CX)
    • Method: POST
  2. Get User Details

    • Description: Retrieves details of the authenticated user using a token.
    • URL: /xapi/v1/MyUser (V20_3CX)
    • Method: GET
  3. Get User Details by Extension

    • Description: Fetches user details by extension from the local 3CX server.
    • URL: /users/{extension} (IP_3CX)
    • Method: GET
  4. 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
  5. Super Admin Sign In

    • Description: Authenticates as super admin using client credentials to obtain a system token.
    • URL: /connect/token (V20_3CX)
    • Method: POST
  6. 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
  7. Get Current Caller

    • Description: Retrieves all current calls from the local 3CX server.
    • URL: /showallcallsjson (IP_3CX)
    • Method: GET
  8. Get Current Call ID

    • Description: Finds the current call ID for a user and destination extension.
    • URL: Uses getCurrentCaller internally (IP_3CX)
    • Method: GET
  9. Blind Transfer

    • Description: Transfers a call to another extension without consultation.
    • URL: /transferbyid/{callId}/{destinationExtension} (IP_3CX)
    • Method: GET
  10. Attended Transfer

    • Description: Transfers a call to another extension with consultation.
    • URL: /join/{extension}/{fromCallId}/{toCallId} (IP_3CX)
    • Method: GET
  11. Conference Call

    • Description: Transfers multiple calls to a conference room.
    • URL: /transferbyid/{callId}/{conferenceRoomId}**{userExtension} (IP_3CX)
    • Method: GET
  12. Get All Conferences

    • Description: Retrieves all conference logs for a user.
    • URL: /logconference (IP_3CX)
    • Method: GET
  13. Get Conference By ID

    • Description: Fetches conference details by conference ID.
    • URL: /confparty/show/{id} (IP_3CX)
    • Method: GET
  14. Drop Conference

    • Description: Drops all participants from a conference.
    • URL: /confparty/dropall/{id} (IP_3CX)
    • Method: DELETE
  15. Update Conference

    • Description: Updates conference actions for a participant.
    • URL: /confparty/{action}/{id}/{participantId} (IP_3CX)
    • Method: POST
  16. Add Participant

    • Description: Adds a participant to a conference.
    • URL: /confparty/add/{id}/{number} (IP_3CX)
    • Method: POST
  17. Get 3CX Agent Status

    • Description: Retrieves the status of a 3CX agent by extension.
    • URL: /getstatus/{extension} (IP_3CX)
    • Method: GET
  18. Set Agent Status on 3CX

    • Description: Sets the status of a 3CX agent.
    • URL: /setstatus/{extension}/{status} (IP_3CX)
    • Method: GET
  19. Get All 3CX Status

    • Description: Retrieves the status of all 3CX agents.
    • URL: /getallstatuses (IP_3CX)
    • Method: GET
  20. User Update Non-Tunnel Connection

    • Description: Updates user's tunnel connection settings.
    • URL: /xapi/v1/Users({userId}) (V20_3CX)
    • Method: PATCH
  21. 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
  22. Get 3CX Config

    • Description: Retrieves system parameters from 3CX.
    • URL: /xapi/v1/Defs/Pbx.GetSystemParameters() (V20_3CX)
    • Method: GET
  23. Add IP Phone Config

    • Description: Updates IP phone configuration for a user.
    • URL: /xapi/v1/Users({userId}) (V20_3CX)
    • Method: PATCH
  24. 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
  25. Active Call Count

    • Description: Retrieves the count of active calls.
    • URL: /callcount (IP_3CX)
    • Method: GET
  26. Write Audio to Stream

    • Description: Pushes audio buffer to a participant's stream.
    • URL: /callcontrol/{v20ClientId}/participants/{participant_id}/stream (V20_3CX)
    • Method: POST
  27. Listen Stream

    • Description: Listens to a participant's audio stream.
    • URL: /callcontrol/{v20ClientId}/participants/{participant_id}/stream (V20_3CX)
    • Method: GET
  28. Set Ring My Mobile

    • Description: Enables or disables mobile ringing for an extension.
    • URL: /enablemobilering/{extension}/{enableRingingValue} (IP_3CX)
    • Method: GET
  29. Set 3CX Presence Status

    • Description: Sets the presence status for an extension.
    • URL: /setstatus/{extension}/{status} (IP_3CX)
    • Method: GET
  30. Set Queue Login Status

    • Description: Sets login status for a queue agent.
    • URL: /queueloginout/{extension}/{isLogin} (IP_3CX)
    • Method: GET
  31. Get Live Calls With User

    • Description: Retrieves live calls with user information.
    • URL: /callslistwithusers (IP_3CX)
    • Method: GET
  32. Set External Call Enable/Disable

    • Description: Enables or disables external call capability for an extension.
    • URL: /setexternalcall/{extension}/{isEnabled} (IP_3CX)
    • Method: GET
  33. Get User Devices

    • Description: Retrieves devices associated with a user extension.
    • URL: /getdevicesbyextension/{extension} (IP_3CX)
    • Method: GET
  34. Queue Stats

    • Description: Retrieves queue statistics for an extension.
    • URL: Uses getLiveCallsWithUser internally (IP_3CX)
    • Method: GET
  35. Get Trunks

    • Description: Retrieves trunk information for campaigns.
    • URL: /xapi/v1/Trunks?$select=Id,Gateway,IsOnline,DidNumbers (V20_3CX)
    • Method: GET
  36. Save Outbound Rule

    • Description: Creates or updates outbound rules for campaigns.
    • URL: /xapi/v1/OutboundRules (V20_3CX)
    • Method: POST or PATCH
  37. Delete Outbound Rule

    • Description: Deletes outbound rules for campaigns.
    • URL: /xapi/v1/OutboundRules({outboundRuleId}) (V20_3CX)
    • Method: DELETE