When creating an MSPP channel, applications define settings in a MSP_VOICE_CHANNEL_PARMS structure to customize the functionality associated with the created channel. This structure includes two DtmfMode parameters that specify how inband DTMF carriage works on the channel.
This topic describes:
Each DtmfMode parameter resides in the separate encoder or decoder substructure within the MSP_VOICE_CHANNEL_PARMS structure as shown in the following example:
|
Encoder substructure |
Decoder substructure |
|
typedef struct tag_msp_FILTER_ENCODER_PARMS |
typedef struct tag_msp_FILTER_DECODER_PARMS |
Each DtmfMode parameter within the msp_FILTER_ENCODER_PARMS substructure is a 16-bit WORD made up of two 8-bit bytes . These bytes specify whether the channel detects DTMF tones, how it passes on this information (as voice data, in DTMF packets, or both), and/or whether the application generates unsolicited events when it detects DTMF tones.
The following table describes the two bytes (Control and PayloadID) that define MSPP channel encoder inband DTMF carriage functionality:
|
Byte |
Available settings |
|
Control |
|
|
PayloadID |
Encoder sets the payload ID for RFC 2833 compliant inband DTMF packets. Range is 96-127. Default value is 96. |
Control parameter settings are not mutually exclusive. That is, applications can combine multiple settings to combine different kinds of functionality.
For information about processing the unsolicited events associated with RFC 2833 capabilities, refer to RFC 2833 related events.
Each DtmfMode parameter within the msp_FILTER_DECODER_PARMS substructure is a 16-bit WORD made up of two 8-bit bytes. These bytes specify whether the channel plays DTMF tones when it receives RFC compliant inband DTMF carriage reports.
The following table describes the two bytes (control and playoutvalue) that define channel decoder inband DTMF carriage functionality:
|
Byte |
Available settings |
|
control |
|
|
playoutvalue |
Specifies an integer value that indicates the number of decoder frames that the MSPP service generates before stopping when no end-of-tone packet is received. The default value is 3. |
Control parameter settings are not mutually exclusive. For example, applications that perform out-of-band DTMF detection can combine DTMF_DISABLED with DTMF_PLAY_ENABLED. These settings stop the channel from detecting RFC 2833 compliant packets while still allowing the application to generate DTMF tones through the MSPP channel.
Applications that generate out-of-band DTMF tones can play DTMF tones through the voice channel by sending MSP_CMD_DECODE_PLAY_DTMF_DIGIT commands to the decoder filter associated with an MSPP channel. When the MSPP channel decoder filter receives this command, it plays the specified tone. When sending this command, the application includes a structure with a Digit and Duration fields. These fields provide information about the DTMF digit to play. When the channel finishes playing the tone, it returns an MSPEVN_DPF_DTMF_PLAY_END event. This event informs the application when a complete tone has been played.