Table of Contents Index NMS Glossary Previous Page Next Page Version


Chapter 7

NaturalConference Demonstration Programs


7.1 Introduction
7.2 cnfjoin
7.2.1 System Requirements
7.2.2 Using cnfjoin
7.2.3 Using Virtual Members
7.2.4 Chaining Conferences
7.2.5 cnfjoin Example
7.3 cnfdemo
7.3.1 System Requirements
7.3.2 Starting cnfdemo
7.3.3 Using the cnfdemo Main Window
7.3.4 Configuring cnfdemo
7.3.5 Using the cnfdemo Batch File to Build Conferences
7.3.6 Using the cnfdemo GUI to Manage Conferences
Opening Resources
Creating a Conference
Resizing a Conference
Adding and Removing Members from a Conference
Changing Attributes
Receiving Calls
Placing Calls
Disconnecting Calls
Closing Conferences and Resources
7.3.7 cnfdemo Architecture
cnfdemo Objects
7.3.8 Initialization
Initializing CT Access
Initializing NaturalConference
Initializing the Trunk
Initializing Switching
7.3.9 The Conference Interface
7.3.10 The Trunk Interface
7.3.11 Channel and Member Connections
7.3.12 Events Management
7.3.13 Conferencing API Object Interface
7.3.14 Trace File
7.4 JCnfDemo
7.4.1 System Requirements
7.4.2 Installed Files
7.4.3 Before Running JCnfDemo
7.4.4 Starting JCnfDemo
7.4.5 Using JCnfDemo

7.1 IntroductionTop of Page

NaturalConference provides the following demonstration programs:
This program...

Demonstrates...

cnfjoin

Adding callers to a conference.

cnfdemo

JCnfDemo (Java version)

Building conferences and connecting users to conferences using a graphical user interface (GUI). The program includes a module that receives calls, prompts a vocal welcome message, and manages commands from the user (through DTMF).

Note: cnfdemo is delivered with its source, resource, and project files. cnfdemo is based on Microsoft Foundation Classes (MFC) and is compatible with Microsoft Visual C++ 6.0. Use cnfdemo as sample source code to base your application on, or as a test program for NaturalConference.

7.2 cnfjoinTop of Page

cnfjoin demonstrates adding callers to a conference. cnfjoin opens a set of available conferencing resources and a designated number of channels for call control. When cnfjoin receives a call, it adds the caller to a conference. All callers are added to the same conference. When a caller disconnects, the program removes the caller from the conference, allowing another caller to take its place.

cnfjoin features NaturalConference functions, Voice Message (VCE) service functions, and Natural Call Control (NCC) service functions. cnfjoin can be used with ISDN, CAS, or analog protocols.

7.2.1 System RequirementsTop of Page

To use cnfjoin, call control and all conferencing resources must reside on the same board. If you use the default configuration files provided by the installation, your system is properly configured for cnfjoin.

7.2.2 Using cnfjoinTop of Page

To use cnfjoin, enter the following command from a command line prompt:

cnfjoin [options]


where options are:
Option

Description

Default

-h

Displays Help

None

-F filename

CT Access configuration file name

nms\ctaccess\cfg\
cta.cfg

-b n

Board number for the line interface and for NaturalConference

0

-p protocol

Protocol to run (usually loopstart)

lps0 for AG 2000

isd0 for AG 4000 and AG 4000C

-n count

Voice channel count

0

-m count

Number of conferences to open

1

-v count

Number of virtual members to add

0

-l level

Reports a low level event

0

-t tracemask

Sets the CTA tracemask

0x0

7.2.3 Using Virtual MembersTop of Page

A virtual member is a conferencing member who is connected to an ADI channel full duplex. Unlike the members specified with the n option, virtual members have no trunk connection. They can be used to play and record .pcm files on a conference.

Use the following menu options to access virtual members:
Option

Description

pf n

Play file sample n.pcm on the channel n (-1 for all).

rf n

