Follow the steps below to connect Twilio phone system to your phone system
SIP calls via 3CX using Twilio Pre requisite
1. In twilio - https://www.twilio.com/docs/voice/api/refer-to-twilio
In order to use the Inbound SIP REFER Twilio feature, you must enable the "Enhanced Programmable SIP Features" in your Voice settings in the Console.
2. In 3CX - https://www.3cx.com/docs/direct-sip/
In the management console, go to “Settings” > “Network” > “FQDN” > “Settings for Direct SIP Calls”
3. Go to “Extensions”, click on extension “103”, go to “Options”, and set the SIP ID field to “103”.
sip address will be - 103@sip.testdomain.com
Steps to connect your phone system with Twilio
1. Create sip domain in Twilio. Remember to use public IP address of 3cx while creating sip domain.
2. Note down the URL of sip domain created.
3. In 3CX create a SIP trunk and in URL give the sip domain URL created in Twilio.
4. Add a DID any like 1001 etc.
5. Create inbound rule for number in 3CX and send to outside number that is DID of Twilio sip trunk.
6. Create outbound rule for Twilio in 3CX.
7 . In twilio studio build a flow to find the 3CX extension using ACD calls using the lambda functions defined in next section.
8. Bind the flow to Twilio sip domain created
9. Try calling the 3CX number it will go to Twilio using sip domain. Flow will execute and will send the call to the extension number found via ACD call.
Overall Flow
Make an inbound call to 3CX number, it goes to Twilio via sip domain, sip domain calls Twilio studio flow, flow return a sip call to 3CX sip address.