Calling using Asterisk-Java VIA AMI

hello all i want to know how to play music file to the user when he picks up my phone. in asterisk i can use A(X) in dial application.
But i want to know how can i do the same using asterisk-java.
which method will be useful for me.

I myself has got the reply so i m posting here so that it would be helpfull for others.

TO play music file to the called person i edited my extensions.conf file like this .
exten =>testing,1,Dial(SIP/testing,20,A(${music}))
exten =>testing,n,Hangup()

where ${music} stands for the music that will be played .
from AMI in java-asterisk i used setvariable method to achieve it.
Following is the code.

originateAction.setPriority(new Integer(1));
originateAction.setTimeout(new Integer(30000));
originateAction.setVariable(“music”,“hello-world”);

thats it now i can make the called person here hello-world.