Discussion:
Windows 8: Inbound calls not handled by TAPI as delivered by TSP
(too old to reply)
d***@gmail.com
2013-01-16 21:19:37 UTC
Permalink
Have observed this with my company's TSP (same issue as expressed in Windows Desktop Development Forums at:
[http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/1d9646d9-ea18-4bfa-8214-d017cab97d56]

The same TSP that has been working well with XP and Windows 7 fails to work on Windows 8 with respect to inbound calls. Outbound seems to be fine.

On receipt of an inbound call, our TSP issues a LINE_NEWCALL msg, followed by a LINE_CALLSTATE msg. This is usually followed by a TSPI_lineGetCallInfo() and a
TSPI_lineAnswer().
On Windows 8, we see a TSPI_lineCloseCall() invocation to TSP even before the LINE_NEWCALL and LINE_CALLSTATE messages are completely processed.

If you compare the tapisrv tracing in Windows 7 vs. Windows 8, on receipt of the LINE_NEWCALL msg, there is a 'DestorytCall' immediately issued after the 'CreateCall'. This has the direct (or perhaps side) effect of TAPI issuing the TSPI_lineCloseCall(). When the LINEEVENT message returns, htCall has a Null value. In this case, we delay 250 ms and send the LINE_NEWCALL msg again. (four times).
The same result occurs.

***********************
WINDOWS 8 TRACE:
***********************
[3344] 15:37:25:615: [INFO ] LineEventProcSP: HTapiLine=00000000000103BB, HTapiCall=0000000000000000, msg=1f4, P1=x187b06c0, P2=x187b06e0, P3=x0
[3344] 15:37:25:615: [TRACE] LineEventProc
[3344] 15:37:25:615: [TRACE] CreatetCall: enter, ptLine=000000EA18125250
[3344] 15:37:25:615: [INFO ] CreatetCall: calling NewObject ptCall 000000EA18125370
[3344] 15:37:25:615: [TRACE] CreatetCall: NewObject returned 0x10322
[3344] 15:37:25:615: [TRACE] CreatetCall: exit, new ptCall=000000EA18125370
[3344] 15:37:25:662: [TRACE] DestroytCall: enter, ptCall=x000000EA18125370
[3344] 15:37:25:927: [INFO ] LineEventProcSP: HTapiLine=00000000000103BB, HTapiCall=0000000000000000, msg=1f4, P1=x187b06c0, P2=x187b06e0, P3=x0
[3344] 15:37:25:927: [TRACE] LineEventProc
[3344] 15:37:25:927: [TRACE] CreatetCall: enter, ptLine=000000EA18125250
[3344] 15:37:25:927: [INFO ] CreatetCall: calling NewObject ptCall 000000EA18125370
[3344] 15:37:25:927: [TRACE] CreatetCall: NewObject returned 0x10311
[3344] 15:37:25:927: [TRACE] CreatetCall: exit, new ptCall=000000EA18125370
[3344] 15:37:25:927: [TRACE] DestroytCall: enter, ptCall=x000000EA18125370
[3344] 15:37:26:178: [INFO ] LineEventProcSP: HTapiLine=00000000000103BB, HTapiCall=0000000000000000, msg=1f4, P1=x187b06c0, P2=x187b06e0, P3=x0
[3344] 15:37:26:178: [TRACE] LineEventProc
[3344] 15:37:26:178: [TRACE] CreatetCall: enter, ptLine=000000EA18125250
[3344] 15:37:26:178: [INFO ] CreatetCall: calling NewObject ptCall 000000EA18125370
[3344] 15:37:26:178: [TRACE] CreatetCall: NewObject returned 0x10300
[3344] 15:37:26:178: [TRACE] CreatetCall: exit, new ptCall=000000EA18125370
[3344] 15:37:26:178: [TRACE] DestroytCall: enter, ptCall=x000000EA18125370
[3344] 15:37:26:443: [INFO ] LineEventProcSP: HTapiLine=00000000000103BB, HTapiCall=0000000000000000, msg=1f4, P1=x187b06c0, P2=x187b06e0, P3=x0
[3344] 15:37:26:443: [TRACE] LineEventProc
[3344] 15:37:26:443: [TRACE] CreatetCall: enter, ptLine=000000EA18125250
[3344] 15:37:26:443: [INFO ] CreatetCall: calling NewObject ptCall 000000EA18125370
[3344] 15:37:26:443: [TRACE] CreatetCall: NewObject returned 0x102ff
[3344] 15:37:26:443: [TRACE] CreatetCall: exit, new ptCall=000000EA18125370
[3344] 15:37:26:443: [TRACE] DestroytCall: enter, ptCall=x000000EA18125370
[3344] 15:37:26:443: [INFO ] LineEventProcSP: HTapiLine=00000000000103BB, HTapiCall=0000000000000000, msg=2, P1=x2, P2=x1, P3=x0
[3596] 15:37:26:443: [INFO ] Got a line spevent, htLine = 0x103bb, htCall = 0x0, dwMsg = 0x2

