Information about hardware
So far, we have used only the DivaCall component to make and receive single calls.
In order to retrieve information
from the API about the both hardware adapters and virtual adapters (SoftIP)
we need to use the
DivaSystem
and
DivaDevice
components.
The DivaSystem property
TotalChannels
gives us the total number of channels available across all devices and
NumDevices
gives us the number of Diva line devices found in the system.
Note that multi-port Diva adapters show up as one line device per port with the
relevant number of channels.
For example: Diva 4BRI has 4 line devices each with 2 channels;
Diva 2PRI has 2 line devices each with 30 channels on E1 or 24 channels on T1.
The DivaSystem method
GetDevice
is used to retrieve each device in turn so that its
properties
can be examined.
Dim Dev As DivaDevice
Dim i As Integer
Dim Sys As DivaSystem = New DivaSystem()
Log("found " & Sys.NumDevices & " devices")
Log("found " & Sys.TotalChannels & " channels")
For i = 1 To Sys.NumDevices
Dev = Sys.GetDevice(i)
Log("Device: " & i)
Log(" - channels: " & Dev.Channels)
Log(" - SN: " & Dev.SerialNumber)
Log(" - fax: " & Dev.FaxSupported)
Log(" - modem: " & Dev.ModemSupported)
Log(" - A-law: " & Dev.CodecALaw)
Next
Sample code for detecting hardware and virtual adapters and their capabilities
Note: .Net Framework 2.0 is required to run the executable.