Redirect Extension to Remote Analog Trunk

A bit of a weird situation here and I’m wondering if someone can help me out.

First a little bit of background: Right now we have a number of legacy Trixbox servers at a number of different sites. We’re currently working on consolidating them down to a single FreePBX server. One thing the legacy Trixbox servers provide is an analog interface to an on-site legacy paging system. We’re looking at replacing these with SIP Gateways at some point, but in the meantime we would effectively like to use the old Trixbox servers as gateways. All remote sites dial 60|XX to access the analog trunk (zap/0)
My thought is as such:

Create an IAX2 trunk between the new FreePBX server and the individual legacy Trixbox servers
Create a custom context for each of the sites to redirect calls to 60|XX via the IAX2 trunk
Assign the appropriate site context to the individual extensions

Right now I have the trunks created, but I think I’m getting hung up on the custom context part, it looks as follows and I’m pretty sure it’s not right.

exten => _60[0-9][0-9],1,Dial(IAX2/sitebiax2/${EXTEN})
include => from-internal

The configuration for the IAX2 trunk is as follows:


an “iax2 show peers” shows the trunk as OK, but I think my syntax for the Dial command is wrong. Any help would be appreciated. Thanks!

Why would you need to do this? Just set an outbound route fir those ranges to the trunk.

Sorry, should have been more clear.

All of the existing sites (call them B C and D) currently use 60|XX to access their local analog trunk. Their extensions will be moved to the new amalgamated server (site A). So if I were to set an outbound route for 60|XX on site A where their extensions would live, I could only assign it to one trunk correct? Or is there a way to assign a trunk a context and put the extensions in a matching context so that when an extension that was on site B dials 60|XX is goes out trunkb but when an extension that was on site C dials 60|XX it goes out trunkc?

You can use the CID field in the outbound route or the extension routing module.

Either will do what you want.

I don’t know if the extension routing module would be feasible for the number of extensions I’d have to drag to the blocked list. How would I go about using the CID field in the outbound route?

May I ask you a question so I can understand how to help you better

1 - Do you know where the documentation is (support/wiki)
2 - Did you read the docs on outbound routes (freepbx/modules/outbound) before you asked

I don’t know all the syntax off the top of my head. If there is something specific you don’t understand, then please ask. But I do ask that you utilize all our support resources

Thank you…Scott

Thanks Scott, now that I know what I’m looking for I was able to RTFM and figure it out. Not sure why I had so much trouble locating that info earlier. Thanks again!

No problem, we have made a lot of changes to site so I wanted to know how we were not getting the info across.

Take note that use can use wildcards in the outbound route CID field.

Good luck