***********************
WINDOWS 7 TRACE:
***********************
[4984] 15:46:18:464: [INFO ] LineEventProcSP: HTapiLine=0000000000010300, HTapiCall=0000000000000000, msg=1f4, P1=x5f48790, P2=x5f487b0, P3=x0
[4984] 15:46:18:464: [TRACE] LineEventProc
[4984] 15:46:18:464: [TRACE] CreatetCall: enter, ptLine=0000000005025B30
[4984] 15:46:18:464: [INFO ] CreatetCall: calling NewObject ptCall 0000000005025C50
[4984] 15:46:18:464: [TRACE] CreatetCall: NewObject returned 0x101ee
[4984] 15:46:18:464: [TRACE] CreatetCall: exit, new ptCall=0000000005025C50
[4984] 15:46:18:464: [INFO ] LineEventProcSP: HTapiLine=0000000000010300, HTapiCall=00000000000101EE, msg=2, P1=x2, P2=x1, P3=x0
[4716] 15:46:18:464: [INFO ] Got a line spevent, htLine = 0x10300, htCall = 0x101ee, dwMsg = 0x2
[4984] 15:46:18:464: [INFO ] LineEventProcSP: HTapiLine=0000000000010300, HTapiCall=00000000000101EE, msg=2, P1=x2, P2=x0, P3=x0
[4716] 15:46:18:464: [TRACE] LineEventProc
[4716] 15:46:18:464: [EVENT] LineEventProc: LINE_CALLSTATE event x2
[4716] 15:46:18:464: [TRACE] CreatetCallClient: enter, ptCall=0000000005025C50,
[4716] 15:46:18:464: [INFO ] CreatetCallClient: calling NewObject, ptCallClient = [0000000005025D10]
[4716] 15:46:18:464: [TRACE] CreatetCallClient: exit, new ptCallClient=0000000005025D10
[4716] 15:46:18:464: [TRACE] CreatetCallClient: enter, ptCall=0000000005025C50,
[4716] 15:46:18:464: [INFO ] CreatetCallClient: calling NewObject, ptCallClient = [0000000005025DE8]
[4716] 15:46:18:464: [TRACE] CreatetCallClient: exit, new ptCallClient=0000000005025DE8
[4716] 15:46:18:464: [INFO ] LineEventProc: i = [0] corresponding ptCallClient [0000000005025DE8]
[4716] 15:46:18:464: [INFO ] LineEventProc: ptCallClient->ptLineClient[0000000005025A00]
[4716] 15:46:18:464: [INFO ] LineEventProc: ptLineClient->ptLineApp[0000000005022310]
[4716] 15:46:18:464: [INFO ] LineEventProc: setting msg->InitContext to ptLineApp[0000000005022310]->InitContext of [00000000800003FF]
[4716] 15:46:18:464: [INFO ] LineEventProc: setting msg->OpenContext to [00000000800003EE]
[4716] 15:46:18:464: [INFO ] FMsgDisbled: dwAPIVersion<= TAPI_VERSION3_0, msg will be enabled
[4716] 15:46:18:464: [TRACE] FMsgDisabled return 0
[4716] 15:46:18:464: [INFO ] LineEventProc: sending LINE_APPNEWCALL, ptClient[0000000005021CA0]
[4716] 15:46:18:464: [TRACE] WriteEventBuffer - enter
[4716] 15:46:18:464: [TRACE] WriteEventBuffer: SetEvent 0000000000000CD0 for local client
[4716] 15:46:18:464: [INFO ] FMsgDisbled: dwAPIVersion<= TAPI_VERSION3_0, msg will be enabled
[4716] 15:46:18:464: [TRACE] FMsgDisabled return 0
[4716] 15:46:18:464: [TRACE] WriteEventBuffer - enter
[4716] 15:46:18:464: [TRACE] WriteEventBuffer: SetEvent 0000000000000CD0 for local client
[4716] 15:46:18:464: [INFO ] LineEventProc: i = [1] corresponding ptCallClient [0000000005025D10]
[4716] 15:46:18:464: [INFO ] LineEventProc: ptCallClient->ptLineClient[0000000005026600]
[4716] 15:46:18:464: [INFO ] LineEventProc: ptLineClient->ptLineApp[00000000050264F0]
[4716] 15:46:18:464: [INFO ] LineEventProc: setting msg->InitContext to ptLineApp[00000000050264F0]->InitContext of [00000000800003FF]
[4716] 15:46:18:464: [INFO ] LineEventProc: setting msg->OpenContext to [0000000000000000]
[4716] 15:46:18:464: [INFO ] FMsgDisbled: dwAPIVersion<= TAPI_VERSION3_0, msg will be enabled
[4716] 15:46:18:464: [TRACE] FMsgDisabled return 0


