I wanted to make a Java application which would dial a telephone
number using the modem. When the person on the other end lifts up the
telephone (answers the phone), the application should start playing an
audio file(eg. .wav file).
The approach I took was using the Java Communications
API(javax.comm.). As my modem is connected to the serial port on my
computer I send AT commands to make the phone call (ATDT2222222). This
is working fine and the call is being placed. I can also send the
audio file the serial port throught the OutputStream class. Now after
this I am struck. How do I play this file.
I wanted to know whether this is possible at all? Whether I am
approaching the wrong way? If it is possible, then please give some
suggestions or samples. If it is not possible , then what is the best
way to do so (like eg. JTAPI, Java Sound API).