Create Loop Back Trunk

Some of our users like to dial their colleague’s extension via the entire DID.

So instead of dialing 1001, they would dial 12223331001. This works, but unnecessarily uses two lines on our SIP provider trunk.

I was thinking that creating a loop back trunk and directing matching calls to it would solve this.

I created a CUSTOM trunk with a dial string

local/$OUTNUM$@cos-all

I then created an Outbound Route to match the dial pattern of the DIDs and pass on just the extension to the loop back trunk.

Prefix: 1222333
Pattern: 1XXX

This seems to work OK, but I wonder if there is a better way to handle this.

Is there some kind of DID reflection built in to VitalPBX that I should be using instead?

Even though it works, I’m not sure that the cos-all is the right context to use for the trunk definition. Is there a different context to use that would be more appropriate?

Lastly, is there a way to re-order the Outbound Routes? Do I just have to delete and re-create everything to have this new route evaluated first?

I believe that a recent update of VitalPBX created internal call routing for DIDs.

I had an issue where two tenants were trying to contact each other. When one would dial the other, the call would go out of the trunk and then back in. After the update, they are routed internally.

Thanks for the info. That has not been my experience, unfortunately. Perhaps the cross tenant diversion happens at a different level. For me on the same tenant it sends it out through the trunk and back in. The incoming route is defined as a DID range. Not sure if that makes a difference.

VitalPBX 3.1.6-1
Asterisk 18.6.0-2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.