I am trying to design an application that can test the quality of calls between two remote locations and I like to answer a call on another site automatically please if someone can help me
You probably need to go through JTPAI 1.2 specification and go over the introduction part of the JTAPI developer guide. You can search for them online. When you install JTAPI a sample app called makecall is also installed along with source code. Go through the source code and use it as starting point to understand who to initialize Cisco JTAPI and invoke the API.