Prosody high level conferencing: API

The following functions are provided by the Prosody high level conferencing API:

API call W Description
sm_conference_create()   Create a conference
sm_conference_add_party()   Add a party to a conference
sm_conference_remove_party()   Remove a party from a conference
sm_conference_delete()   Delete a conference
sm_conference_info()   Get information about a conference

This document is also available as separate pages for each function.


Prosody high level conferencing: API: sm_conference_create

Prototype Definition

tSMConference sm_conference_create(void)

Description

Create and allocate resources for a new multi-party conference. Note sm_conference_delete() should be called to free the conference when it has been finished with.

Returns

Returns a conference structure, if successful, or zero if no new conference could be created. .


Prosody high level conferencing: API: sm_conference_add_party

Prototype Definition

int sm_conference_add_party(struct sm_conference_add_party_parms *parms)

Parameters

*parms
a structure of the following type:
typedef struct sm_conference_add_party_parms {
	tSMConference conf;					/* in */
	tSMChannelId channelIn;					/* in */
	tSMChannelId channelOut;				/* in */
	int out_volume;						/* in */
	int out_agc;						/* in */
	int in_volume;						/* in */
	int in_agc;						/* in */
} SM_CONFERENCE_ADD_PARTY_PARMS;

Description

Adds new party to a previously created conference.

Note this party must not be a member of another conference. Adding a party to a conference twice (without removing it first) will result in an error condition.

Fields

conf
A conference created with sm_conference_create().
channelIn
The new party's input channel.
channelOut
The new party's output channel.
out_volume
The volume adjustment for the new party's output channel.
out_agc
Whether or not the new party's output channel should perform automatic gain control. When enabled, AGC tries to make the signal average about 0dBm0 by adjusting its gain. Although this is far too loud for normal use, it means that the desired level can be specified directly in out_volume. For example, if you want the target to be -12 dBm0, you set the volume to -12 and it applies this to the 0dBm0 signal generated by the AGC, giving an overall signal average targetted at -12dBm0.
in_volume
The volume adjustment for the new party's input channel.
in_agc
Whether or not the new party's input channel should perform automatic gain control.

Returns

0 if call completed successfully, otherwise a standard error such as:


Prosody high level conferencing: API: sm_conference_remove_party

Prototype Definition

int sm_conference_remove_party(struct sm_conference_remove_party_parms *parms)

Parameters

*parms
a structure of the following type:
typedef struct sm_conference_remove_party_parms {
	tSMConference conf;					/* in */
	tSMChannelId channelIn;					/* in */
	tSMChannelId channelOut;				/* in */
} SM_CONFERENCE_REMOVE_PARTY_PARMS;

Description

Removes existing party from previously created conference. The channelIn and channelOut parameters must be the same as were used in the corresponding call to sm_conference_add_party().

Fields

conf
A conference created with sm_conference_create().
channelIn
The party's input channel.
channelOut
The party's output channel.

Returns

0 if call completed successfully, otherwise a standard error such as:


Prosody high level conferencing: API: sm_conference_delete

Prototype Definition

void sm_conference_delete(tSMConference conf)

Parameters

conf
A conference created with sm_conference_create().

Description

Removes all remaining participants from a conference and releases all resources which were being used by the conference. As soon as this function has been invoked, the conference becomes invalid and any further attempt to refer to it is an error.


Prosody high level conferencing: API: sm_conference_info

Prototype Definition

int sm_conference_info(struct sm_conference_info_parms *parms)

Parameters

*parms
a structure of the following type:
typedef struct sm_conference_info_parms {
	tSMConference conf;					/* in */
	int activeChannelCount;					/* out */
	tSMChannelId *activeChannelList;			/* in */
} SM_CONFERENCE_INFO_PARMS;

Description

Return list of input channel identifiers corresponding to those input channels belonging to participants in the conference that are currently active (i.e currently speaking).

The parameter activeChannelList must point to an area of memory large enough to contain an array of N values of type tSMChannelId where N is the maximum possible no. of participants in the conference.

On return, activeChannelCount will be set to the no. of input channel identifiers written by the call to activeChannelList, each identifier in this list being the input channel id of an active participant in the conference. If a conference has only one member it will never report that member as being active.

Fields

conf
A conference created with sm_conference_create().
activeChannelCount
The number of channels currently active in this conference.
activeChannelList
A pointer to where to store the list of channels currently active on this conference.

Returns

0 if call completed successfully, otherwise a standard error such as:


These functions constitute the Prosody high level conferencing API.