Dialogic logo

Using the Diva Component API

  Introduction  
     2 pages
  About the Component API  
     4 pages
  Preparing to use the API  
     2 pages
  Component API objects  
     2 pages
  Making and receiving calls  
     3 pages
  Voice, tones, fax & data  
     7 pages
  Accessing the adapters  
     2 pages
  Handling multiple calls  
     9 pages
  Using non-blocking mode  
     18 pages
  Samples  
 
  << Back     Next page >>  
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.

Copyright© 2016 Dialogic® Corporation. All rights reserved. Legal Notice
50-000.htm 100 10000