This guide covers the basic registration steps, how to configure routes, and how to set up SMS with SIPTRUNK for 3CX Version 18. You should already have SMS-enabled numbers with a completed 10DLC, an active Campaign, and an active SMS billing plan prior to beginning this guide. The “My Messaging” tab should be visible in the customer portal to indicate SMS is enabled on the account. Please note this guide is for new installs of 3CX. Screenshots are included throughout to demonstrate the process.
1. Log in to the Admin Console to access the 3CX configuration menu.
Registration
2. Navigate to the “SIP Trunks” menu on the left menu column and click "Add SIP Trunk". Select “Generic” as the Country and “Generic SIP Trunk” as the Provider. Enter your SIP trunk number in the “Main Trunk Number” field. Click "OK".
3. On the “General” tab of the SIP trunk configuration, your “Registrar/Server/Gateway”, enter "gw.siptrunk.com" as the host and check the “Auto Discovery” box. Set the outbound proxy to "gw1.siptrunk.com".
4. Below in the “Authentication” section, enter your SIP trunk number as the “Authentication ID” and your “Trunk Password” (found in the SIPTRUNK customer portal under SIP Trunking --> SIP Trunks) as the “Authentication Password”.
5. Select the “Options” tab in the SIP trunk configuration. Scroll down to “Advanced” and enter "gw2.siptrunk.com" in the “Alternative Proxy” field. This will enable failover to a redundant gateway if there are ever connectivity issues to gw1.siptrunk.com.
6. Select the “Inbound Parameters” tab in the SIP trunk configuration. Change the “CalledNum” parameter from “To: User Part” to “Request-Line URI: User Part”. The inbound parameters should read as:
- CallerNum - Contact: User Part
- CallerName - From: Display Name
- CalledNum - Request Line URI: User Part
Click "OK" to save the configuration.
7. Back in the main SIP trunk status menu, the SIP trunk you just configured should now show as green to indicate it’s registered with SIPTRUNK's gateway. You may also confirm the connection status in the SIPTRUNK customer portal by navigating to "SIP Trunking" > "SIP Trunks" and clicking "View Trunk Registration Status".
Outbound Routes
The next step is to configure outbound calling. SIPTRUNK requires all North American numbers to be dialed in an 11-digit format (see Setting Up Outbound Calling for more info on this topic).
8. Select “Outbound Rules” in the left menu and click “Add.” We will be adding three separate rules as described below:
NOTE: Remember to set the "Route" to the SIP trunk you created and also populate the "Outbound Caller ID" field for each rule.
11-Digit Dialing
9. Name the first rule 11-digit dialing, because we require you to send 11 digits outbound for domestic calling. Enter 11 in the field “Calls to numbers with a length of”.
10-Digit Dialing
10. At this point, if you dial 10 digits, calls will fail. Create another rule for 10 digits and prepend a 1 if your client only wishes to dial 10 digits. Set the "Calls to Numbers with a length of" field to "10".
3-Digit/E911 Dialing
11. For Emergency Calling, this route will take all calls that begin with a "9" and are 3-digits in length. These calls will then be routed to SIPTRUNK. Add the "9" to the "Calls to numbers starting with prefix" field and "3" to the "Calls to Numbers with a length of" field.
IMPORTANT: Add your Enhanced DID as the "Outbound Caller ID" for E911 calling. See the article E911 - Important Information for more info on this subject.
10. For International Calling, this route will take all calls that begin with "011" dialed, which is the International Exit code, and then send the calls to SIPTRUNK after stripping the first digits (011) from the number string. Add "011" to "Calls to numbers starting with prefix" and "3" to the "Strip Digits" fields.
NOTE: See Setting Up Outbound Calling for more information on setting up international calling.
Inbound Routes
11. Once you have at least one DID, navigate to “SIP Trunks” in your 3CX. Edit your existing SIP trunk and select the “DIDs” tab. Click “Add Single DID” and enter your DID in the following format:
- +1NPANXXXXXX (a +1 followed by the number in a 10-digit format)
Press ENTER to submit the DID and then click "OK" to save all of the changes.
12. Navigate to the “Inbound Rules” menu. Click the “Add DID Rule” button. Name the rule whatever you'd like, and verify that the correct DID is selected in the “DID/DDI” drop down. You may then use the “Route calls to” section to route inbound calls accordingly.
Completing SMS Configuration
13. Navigate to the SIPTRUNK customer portal and enter the “My Messaging” tab to view SMS-enabled numbers and configuration options. You should see your DID with a green icon indicating it is enabled.
14. The API Key needs to be generated next. Click the “API Keys” button and then “Create New API Key”. Save the generated credentials for later, because you will not be able to recover this information from our portal again and will then need to generate a new API Key.
15. Return to the 3CX Admin Console and edit the Generic SIP trunk you created earlier and navigate to the SMS tab. Toggle the “Enable SMS” button on and enter your “3CX API Token” from the SIPTRUNK customer portal into the “API Key” field and enter https://messaging.siptrunk.com/3cx/ into the “Provider URL” field.
16. Copy the Webhook URL from the SIP trunk in 3CX and navigate back to the SIPTRUNK customer portal and click the “Webhooks” button. Click “Create New Webhook” and paste the URL into the “Description” field, name your webhook, and then submit it. Your webhook will be created and you can then assign it to your DID number via the dropdown.
17. Ensure you have proper whitelisting set in the firewall to utilize the SIPTRUNK service. Refer to Interconnecting with SIPTRUNK for the full guidelines.
Your number is now configured for SMS and you can place test messages via the “Chat” menu in 3CX. Please open a ticket with SIPTRUNK if you need assistance with the configuration process by contacting the Support team at support@siptrunk.com or by calling 800-250-6510.
Comments