3CX WebAPI

A web service that runs on the server where 3CX is installed. This service receives http requests, processes them using the 3CX software API and provides responses to received http requests in json format.

3CX REST API

3CX REST API

Use REST API to get IVR, Queue and Extension status of your 3CX

GET

Get the statuses of the user's extension number

SET

Set the user status, enter the user into the queue

Windows and Debian

Use a build for Windows or Debian with the same functionality

Install as a Service

Install as a service (daemon) on your 3CX server and use.

Make call API

Use the URL request to make an outgoing call

Pricing 3CX WebAPI

Pricing is based on the number of concurrent calls required (SC). This includes internal and external calls 3CX.

  • WebAPI 4 SC
    $ 149
  • WebAPI 8 SC
    $ 199
  • WebAPI 16 SC
    $ 299
  • WebAPI 24 SC
    $ 399
  • WebAPI 32 SC
    $ 499
  • WebAPI 48 SC
    $ 599
  • WebAPI 64 SC
    $ 799
  • WebAPI 96 SC
    $ 999
  • WebAPI 128 SC
    $ 1 399
  • WebAPI 192 SC
    $ 1 799
  • WebAPI 256 SC
    $ 1 999
  • WebAPI 512 SC
    $ 2 999
  • WebAPI 1024 SC
    $ 3 999

The price doesn’t include any taxes or VAT.

Technical features

List of GET requests for the 3CX REST API

Get the current number of calls passing through the PBX
pbx.calls.get

Get detailed information about all currently active connections
pbx.ac.get

answer:

  • count – total number of active connections (calls passing through the PBX)
    AConnByCallID – list of active connections:
  • CallID – Call ID
    direction – the direction of the call. Possible values:
  • FromExternal – the call came from an external line, but it hasn’t been distributed yet
  • FromInternal – the call came from an internal number, but it hasn’t been distributed yet
  • Inbound-call from an external line to an internal number
  • Outbound-call from an internal number to an external line
  • External-call from an external line to an external line
  • Internal-call from an internal number to an internal one
  • Did – DID rule

Get detailed information about all current calls. The information is essentially similar to that provided by the previous pbx.calls.get?key={secret key} command, but the information is provided in a slightly different cross-section and logic.
pbx.callsinfo.get

answer:

  • count – total number of calls
    callsInfo – list of calls currently passing through the PBX
  • CallID – Call ID
    state – call state: Unknown, Initiating, Routing, Talking, Transferring, Rerouting
    startedAt
     – call start time answeredAt – call
    start
     time (can be null)
    did – for a call from an external line, the name of the DID rule, if any
    owner
     – information about the owner of the call. Matches data from the OMCallCollector class.ActiveConnectionFields
    talkTo – information about who the owner of the call is talking to (if he is talking), and a list. Matches data from the OMCallCollector class.ActiveConnectionFields
    routingTo – information about who the call is being sent to (if any), and a list. Matches data from the OMCallCollector class.ActiveConnectionFields

Get a list of all user extensions
all.ext.get

Get a list of all registered user extensions
all.registered.get

Get a list of all call groups
all.group.get

Get a list of all call queues
all.queue.get

Get a list of all IVRs
all.ivr.get

Get a list of all external lines (paths)
all.line.get

Get user extension information fields
ext.info.get?num={extension number}

Get user Extension number statuses
ext.state.get?num={extension number}

answer:

  • num – the user’s extension number
    registered – whether or not this extension is registered on the PBX
    status – Free-the subscriber is not in conversation, Busy-the subscriber is in conversation or receives a call or makes a call
    fwdName – current redirect status
    qGlobalStatus – global entry/exit status of all queues
    qStatus – entry/exit statuses for specific queues (num – queue number, status – status)

Get a list of all queue operators
queue.members.get?num={queue number}

Get a list of all available queue operators
queue.free.get?num={queue number}

Get a list of all queue operators that are in conversation
queue.talk.get?num={queue number}

Find out if there is at least one free queue operator ready to receive the call
queue.isfree.get?num={queue number}

Get a list of all call group statements
group.members.get?num={call group number}

Get a list of all available call group operators
group.free.get?num={call group number}

List of SET requests for the 3CX REST API

Make a call
makecall?first={first call shoulder number}&second={second call shoulder number}

Note: after making the request, the employee’s phone rings first, after he picks up the phone, an external subscriber will dialed


Change the forwarding status of the user’s extension number
ext.fwd.set?num={extension number}&status={name of the forwarding status in english}

answer: the command execution was completed successfully/unsuccessfully, the command fails if incorrect data (user extension number and/or status name) is transmitted.

Set the option of global entry/exit from all queues for the user’s extension number
ext.queueglobal.set?num={extension number}&log={on/off}

answer: the command was executed successfully/unsuccessfully
If forwarding statuses are responsible for global entry/exit from queues, the result is false – no entry/exit from queues will occur. In this case, use changing the forwarding status.

Enter / output a queue operator to a specific queue
ext.queue.set?num={extension number}&queue={queue number}&log={on/off}

answer: the command was executed successfully/unsuccessfully. The command fails if incorrect data (user extension number and/or queue number)is transmitted

Set options for the user’s extension number
ext.options.set?num={extension number}&enabled={on/off}&external={on/off} &recording={off/external/all}

When using a command, you can use only one or two options, rather than all 3 options.

Value of options:
enabled – the extension number is enabled or disabled
external – whether calls to external numbers are allowed
recording-call recording mode (disabled/external calls only/all calls)