Has anyone worked around this or found a solution?
d***@gmail.com
2013-01-18 14:12:03 UTC
Permalink
solution posted at: http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/1d9646d9-ea18-4bfa-8214-d017cab97d56

Bottom line is that on Windows 8 64-bit (have not checked 32-bit yet), the TSP's
invocation of the callback function (given to it by TAPI) needs to match the
signature of the function. This is in contrast to Microsofts specification of usage. You MUST use DWORD_PTR, not DWORD.

The MSD says to cast the parameter &htCall to a DWORD. http://msdn.microsoft.com/en-us/library/windows/desktop/ms725235%28v=vs.85%29.aspx
LINE_NEWCALL
htLine = (HTAPILINE) hLineDevice;
htCall = (HTAPICALL) 0;
dwMsg = (DWORD) LINE_NEWCALL;
dwParam1 = (DWORD)(HDRVCALL) hdCall;
dwParam2 = (DWORD)(LPHTAPICALL) &htCall;
dwParam3 = (DWORD) 0;
http://msdn.microsoft.com/en-us/library/windows/desktop/ms725228%28v=vs.85%29.aspx
void CALLBACK Line_Event(
HTAPILINE htLine,
HTAPICALL htCall,
DWORD dwMsg,
DWORD_PTR dwParam1,
DWORD_PTR dwParam2,
DWORD_PTR dwParam3
);
r***@gmail.com
2013-01-22 09:57:55 UTC
Permalink
Post by d***@gmail.com
solution posted at: http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/1d9646d9-ea18-4bfa-8214-d017cab97d56
Bottom line is that on Windows 8 64-bit (have not checked 32-bit yet), the TSP's
invocation of the callback function (given to it by TAPI) needs to match the
signature of the function. This is in contrast to Microsofts specification of usage. You MUST use DWORD_PTR, not DWORD.
The MSD says to cast the parameter &htCall to a DWORD. http://msdn.microsoft.com/en-us/library/windows/desktop/ms725235%28v=vs.85%29.aspx
LINE_NEWCALL
htLine = (HTAPILINE) hLineDevice;
htCall = (HTAPICALL) 0;
dwMsg = (DWORD) LINE_NEWCALL;
dwParam1 = (DWORD)(HDRVCALL) hdCall;
dwParam2 = (DWORD)(LPHTAPICALL) &htCall;
dwParam3 = (DWORD) 0;
http://msdn.microsoft.com/en-us/library/windows/desktop/ms725228%28v=vs.85%29.aspx
void CALLBACK Line_Event(
HTAPILINE htLine,
HTAPICALL htCall,
DWORD dwMsg,
DWORD_PTR dwParam1,
DWORD_PTR dwParam2,
DWORD_PTR dwParam3
);
I am having the same issue. I guess we have to wait for an update from Avaya?
j***@gmail.com
2013-07-05 12:21:50 UTC
Permalink
Post by d***@gmail.com
solution posted at: http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/1d9646d9-ea18-4bfa-8214-d017cab97d56
Bottom line is that on Windows 8 64-bit (have not checked 32-bit yet), the TSP's
invocation of the callback function (given to it by TAPI) needs to match the
signature of the function. This is in contrast to Microsofts specification of usage. You MUST use DWORD_PTR, not DWORD.
The MSD says to cast the parameter &htCall to a DWORD. http://msdn.microsoft.com/en-us/library/windows/desktop/ms725235%28v=vs.85%29.aspx
LINE_NEWCALL
htLine = (HTAPILINE) hLineDevice;
htCall = (HTAPICALL) 0;
dwMsg = (DWORD) LINE_NEWCALL;
dwParam1 = (DWORD)(HDRVCALL) hdCall;
dwParam2 = (DWORD)(LPHTAPICALL) &htCall;
dwParam3 = (DWORD) 0;
http://msdn.microsoft.com/en-us/library/windows/desktop/ms725228%28v=vs.85%29.aspx
void CALLBACK Line_Event(
HTAPILINE htLine,
HTAPICALL htCall,
DWORD dwMsg,
DWORD_PTR dwParam1,
DWORD_PTR dwParam2,
DWORD_PTR dwParam3
);
Not sure to understand ...
You must redefine the function Line_Event ?
How do you do this in vb.Net ? Visual studio doesn't understant DWORD (I use int32 instead), DWORD_PTR (I use IntPtrinstead), HTAPILINE, HTAPICALL...
My program os ok on windows 7, but on windows 8, the program is able to make a call, but no event rised when incoming call.
Andreas Marschall [exMVP TAPI]
2013-07-28 23:06:50 UTC
Permalink
Post by j***@gmail.com
Post by d***@gmail.com
void CALLBACK Line_Event(
HTAPILINE htLine,
HTAPICALL htCall,
DWORD dwMsg,
DWORD_PTR dwParam1,
DWORD_PTR dwParam2,
DWORD_PTR dwParam3
);
Not sure to understand ...
You must redefine the function Line_Event ?
How do you do this in vb.Net ? Visual studio doesn't understant DWORD (I use int32 instead), DWORD_PTR (I use IntPtrinstead), HTAPILINE, HTAPICALL...
My program os ok on windows 7, but on windows 8, the program is able to make a call, but no event rised when incoming call.
Julien,
you are an TAPI application deveöoper, correct?