Record file cnfjoin n.pcm on the channel n (-1 for all).

ps n

Stop playing the file on the channel n (-1 for all).

rs n

Stop recording the file on the channel n (-1 for all).

s

The number of actual members connected, and the number of virtual members. Virtual member numbers follow the actual member numbers.

h

Help.

q

Quit cnfjoin.

Note: .pcm files contain voice sampled at 8kHz with 16 bit format (128Kbps). You can create, edit, and play .pcm files with the Cool Edit utility distributed with Natural Access. .pcm files accessed by cnfjoin must be in the working directory.

7.2.4 Chaining ConferencesTop of Page

Conferences are opened on separate resources. Each conference can host the maximum number of members available on a resource. When the m value is 1 (default value), only one conference is opened. If the m value is greater than 1, a master conference is opened on the first resource, and count number of child conferences are opened on the following count resources. Each child conference hosts a subset of the actual conferees plus a special member that is connected to the master conference. The master conference mixes the count special members and redistributes the mixing output to all the child conferences.chap712.gif

Figure 10. Master Conference with Child Conferences


Note:  Make sure that more than count + 1 resources are available on the same board in order to run this configuration.

7.2.5 cnfjoin ExampleTop of Page

The following example sets up 4 resources, hosting a maximum of 56 members with full capabilities at 14 members per resource. A maximum of 24 members can dial into the T1 link and join the conference. 4 members are special members connected to the master conference. 24 virtual members (member 24 to member 47) are available for playing and recording .pcm files.

This example assumes you are using an AG4000/1600 board connected to one T1 interface:

  1. Configure your system using agpi4cnf_2t1_1600.cfg (OAM) or ag4cnf_2t1_1600.cfg (agmon), and cnf_ag4_2t1_1600.cfg.

    
    
  2. In the nms\ctaccess\demos\cnfjoin directory, create 24 .pcm files named sample24.pcm to sample47.pcm.

    
    
  3. Start cnfjoin by entering the following command at the prompt:

    
    cnfjoin -n 24 -m 4 -v 24
This example does not use all the resources (the resources can host a maximum of 56 members; only 52 members are used). The limitation comes from the IVR channel MIPS requirement. Only 6 DSPs are left for IVR (1 is taken by ISDN and 9 by conferencing according to ag4cnf_2t1_1600.cfg). The DSPs can support 48 channels (8 per DSP). The configuration could have been optimized by using fewer DSPs for conferencing and saving DSPs for IVR.

7.3 cnfdemoTop of Page

cnfdemo demonstrates building and managing conferences, and connecting users to conferences through a graphical user interface (GUI). cnfdemo includes a small module for receiving calls, prompting a vocal welcome message, and managing commands from the user (through DTMF).

cnfdemo uses the Natural Call Control (NCC) API for the trunk interface, the Switching (SWI) API to connect a caller to a channel, and the NaturalConference (CNF) API for the conferencing features.The cnfobj.dll supplied with the program provides an object-oriented API to NaturalConference for wrapping the NaturalConference API C code.

7.3.1 System RequirementsTop of Page

cnfdemo is available under Windows NT 4.0 only. The following board configurations support cnfdemo:

7.3.2 Starting cnfdemoTop of Page

Before you start cnfdemo, ensure that

To start cnfdemo, click Start. Select NaturalMicroSystems NaturalConference, and then select Demonstration.

7.3.3 Using the cnfdemo Main WindowTop of Page

Following is the cnfdemo main window:

chap73.gif

The cnfdemo main window has four main sections:
Section

Use this section to...

Trunk

Manage calls.

Opened Objects

View the open resources, the conferences running on each resource, and the members attending each conference.

Attributes

View and change the capabilities of the selected conference or member. For information on changing attributes, refer to Section 7.3.6, Using the cnfdemo GUI to Manage Conferences.

Information

View information for the selected resource, conference, or member.

The following table describes the buttons on the cnfdemo window:
Button

Use this button to...

