FreePBX IVR dialout to external PBX

Hello, I have FreePBX 16.0 working as standalone Voicemail and IVR for Cisco CME 8.6 PBX because the Cisco has no voice mail of its own. The integration between the two is via pjsip trunk. Everything works fine so far. Pstn and internal calls on the Cisco CME PBX get answered on their extensions, busy noanswer calls go to the proper voicemail box on the FreePBX as expected. I even got the MWI lamps on the Cisco CME extensions to work properly (that was a wrestling match). I also have an IVR setup on the FreePBX which works. But, the problem I have is when a call is in the FreePBX IVR and caller does a direct extension dial, the call leaves the FreePBX IVR and goes directly to the FreePBX extension mailbox without first ringing the phone on the Cisco CME PBX. This is understandable because the IVR can see the extension is local due to the local mailbox. Is there a way to have FreePBX prioritize the IVR outbound call route/trunk for the extension lookup? This way the FreePBX IVR direct dial would ring the Cisco CME phone before FreePBX voicemail which is the desired functionality. I’ve read a lot of posts here over the last few months and your knowledge is impressive. Thanks in advance for your advice!

Needed to edit

Admin> Config Edit> extensions_custom.conf

exten => _10[0-3]X,1,goto(outbound-allroutes,${EXTEN},1)
exten => _10[0-3]X#,1,goto(outbound-allroutes,${EXTEN:0:4},1)

Note, my extension range on the CME is 1000 to 1039

1 Like