Unfortunately there is nothing any TAPI aaplication can do to fix this issue.

This issue can only be solved
•either by MS undoing the interface changes on TSPI level
•or by the TSP manufacturers adaption their TSPs to the changed TSPI behaviour

To sum things up here is the situation as I understand it.

Problem: Incoming calls are not reported via TAPI

Affected OS:
•Windows 8 (x64 versiion only)
•Windows Server 2012 (there is only a x64 version)

Affected TSP (feel free to report addional info, e.g. version, fix available etc.)
•Avaya TAPI
•Acatel-Lucent TSP
•Siemens HiPath TAPI 120/170 (V2 R1.66.0)

With the latter TSP I reproduced the issue myself on a MS Surface Pro (with Win8x64).
The other TSPs have been reported by others.

Technical background:

The issue is caused by TAPISRV (Telephony Service) not processing LINE_NEWCALL correctly on the affected OS,
presumable due to additional parameter type checking for the dwParams in LINEEVENT / PHONEEVENT.
It is about DWORD vs. DWORD_PTR.
The issue is only existing on x64 OS because there those two types a different: (unsigned long) vs. (unsigned __int64)
In x86 they are the same (unsigned long), hence in x86 there is no issue.
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.I-B-A-M.de/Andreas_Marschall's_Toto_Tools.htm
* Please post all messages and replies to the group / forum so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
Andreas Marschall [exMVP TAPI]
2013-07-29 04:13:22 UTC
Permalink
Post by Andreas Marschall [exMVP TAPI]
Affected TSP (feel free to report addional info, e.g. version, fix available etc.)
•Avaya TAPI
•Acatel-Lucent TSP
•Siemens HiPath TAPI 120/170 (V2 R1.66.0)
From http://answers.microsoft.com/en-us/windows/forum/windows_8-networking/ugraded-to-windows-8-now-tapi-does-not-work-no/6d80db30-7bee-4301-aaba-2c7b5cc6cdd6 we can this one add to the list of affected TSP:

•NEC TSP (for PBX NEC SL1100)
--
Best Regards
Andreas Marschall
Microsoft MVP for TAPI / Windows SDK / Visual C++ 2003-2008
TAPI / TSP Developer and Tester
My TAPI and TSPI FAQ:
http://www.I-B-A-M.de/Andreas_Marschall's_TAPI_and_TSPI_FAQ.htm
My Toto® Tools (a collection of free, mostly TAPI related tools):
http://www.I-B-A-M.de/Andreas_Marschall's_Toto_Tools.htm
* Please post all messages and replies to the group / forum so all may
* benefit from the discussion. Private mail is usually not replied to.
* This posting is provided "AS IS" with no warranties, and confers no rights.
n***@gmail.com
2013-09-13 12:18:16 UTC
Permalink
same Problem with Siemens HiPath TAPI 120/170 (V2 R1.67.0)
s***@gmail.com
2014-05-28 09:59:11 UTC
Permalink
Still not working under Win 8.1 64bit...
Siemens Hipath 580, TAPI V2 R2.0.68.0000
And no solution in sight after nearly 2 years...this is very annoying...:(
Seems that the companies aren´t informed about their faulty TAPI software?!
Loading...