Routing IAX betwen more than 2 boxes

Asterisk 1.4.23.1 I am trying to route between three asterisk systems

I need to route an sip trunk out an IAX2 trunk then two a box in one trunk then out another IAX2

sip —> box1 —iax2 -> box2 --iax2 --> box3 --> sip phones
how do I route between routes

I’ve have some success with ring groups and # to dial out a trunk

but not a lot any suggestions on how to do this would be great

thank you!