For AI assistants: this page as plain markdown is at https://docs.voicelogica.ai/raw/phone-systems/3cx.md, and https://docs.voicelogica.ai/llms.txt lists the docs by topic, one file each, small enough to read whole. Read those rather than this HTML page.
3CX
There are two ways to connect 3CX:
| As an extension (recommended) | SIP trunk | |
|---|---|---|
| 3CX version | V20 Update 10 or later | v18, v20 |
| What you set up in 3CX | An API key (Service Principal) | A Generic SIP Trunk and rules |
| How staff reach the agent | Dial its name, for example ai | A short code over the trunk |
| Transfers | Inside 3CX, to extensions, queues and ring groups | Back over the trunk |
Connect as an extension (3CX V20 Update 10 or later)
Section titled “Connect as an extension (3CX V20 Update 10 or later)”The AI agent becomes an extension on your 3CX. Voice Logica connects out to your 3CX over https using the 3CX Call Control API, so there is no trunk, no registration and no port forwarding. Your team dials the agent like a colleague, outside callers can reach it on a DID, and the agent transfers callers to extensions, queues and ring groups inside 3CX.
1. Create an API key in 3CX
Section titled “1. Create an API key in 3CX”- Sign in to the 3CX Web Client as an administrator and open Admin → Integrations → API. Click Add.
- Enter a Client ID, for example
ai. It is also the number your team dials to reach the agent. - Tick 3CX Call Control API access.
- Optional: assign a DID, so outside callers reach the agent directly.
- Save, and copy the API key straight away: 3CX shows it only once.
2. Connect it in Voice Logica
Section titled “2. Connect it in Voice Logica”Telephony - Trunks - Connect your PBX, pick 3CX and the agent, then As an extension. Enter your 3CX address (for example https://company.3cx.eu), the Client ID and the API key, and click Connect 3CX. The dialog changes to Connected within a few seconds.
You can also ask Claude or ChatGPT connected to Voice Logica to “connect my 3CX”. It uses connect_3cx and walks you through the same steps.
3. Send calls to the agent
Section titled “3. Send calls to the agent”- From an extension: dial the Client ID (for example
ai). - From outside: call the DID you assigned to the Service Principal.
- From an IVR option, a queue’s no-answer destination or after-hours routing: choose the Service Principal’s DID or extension as the destination.
4. Transfers back to people
Section titled “4. Transfers back to people”The agent transfers callers inside 3CX to an internal number: an extension, a queue, a ring group or an IVR (2 to 6 digits). Write the numbers in the agent’s prompt, for example “Accounting: 201. Sales queue: 800.” The agent never dials outside numbers through your 3CX.
Good to know
Section titled “Good to know”- Each call with the agent counts towards your 3CX licence’s simultaneous calls.
- If the connection drops, Voice Logica reconnects on its own.
- To stop, open the same dialog and click Disconnect, then delete the Service Principal in 3CX.
- The 3CX address must be reachable from the internet over https. For 3CX older than V20 Update 10, use the SIP trunk below.
How Voice Logica connects
Section titled “How Voice Logica connects”SIP trunk (any version): 3CX registers a SIP trunk to Voice Logica (way 1) as a Generic SIP Trunk. Voice Logica creates the trunk and gives you a server, a username and a password. This works for 3CX on-premise and hosted.
- Calls 3CX sends to this trunk are answered by the AI agent.
- The agent transfers callers back over the same trunk, and 3CX rings the extension through the trunk’s inbound rules.
Before you start: your 3CX licence caps simultaneous calls, including calls on this trunk. A Warm transfer counts as two until it connects.
1. Create the connection in Voice Logica
Section titled “1. Create the connection in Voice Logica”Telephony - Trunks - Connect your PBX, pick 3CX and the agent. Keep the dialog open until it says Connected.
2. Add the trunk on 3CX
Section titled “2. Add the trunk on 3CX”- Admin console → Voice & Chat → Add Trunk. Country Generic, Provider = Generic SIP Trunk.
- Registrar / Server / Gateway Hostname or IP = the server, port 5060.
- Type of Authentication = Register/Account based. Authentication ID = the username, Authentication Password = the password.
- Main Trunk No: any number that identifies the trunk.
- Tick Create an outbound rule for this SIP Trunk if you want 3CX to make the rule for step 3. Save, and check the trunk shows as registered.
3. Send calls to the agent
Section titled “3. Send calls to the agent”- A short code: an outbound rule with a prefix (for example
9) that uses this trunk. - A number, an IVR option, a queue’s no-answer destination, after-hours calls: set that destination to an external number over the Voice Logica trunk.
4. Let the agent transfer back to extensions
Section titled “4. Let the agent transfer back to extensions”On the trunk, set inbound (DID) routing so calls from Voice Logica reach your extensions by number. Then, in Voice Logica, add the extensions as transfer destinations on the agent: an External destination with the extension number (for example 201), or a User with that extension. Use Warm transfer, so the agent comes back and takes a message when nobody answers.
5. Check it works
Section titled “5. Check it works”- The dialog says Connected; the trunk’s SIP logs in Voice Logica show each REGISTER and our reply.
- Dial the short code from an extension: the call appears in Calls.
- Ask the agent for a colleague: the extension rings.
Good to know
Section titled “Good to know”- Menu names for rules differ between v20 builds; the trunk wizard’s outbound-rule option is the quickest route.
- Turn off SIP ALG on the office router (on-premise installs).
Frequently asked questions
Section titled “Frequently asked questions”How do I connect my 3CX to Voice Logica?
In Voice Logica, open Telephony - Trunks - Connect your PBX and pick 3CX and the agent; the dialog gives you a server, a username and a password. In the 3CX admin console go to Voice & Chat → Add Trunk, choose Generic SIP Trunk, enter the server (port 5060), set Type of Authentication to Register/Account based and enter the username and password as Authentication ID and Authentication Password. Save, and the Voice Logica dialog changes to Connected when 3CX registers.
Does Voice Logica work with hosted 3CX as well as 3CX on-premise?
Yes. 3CX connects as a Generic SIP Trunk that registers to Voice Logica, and this works for 3CX on-premise and hosted, on v20 and v18. On an on-premise install, also turn off SIP ALG on the office router.
Do calls on the Voice Logica trunk count towards my 3CX licence's simultaneous calls?
Yes. Your 3CX licence caps simultaneous calls, including calls on the Voice Logica trunk. Each call with the agent counts as one, and a Warm transfer counts as two until it connects.
Can the AI agent transfer a call back to a 3CX extension?
Yes. The agent transfers the caller back over the same trunk, and 3CX rings the extension through the trunk’s inbound (DID) routing, which you set so calls reach your extensions by number. In Voice Logica, add each extension to the agent as an External destination with the extension number (for example 201) or as a User with that extension. Use Warm transfer, so the agent comes back and takes a message when nobody answers.
How do I choose which 3CX calls the AI agent answers?
For a short code, create a 3CX outbound rule with a prefix (for example 9) that uses the Voice Logica trunk. For a number, an IVR option, a queue’s no-answer destination or after-hours calls, set that destination to an external number over the Voice Logica trunk. Ticking Create an outbound rule for this SIP Trunk in the 3CX trunk wizard is the quickest way to create the rule.
Do I need a public IP or port forwarding to connect 3CX to Voice Logica?
No. 3CX registers the trunk to Voice Logica, so the connection always goes outwards and nothing is opened on your firewall. The PBX only needs outbound UDP 5060 to Voice Logica and outbound RTP audio. Turn off SIP ALG on the office router, because it is the most common reason a trunk does not register or has no audio.
Can I connect 3CX to Voice Logica without a SIP trunk?
Yes, on 3CX V20 Update 10 or later. Create a Service Principal in 3CX under Admin → Integrations → API with 3CX Call Control API access ticked, and copy its API key. Then in Voice Logica open Telephony - Trunks - Connect your PBX, pick 3CX and As an extension, and enter your 3CX address, the Client ID and the key. The AI agent becomes an extension your team dials by its Client ID.
When 3CX is connected as an extension, where can the AI agent transfer calls?
To any internal number in your 3CX: an extension, a queue, a ring group or an IVR, 2 to 6 digits long. The transfer happens inside 3CX, so it shows in 3CX like any other transfer. Write the numbers and who they belong to in the agent’s prompt. The agent cannot dial outside numbers through your 3CX.
Which 3CX versions can connect as an extension?
3CX V20 Update 10 or later, hosted or on-premise, with an address reachable over https from the internet. Older versions, including v18, connect with the SIP trunk on this page.
