I am using Asterisk as a voice mail server for my legacy PBX.
For that reason, the extensions that exist on my legacy PBX, I have also set them up as custom extensions on Asterisk with mail boxes. To route these numbers to my legacy PBX when dialing from a regular Asterisk extension, I have added a custom dial string that points to a trunk to my legacy system.
That works well, problem is I can only point to one trunk dialing out.
I would like to make use of the fact that I have several trunks that could failover to each other, as I could with outbound routes.
Is there a way to point a custom extension to an outbound route using a custom dial string or any other way to reconcile that?
The default outbound route screen on FreePBX has three outbound trunks. I’m pretty sure you can go nuts if you want and use a bunch of them.
In the same form, the "Dial Patterns that will use this Route " settings should take care of just about any dial strings you can think of.
My problem is, that I want to send numbers out on a trunk, that also exist within Asterisk as extensions.
How would I accomplish that?
I assume that when matching a dialed number, Asterisk always prioritizes local extensions over sending digits out on a trunk.
E.g. I have 2517 as a custom extension in Asterisk.
When someone dials 2517 I want these digits to get sent out on a trunk.
There was a request last week where someone asked why, if they had extensions that were also their DID, why the calls went out over the trunk to get answered when they should have been answered locally.
Based on that, I’d say “Try it”. I’m not sure which one it prefers (I’ve never built a system that needed to do that) but from the information I have available, you might be surprised to find that it does what you want.
If I understand what you are asking, I think you want the following dial string for the remote extensions:
Thanks for your help guys.
This is the entry in my device options, that makes it work.
Now let’s say I wanted the same functionality not only for local extensions, but also for calls coming in on a SIP trunk from a second Asterisk server.
So basically for all calls, not only local.
How would the dial string look then?
Actually local/[email protected] works for calls coming in from a trunk as well.
So thanks guys, that was really helpful!