*
The moose likes Java in General and the fly likes Java Telephone API (JTAPI) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Telephone API (JTAPI)" Watch "Java Telephone API (JTAPI)" New topic
Author

Java Telephone API (JTAPI)

Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
Ok , I know in C/C++ you can use the TAPI to write a computer answering machine program.
What I am curious of is can I use this java api to do the same thing.

I don't have PBX boxs or anything hi-tec.
But I do have a V.92 data/fax/voice modem in my computer.
One day I installed the fax component of the windows xp components from install cd.
All I had to do to fax was run a rj11 line from my modem to my phone wall jack.
It works fine!
I looked and all microsoft fax/dialer.exe ..etc software uses the TAPI functions for phone ...etc .
So I thought their should be a java equivalent to this since I am better at coding with java.

But I am curious do you need special hardware or software like asterisk ...etc to use the JTAPI.
I am kind of looking for a way to use the TAPI but just in java not in C/C++. I am not willing to start creating JNI functions for this purpose. So I hope JTAPI is what will work with my V.92 modem.

Basically I want to create a answering machine program in java that play's a different greeting message based on the caller id.

I also saw in device manager that my V.92 modem is using com3 I don't get this because the V.92 modem is plugged in to the PCI 2 slot (also listed in device manager)??? So I guess I don't know what the com0 to com255 means ? thought com meant serial port i.e the one or two serial pins on the back of the computer???

If com3 is some type of virtual port then maybe I could use java communication api to communicate with it and send/recieve AT commands to the V.92 modem. Bypassing the whole JTAPI thing.

Any help would be great.
Since I am kind of lost in the dark to the above questons.

The Java Telephone api makes me think that this api was just the function names of things that the providers of the deviceswill use to have their product supported by a java api. Not an already functioning telephone api like TAPI but maybe I am wrong?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Sam Doder wrote:The Java Telephone api makes me think that this api was just the function names of things that the providers of the deviceswill use to have their product supported by a java api. Not an already functioning telephone api like TAPI but maybe I am wrong?

No, I think you are right about that. JTAPI is just a spec and Sun didn't write a reference implementation for the spec. Other people have, though, I believe, so you should be able to find JTAPI implementations. Theoretically you could write your own implementation, but that would be a lot of work. A lot. You don't want to do that.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
The Java Telephone api makes me think that this api was just the function names of things that the providers of the deviceswill use to have their product supported by a java api. Not an already functioning telephone api like TAPI but maybe I am wrong?

This isn't unprecedented. JDBC is an API where Sun didn't ship an implementation before JavaDB -a.k.a. Apache Derby- came along (disregarding the ODBC/JDBC bridge). And for JSAPI (the Java Speech API) Sun never shipped any implementation - it has always been up to 3rd party vendors to do that.


Ping & DNS - my free Android networking tools app
Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
Well , yes I am not willing to write it from scratch. Also not willing to use the JNI nd write wrapper class for a java version of TAPI.

So the question then becomes does anybody know of a implementation of JTAPI that works for most V.92 data/fax/voice modems?
My V.92 came with my dell dimension 8100 around 2003 I bought it?

I found this link but I am unsure if this will work
http://gjtapi.sourceforge.net/

If I cann't find a version for it to work.

Then I am wondering if I use the java comm api and issue AT command thru com3 (com3 is where it say's in device manager that the V.92 modem is using As well as in PCI slot 2 device 0 function 0)

If anything if I cann't get a version of the java comm to work then I can create a one function wrapper class for CREATEFILE c++ to open \\?\com3 ,...etc.

Curious the if I have all the functionality provided by the modem doing it this way.
I know their is AT commands to get the caller id info ,...etc

Thanks for any help.
Seems though their should be a working api for sending/recieveing faxes from a V.92 modem in java?
And if that is the case the it stands to reason since these modems are also voice seems their should be a java equivalent to get caller id ,...etc etc

In C++ you can do it thru the TAPI but it is a pain, and I would much rather do it in java and beable to provide a quick GUI interface. Win32 api gui stuff is a pain for me to try and do. Did it once don't really want to do it again
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
This may be a starting point: http://xtapi.sourceforge.net/ You said you have TAPI installed, right?
Sam Doder
Ranch Hand

Joined: Feb 06, 2008
Posts: 204
Ok , forget JTAPI or TAPI for a second.
I opened hyperterminal and issued the command At Dt = phone number to dial
And it dials fine and answers fine using these commands.
I know my modem is using com3.
So I thought writing a program using the javax.comm package would do the same thing that hyperterminal does.
In Hyperterminal I seleted com3 so the only thing is am I sending the data in the wrong format or something?

Heres my code
When I run it, it echos back what I typed so the java app is not failing to run however I should here the modem dialing a number when I issue the At DT = command. Maybe hyperterminal is sending other data to the modem with every command i send. Just don't know wish somebody could tell my what is going wrong?
Please feel free to compile/run my program to test it out. (note you will need the java.comm package ,...etc to run it, also you will probably have to change the com port to a different com port if your modem is not on COM3 , remember capitial letters makes a differents when typeing COM3 or com3 in the program)

 
wood burning stoves
 
subject: Java Telephone API (JTAPI)
 
Similar Threads
Make call to phone with java + broadband connection?
Can i use JTAPI after using Java Comm ?
Passed 92%
what is JTAPI ?
How can i trap telephone ring in java