Call

Place a call.

Release

Disconnect a call.

Quit

Close cnfdemo.

CNX

Connect a member to a channel.

UNCNX

Disconnect a member from a channel.

Batch

Run a batch file.

Open Resource

Open a resource.

Close Resource

Close the selected resource.

Create Conference

Create a conference on the selected resource.

Close Conference

Close the selected conference.

Resize Conference

Adjust the number of members allocated to the selected conference.

Join Conference

Add members to the selected conference.

Leave Conference

Remove members from the selected conference.

The following table describes the menu items on the cnfdemo window:
Menu Item

Use this menu item to...

Configuration...Board Configuration

Open the Trunk Configuration dialog box to view or modify your current configuration. See Section 7.3.4, Configuring cnfdemo for more information.

Tools...Apply Conference Attributes

Apply the attributes of the selected conference to all other conferences in the same resource. Member attributes remain unchanged. See Section 7.3.6, Using the cnfdemo GUI to Manage Conferences for more information.

Tools...Apply Member Attributes

Apply the attributes of the selected member to all other members in the same conference. See Section 7.3.6, Using the cnfdemo GUI to Manage Conferences for more information.

Note: By using this menu item, you avoid the repetitive action of changing one attribute on all members of the same conference.

7.3.4 Configuring cnfdemoTop of Page

The first time you use cnfdemo, you must configure the trunk. The parameters you enter are saved in the cnfdemo configuration file (cnfdemo.ini).

To configure cnfdemo:

  1. Select Board Configuration from the Configuration menu. The Trunk Configuration dialog box displays:

    
    chap70.gif
    
    
  2. Complete the fields as described in the following table:
    Field

    Description

    Board Identifier

    The AG trunk board identifier as defined in the ag.cfg file.

    Protocol

    The line protocol.

    Number of Line(s)

    The number of lines you want to start on the trunk interface.

    
    
  3. Choose OK.

    
    The cnfdemo.ini file is updated.
  4. Close and restart cnfdemo to apply the changes.

7.3.5 Using the cnfdemo Batch File to Build ConferencesTop of Page

cnfdemo provides the 1R_2C_30M.cbt batch file that contains a set of conferencing commands allowing you to quickly build a conference and ensure that all objects are created with the same configuration.

To start the batch file, use one of the following methods:

