Issue
If you’re using 3CX PBX with Twilio Elastic SIP Trunking and experiencing issues making outbound calls, such as receiving a “Bad Request (400)” error in 3CX, this guide will help you identify and resolve common causes.
Product
Programmable Voice
Cause
Common issues:
- Outbound calls from 3CX fail with a “Bad Request (400)” error.
- Inbound calls to 3CX work as expected.
Resolution
1. Verify Trunk Configuration
- Authentication: Ensure your Twilio Account SID and Auth Token are correctly entered in 3CX.
- Trunk Termination URL: Confirm the SIP trunk termination URI matches the format provided by Twilio.
- Outbound Caller ID: Set a valid, E.164-formatted caller ID number in your 3CX outbound rules.
2. Check Number Formatting
Twilio requires all phone numbers to be in E.164 format. For example, a South African number should look like +27600123456.
- Double-check that all dialed numbers (destination and caller ID) are in E.164 format.
- Incorrect formatting is a common cause of outbound call failures.
3. Account Balance
- Verify your Twilio account has sufficient balance to place outbound calls.
4. Capture and Review SIP Traces
- If calls are not reaching Twilio, capture a SIP packet trace (PCAP) from your PBX.
- Look for errors or misformatted numbers in the SIP INVITE.
- Share the trace with your technical team or Twilio Support for further analysis.
Example Scenario
A user configured 3CX with Twilio Elastic SIP Trunking. Inbound calls worked, but outbound calls failed with “400 Bad Request” in 3CX. After reviewing the SIP traces, it was found that the dialed numbers were not in E.164 format. Once corrected, outbound calls succeeded.
Additional Information
Additional details are outlined in the following document:
If you’ve checked all the above and outbound calls are still failing:
- Double-check your number formatting and trunk configuration.
- Capture and review SIP traces for failed calls.
- Reach out to your PBX administrator or technical support team for further assistance.
Note: Before reaching out to Twilio support, please ensure you provide the related Call SID(s) as a reference. If no Call SID(s) are generated, capture a PCAP (packet capture) from your PBX side and share it with your request. Supplying this information upfront will help expedite resolution times. https://help.twilio.com/articles/223180488-What-is-a-Call-SID-
Tip: Always use E.164 format for all phone numbers and keep your trunk configuration up to date to avoid common outbound call issues.