This is something that happened this weekend. A customer of mine asked a way to save money when someone calls to a DID that is already hosted in the PBX. Currently, in any FusionPBX default installation, when you dial a number it is already hosted in your PBX it will go through your carrier and come back causing you unnecessary costs.

So, there should be a way to avoid this PSTN trip and route the call internally, even if it is inter-tenant. Please note that this is a capability I will include in the LCR for FusionPBX 2 (also know as pseud-enum support), but he couldn't wait, so here is a way to manually work around it.

Another think you need to take in mind is if you have a big PBX with many numbers, using this method is a direct ticket to craziness. It will be very easily to lose track of phone numbers as the port-in, port-out almost without notification. LCR for FusionPBX 2 will do this in an automatic wait without needing you to do anything at all. If this is your situation, I would recommend you to wait for the LCR for FusionPBX 2.

Add/change anything of this dial plan example to fit your needs.

condition destination_number ^\+?1?(\d{10})$
action set callee_id_number=$1
myvar[0]=9999999999

condition ${myvar} ${callee_id_number}
action transfer ${callee_id_number} XML public

Good luck!

blog comments powered by Disqus