Menu

#22 Missing call state notification in TAPI 3.x CS_OFFERING

ActivaTSP v1.4.x
open
None
5
2012-02-12
2010-06-23
No

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.

Discussion

  • agupta

    agupta - 2011-11-21

    I have also tested it , and once we make this change even with dialer.exe we are able to get callerid properly .

     
  • Cristian Onet

    Cristian Onet - 2012-01-31

    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?

     
  • Cristian Onet

    Cristian Onet - 2012-02-04

    Patch that fixes the problem

     
  • activatsp

    activatsp - 2012-02-09
    • status: open --> closed-out-of-date
     
  • activatsp

    activatsp - 2012-02-12
    • assigned_to: nobody --> activatsp
    • status: closed-out-of-date --> open
     
  • activatsp

    activatsp - 2012-02-12

    Hi, we will review this bug and probably add to the code base.

     

Log in to post a comment.