Configuring OpenAI for 3CX AI Agents
Introduction
This guide explains how to integrate OpenAI with 3CX AI Agents to enable intelligent receptionist and call-handling scenarios powered by AI.
This feature requires 3CX AI edition.
Step 1: Setting Up an OpenAI Account
If you don’t already have an OpenAI account, create one, set up billing, and generate an API Key.
Create a Project and set up Billing
- Sign in to OpenAI Login page
- Create a new Project and give it a descriptive name.
- Go to "Settings → Billing" and complete the billing setup.
- Ensure you have enough credit for your expected usage.
Note: You must have a paid OpenAI account for correct functionality; trial accounts are limited and can exhibit unpredictable issues/errors. OpenAI accounts who pay a minimum of $100 are typically elevated to Tier 3 directly.
Configure Model Access and Limits
- Go to "Project → Limits".
- Set a budget to control your spending.
- Under Allow or block models, keep the list empty to allow all models
- Under Rate limits, increase limits for the models above as needed (larger installations may require higher limits to avoid unpredictable behavior).
Note about Rate Limits: your ability to raise limits depends on your OpenAI API usage tier / account history.
Create a New API Key
- Go to "Dashboard → API Keys".
- Click Create a New Secret Key.
- Enter a descriptive name and set permissions to All.
- Copy the key and store it securely.
Step 2: Configuring OpenAI in 3CX
- In the Admin Console, go to "Admin → Integrations → AI" and click the OpenAI API button
- Paste your OpenAI Secret Key.
- Select models:
- OpenAI Model for Real-Time Calls: gpt-realtime (recommended)
- OpenAI Model for Text: gpt-5o-mini (recommended)
- Fill in:
- Company Name
- Company Description; this is used by AI Agents to understand your organization’s context.
- Click the Save button.
Step 3: Add Knowledge Sources / RAG (bring your own content)
Knowledge Sources let agents retrieve company-specific content during calls/chats (policies, FAQs, routing rules, product docs). In the OpenAI ecosystem this is commonly implemented via file ingestion and embedding/vector search for retrieval.
- In the Admin Console, go to "Admin → Integrations → AI"
- Click the Knowledge Sources button followed by the Add button
- Set a Name and Description for your knowledge base
- Upload files (PDFs/docs/text) containing anything related to your business, such as:
- Business hours & holiday rules
- Department routing instructions
- Product/price FAQs
- “What we do / how to talk about us” wording
- TIPS
- Ensure that the Description accurately describes the contents of the knowledge base to improve information retrieval
- If you have documents that cover different, unrelated contexts (for example medical documents and internal travel policy documents), do not put them in the same store; create separate knowledge stores for each context
- The OpenAI API does not update 3CX on each knowledge base change; with each change you make, press the Refresh button and wait for the process to complete
Note: Knowledge Sources are created and billed under the OpenAI project/key you configured.
Step 4: Creating and Configuring AI Agents
- Click the "Admin → Integrations → AI → Add Agent" button:
- Choose the agent type:
- Receptionist: Company-oriented AI agent for basic call handling and routing
- Personal Assistant: Tuned for handling calls for a specific user (e.g. Boss)
- In the Agent Info tab:
- Define General Settings for your AI Agent:
- Extension – unique extension number for the AI Agent
- Assistant For (PA only) – which user the PA represents
- Department Membership – which departments the AI Agent belongs to
- First Name and Last Name – the spoken/visible identity for the AI Agent
- Assigned DID number(s) – direct inbound numbers that reach the AI Agent
- Configure Voice and Call Settings for your AI Agent:
- Voice Style – select your preferred voice option
- Call Recording - Off or All calls or External calls only
- Maximum Call Duration
- Agent Talk Link – enables click-to-talk or chat from a website; leaving the field empty disables the link for this Agent
- In the Agent Type tab:
- Set the Knowledge Sources – choose which Knowledge Sources the agent can access
- Set the Introduction Language – default greeting language
- You can also Allow Language Switching
- Set the Welcome Message – the first message spoken to the caller
- In the Agent Instructions tab, your AI Behaviour Instructions have been pre-configured; if necessary, however, the Customize Prompt button allows tuning of tone, policy boundaries, “do/don’t” rules
- In the Block Spam Calls tab:
- Spam Protection is enabled by default
- You can customize What Counts as Spam to define what Spam or Fraud means, and what action to take:
- End Call
- Transfer To (a manager/reviewer)
- Send screening summary + disconnect
- In the Call Routing tab (Receptionist only):
- Add Routing Behaviour rules so your AI Agent can intelligently route calls and chats to different destinations based on your description
- As an example, if the caller says, “I get error 404”, the AI Agent can classify this as a support call and transfer to a destination with a description like “In case of HTTP errors, transfer here”.
- You may create multiple routing entries, but avoid excessive overlap to ensure accurate routing.
- If you Allow Extension Routing by Name, your AI Agent allows callers to request transfers by name; for example "Please transfer me to George".
- With Confidentiality Mode enabled:
- this prevents AI from revealing confidential info like last names and employee information
- keep in mind that if you combine this with Allow Extension Routing by Name, your AI Agent will not be able to, for example, ask "We have two Georges, George Takei and George Washington, which would you like to be connected to?", but will ask the caller for the full name of the intended destination
- In the Call Screening tab:
- You can Disable Call Screening for Known Contacts relaxes the screening process for known, trusted contacts stored in the phonebook.
- You can enable the Busy Check Before Call Transfer checkbox to ensure that the destination extension is available before transferring the call.
- In the Options tab:
- The Caller Response Actions target two specific types of problematic callers:
- Hostile or abusive callers.
- Non-collaborative callers who impede the conversation.
- Appropriate actions can be configured to manage these situations automatically.
Technical Notes
- Audio codec: Only PCMU is supported.
- Networking / Firewall Configuration
- Ensure that the Firewall Checker gives you a clean bill of health
- You will also need to allow outbound traffic to:
- TCP 443 (HTTPS)
- UDP 3478 (STUN/TURN)
- Note about AI Models:
- OpenAI is constantly updating their models, and as new and improved versions become available, older versions become deprecated. The information in this document will be updated from time to time to keep up to date with the current recommended options. You will need to ensure that your OpenAI account is configured to allow the newer models to be used by 3CX.
- New releases of 3CX will automatically update configured models to the more modern equivalents.
Last Updated
This document was last updated 26 May 2026