I success to run a trunk (iax or sip) between your two PBXs .
and i success to transfer call from A to B ( from provider trunk to the trunk i build )
see pic i attached
how to config outgoing call from B ( the trunk i build ) to A and transfer him to provider trunk ??
trunk
1.Can B register to the Provider Trunk as well? That would be easiest.
2.Put the IAX trunk in the from-internal context. The calls will follow the same dial plan as a phone and be able to dial all the extensions. Once the call is in A, route it out via our existing outbound routes. Inbound route on A that has the trunk as a destination.