Prosody RTP processing: API: sm_vmprx_config_codec_tetra

Prototype Definition

int sm_vmprx_config_codec_tetra(struct sm_vmprx_codec_tetra_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_tetra_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
} SM_VMPRX_CODEC_TETRA_PARMS;

Description

Configures a TETRA speech codec to the VMP[rx] setting the payload type mapping to payload_type.

It is possible to change the payload type mapping of a codec whilst a VMP[rx] remains valid by specifying a new payload type mapping for a given codec. This supersedes any previous mappings that were in effect for that codec.

If the call completes successfully, RTP packets arriving at the VMP[rx] with a payload type that matches a mapped type will be decoded using this codec.

If the codec is given the payload type -1 the codec is no longer valid for this RTP session, unless it is subsequently reconfigured.

There is not currently a standard packet encoding for wrapping TETRA-encoded speech into RTP. This implementation expects RTP frames that have standard RTP header followed by: ETSI two octet Payload header (with bits for framing rate, frame number, information element control, traffic type, contents control and payload) - the payload header follows the format described in ETSI TS 100 392-3-8 V0.0.8 section 5.2.1 TETRA ISI payload encoding. Two 18 octet tetra frames - each frame consisting of BFI bit followed by 137 bits of tetra encoded data (holding 30ms of encoded audio data according to traffic type 0 followed by 6 padding bits) - thus this pair of frames conveys 60ms of audio

The tetra encoded data in the 18 octet tetra frames is expected to be traffic type 0 - ACELP (ETS 300 395-2, 4.2.2.7) following MSB-LSB bit order.

The contents of the ETSI payload header are ignored apart from contents control bits which have following effect:

all other values: - we use packet loss concealment algorithm to fill in gap left by absent traffic 1 and traffic 2

Note for incoming data, the RTP timestamp is used to control jitter buffer frame numbers in Tetra payload header are ignored.

This requires the module tetra to have been downloaded.

Fields

vmprx
The VMP[rx] to which to add the codec
payload_type
The payload type identifer to use with this codec (see IETF RFC 3550 section 13). Supplying a value of -1 will remove any payload type configuration from the codec preventing its use.

Returns

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


This function is part of the Prosody RTP processing API.