Can any one tell me that the device ID assigned by TAPI for the line and
phone devices be same?
More specifically, if TAPI assigns device ID as 0x01 (suppose) for line
device than can it assign 0x01 as a device ID for phone device also or will
it assign the saperate device ID for the phone devices and line devices?
I have an impration that TAPI can not assign same device ID to the line and
phone devices but still i want to clear it.
Thanks,
Mohit
Mohit,
simple answer: they are not the same.
> More specifically, if TAPI assigns device ID as 0x01 (suppose) for line
> device than can it assign 0x01 as a device ID for phone device also or
> will
> it assign the saperate device ID for the phone devices and line devices?
Please note that phoneDeviceIDs / phoneDeviceIDs are zero-based, i.e. their
range starts both at 0x00
and ends at num_line_devs-1 resp. num_phone_devs-1.
Exampel:
TSP #1 enumerates 1 line + 1 phone
TSP #2 enumerates 1 line + 0 phone
TSP #3 enumerates 5 line + 5 phone
TSP #4 enumerates 2 line + 0 phone
TSP #5 enumerates 1 line + 1 phone
Then on lineInitializeEx() a TAPI app will get *lpdwNumDevs = 10, hence
lineDeviceID range is 0..9,
and on phoneInitializeEx() it will get *lpdwNumDevs = 7, hence
phoneDeviceIDrange is 0..6.
A TAPI can use lineGetID(hLine,,,,,"tapi/phone") to retrieve the
corresponding (if available) phoneDeviceIDfor a given line device,
and lineGetID(hPhone,,,,,"tapi/line") to retrieve the corresponding (if
available) lineDeviceID for a given phone device.
lineDeviceID <---> phoneDeviceID
0x00 0x00
0x01
0x02 0x01
0x03 0x02
0x04 0x03
0x05 0x04
0x06 0x05
0x07
0x08
0x09 0x06
> I have an impration that TAPI can not assign same device ID to the line
> and
> phone devices but still i want to clear it.
I don't understand. What do you mean by "want to clear it" in this regard?
--
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.
What I was thinking was, if device ID 0x01 is given to the line device then
TAPI will not give the same device ID, i.e., 0x01 to phone device. It might
give 0x02 or any other device ID to the phone device.
More specifically, if I consider your example, if TAPI recognizes 10 line
devices and 7 phone devices then as per my thinking, TAPI may assign device
ID 0x00 to 0x09 to line devices and device ID 0x10 to 0x16 to phone devices,
i.e., TAPI can not use range 0x00 to 0x09 to assign device IDs for phone
devices.
Thanks for correcting me,
Mohit
> --
> 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.
>
>
> .
>
Mohit, you are welcome.
> What I was thinking was, if device ID 0x01 is given to the line device
> then
> TAPI will not give the same device ID, i.e., 0x01 to phone device. It
> might
> give 0x02 or any other device ID to the phone device.
>
> More specifically, if I consider your example, if TAPI recognizes 10 line
> devices and 7 phone devices then as per my thinking, TAPI may assign
> device
> ID 0x00 to 0x09 to line devices and device ID 0x10 to 0x16 to phone
> devices,
> i.e., TAPI can not use range 0x00 to 0x09 to assign device IDs for phone
> devices.
lineDeviceID and phoneDeviceID ranges are independant of each other and both
start at 0x00.
The ranges are also continous, i.e. don't have any gaps - unless devices are
removed via LINE_REMOVE / PHONE_REMOVE during the run-time of this TAPISRV
instance.
New devices via LINE_CREATE / PHONE_CREATE will always get the lowest
available (i.e. previously never used during the run-time of this TAPISRV
instance) ID of their type (e.g. 0x0a for line and 0x07 for phone).