Ravi Kansangara
2013-12-06 13:16:48 UTC
Hi,
I am developing TSP for PBX.
PBX is capable to serve approx. 2000 Lines.
According to me there are two possible ways by which i can expose these lines to TAPI.
--------------------------------------------------------------
1st Method :
--------------------------------------------------------------
I can provide No. of lines in function TSPI_providerEnumDevices.
i.e. *lpdwNumLines = 2000
(These are Max. no. of Lines supported by PBX & not the no. of lines currently active/accessible) Am i correct ?
If i am correct, in this way TAPISRV.exe will call function TSPI_lineGetDevCaps 2000 times to get line device capabilities. (Which lines should be obviously accessible from TSP & PBX side)
Also TSP should fill Device Id of each line to its structure got in TSPI_lineGetDevCaps function.
Here my problem is that before exposing 2000 lines from TSP to TAPI,
TSP must initialize them & get its information from PBX. That is after user set PBX configuration from TSP GUI, i have to stuck there till all the lines are exposed from PBX to TSP. Am i correct ?
--------------------------------------------------------------
2nd Method :
--------------------------------------------------------------
I can provide No. of lines in function TSPI_providerEnumDevices as 0.
i.e. *lpdwNumLines = 0;
So TAPISRV.exe won't call any functions regarding to line.
Now on each line exposed by PBX to TSP, TSP will send LINE_CREATE message to TAPI with one temporary Device Id.
In accordance to that TAPI will call function TSPI_providerCreateLineDevice
with temporary id given by TSP & new Device Id assigned by TAPI.
So here TSP can provide access of new line to TAPI. Also TSP should fill Device Id of each line to its structure in TSPI_providerCreateLineDevice function.
---------------------------------------------------------------
My Query is.....
Which design is better? Why?
According to me 2nd method is correct & suitable where lines are created &
removed dynamically. Am i correct ?
But i found few statements regarding to LINE_CREATE Message in MSDN
Microsoft as,
---------------------------------------------------------------
"Service providers can (and should) continue to make "static" device
allocations at start up when TAPI calls TSPI_providerEnumDevices. Creating
known devices using this mechanism, instead of always using LINE_CREATE,
involves lower overhead for applications (because they don't have to process
LINE_CREATE messages, updated device information, and so on). The
LINE_CREATE mechanism is intended to be used only if new devices are created
while the service provider is active (for example, between TSPI_providerInit
and TSPI_providerShutdown)."
---------------------------------------------------------------
According to these quotes i should not use LINE_CREATE Message for each line
to be exposed.
So Regarding to my requirement how should i expose lines from TSP to TAPI,
As i have not all data regarding to
Thanks.
I am developing TSP for PBX.
PBX is capable to serve approx. 2000 Lines.
According to me there are two possible ways by which i can expose these lines to TAPI.
--------------------------------------------------------------
1st Method :
--------------------------------------------------------------
I can provide No. of lines in function TSPI_providerEnumDevices.
i.e. *lpdwNumLines = 2000
(These are Max. no. of Lines supported by PBX & not the no. of lines currently active/accessible) Am i correct ?
If i am correct, in this way TAPISRV.exe will call function TSPI_lineGetDevCaps 2000 times to get line device capabilities. (Which lines should be obviously accessible from TSP & PBX side)
Also TSP should fill Device Id of each line to its structure got in TSPI_lineGetDevCaps function.
Here my problem is that before exposing 2000 lines from TSP to TAPI,
TSP must initialize them & get its information from PBX. That is after user set PBX configuration from TSP GUI, i have to stuck there till all the lines are exposed from PBX to TSP. Am i correct ?
--------------------------------------------------------------
2nd Method :
--------------------------------------------------------------
I can provide No. of lines in function TSPI_providerEnumDevices as 0.
i.e. *lpdwNumLines = 0;
So TAPISRV.exe won't call any functions regarding to line.
Now on each line exposed by PBX to TSP, TSP will send LINE_CREATE message to TAPI with one temporary Device Id.
In accordance to that TAPI will call function TSPI_providerCreateLineDevice
with temporary id given by TSP & new Device Id assigned by TAPI.
So here TSP can provide access of new line to TAPI. Also TSP should fill Device Id of each line to its structure in TSPI_providerCreateLineDevice function.
---------------------------------------------------------------
My Query is.....
Which design is better? Why?
According to me 2nd method is correct & suitable where lines are created &
removed dynamically. Am i correct ?
But i found few statements regarding to LINE_CREATE Message in MSDN
Microsoft as,
---------------------------------------------------------------
"Service providers can (and should) continue to make "static" device
allocations at start up when TAPI calls TSPI_providerEnumDevices. Creating
known devices using this mechanism, instead of always using LINE_CREATE,
involves lower overhead for applications (because they don't have to process
LINE_CREATE messages, updated device information, and so on). The
LINE_CREATE mechanism is intended to be used only if new devices are created
while the service provider is active (for example, between TSPI_providerInit
and TSPI_providerShutdown)."
---------------------------------------------------------------
According to these quotes i should not use LINE_CREATE Message for each line
to be exposed.
So Regarding to my requirement how should i expose lines from TSP to TAPI,
As i have not all data regarding to
Thanks.