Hi,
I am developing a TAPI 3.x application (popup) and I'm using Activa TSP to test it. I've set it up and everything seems to work as expected I receive incoming call notifications and I can make calls using TAPI but I have the following problem.
When I register the call notifications interface in TAPI (see http://msdn.microsoft.com/en-us/library/ms732558%28VS.85%29.aspx\) I do it with the monitor flag set to true and the owner flag set to false. When receiving an incoming call on a monitored extension I get the following notifications:
1. Call notification event and I can get the caller ID
2. Call state change event with the state 'Offering'
3. After I answer (using a desktop phone connected to the extension) I get a call state change event with the state 'Connected'
4. After I hangup (using a desktop phone connected to the extension) I get a call state change event with the state 'Disconnected'
This flow is OK but if I register the call notification interface with the owner flag set to true I get the following flow.
1. Call notification event and I cannot get the caller ID (it's empty)
2. No call state change event with the state 'Offering'
3. After I answer (using a desktop phone connected to the extension) I get a call state change event with the state 'Connected' and I can get the caller ID
4. After I hangup (using a desktop phone connected to the extension) I get a call state change event with the state 'Disconnected'
I need to register the call notification interface as owner to be able to reject calls or forward calls from the applications but I also need to get the caller ID while the call is offering.
After some debugging and thanks to the fact that Activa TSP's code is open source I found that the bug is in Activa TSP.
In asttaiprovider.cpp:3095
pac->dwAddrCapFlags = LINEADDRCAPFLAGS_DIALED | LINEADDRCAPFLAGS_ACCEPTTOALERT;
the LINEADDRCAPFLAGS_ACCEPTTOALERT tells TAPI 3.x to call TSPI_lineAccept http://msdn.microsoft.com/en-us/library/ms725527%28VS.85%29.aspx before alerting which returns an error (due to the nature of the TSP) and causes the whole call notification flow to miss a state. I've removed that flag and can confirm that it fixes the described bug. Sorry for not attaching as a patch but it should be relatively simple to commit the change based on this description.
I have also tested it , and once we make this change even with dialer.exe we are able to get callerid properly .
Any news about this?
Since I've reported this problem Activa 1.8.x was released but this problem was not fixed, do you have any intetion to add this to the codebase?
Patch that fixes the problem
Hi, we will review this bug and probably add to the code base.