IVR Routing with multiple PBX's

I can think of one way to do this, but figure I may be taking the long way around and making it more complex.

We have a main PBX that all out in/outbound trunks come into, and then we have some smaller Atom based PBX’s at various locations that all communicate with the main PBX.

Trunks ---- Main_PBX ----- PBX_A  (extensions 2XX)
                                    |----- PBX_B  (extensions 3XX)

Now if I have a DID number, it’s simple to just setup an inbound route on Main_PBX to sent it on the trunk to PBX_A, and then on PBX_A I can take and setup and inbound route matching the same DID number to send it to the desired extension. Works perfect!

Now we have a main number, and it comes into the main company IVR, a and I want to allow a user for example to dial 2 to go to extensions 202, or 3 to go extension 303, or 4 to go to extension 204.

Here is the problem, if I say on press of 2 go down trunk to PBX_A, on the press of 4 you would also go to the trunk to PBX_A, then it does send it down the trunk. When the call hits PBX_A I have the problem, as I have the DID for the main number that hit the initial IVR, but to way to tell it how it should be reaching the user at 202 or at 204 per the above example. So I am stuck with only being able to reach a single extension once it’s handed off to the remote PBX.

Is there some way to do any call selection, or pass along selection info to the next PBX to match on once it’s directed down the appropriate trunk? Has anyone run into this, and how did you handle it?

The chained PBX’s for sure add a new layer to how to handle call routing, and with DID’s it’s still darn easy, but add in an IVR to make path selections, and I don’t have a simple answer, outside of maybe a bunch of Misc Destinations. Trying to do this for several hundred phones, with a half dozen remote locations, Misc Destinations could get quite extensive. If the IVR can tag things, so you can route/select at the far end PBX based on that, it would seem idea, and then you can just point the IVR keypress to the desired trunk.

You probably need to make outbound routes to suit the “foreign extensions” to use the inter-asterisk trunks as you probably surmised but the context of such trunks needs to include the endpoints on the far end you need access to, from-internal is a ubiquitous but overly generous starting point.

. . . and you might need to suffix the far end extensions with # . (I haven’t tested that for a while though)

Not sure I am following you, but thanks for the input. Can you explain what you mean by “make outbound routes to suit the foreign extensions”? How can I make an IVR so it let’s the signaling going down the IAX trunk to a remote PBX know, hey I am sending you this call, but it’s going to extension 201 or 204, or whatever. As I did set the IVR for example to sent it to trunks to PBX_A, but outside of that I don’t see how to pass any other info…