I’m facing an issue with FreePBX 16.0.40.7 that is configured to route calls between a Teams SBC and Twilio (FreePBX is in the middle).
I have an inbound route which is for Teams → Twilio and I pattern match based on the Caller ID which are all E.164 numbers. The destination is then my trunk to Twilio. Calls are working fine at this point.
Now what I want to do is overwrite the CID for these outbound calls to another E.164 number. Since Outbound Routes are not used in this case (since I am directly defining the trunk in the inbound route settings), I set my trunk Outbound Caller ID to the new number and set CID Options to “Force Trunk CID”.
The problem is that for these calls, FreePBX still sends the original caller ID to Twilio and not the forced CID.
Does anyone know what could be causing this issue?
Those are settings that require the call to hit certain parts of the dialplan. Since you are ignoring the outbound routes you may be ignoring the dialplan that sends the call out the trunk after it is processed through the Outbound Routes. That’s the point the system is checked for the some of the trunk options selected, like Force Trunk CID.
If you’re just sending the call straight out the trunk options like Force Trunk CID are ignored. You would need to modify your setup to add the proper CallerID to the trunk if you’re going to ignore existing dialplan flow.
Thanks Tom! Would I need to try to set the custom DID on the teams side? Or would I need to somehow have the teams inbound route hit the dual plan first? If so, do you know how that could be done?
From the dropdown menu, I’m not seeing any option for Outbound Routes. If I change the Trunk settings to use the context from-internal, would that send it to the outbound routes? What would I set the inbound route destination to for that?
Ok that seems to have worked! I deleted the inbound route completely and changed the Trunk to use the context from-internal and as a result, the call routed via the Outbound Route with the Route CID being used. Thanks again for your help Tom.