Short answer
In the Enfonica Console, add the 3CX PBX app under Cloud SMS > Apps. Copy its URL and API key into the SMS settings of your 3CX SIP trunk. Then set your mobile number's incoming message handler to the app's Incoming SMS Handler URL, so messages to the number reach 3CX.
- Applies to
- Cloud SMS, Phone Numbers
- Works with
- 3CX v20 and later, self-hosted
- Who can do this
- Whoever manages your 3CX and your Enfonica project
On this page
Before you start
- An SMS-enabled Enfonica mobile number in your project.
- 3CX v20 or later, self-hosted, with a SIP trunk to Enfonica.
- Admin access to 3CX and to your Enfonica project.
How SMS in 3CX works
Enfonica connects to 3CX as its SMS provider, on the same SIP trunk that your calls use. Messages your team sends from 3CX go out through Cloud SMS from your Enfonica mobile number. Messages sent to that number are passed on to 3CX. Your team texts and calls from one number.
Setup has three parts. You add the 3CX PBX app in the Enfonica Console, connect it to your 3CX SIP trunk, and then point your mobile number's incoming messages at the app.
Add the 3CX PBX app in the Enfonica Console
- In the Enfonica Console, open your project, and go to Cloud SMS > Apps.
- Select Browse marketplace, and then select 3CX PBX.
- Select Add to Project. A dialog opens with an Outbound Notification Webhook URL, an API Key, and an Inbound webhook URL field for 3CX's webhook. Keep the dialog open while you set up 3CX.
Connect it to your 3CX SIP trunk
In 3CX, open the SIP trunk you use for Enfonica, and go to its SMS settings. Then copy each value across:
- Copy the Outbound Notification Webhook URL from the Enfonica dialog, and paste it into 3CX as the Provider URL.
- Copy the API Key from the Enfonica dialog, and paste it into 3CX as the API Key.
- Copy the webhook URL that 3CX shows for the trunk, and paste it into Inbound webhook URL in the Enfonica dialog.
- Save the trunk in 3CX, and then select Add in the Enfonica dialog. The app appears under Cloud SMS > Apps. Its page has an Outgoing configuration section and an Incoming configuration section.
- On the trunk's DIDs tab in 3CX, add your mobile number in +E.164 format, for example
+61491570006. If the number is already there for calls, check that it has the plus sign and the country code. - In 3CX, choose the user or queue that handles messages for that number. Only the people it reaches can send and see SMS for that number.
Send incoming SMS to 3CX
Messages sent to your mobile number go wherever the number's incoming message handler sends them. To point the handler at 3CX:
- In the Enfonica Console, go to Cloud SMS > Apps, and open the 3CX PBX app.
- Under Incoming configuration, copy the Incoming SMS Handler URL.
- Go to Phone Numbers > My numbers, and select your mobile number.
- Under Messaging settings, in Incoming message handlers, select Add, and then select HTTPS URL.
- Paste the URL. Make it the only handler, or the first one in the list.
- Select Save Changes.
If messages to your number show in the Enfonica Console but never reach 3CX, the number's handler is almost always a different or older URL. Copy the Incoming SMS Handler URL from the app's page again, and paste it in place of the old one.
Check that it worked
- From a mobile phone, text your Enfonica number. The message appears in 3CX for the user or queue you chose. In the Console, it appears in Cloud SMS > Messages with the status Received.
- Reply from 3CX. The mobile phone receives the reply from your Enfonica number, and the Console shows it as Delivered.
- Reply again from the mobile phone. The reply appears in the same conversation in 3CX.
If it isn't working
Each of these problems comes up regularly, and most come down to one setting.
Messages show in the Console but not in 3CX
Enfonica received the message, but either it couldn't pass the message to 3CX, or 3CX delivered it somewhere nobody is looking. Check these settings:
- The number's handler is the app's Incoming SMS Handler URL. See Send incoming SMS to 3CX.
- The DID in 3CX is in +E.164 format.
- If the number goes to a queue, check which members the queue reaches.
If the message still doesn't appear, check the 3CX logs for SMS errors, and send us the details in What to send us.
Replies start a new conversation
3CX matches conversations by number. Send to numbers in +E.164 format, such as +61491570006, so that a reply from that mobile joins the same conversation.
Only one person can see a conversation
In a 3CX queue, every member can see a conversation that nobody has taken. After someone takes it, or 3CX assigns it to them automatically, it's hidden from the others. If everyone in the queue should see every message, turn off automatic assignment for the queue in 3CX.
You can't tell which number a message came in on
3CX doesn't show which DID received an SMS. Give each mobile number its own queue, and add the same people to each queue. The queue name then shows which number the message came in on.
Sending from 3CX fails with Bad Request
3CX shows an error such as Failed to send message(s) to the provider with "status":400. Check these causes:
- If you send from an alphanumeric sender ID to Australian numbers, the sender ID must be registered and Active in this project. See SMS from your sender ID won't send to Australian numbers.
- If your 3CX was set up for SMS before the 3CX PBX app existed, replace that setup with the app. Follow the steps in this article.
A conversation disappeared from 3CX
When a conversation is marked as dealt with or archived, 3CX stops showing it. Every message stays in Cloud SMS > Messages in the Enfonica Console, so you can still find what was said.
Questions
Can my team send from our business name?
Yes. The app can send from your mobile number or from an alphanumeric sender ID of up to 11 characters. Sender IDs that send to Australian numbers must be registered first. To learn how, see Register an alphanumeric sender ID for SMS in Australia.
People can't reply to a sender ID, so use your mobile number for conversations.
Can we send and receive photos?
No. Enfonica's virtual mobile numbers support calls and SMS, but not MMS. Picture messages sent to the number aren't received.
Can we use a mobile number we already have?
Yes. Port it to Enfonica, and it works with 3CX like any other Enfonica mobile number. After the port, the number can't receive MMS, so first check that this is fine for the people who text you. To learn how, see Port your phone numbers to Enfonica.
Does this work with other phone systems?
The Marketplace in Cloud SMS > Apps also has apps for Yeastar PBX and Genesys Cloud (Genesys Open Messaging). You set them up the same way.
What to send us
Include these and we can trace the message.
- The number or sender ID you sent from, and the number you sent to.
- The date and time you sent it, with your timezone.
- The message ID, if you sent it with the API.
- What you expected and what happened instead.
Our support team are telco specialists, backed by the engineers who run the network.
Related
Was this helpful?
What was the problem?
Thanks for telling us.