"Akil Dsouza" <d.a
...@teles.com> schrieb im Newsbeitrag
news:uYXvmz9UKHA.4780@TK2MSFTNGP05.phx.gbl...
> TapiApplication<----->TAPISRV<----->TSP<------>CSTAServer
> Is there any way to notify the Tapi application about the TCP Connection
> loss between TSP and CSTAServer without a request from the
> the TAPI application. I am doing a TCP connection to CSTA Server from my
> TSP.
> If for some reason CSTA server closes the connection with my TSP(ofcourse
> it gets notified at TSP) is it possible to notify the same to the TAPI
> application
> without any requests(TSPI_xxx() functions) from the TAPI application.
Akil
yes this is possible in some ways:
1) forcible close all open lines devices with a LINE_CLOSE messages.
In this case all TAPI app need to try to lineOpen() their devices again.
In this solution it is recommended to let TSPI_lineOpen() fail, e.g. with
LINEERR_RESOURCEUNAVAIL, until you have the CSTA line re-established.
You need to check if all TAPI apps that you want to support can handle this.
I guess there are some TAPI apps that won't deal well with such a
situation...
2) usage of LINE_LINEDEVSTATE messages with LINEDEVSTATE_DISCONNECTED on
CSTA connection loss and LINEDEVSTATE_CONNECTED on CSTA
connection(re-)established.
LINEDEVCAPS.dwLineStates should contain LINEDEVSTATE_DISCONNECTED |
LINEDEVSTATE_CONNECTED.
Additionally LINEDEVSTATUS.dwDevStatusFlags should reset / set
LINEDEVSTATUSFLAGS_CONNECTED appropriately.
You need to check if all TAPI apps that you want to support can handle this.
I guess this can be handled by more TAPI apps than solution #1, since in the
easiest case they need to do nothing.
> I am doing a TCP connection from my TSP to the CSTA server during
> TSPI_providerInit()
> So if the CSTA server closes the connection ofcource i can notify the
> application with an error upon receiving a request from the
> application( TSPI_xxx() function)
> Is there any way to notify the tapi application about the connection loss
> errror immediately so that the application---->TAPISRV---> invokes a
> TSPI_providerShutdown()[for doing Uninitialize] and
> TSPI_providerInit()[for normal Initialize] again?
It isn't recommended to force a TSPI_providerShutdown() for just your TSP's
CSTA connection being (temporarily) down.
If you want to try it anyway your TSP can send a LINE_LINEDEVSTATE messages
with LINEDEVSTATE_REINIT.
This affects the complete TAPI system, i.e. *all* TSPs and *all* TAPI apps.
You need to check if all TAPI apps that you want to support can handle this.
I guess there are some TAPI apps that won't deal well with such a
situation...
So my suggestions is to re-establish the CSTA connection in the background
and use solution #2 to notify TAPI apps about the current dev status.
--
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
TAPI development around the world (Frappr! map):
http://www.frappr.com/TAPIaroundTheWorld
* Please post all messages and replies to the newsgroup 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.