I just read about adding (LINE_CREATE) and removing (not supported)
lines dynamically.
I wonder - is there a simpler approach to just re-initialize the TSP?
E.g. is it possible to send a message from the TSP to TAPI which causes
TAPI to reinitialize the TSP, i.e. calling TSPI_providerEnumDevices again?
thanks
Klaus
Klaus,
why do you think that removing lines dynamically is not supported?
Indeed it is: via LINE_REMOVE message.
> I wonder - is there a simpler approach to just re-initialize the TSP? E.g.
> is it possible to send a message from the TSP to TAPI which causes TAPI to
> reinitialize the TSP, i.e. calling TSPI_providerEnumDevices again?
It is only possible to re-init the *whole* TAPI system by sending
LINE_LINEDEVSTATE message with LINEDEVSTATE_REINIT.
But this isn't recommended for your scenario because with _REINIT *all* TAPI
apps need to lineShutdown() / phoneSutdown() all devices and *all* TSPs re
affected.
If only one TAPI app isn't smart enough to handle _REINIT than the whole
TAPI system is "deadlocked", i.e.e waiting on this one TAPI app to shutdown.
I'd regard such an an approch as quick and dirty.
A TAPI compliant solution is the usage of LINE_CREATE / LINE_REMOVE.
--
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.
Hi Andreas!
I was confused by this paragraph (from
http://msdn.microsoft.com/en-us/library/ms725223%28VS.85%29.aspx )
...Devices cannot be removed dynamically. If a service provider wants to
remove a line from service, it can send a LINE_LINEDEVSTATE
(LINEDEVSTATE_OUTOFSERVICE) message. It would then refuse (for example,
by returning LINEERR_INVALLINESTATE) to perform any operation with the
device until it returns to service or the provider is shut down and
restarted (in which case the device could not be declared in
TSPI_providerEnumDevices, effectively removing it from the system)....
>> I wonder - is there a simpler approach to just re-initialize the TSP? E.g.
>> is it possible to send a message from the TSP to TAPI which causes TAPI to
>> reinitialize the TSP, i.e. calling TSPI_providerEnumDevices again?
>
> It is only possible to re-init the *whole* TAPI system by sending
> LINE_LINEDEVSTATE message with LINEDEVSTATE_REINIT.
> But this isn't recommended for your scenario because with _REINIT *all* TAPI
> apps need to lineShutdown() / phoneSutdown() all devices and *all* TSPs re
> affected.
> If only one TAPI app isn't smart enough to handle _REINIT than the whole
> TAPI system is "deadlocked", i.e.e waiting on this one TAPI app to shutdown.
> I'd regard such an an approch as quick and dirty.
> A TAPI compliant solution is the usage of LINE_CREATE / LINE_REMOVE.
Ok. Thanks
Klaus
Klaus,
yes, I agree that this paragrapg is confusing - because it is wrong.
LINE_REMOVE is supported by TAPI.
I've just sent a comment about this with feedback link on the references web
page.
I've built a TSP that uses LINE_CREATE and LINE_REMOVE to dynamically add
and remove line devices.
So this concept definitely works.
> Ok. Thanks
You are welcome.