# Voice channel parameter structures

When an application creates an MSPP API voice channel, it must specify the following parameters:

typedef struct tag_MSP_VOICE_CHANNEL_PARMS
{
DWORD size;
msp_FILTER_JITTER_PARMS JitterParms;
msp_FILTER_ENCODER_PARMS EncoderParms;
msp_FILTER_DECODER_PARMS DecoderParms;
} MSP_VOICE_CHANNEL_PARMS;

Record channels used in Dialogic native record functionality are voice channels that include only a jitter filter. Consequently, to specify initial native record channel settings, application use the MSP_VOICE_CHANNEL_PARMS structure, but specify only jitter parameters.

### MSP_VOICE_CHANNEL_PARMS

#### Dependent function: mspCreateChannel

Field | Type | Default | Units | Description
size | DWORD | N/A | N/A | Size of the parameter structure.
msp_FILTER_JITTER_PARMS | Structure | N/A | N/A | Structure specifying parameters for jitter functionality.
msp_FILTER_ENCODER_PARMS | Structure | N/A | N/A | Structure specifying parameters for voice encoder functionality.
msp_FILTER_DECODER_PARMS | Structure | N/A | N/A | Structure specifying parameters for voice decoder functionality.

This topic discusses the following substructures:

- Jitter filter substructure

- Encoder filter substructure

- Decoder filter substructure

## Jitter filter substructure

Applications specify jitter functionality with the following parameters:

typedef struct tag_msp_FILTER_JITTER_PARMS
{
DWORD size;
DWORD depth;
DWORD adapt_enabled;
} msp_FILTER_JITTER_PARMS;

### msp_FILTER_JITTER_PARMS

#### Dependent function: mspCreateChannel

Field name | Type | Default | Units | Description
size | DWORD | N/A | N/A | Size of the structure.
depth | DWORD | 2 | frames | Size (in frames) of the internal queue maintained by a jitter filter. Range is 1 to 16.
adapt_enabled | DWORD | 0 (disabled) | 1 =enabled 0 = disabled | Enables adaptive jitter on the channel jitter filter. For more information about adaptive jitter, refer to Jitter channel filter.

## Encoder filter substructure

Applications specify voice encoder functionality with the following parameters:

typedef struct tag_msp_FILTER_ENCODER_PARMS
{
DWORD size;
WORD Mode;
WORD Gain;
WORD VadControl;
WORD NotchControl;
WORD IPFormat;
WORD Rate;
WORD PayloadID;
WORD DtmfMode;
} msp_FILTER_ENCODER_PARMS;

### msp_FILTER_ENCODER_PARMS

#### Dependent function: mspCreateChannel

