I’ve been using Twilio with my FreePBX for a few years and it works quite well. Now I’m trying something a bit different with one of my numbers that I could use some advice on.
I have designed a Twilio flow for one number that first routes it to my CRM and the if the person is unavailable I want to have it send it to my FreePBX server directly into voicemail.
The problem I’m encountering is that with the “Connect Call” Twilio Flow widget I’m not able to send a call to a specific extension on FreePBX, and I’m sure it is because I don’t know the proper way to place a direct SIP call to FreePBX.
The configuration asks for the SIP endpoint (as “sip:[email protected]”) with a username and password as optional extras. I thought this would translate extension 101 as “sip:[email protected]” so that is what I have in the setting. I’ve tried having no user/pass (which I was totally confident would fail), tried the extensions username and extension password (which I figured would also fail since this isn’t connecting a sip phone) and I tried my actual user login to FreePBX. None of these worked.
I figure there is probably a setting somewhere in FreePBX to allow this kind of addressing on an extension but I’m not sure where. Twilio is fully integrated with this instance of FreePBX but I don’t see a way to “tap into” that existing SIP trunk and then route to the extension in any kind of flow widget. I’m sure I could probably trigger off of the Twilio phone number to create an inbound route and just have the flow call the main number but it seems like I should be able to use the “sip:[email protected]” method to get where I want without extra inbound routing rules.
Any thoughts on how to make this work?