Commands are not case sensitive. The pound sign (#) and semicolon (;) are comment delimiters.

The following sample batch file creates 2 conferences of 30 member each, with echo cancellation disabled:

  # Open resource 0
resource 0
  # Create conference named "1" on resource 0 containing 30 members and
# disabling the Echo Canceller
conference 30 1 1
# Open resource 1
resource 1
# Create conference named "2" on resource 1 containing 30 members and
# disabling the Echo Canceller
conference 30 1 2
Use the following batch file commands to create conferences:
Command

Description

Example

conference
allocated members flags conference name

Creates a new conference on the current resource.

conference 30 1 1

resource resource_number

Specifies the conferencing resource number.

resource 0

Use the following batch file flags:
Use this flag...

Hex

To disable...

CNF_NO_ECHO_CANCEL

0x1

Echo cancellation

CNF_NO_MAPPING

0x2

Conference mapping mode

CNF_NO_DTMF_CLAMPING

0x4

DTMF clamping

CNF_NO_TONE_CLAMPING

0x8

Tone clamping

7.3.6 Using the cnfdemo GUI to Manage ConferencesTop of Page

The following sections describe how to use the cnfdemo GUI to

Opening ResourcesTop of Page

Follow this procedure to open a resource:

  1. On the cnfdemo window, choose the Open Resource button.

    
    The Open Resource dialog box displays, listing the conferencing resources configured in the system:
    chap72.gif
  2. Select a resource from the Resources box.

    
    The following information about the resource displays:
  1. Click Open to open the resource:chap75.gif

    
    
    
    The resource opens and displays in the Opened Objects list on the cnfdemo window. The resource information displays in the Information box.

Creating a ConferenceTop of Page

After you open a resource, you can create a conference. To create a conference:

  1. On the cnfdemo window, select the resource from the Opened Objects list.

    
    
  2. Choose Create Conference.

    
    The Create Conference dialog box displays:
    chap76.gif The Resource section lists the number of conferences running on the resource, the maximum number of members the resource supports, the number of available members, and the resource capabilities.
  3. Use the New Conference section to enter information for the new conference. Complete the fields as described in the following table:
    Field

    Description

    allocated_members

    Enter the number of members to allocate to the conference.

    application_string

    Enter a user-defined name for this conference; for example,
    Conf 1. This name displays in the Opened Objects list on the cnfdemo main window.

    flags

    Lists the capabilities you can disable for this conference. Select a capability to disable it.

    
    
  4. Choose Create to create the new conference.

Resizing a ConferenceTop of Page

You can adjust the number of members allocated to a conference at any time. To resize a conference:

  1. On the cnfdemo window, select the conference you want to resize and choose Resize Conference.

    
    The Resize Conference dialog box displays:
    chap71.gif The following information displays in the dialog box:
    Section

    Description

    Resource

    Displays information about the resource, such as the number of conferences running on the resource, the maximum number of members the resource supports, and the number of available members.

    Conference

    Displays current conference parameters, such as the number of members allocated and the number of members attending.

    Resize Parameters

    Allows you to resize the conference.

    Capabilities

    Displays the capabilities available for this conference.

  2. Use the Resize Parameters section to change the number of members allocated to the conference:
    To...

    Then...

    Reduce the number of allocated members by a specific number

    Enter the number in the Number field and select CNF_REDUCE_ALLOCATED.

    Increase the number of allocated members by a specific number

    Enter the number in the Number field and select CNF_INCREASE_ALLOCATED.

    Resize the conference to a specific number

    Enter the number in the Number field and select CNF_RESIZE_ALLOCATED.

    
    
  3. Choose Resize to resize the conference.

Adding and Removing Members from a ConferenceTop of Page

Follow this procedure to add and remove members from a conference:

  1. On the cnfdemo window, select the conference you want to add a member to and choose Join Conference.

    
    The Join Conference dialog box displays:
    chap77.gif The Conference section displays the number of members allocated to the conference, the number of members currently attending the conference, the conference identifier, and the conference capabilities.
  2. In the Application_String field of the Member section, enter a user-defined identifier for the member you are adding to the conference (for example, Member 1). This name displays in the Opened Objects list on the main window.

    
    
  3. Choose Join Conference.

    
    The new member is added to the Opened Objects list on the main window.
    After a conference is created and members are added, the application receives the active talker event (CNFEVN_ACTIVE_TALKERS_CHANGE). cnfdemo adds a star (*) in the Active (A) field of the Trunk list box on the corresponding channel line to identify who is speaking. When the caller stops speaking, the star is removed.
  4. To remove a member from a conference, select the member from the Opened Objects list on the main window and choose Leave Conference.

Changing AttributesTop of Page

You can change attributes for individual members and conferences, or apply a global change to all members in a conference or all conferences in a resource.

To change attributes for individual members or conferences:

  1. On the Opened Objects list of the cnfdemo window, select the member or conference whose attributes you want to change.

    
    
  2. In the Attribute section, double-click on the attribute value and edit it.

    
     The new value is validated, and the attribute is changed:
    :chap78.gif
To globally apply the attributes of one member to all other members in the same conference:

  1. On the Opened Objects list of the cnfdemo window, select the member whose attributes you want to copy.

    
    
  2. Choose Apply Member Attributes from the Tools menu.

    
    The attributes are applied to all other members in the conference.
To globally apply the attributes of a conference to all other conferences in the resource:

  1. On the Opened Objects list of the cnfdemo window, select the conference for which you want to copy attributes.

    
    
  2. Choose Apply Conference Attributes from the Tools menu.

    
    The attributes are applied to all other conferences in the same resource.

Receiving CallsTop of Page

cnfdemo allows you to automatically connect an incoming call to a conference. To use this feature, create two conferences, conference 1 and conference 2 (you can use the 1R_2C_30M.cbt batch file to create the conferences). You do not need to add members to the conferences.

When a channel receives an incoming call, a welcome message asks the caller to select a conference by pressing DTMF 1 or DTMF 2. cnfdemo creates a new member on the selected conference, and connects the caller to the conference with an MVIP connection. The caller can use DMTF 3 to increase the volume or DTMF 9 to decrease the volume at any time. After the caller hangs up, cnfdemo restores the MVIP connection and releases the channel.

Placing CallsTop of Page

Use the Trunk section of the cnfdemo window to place calls:

  1. To place a call, enter the call number in the Call Address field and press Call.

    
    chap79.gif
    
    When the call is answered, the welcome message plays, asking the prospective member to choose a conference (by pressing DTMF 1 for conference 1 or DTMF 2 for conference 2).
    The call number or channel ID displays in the Chn field of the Trunk list box.
  2. Connect the member to the channel by selecting the channel from the Trunk section and pressing CNX.

    
    The member is connected to the channel (the connection is an MVIP connection if you use the SWI API under the MVIP 95 model).

Disconnecting CallsTop of Page

      1. From the Opened Objects list, select the member you want to disconnect.

        
        
      2. Press UNCNX.

        
        The member is disconnected and MVIP connections are restored.
      3. Press Release to disconnect the call.

        
        The line is disconnected. Related member MVIP connections are closed.

Closing Conferences and ResourcesTop of Page

To close a conference:

  1. On the cnfdemo window, select the conference you want to close.

    
    
  2. Choose the Close Conference button.

    
    The conference is closed, and all members are removed.
To close a resource:

  1. On the cnfdemo window, select the resource you want to close.

    
    
  2. Choose Close Resource.

    
    The resource is closed, all members are removed, and all conferences are closed.

7.3.7 cnfdemo ArchitectureTop of Page

cnfdemo is a demonstration program built with the Microsoft Foundation Classes (MFC). It can only be recompiled by Microsoft Visual C++.

The following diagram illustrates the object architecture:chap74.gif

Figure 11. cnfdemo Object Architecture


The following table lists the types of cnfdemo objects:
Object Type

Description

Dialog boxes

Contain objects like CAbout or CCreateCnf which retrieve information from the user to build conferences.

Switching

Contains one main object, Cppx. Cppx is a container for CppxLink which can connect a channel object (a line) and a member object (CMember) through the MVIP BUS.

Trunk interface

Contains one main object, CTrunk. CTrunk is a container for CChannel, which contains threads and manages line interfaces by using Natural Call Control. CChannel is also responsible for playing the prompts file. CChannel is the line interface core object.

CnfObj API

A set of conferencing objects in cnfobj.dll. See Section 7.3.13, Conferencing API Object Interface for more details.

CNotif

Used by CChannel to notify its owner of some events without knowing the owner methods.

CTrace

Provides an interface to put a trace in a log file or to prompt a string via a message box.

CLedit

Used by CnfDemoDlg to edit a conference or member attribute.

CBConfig

Provides an interface to read from and write to the cnfdemo configuration file.

dlgItem

An internal structure used by cnfdemo to store context information and to link items like resources, conferences, or members to a channel.

cnfdemo ObjectsTop of Page

The following table describes the cnfdemo objects:
File

Description

CAbout.cpp

About dialog box

CBConfig.cpp

Configuration file management

CChannel.cpp

Channel object

JoinConf.cpp

Join Conference dialog box

CnfDemo.cpp

cnfdemo main entry point

CnfDemoDlg.cpp

cnfdemo main window

CNotif.cpp

Notification object

CLedit.cpp

Attribute edit control

Config.cpp

Trunk Board Configuration dialog box

Cppx.cpp

Switching object

CreatCnf.cpp

Create Conference dialog box

CTrunk.cpp

Trunk interface object

Ctrace.cpp

Trace object

OpenRes.cpp

Open Resource dialog box

ResizeCnf.cpp

Resize Conference dialog box

StdAfx.cpp

MFC definitions

7.3.8 InitializationTop of Page

All initializations are made when cnfDemoDlg is initialized.

Initializing CT Access Top of Page

The ctaInitialize call is made in CtaInit. cnfdemo use CT Access Server (ctdaemon). See CCnfDemoDlg::CtaInit.

Initializing NaturalConferenceTop of Page

Set the NaturalConference environment by opening the CNF service on the conferencing board. See ctaOpenServices in the CCnfDemoDlg::CtaInit. CnfDemoDlg manages only the conference and switching services.

static CTA_SERVICE_DESC CnfService[] =  {
 { {"SWI", "SWIMGR"}, { 0 }, { 0 }, { 0 } },
 { {"CNF", "CNFMGR"}, { 0 }, { 0 }, { 0 } }
 };

The conferencing API is reached by creating a CSysRes object.

Initializing the TrunkTop of Page

Set the trunk environment in the CTrunk object. See CTrunk::TrunkCtaInit. Open services on the trunk board just for the initialization. Then CTrunk does not need to call the trunk board. CTrunk creates one CChannel object per line resource. Each channel object opens its own services on the trunk board.

CTA_SERVICE_DESC ChannelService[] =  {
 { {"ADI", "ADIMGR"}, { 0 }, { 0 }, { 0 } },      
 { {"NCC", "ADIMGR"}, { 0 }, { 0 }, { 0 } },
 { {"VCE", "VCEMGR"}, { 0 }, { 0 }, { 0 } }
 };

Initializing SwitchingTop of Page

To initialize switching, create a new Cppx object in CCnfDemoDlg::CtaInit. The CppxLink objects then open all needed SWI handles to the trunk and conferencing boards.

7.3.9 The Conference InterfaceTop of Page

The conference interface is based on dialog boxes used to retrieve parameters from the user. cnfobj.dll is used to call the CNF service.

7.3.10 The Trunk InterfaceTop of Page

The trunk interface is based on channel objects. Each channel object is responsible for line interface initialization, prompting vocal messages, and receiving NCC, ADI, and CTA events.

A channel object opens the required CTA services and creates a thread during initialization. The thread waits for CTA events and calls the appropriate channel function when it receives an event.

The channel object also maintains the channel's state corresponding to the cnfdemo automatic answering feature.

Channel objects use the followings events:
Event

The channel performs this action...

APPEVN_CHANNEL_SHUTDOWN

Closes the CTA environment and sets the channel event the trunk object is waiting for.

NCCEVN_SEIZURE_DETECTED

Stores the call handle.

NCCEVN_PLACING_CALL

Stores the call handle.

CTAEVN_OPEN_SERVICES_DONE

Starts the channel protocol.

NCCEVN_START_PROTOCOL_DONE

Changes the state to CHN_STATE_WAIT_FOR_INCOMING_CALL.

NCCEVN_INCOMING_CALL

Answers the call and stores the caller information.

NCCEVN_CALL_DISCONNECTED

Notifies the channel owner and releases the call.

NCCEVN_CALL_CONNECTED

Notifies the channel owner and changes the state to CHN_STATE_WAIT_FOR_DIGIT.

NCCEVN_CALL_RELEASED

Clears the call handle and changes the state to wait.

NCCEVN_STOP_PROTOCOL_DONE

Stops the protocol, clears the call handle, and changes the state to wait.

ADIEVN_DIGIT_BEGIN

Notifies the owner about a digit event such as changing member attributes or selecting a conference.

ADIEVN_PLAY_DONE

Stops the welcome prompt and changes the state to CHN_STATE_CONNECTED.

7.3.11 Channel and Member ConnectionsTop of Page

The Cppx object manages the MVIP connections. When a new member is created on caller choice, the member must be connected to the channel. This is done by creating a new CppxLink object and connecting the channel stream and timeslot to the member stream and timeslot. If the conferencing board is different than the trunk board, the MVIP bus is used to connect the boards.

Cppx use the SWI API and MVIP_95 models.

On the ADIEVN_DIGIT_BEGIN event, the channel notifies the cnfdemo conferencing thread. cnfdemo receives the digit. If the channel's state is connected, the digit is used to choose the conference. Otherwise, the digit is used to modify the member attributes.

7.3.12 Events ManagementTop of Page

Events are retrieved by using ctaWaitEvent in a thread. NaturalConference uses one thread for all conferences. This thread (DWORD CnfThread(LPDWORD lpdwParam);) waits for an internal shutdown event, active talker change event, or notification event. Each channel has its own waiting events thread.

Following is an example of a channel event:

  1. The channel object receives an ADIEVN_DIGIT_BEGIN event.

    
    
  2. The channel object notifies CnfDemoDlg of the digit event.

    
    
  3. CnfDemoDlg returns the digit.

    
    
  4. CnfDemoDlg adds the member to the conference.

    
    
  5. CndDemoDlg uses Cppx to create a link between the new member and the channel.

    
    
  6. The link is made by a new CppxLink object.

All references are stored in the dlgItem structure.

chap710.gif

Figure 12. Channel Event Example


The following example illustrates what happens when the conferencing service sends a CNFEVN_ACTIVE_TALKERS_CHANGE event:

  1. The CnfDemoDlg thread receives a CNFEVN_ACTIVE_TALKERS_CHANGE event.

    
    
  2. CnfDemoDlg asks the CnfObj API to get the NaturalConference objects related to the confid using CConf::GetConfFromId.

    
    
  3. CnfDemoDlg gets the active talker member list using CConf::GetActiveTalkersList and builds internal erase and active lists. The erase list corresponds to the previous talkers and the active list corresponds to current talkers.

    
    
  4. The CnfDemoDlg updates all appropriate Channel Active fields in the Trunk list.

    
    chap711.gif
    
    
    Figure 13. Conferencing Event Example

7.3.13 Conferencing API Object InterfaceTop of Page

The conferencing API object interface (cnfobj.dll) provides a set of useful conferencing objects to interface to the CNF C API. There are no CT Access calls such as ctaInitialize or ctaCreatContext. The application is responsible for loading all services and managers needed for conferencing.

7.3.14 Trace FileTop of Page

The cnfdemo trace file contains errors with date and time. Use this file to debug or understand the conferencing functions and trunk interface.

Following is an example of a trace file:

4/11 11:4:5     No call number
4/11 15:47:14     [AnalyzeBatchFile] OpenResource
CNFERR_RESOURCE_NOT_AVAILABLE
4/11 16:18:22 [OnCreateConf] CreateConference
CNFERR_NOT_ENOUGH_RESOURCE_SPACE
4/11 16:32:44 [SetAttrib] SetAttribute CTAERR_FUNCTION_NOT_ACTIVE

7.4 JCnfDemoTop of Page

The JCnfDemo demonstration program is a multiplatform Java application that demonstrates building and managing conferences through a graphical user interface similar to the cnfdemo interface.

7.4.1 System RequirementsTop of Page

JCnfDemo is available under Windows NT 4.0 and Sparc Solaris 2.6 or 2.7. To use JCnfDemo, install the Java runtime version 1.1.x or higher on your system.

Under Windows NT 4.0, JCnfDemo runs with the following versions of the Java runtime (these programs can be found at http://java.sun.com/jdk):

Under Sparc Solaris, JCnfDemo runs with the JAVA 1.1.6 version of the Java runtime (these programs can be found at http://www.sun.com/solaris/java).

The following board configurations support JCnfDemo:

7.4.2 Installed FilesTop of Page

The JCnfDemo program is installed in the nms\cnf\javademo directory. The following tables list the JCnfDemo components:
Component

Description

JCnfDemo.jar

The demonstration program in Java

com_nmss.jar

Java classes allowing access to CTA libraries

swingall.jar

The SWING Java package 1.1

The following libraries are also installed:
Under Windows NT

Under Unix

Description

jctaapi.dll

libjctaapi.so

Dynamic library used to interface the ADI, NCC, and VCE services through the JNI

jcnfapi.dll

libjcnfapi.so

Dynamic library used to interface the CNF service through the JNI

jswiapi.dll

libjswiapi.so

Dynamic library used to interface the SWI service through the JNI

The following diagram illustrates the JCnfDemo architecture:chap714.gif

7.4.3 Before Running JCnfDemoTop of Page

Before running JCnfDemo, ensure that

Follow these step to verify the Java runtime installation:

  1. Verify that the CLASSPATH environment variable is defined, as described in the Java readme.txt. For example, under Windows NT:

    
    set JAVADIR=c:\java
    set CLASSPATH=.;%JAVADIR%\classes;%JAVADIR%\lib\classes.zip
  2. Verify that the PATH environment variable contains the directory where the Java runtime engine is installed. For example,

    
    set PATH=%PATH%;%JAVADIR%\bin (under Windows NT)
    export PATH=$PATH:/usr/java/bin
    (under Unix with korn shell)
    setenv PATH "$PATH:/usr/java/bin"
    (under Unix with C shell)
  3. Enter java -version to verify that your installed Java runtime engine is compatible with JCnfDemo.

    
    
  4. Add the three JAVA packages (.jar files) to the CLASSPATH environment variable. To run JCnfDemo from any directory, add the full path. To run the program in the nms\cnf\javademo directory, add just the filenames. For example,

    
    set CLASSPATH=%CLASSPATH%;com_nmss.jar;swingall.jar;JCnfDemo.jar (under Windows NT)
    export CLASSPATH=$CLASSPATH:com_nmss.jar:swingall.jar:JCnfDemo.jar
    (under Unix with korn shell)
    setenv CLASSPATH "$CLASSPATH:com_nmss.jar:swingall.jar:JCnfDemo.jar"
    (under Unix with C shell)
  5. To run JCnfDemo in the nms\cnf\javademo directory, verify that the PATH variable under Windows NT contains the current directory (described by "."). Under Unix, verify that the LD_LIBRARY_PATH contains the current directory.

    
    To run JCnfDemo anywhere, add nms\cnf\javademo to your PATH or LD_LIBRARY_PATH variable. For example,
    set PATH=%PATH%;\nms\cnf\javademo (under Windows NT)
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/nms/cnf/javademo
    (under Unix with korn shell)
    setenv LD_LIBRARY_PATH"$LD_LIBRARY_PATH:/opt/nms/cnf/javademo"
    (under Unix with C shell)

7.4.4 Starting JCnfDemoTop of Page

To start JCnfDemo, enter the following command (JCnfDemo is case sensitive):

java JCnfDemo


If this command generates an error because the Java application cannot find the JCnfDemo class, explicitly define the location of JCnfDemo by entering

java -classpath %CLASSPATH% JCnfDemo (under Windows NT)


java -classpath $CLASSPATH JCnfDemo (under Unix)
If the Java program is still unable to locate JCnfDemo, verify that your CLASSPATH statement is correct and contains the proper location of the JCnfDemo.jar file.

For a description of the methods and objects available in JCnfDemo.jar and com_nmss.jar, uncompress and read the HTML files in the nms\cnf\javademo\doc directory.

7.4.5 Using JCnfDemoTop of Page

Following is the JCnfDemo main window:chap713.gif

JCnfDemo is based on the Java swing metal look. Use the program as you use cnfdemo (see Section 7.3, cnfdemo), with the following differences:



Table of Contents Index NMS Glossary Previous Page Next Page Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.