TAPI - getting a handle to an existing call
-
I would like to get a handle to a call which was already established. The call must first be established by two persons on two phones and then the modem on one side starts to transmit data to the modem on the other side. How does one do it when the call is in progress ? I know that lineMakeCall returns a handle but I wasn't able to read from that handle. Any ideas or comments ?
-
I would like to get a handle to a call which was already established. The call must first be established by two persons on two phones and then the modem on one side starts to transmit data to the modem on the other side. How does one do it when the call is in progress ? I know that lineMakeCall returns a handle but I wasn't able to read from that handle. Any ideas or comments ?
You may be up a tree with this one. I think there's a hardware limitation in the modems we use today. They require that a dial tone be detected first, then a number dialed, then a carrier established along with filter properties based on an exchange of tone patterns between them. There may be a way to disable these 'features' but it's been a long time since I've played with the old Hayes 'AT' command set. Do some research on this issue before you invest too much time in the TAPI code for it.
-
I would like to get a handle to a call which was already established. The call must first be established by two persons on two phones and then the modem on one side starts to transmit data to the modem on the other side. How does one do it when the call is in progress ? I know that lineMakeCall returns a handle but I wasn't able to read from that handle. Any ideas or comments ?
The modem needs to be set-up to monitor the line before the call is made. Your application will need to keep tracking of all the HCALL handles and then make use of the handle when needed. A lot will depend on what your modem TSP supports, lineGetNewCalls is meant to return a handle to existing calls. Most PABX's have trouble with this, and modems are usually worse. Michael :-)
-
The modem needs to be set-up to monitor the line before the call is made. Your application will need to keep tracking of all the HCALL handles and then make use of the handle when needed. A lot will depend on what your modem TSP supports, lineGetNewCalls is meant to return a handle to existing calls. Most PABX's have trouble with this, and modems are usually worse. Michael :-)
Michael, The problem is I am dealing with two modes of operation. one mode is automatic and works fine with a modem on a medical device dialing a center and transmitting data automatically. Another mode of operation is manual or not automated system which requires a patient to call a medical center first. While talking on the phone the doctor requires the patient to press a transmit button which should send the data on the phone line to the doctor. That is the reason I wanted to get a handle for an existing line. Actuall, my programmer dealing with the matter has managed to get a handle to the comm port, but when doing the ReadFile it returns with no data. Well, if you can help, it would be nice. Bye.
-
Michael, The problem is I am dealing with two modes of operation. one mode is automatic and works fine with a modem on a medical device dialing a center and transmitting data automatically. Another mode of operation is manual or not automated system which requires a patient to call a medical center first. While talking on the phone the doctor requires the patient to press a transmit button which should send the data on the phone line to the doctor. That is the reason I wanted to get a handle for an existing line. Actuall, my programmer dealing with the matter has managed to get a handle to the comm port, but when doing the ReadFile it returns with no data. Well, if you can help, it would be nice. Bye.
A lot depends on how your hardware is set-up, is the modem and phone plugged into the same extension? TAPI needs to have opened the device (modem) to be able to see the calls on the line. Your application needs to open the line device using lineOpen and monitor the events and keep a track of the active HCALL handles. You should then be able to do the data transfer using lineGetID to get the COM port. Actually, thinking about it if you have the device opened when the call comes in then you might be able to use lineGetID on the device rather than the call. http:\\www.julmar.com has some TAPI utilities for monitoring lines, you might want to see if these can see the call handle. Also the TAPI Browser on the platform SDK is usefully for seeing what handles are available to you. Michael :-)