Trunk to trunk transfer

I have 2 Asterisk/freepbx server in 2 separate locations. One is used primarly for TDM to VoIP gateway and other is used in a separate location as PBX.

I have an autoattendant application on Asterisk1(GW) which allows for the call to enter an extension and based on extension they enter I want to route the call to Asterisk2(PBX). Asterisk1 is not aware of the extensions on Asterisk2, all it knows is that anything _6XXX needs to go to Asterisk2. When i call from from an extensions on Asterisk1 the call does get sent to Asterisk2 properly. But when I enter the extension during the Announcement on Asterisk1 all i get is that the extension is invalid.

How can I configure a destination trunk in the Announcement so that it goes to Asterisk2

Am I making this too difficult.

-mahmood

If the Announcement is part of an IVR then the IVR is expecting a selection 1,2,3, etc… and not an extension. Is the message that it is not a valid choice or extension?

The other issue is that incoming calls are routed different than outgoing calls.

Inbound calls (typically from-trunk, from-pstn, from-zaptel) use inbound routes to send them to the internal extensions and services.

Outbound calls (from-internal) are the local extensions they use the outbound routes to send them to trunks. You are trying to route an inbound call using an outbound rule.

You can change the context on your incoming calls from from-trunk to from-internal and then the incoming calls will obey the outbound rules.