Long time since I have posted any question in this forum, got busy with our tight schedules to deliver a product.
I searched the entire forum for a similar question, but this wasn't asked.
Now let me detail the problem:
We have developed an IVRS application on Diva 4P Analog board.Our
application needs to support Multiple Diva PRI/E1-30 in the future
releases. Right now i could successfully integrate a Single Diva
PRI/E1-30 board with our application.
Here are my questions:
1) How to Detect whether the 2 boards installed have a live PRI connection attached to it, right now i couldnt figure out a method to detect the PRI Connection attached to a board is UP or DOWN, or if the PRI connection is connected or not.I experimented with the function DWORD DivaGetLineDeviceStatus ( DWORD LineDeviceId, DivaDeviceStatusType Type, DivaDeviceStatusValue *pValue, DWORD ValueSize );Could
someone please show me the code snippet to do this, or tell me the
parameters that should be used with this function for the same? Or if
some other functions should be used please guide me through the right
path.2) What are the things to be taken care of when Multiple Diva PRI/E1-30 boards must be accessed by a single application?3)
How to detect whether an Event in the Event queue if for a particular
board when multiple boards are installed on the same machine? Which
event is associated with which board? The event detection mechanism we
are using is Win32 Event Reporting.4) How to disable a
particular Board from being detected by the Diva Server (diver) without
removing it from the Machine. My operating system is XP professional
and tried to disable it from the Device Manager, but this doesn’t work.
Any Help is appreciated, and Thanks in advance,
1. There is a sample ShowDeviceStatus that is shipped with the SDK. This gives an example of how to use this function to get line status reports.
2/3. Each PRI span just has a different 'LineDevice' number. There's nothing special needed to handle multiple boards, since events are on a per-call basis anyway. All events will arrrive in the same place, and if you want to find out which device it comes from, you could get the LineDevice from DivaGetCallProperties.
One useful trick is that you can pass in your own handle when you do DivaConnect, DivaAnswer etc., then this handle will be passed back to you on every event as one of the parameters to the event. This means that you can have your own managing structure for each call that gets created (I normally call this a 'CallInstance') that you can use to track which calls belong to which boards. Several of the samples we suppy demonstrated this technique.
4. What are you trying to achieve by disabling the board?
Thanks for helping me to solve the problem.
I went through the sample pointed by you and got a good idea about it.
4. By disabling the board i wanted to prevent the events from this device reaching the application. But when i read the SDK documetation i found the parameter "LineDevice" Which can be used to disable a particular hardware from the event reporting system,
[in] This parameter specifies the line device that should be used for the call. If the parameter is set to LINEDEV_ALL, Diva Dialogic API searches for a free resource on all installed line devices.
both in DivaConnect and DivaListen function
Thanks once again.