This topic presents:
Conferences are created with both parameters and attributes. Conference parameters contain information about a given conference, and cannot change over the life of the conference. Attributes denote certain special characteristics that a given conference possesses, and change frequently during the life of the conference.
You retrieve conference parameters and other information together in a corresponding CNF_CONFERENCE_INFO structure, while you access attributes individually.
You can assign the following types of attributes to a conference:
Loudest speaker
Event mask
Active talkers
Active talkers timer
For a description of conference attributes, refer to cnfGetConferenceAttribute.
The following table lists the functions for accessing conference information and attributes:
|
To... |
Description |
|---|---|
|
Retrieve conference information, call cnfGetConferenceInfo |
Returns a CNF_CONFERENCE_INFO structure containing information such as the number of members allocated, the number of members attending, and the conference capabilities. |
|
Retrieve a conference attribute, call cnfGetConferenceAttribute |
Returns the value of the specified conference attribute. |
|
Set a conference attribute, call cnfSetConferenceAttribute |
Sets the value of the specified conference attribute. |
|
Retrieve the list of members currently attending the conference, call cnfGetMemberList using a valid conference identifier |
Returns the memberidlist. By performing a loop using the retrieved memberidlist, you can get information about each member. For example: for (memberindex = 0; memberindex < nummemberid; memberindex ++) |
Information and attributes associated with members differ in the same way they do for conferences. Members are created with both parameters and attributes. While member parameters cannot change over the life of the conference, member attributes change frequently during the life of the conference.
You retrieve member parameters and other information together in a corresponding CNF_MEMBER_INFO structure, while you access attributes individually.
You can assign the following types of attributes to conference members:
Automatic gain control
Talking and listening control
Talker privileges
DTMF clamping
Tone clamping
Echo cancellation
Self echo
G.711 law
For a detailed description of the member attributes, refer to cnfGetMemberAttribute.
The following table lists the functions for accessing member information and attributes:
|
To... |
Call this function... |
Description |
|---|---|---|
|
Retrieve member information |
Returns a CNF_MEMBER_INFO structure containing stream and timeslot information for the given member. | |
|
Retrieve a member attribute |
Returns the value of the specified member attribute. | |
|
Set a member attribute |
Sets the value of the specified member attribute. | |
|
Retrieve several member attributes |
Retrieves multiple member attributes with one function invocation. | |
|
Set several member attributes |
Sets multiple member attributes with one function invocation. |
Call cnfStartTone to play a tone to all members of a conference to indicate that a new member is joining or leaving the conference. When cnfStartTone is invoked, members stop hearing each other and hear only the tone.
Tone attributes are stored in the CNF_TONE_PARMS structure. You can also set default parameters for the tone attributes.
The following table lists the functions to call to play a tone:
|
To... |
Call this function... |
Description |
|---|---|---|
|
Play a tone |
The program plays a sequence of user-defined tones. If the event_mask is set to CNF_EVNMSK_TONE_DONE before cnfStartTone is called, when the specified number of iterations (defined in CNF_TONE_PARMS) is complete, NaturalConference generates CNFEVN_TONE_DONE. | |
|
Abort tone generation or stop an infinite duration tone |
The program immediately terminates active tone generation. If the event_mask is set to CNF_EVNMSK_TONE_DONE before cnfStartTone is called, the program generates CNFEVN_TONE_DONE. |
NaturalConference uses the Natural Access event reporting mechanism, ctaWaitEvent. ctaWaitEvent returns the CTA_EVENT structure informing the application about which event occurred on which context. The structure includes information specific to the event.
Some events are generated only by setting the appropriate bit in the CNF.CONFERENCE_ATTR event_mask parameter or by modifying the CONF_ATTR_EVENT_MASK attribute using cnfSetConferenceAttribute.
NaturalConference generates the following events:
|
Event |
Description |
|---|---|
|
CNFEVN_ACTIVE_TALKERS_CHANGE |
One or more of the active talkers changed. |
|
CNFEVN_CLOSE_RESOURCE_DONE |
cnfresourcehd was released. |
|
CNFEVN_OPEN_RESOURCE_DONE |
cnfresourcehd was allocated. |
|
CNFEVN_TONE_DONE |
Tone generation completed or was stopped. |
When receiving CNFEVN_ACTIVE_TALKERS_CHANGE, you can retrieve the actual list of members that are active talkers by calling cnfGetActiveTalkersList. If the space available for retrieving the list of members is large enough, the number of memberid fields filled by the function and returned in nummemberids is the number of members speaking, as defined by the attribute CONF_ATTR_ACTIVE_TALKERS value currently set for that conference. The returned list contains the member that is the active talker when the function is called. The active talker lists are not queued in NaturalConference.
To close a conference, follow these steps:
|
Step |
Action |
|
1 |
Remove all conference members by calling cnfLeaveConference. |
|
2 |
Close the conference by calling cnfCloseConference. |
|
3 |
Close the conference resource by calling cnfCloseResource. |
Although a conference merges voices coming from different calls, there is no direct relationship between individual calls and conference members. The application features and scenarios drive the way calls and members are created and destroyed. A call can be added or removed from the same or different conferences without having to be released. When a call is disconnected, the application should force the corresponding members to leave the conference as soon as possible.
The following table lists the functions to call when closing a conference:
|
To... |
Call this function... |
Description |
|---|---|---|
|
Remove a member from a conference |
Removes the member from the conference and destroys the member identifier. | |
|
Close a conference |
Closes the conference and enables the system resources that were occupied by that conference to be used by other (new or existing) conferences located on the same resource. Closing a conference with members still joined does not have a negative impact on NaturalConference behavior. If a conference still contains members when it is closed, the members are forced to leave in an automatic internal process equivalent to invoking cnfLeaveConference on each member. After the conference is empty, it is destroyed. | |
|
Close a conference resource |
Closes the resource, enabling the system resources to be used by another application. When you close a resource, all conferences using that cnfresourcehd are closed by an automatic internal process equivalent to calling cnfCloseConference on each running conference. Conferences using a different cnfresourcehd are not affected. Wait for CNFEVN_CLOSE_RESOURCE_DONE before making any other calls to NaturalConference (especially important when using the Server mode of Natural Access). This event verifies that the resource was released. |