Prosody RTP processing: API: sm_vmptx_generate_tones

Prototype Definition

int sm_vmptx_generate_tones(struct sm_vmptx_generate_tones_parms *tonep)

Parameters

*tonep
a structure of the following type:
typedef struct sm_vmptx_generate_tones_parms {
	tSMVMPtxId vmptx;					/* in */
	tSM_INT *tones;						/* in */
	tSM_INT num;						/* in */
	tSM_INT duration;					/* in */
	tSM_INT interval;					/* in */
	tSM_INT volume;						/* in */
} SM_VMPTX_GENERATE_TONES_PARMS;

Description

Causes a VMP[tx] to generate rfc2833 tone packets for a sequence of tones, containing num tones. Each tone will have duration duration And the interval between the tones will be interval. tones contains a list of tone identifiers for the tones to be generated, as defined in IETF RFC 2833). Both duration and interval must be given as a multiple of 10ms. The volume must be between 0 and -15 inclusive.

Note that this function by itself is not sufficient to cause the VMP[tx] to transmit RTP packets. The VMP[tx] must also have a valid datafeed which has been connected using sm_vmptx_datafeed_connect().

Fields

vmptx
The VMP[tx] that you wish to generates tones with
tones
The tones to generate
num
The number of tones in the list
duration
The duration of the tones.
interval
The interval between the tones
volume
The volume of the tone in dBm0

Returns

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


This function is part of the Prosody RTP processing API.