Field name | Type | Default | Units | Description
size | DWORD | N/A | N/A | Size of the structure.
mode | WORD | 0x0001 (online) | N/A | Vocoding mode. Off-line means that the encoder produces null media packet frames. 0x0000 = off-line 0x0001 = online
gain | WORD | 0x0400 (0 dB) | N/A | Gain value applied to the encoder filter output in S5.10 format. Refer to Calculating vocoder filter gain and loss for a mapping of decibel gain/loss values to linear gain/loss values.
VadControl | WORD | 0x0000 (VAD disabled) | N/A | Enables or disables voice activity detection (VAD). 0x0000 = VAD disabled 0x0001 = VAD enabled
NotchControl | WORD | 0x0000 (DTMF/CED suppression disabled) | N/A | Enables and/or disables DTMF/CED tone suppression filters. The following values are defined: 0x0000 = DTMF and CED notch filters disabled 0x0001 = DTMF notch enabled, CED notch disabled 0x0002 = DTMF notch disabled, CED notch enabled 0x0003 = DTMF and CED notch filters enabled
IPFormat | WORD | 0x0000 | N/A | The companding algorithm applied to the IP payload (applies to G711 and G.726 encoders). The following values apply to G.711: 0x0000 = mu-law (for T1 systems) 0x0001 = A-law (for E1 systems) The following values apply to G.726 0x0000 = Little endian, RFC 3551 format 0x0001 = Big endian, I.366.2 Annex E format
Rate | WORD | Encoder specific | N/A | Vocoding rate in kbit/s. Legal values depend on the encoder. Currently, only G.723.1 supports variable rates (where the default is 0, or 6.4 kbit/s). 0 specifies the highest bit rate setting. The bit rate decreases as settings are incremented by one. Therefore for G.723.1, 0 specifies 6.4 kbit/s and 1 specifies 5.3 kbit/s. If a 2 value is defined, it specifies a lower bit rate than 5.3 kbit/s.
PayloadID | WORD | Channel specific | N/A | Payload ID for outgoing Fusion media frames. Valid Range is 96 - 127. Refer to Vocoder filter attributes for a list of default payload IDs.
DtmfMode | WORD | DTMF_INBAND_ENABLED | N/A | Specifies the mode in which the filter processes DTMF tones. The application combines a payload value and a control value using the bitwise OR operator. The payload value is the DTMF payload ID shifted left by 8 bits. Defined values for control include: DTMF_DISABLED Inband DTMF carriage is not supported for the channel. The following values can be ORed to specify encoder functionality: DTMF_INBAND_ENABLED (default) MSPP channel detects DTMF tones and transfers DTMF information though RFC 2833 compliant packets. DTMF_EVENTS_ENABLED MSPP channel detects DTMF tones and transfers DTMF information through MSPEVN_DPF_DTMF_REPORT events. DTMF_SHIFT_ENABLED If set, shifts the timestamp of the associated DTMF RTP packets back to better align them with the actual start of DTMF detection. This allows for more synchronized decoder playout of the RFC 2833 DTMF digit with regard to actual DTMF time. VOICE_ENABLED If DTMF_INBAND_ENABLED is set, the filter sends voice RTP packets as well as inband DTMF packets for the duration of the DTMF digit.

## Decoder filter substructure

Applications specify voice decoder functionality with the following parameters:

typedef struct tag_msp_FILTER_DECODER_PARMS
{
DWORD size;
WORD Mode;
WORD Gain;
WORD IPFormat;
WORD PayloadID;
WORD DtmfMode;
} msp_FILTER_DECODER_PARMS;

### msp_FILTER_DECODER_PARMS

#### Dependent function: mspCreateChannel

Field name | Type | Default | Units | Description
size | DWORD | N/A | N/A | Size of the structure.
mode | WORD | 0x0001 (online) | N/A | Vocoding mode. Off-line means that the decoder filter plays silence to the DS0 endpoint. 0x0000= off-line 0x0001 = online
gain | WORD | 0x0400 (0 dB) | N/A | Gain value applied to the decoder filter output in S5.10 format. Refer to Calculating vocoder filter gain and loss for a mapping of decibel gain/loss values to linear gain/loss values.
IPFormat | WORD | 0x0000 | N/A | The companding algorithm applied to the IP payload (applies to G.711 and G.726 decoders). The following values apply to G.711: 0x0000 = mu-law (for T1 systems) 0x0001 = A-law (for E1 systems) The following values apply to G.726: 0x0000 = Little endian, RFC 3551 format 0x0001 = Big endian, I.366.2 Annex E format
PayloadID | WORD | Channel specific | N/A | Payload ID for incoming Fusion media frames. Valid Range is 96 - 127. Refer to Vocoder filter attributes for a list of default payload IDs.
DtmfMode | WORD | DTMF_INBAND_ENABLED | N/A | Specifies if and how the decoder filter plays DTMF tones when it receives DTMF data (only when inband DTMF carriage is enabled). The application combines one or more control values with a playout value using the bitwise OR operator. Defined values for control include: DTMF_DISABLED MSPP channel does not play a DTMF tone when it receives an RFC 2833 compliant inband DTMF carriage packet. DTMF_INBAND_ENABLED MSPP channel automatically plays a DTMF tone when it detects an RFC 2833 compliant inband DTMF carriage packet. This setting is enabled by default. DTMF_PLAY_ENABLED MSPP channel plays DTMF tones when the application sends an MSP_CMD_DECODE_PLAY_DTMF_DIGIT command. The playout value is an integer that specifies the number of decoder frames for an ongoing tone to continue when no end-of-tone packet is received. The integer must be shifted left by 8 bits before being ORed with one or more control values.