Problem with asterisk AGI

have a fairly complicated setup. Extensions (1,2 and 3). In 3 - I execute AGI in java which plays few wav files depending on external parameters.

Can I have a dial plan inside my AGI? If not, how do I accomodate user who needs to reach extension 2 from my agi? I have tried stream file and get data but the two commands did not work at all.