This function is only in Prosody version 2 (TiNG).
int sm_vmprx_config_tones(struct sm_vmprx_tone_parms *tonep)
typedef struct sm_vmprx_tone_parms {
tSMVMPrxId vmprx; /* in */
tSM_INT regen_tones; /* in */
tSM_INT detect_tones; /* in */
} SM_VMPRX_TONE_PARMS;
Allows an application to specify the action to be taken upon receipt of RFC2833 tones packets in an RTP stream.
Regenerating the tones is a requirement for applications acting as a VoIP to TDM gateway. Applications that need to detect tones from the audio stream will frequently be required to regenerate tones from RFC 2833 packets, this is of particular importance when using codecs that cannot adequately encode tones (e.g. G.729). If regen_tones contains a non-zero value, the VMP[rx] will attempt to regenerate tones in the audio stream when an RFC2833 packet is received.
Applications that terminate a VoIP call may choose not to regenerate tones and to rely on the RFC2833 tone notifications. Supplying a non-zero value in the detect_tones field instructs the VMP[rx] to notify the user when an RFC 2833 tone packet is received in the RTP stream. The VMP[rx]'s event will be set when a tone notification is available.
This requires the module vtdet to have been downloaded.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody RTP processing API.