Prosody RTP processing: API

The following functions are provided by the Prosody RTP processing API:

API call W Description
sm_rtcphand_config_bandwidth() P Configure bandwidth for a RTCP handler to use
sm_rtcphand_config_reports() P Configure local reporting by an RTCP handler
sm_rtcphand_config_sdes() P Configure an RTCP SDES item
sm_rtcphand_create() P Create RTCP handler
sm_rtcphand_destroy() P Destroy a previously allocated RTCP handler
sm_rtcphand_get_data() P Get data from an RTCP handler
sm_rtcphand_get_event() P Obtain an event for a RTCP handler
sm_rtcphand_request_statistics() P Provoke an RTCP handler into providing statistics
sm_rtcphand_status() P Determine RTCP handler status
sm_vmprx_config_authentication_hmac_sha1() T Configure a VMP[rx] to use HMAC-SHA1 authentication
sm_vmprx_config_authentication_null() T Configure a VMP[rx] to use no authentication
sm_vmprx_config_codec() T Configure a codec for a VMP[rx]
sm_vmprx_config_codec_alaw() T Configure an A-law codec for a VMP[rx]
sm_vmprx_config_codec_amrnb() T Configure an AMR-NB codec for a VMP[rx]
sm_vmprx_config_codec_comfort_noise() T Configure an RFC 3389 comfort noise codec for a VMP[rx]
sm_vmprx_config_codec_evrc() T Configure an EVRC codec for a VMP[rx]
sm_vmprx_config_codec_g723_1() T Configure a G.723.1 codec for a VMP[rx]
sm_vmprx_config_codec_g726() T Configure a G.726 codec for a VMP[rx]
sm_vmprx_config_codec_g728() T Configure a G.728 codec for a VMP[rx]
sm_vmprx_config_codec_g729ab() T Configure a G.729 AB codec for a VMP[rx]
sm_vmprx_config_codec_g729i() T Configure a G.729 I codec for a VMP[rx]
sm_vmprx_config_codec_gsmefr() T Configure a GSM-EFR codec for a VMP[rx]
sm_vmprx_config_codec_gsmfr() T Configure a GSM-FR codec for a VMP[rx]
sm_vmprx_config_codec_ilbc() T Configure an iLBC codec for a VMP[rx]
sm_vmprx_config_codec_melpe() P Configure a MELPe codec for a VMP[rx]
sm_vmprx_config_codec_mulaw() T Configure an mu-law codec for a VMP[rx]
sm_vmprx_config_codec_rfc2833() T Configure an RFC2833 codec for a VMP[rx]
sm_vmprx_config_codec_rfc4040() T Configure an RFC4040 codec for a VMP[rx]
sm_vmprx_config_codec_smv() P Configure an SMV codec for a VMP[rx]
sm_vmprx_config_dataloss() T Configure data loss threshold for a VMP[rx]
sm_vmprx_config_encryption_aes_cm() T Configure a VMP[rx] to use AES-CM encryption
sm_vmprx_config_encryption_aes_f8() T Configure a VMP[rx] to use AES-f8 encryption
sm_vmprx_config_encryption_null() T Configure a VMP[rx] to use no encryption
sm_vmprx_config_jitter() T Configure the jitter buffer belonging to a VMP[rx]
sm_vmprx_config_tones() T Configure tone handling for a VMP[rx]
sm_vmprx_create() T Create a VMP[rx] endpoint
sm_vmprx_destroy() T Destroy a previously allocated VMP[rx]
sm_vmprx_get_datafeed() T Obtain a datafeed from a VMP[rx]
sm_vmprx_get_event() T Obtain an event for a VMP[rx]
sm_vmprx_get_ports() T Get the RTP and RTCP port information from a VMP[rx]
sm_vmprx_set_rtcphand() P Configures the RTCP handler which handles RTCP for the VMP[rx]
sm_vmprx_status() T Determine VMP[rx] status
sm_vmprx_stop() T Instructs a VMP[rx] to stop processing RTP
sm_vmptx_config() T Configure the basic options for a VMP[tx]
sm_vmptx_config_authentication_hmac_sha1() T Configure a VMP[tx] to use HMAC-SHA1 authentication
sm_vmptx_config_authentication_null() T Configure a VMP[tx] to use no authentication
sm_vmptx_config_codec() T Configure a codec for a VMP[tx]
sm_vmptx_config_codec_alaw() T Configure an A-law codec for a VMP[tx]
sm_vmptx_config_codec_amrnb() T Configure a VMP[tx] to use AMR-NB
sm_vmptx_config_codec_amrnb_mode() T Set the mode of an AMR-NB codec for a VMP[tx]
sm_vmptx_config_codec_comfort_noise() T Configure RFC 3389 comfort noise codec for a VMP[tx]
sm_vmptx_config_codec_evrc() T Configure a VMP[tx] to use EVRC
sm_vmptx_config_codec_g723_1() T Configure a VMP[tx] to use G.723.1
sm_vmptx_config_codec_g726() T Configure a VMP[tx] to use G.726
sm_vmptx_config_codec_g728() T Configure a VMP[tx] to use G.728
sm_vmptx_config_codec_g729ab() T Configure G.729 AB codec for a VMP[tx]
sm_vmptx_config_codec_g729i() T Configure G.729 I codec for a VMP[tx]
sm_vmptx_config_codec_gsmefr() T Configure a VMP[tx] to use GSM-EFR
sm_vmptx_config_codec_gsmfr() T Configure a VMP[tx] to use GSM-FR
sm_vmptx_config_codec_ilbc() T Configure a VMP[tx] to use iLBC
sm_vmptx_config_codec_melpe() P Configure a MELPe codec for a VMP[tx]
sm_vmptx_config_codec_mulaw() T Configure an mu-law codec for a VMP[tx]
sm_vmptx_config_codec_rfc2833() T Configure RFC 2833 codec for a VMP[tx]
sm_vmptx_config_codec_rfc4040() T Configure RFC 4040 codec for a VMP[tx]
sm_vmptx_config_codec_smv() P Configure a VMP[tx] to use SMV
sm_vmptx_config_encryption_aes_cm() T Configure a VMP[tx] to use AES-CM encryption
sm_vmptx_config_encryption_aes_f8() T Configure a VMP[tx] to use AES-f8 encryption
sm_vmptx_config_encryption_null() T Configure a VMP[tx] to use no encryption
sm_vmptx_config_tones() T Configure tone handling for a VMP[tx]
sm_vmptx_create() T Create a VMP[tx] endpoint
sm_vmptx_create_toneset() T Configure a set of tones for use with RFC 2833 generation.
sm_vmptx_datafeed_connect() T Connect a VMP[tx] to a datafeed
sm_vmptx_destroy() T Destroy a previously allocated VMP[tx]
sm_vmptx_destroy_toneset() T Destroy a toneset
sm_vmptx_generate_tones() T Generate rfc2833 tones using a VMP[tx]
sm_vmptx_get_event() T Obtain an event for a VMP[tx]
sm_vmptx_set_csrc() P Configures the CSRC list sent by the VMP[tx]
sm_vmptx_set_rtcphand() P Configures the RTCP handler which handles RTCP for the VMP[tx]
sm_vmptx_status() T Determine VMP[tx] status
sm_vmptx_stop() T Instructs a VMP[tx] to stop sending RTP

Key to W column:

P Preliminary documentation - this functionality is under development. It could be changed or withdrawn, and may not be implemented in this release
T Only in Prosody version 2 (TiNG)

This document is also available as separate pages for each function.


Prosody RTP processing: API: sm_rtcphand_config_bandwidth

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_config_bandwidth(struct sm_rtcphand_config_bandwidth_parms *rvp)

Parameters

*rvp
a structure of the following type:
typedef struct sm_rtcphand_config_bandwidth_parms {
	tSMRTCPHandId rtcphand;					/* in */
	tSM_INT rtcp_bw;					/* in */
	tSM_INT rtcprx_bw;					/* in */
	tSM_INT rtcptx_bw;					/* in */
} SM_RTCPHAND_CONFIG_BANDWIDTH_PARMS;

Description

Configures the RTCP bandwidth.

Fields

rtcphand (Only in Preliminary Documentation)
The RTCP handler to configure
rtcp_bw (Only in Preliminary Documentation)
The bandwidth, in bits per second, allocated for use by RTCP in the session in which this RTCP handler is participating. This is the value rtcp_bw specified in IETF RFC 3550.
rtcprx_bw (Only in Preliminary Documentation)
The bandwith, in bits per second, allocated for use by RTCP reports from RTP receivers. This is the value spcified by "b=RR:<bandwith-value>" in SDP (IETF RFC 3556).
rtcptx_bw (Only in Preliminary Documentation)
The bandwith, in bits per second, allocated for use by RTCP reports from RTP senders. This is the value spcified by "b=RT:<bandwith-value>" in SDP (IETF RFC 3556).

Returns

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


Prosody RTP processing: API: sm_rtcphand_config_reports

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_config_reports(struct sm_rtcphand_config_reports_parms *rvp)

Parameters

*rvp
a structure of the following type:
typedef struct sm_rtcphand_config_reports_parms {
	tSMRTCPHandId rtcphand;					/* in */
	tSM_INT reports;					/* in */
} SM_RTCPHAND_CONFIG_REPORTS_PARMS;

Description

Configures the reports to be locally generated by RTCP. The reports are collected using sm_rtcphand_get_data().

Fields

rtcphand (Only in Preliminary Documentation)
The RTCP handler to configure
reports (Only in Preliminary Documentation)
The reports desired. This is a bitmask of the desired reports, with bit N indicating that report type N is to be generated. The type numbers are the same as for sm_rtcphand_get_data().

Returns

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


Prosody RTP processing: API: sm_rtcphand_config_sdes

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_config_sdes(struct sm_rtcphand_config_sdes_parms *rvp)

Parameters

*rvp
a structure of the following type:
typedef struct sm_rtcphand_config_sdes_parms {
	tSMRTCPHandId rtcphand;					/* in */
	tSM_INT itemnum;					/* in */
	tSM_INT stringlen;					/* in */
	char *stringval;					/* in */
} SM_RTCPHAND_CONFIG_SDES_PARMS;

Description

Configures one string to be used by RTCP. The strings are used to specify the source description (SDES) items. Since Canonical End-Point Identifier SDES Item (CNAME) is mandatory in RTCP packets, it should be configured before the RTCP handler needs to transmit RTCP packets.

When a string which has already been configured is configured again, the new value replaces the old one.

Fields

rtcphand (Only in Preliminary Documentation)
The RTCP handler to configure
itemnum (Only in Preliminary Documentation)
Which SDES item to configure. This is the SDES type (for example, as defined in section 12.2 of IETF RFC 3550).
stringlen (Only in Preliminary Documentation)
The length of the string in octets.
stringval (Only in Preliminary Documentation)
The string contents.

Returns

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


Prosody RTP processing: API: sm_rtcphand_create

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_create(struct sm_rtcphand_create_parms *rtcphandp)

Parameters

*rtcphandp
a structure of the following type:
typedef struct sm_rtcphand_create_parms {
	tSMRTCPHandId rtcphand;					/* out */
	tSMModuleId module;					/* in */
} SM_RTCPHAND_CREATE_PARMS;

Description

Creates a RTCP handler. Note that you must configure the CNAME with sm_rtcphand_config_sdes() before the RTCP handler can generate RTCP packets.

This requires the module rtcp to have been downloaded.

Fields

rtcphand (Only in Preliminary Documentation)
The newly created RTCP handler identifier
module (Only in Preliminary Documentation)
A value obtained from sm_open_module() which indicates the module where the VMP[tx] is to be allocated.

Returns

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


Prosody RTP processing: API: sm_rtcphand_destroy

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_destroy(tSMRTCPHandId rtcphand)

Parameters

rtcphand
A tSMRTCPHandId that has been prevously created by a call to sm_rtcphand_create().

Description

Destroys rtcphand and invalidates the tSMRTCPHandId.

Returns

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


Prosody RTP processing: API: sm_rtcphand_get_data

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_get_data(struct sm_rtcphand_get_data_parms *datap)

Parameters

*datap
a structure of the following type:
typedef struct sm_rtcphand_get_data_parms {
	tSMRTCPHandId rtcphand;					/* in */
	char *data;						/* in */
	tSM_INT max_length;					/* in */
	tSM_INT done_length;					/* out */
} SM_RTCPHAND_GET_DATA_PARMS;

Description

Attempt to read data from an RTCP handler. If the event obtained from sm_rtcphand_get_event() is currently signalled, then this function will not block, but instead read less than max_length of data when either:

To permit maximum system throughput, this function refuses to read from a RTCP handler whose status has changed since it was last checked. This allows an application to avoid checking the status during bulk data transfer. The application only needs to check the status when a call to sm_rtcphand_get_data() returns with done_length equal to zero.

If an error is reported, the done_length field indicates the amount of data which was read before the error occurred.

The data is a stream which contains records. Note that this means that a single call to sm_rtcphand_get_data(). does not always return exactly one record - it may return data from part of a record or from multiple consecutive records. Each record starts with two 32-bit words encoded with the least significant byte first, like this:

data[0] = length & 0xff
data[1] = (length >> 8) & 0xff
data[2] = (length >> 16) & 0xff
data[3] = (length >> 24) & 0xff
data[4] = type & 0xff
data[5] = (type >> 8) & 0xff
data[6] = (type >> 16) & 0xff
data[7] = (type >> 24) & 0xff

The first word, length, is the number of octets of additional data which follows. If this value is not a multiple of four, padding octets follow to bring the total to a multiple of four.

The second word, type, indicates the meaning of any additional data. The values currently defined are:

ValueMeaning
2Transmitted RTCP - the data is an IP datagram which is an RTCP report generated by the RTCP handler
3Received RTCP - the data is an IP datagram containing an RTCP report received by the RTCP handler
4Summary report - the data is a report giving statistics of all traffic so far - provoked by sm_rtcphand_request_statistics()

Note that IP datagrams may not be the actual data transmitted or received for two reasons. Firstly, they are unencrypted, even if they would be encrypted while in transit, and secondly they may be reconstructions which do not fill in irrelevant fields so, for example, the time-to-live field might be zero, and IP options present in transit may be missing. The format is specified to be an IP datagram to guarantee that any information which might be in the real IP datagram can be easily represented in the data retrieved through sm_rtcphand_get_data().

A sample library for processing RTCP handler data is provided with TiNG, see Prosody RTCP library for documentation.

Fields

rtcphand (Only in Preliminary Documentation)
The RTCP handler to use
data (Only in Preliminary Documentation)
A pointer to the buffer into which data should be read.
max_length (Only in Preliminary Documentation)
The amount of space in the buffer.
done_length (Only in Preliminary Documentation)
The amount of data actually read.

Returns

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


Prosody RTP processing: API: sm_rtcphand_get_event

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_get_event(struct sm_rtcphand_event_parms *eventp)

Parameters

*eventp
a structure of the following type:
typedef struct sm_rtcphand_event_parms {
	tSMRTCPHandId rtcphand;					/* in */
	tSMEventId event;					/* out */
} SM_RTCPHAND_EVENT_PARMS;

Description

If the call completes successfully event will hold the tSMEventId belonging to rtcphand. The tSMEventId is valid until the RTCP handler is destroyed using sm_rtcphand_destroy(). This event will be signalled when there is data to be collected using sm_rtcphand_get_data() or when a status change occurs on the RTCP handler. When the event is signalled the user should call sm_rtcphand_get_data() to try collecting data. If there is no data, the user must call sm_rtcphand_status() to discover the nature of the status change.

Fields

rtcphand (Only in Preliminary Documentation)
The RTCP handler
event (Only in Preliminary Documentation)
The event identifier

Returns

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


Prosody RTP processing: API: sm_rtcphand_request_statistics

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_request_statistics(struct sm_rtcphand_request_statistics_parms *rrsp)

Parameters

*rrsp
a structure of the following type:
typedef struct sm_rtcphand_request_statistics_parms {
	tSMRTCPHandId rtcphand;					/* in */
	tSM_INT statcode;					/* in */
} SM_RTCPHAND_REQUEST_STATISTICS_PARMS;

Description

Instructs RTCP handler to provide a statistics report as soon as possible for the specified category of statistics. The statistics report will appear in the data retrieved through sm_rtcphand_get_data() and may be in addition to statistics reports generated for other reasons. It may not be an additional report if the RTCP handler was about to produce a report of the requested type anyway, for example if the specified report type is currently enabled by sm_rtcphand_config_reports()

Fields

rtcphand (Only in Preliminary Documentation)
The RTCP handler which is to provide the statistics
statcode (Only in Preliminary Documentation)
Which statistics are to be provided. See sm_rtcphand_get_data() for the possible types of statistics and their codes.

Returns

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


Prosody RTP processing: API: sm_rtcphand_status

This function is only in Preliminary Documentation.

Prototype Definition

int sm_rtcphand_status(struct sm_rtcphand_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_rtcphand_status_parms {
	tSMRTCPHandId rtcphand;					/* in */
	enum kSMRTCPHandStatus {
		kSMRTCPHandStatusRunning,
	} status;						/* out */
} SM_RTCPHAND_STATUS_PARMS;

Description

Returns the current status of the RTCP handler. This function must be called when the event obtained from sm_rtcphand_get_event() is signalled and sm_rtcphand_get_data() indicates that no data is available for collection.

Fields

rtcphand (Only in Preliminary Documentation)
The RTCP handler to interrogate
status (Only in Preliminary Documentation)
One of these values:
kSMRTCPHandStatusRunning
The RTCP handler is running normally.

Returns

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


Prosody RTP processing: API: sm_vmprx_config_authentication_hmac_sha1

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_authentication_hmac_sha1(struct sm_vmprx_config_authentication_hmac_sha1_parms *pp)

Parameters

*pp
a structure of the following type:
typedef struct sm_vmprx_config_authentication_hmac_sha1_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT keylen;						/* in */
	char *key;						/* in */
	tSM_INT taglen;						/* in */
} SM_VMPRX_CONFIG_AUTHENTICATION_HMAC_SHA1_PARMS;

Description

Configures a VMP[rx] to use HMAC-SHA1 authentication, as defined in IETF RFC 3711.

This requires the module securertp to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to configure
keylen (Only in Prosody version 2 (TiNG))
The length of the authentication key in octets.
key (Only in Prosody version 2 (TiNG))
The authentication key.
taglen (Only in Prosody version 2 (TiNG))
The length of the authentication tag in bits.

Returns

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


Prosody RTP processing: API: sm_vmprx_config_authentication_null

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_authentication_null(struct sm_vmprx_config_authentication_null_parms *pp)

Parameters

*pp
a structure of the following type:
typedef struct sm_vmprx_config_authentication_null_parms {
	tSMVMPrxId vmprx;					/* in */
} SM_VMPRX_CONFIG_AUTHENTICATION_NULL_PARMS;

Description

Disables any authentication which may have been in use by a VMP[rx].

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to configure

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec(struct sm_vmprx_codec_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_parms {
	tSMVMPrxId vmprx;					/* in */
	enum kSMCodecType {
		kSMCodecTypeAlaw,
		kSMCodecTypeMulaw,
		kSMCodecTypeG729AB,
		kSMCodecTypeRFC2833,
		kSMCodecTypeComfortNoise,
	} codec;							/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode {
		kSMPLCModeDisabled,
		kSMPLCModeEnabled,
	} plc_mode;						/* in */
} SM_VMPRX_CODEC_PARMS;

Description

This function is deprecated because it will not be updated to add any new codecs or new features for the codecs it covers. The codecs it covers can also be configured using sm_vmprx_config_codec_alaw(), sm_vmprx_config_codec_comfort_noise(), sm_vmprx_config_codec_g726(), sm_vmprx_config_codec_mulaw(), and sm_vmprx_config_codec_rfc2833() and new codecs will be added by adding new functions for each codec.

Configures the specified 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 the selected codec.

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

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
codec (Only in Prosody version 2 (TiNG))
The codec to be configured
One of these values:
kSMCodecTypeAlaw
G711 A-law codec.
kSMCodecTypeMulaw
G711 Mu-law codec.
kSMCodecTypeG729AB
G729 AB codec.
kSMCodecTypeRFC2833
RFC 2833 tones.
kSMCodecTypeComfortNoise
Comfort noise generation
payload_type (Only in Prosody version 2 (TiNG))
The payload type identifer for the selected codec (see IETF RFC 3550 section 13). Supplying a value of -1 will remove any payload type configuration from the specified codec.
plc_mode (Only in Prosody version 2 (TiNG))
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_alaw

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_alaw(struct sm_vmprx_codec_alaw_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_alaw_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_ALAW_PARMS;

Description

Configures an A-law 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.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_amrnb

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_amrnb(struct sm_vmprx_codec_amrnb_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_amrnb_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT aligned;					/* in */
	tSM_INT gsmefr;						/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_AMRNB_PARMS;

Description

Configures the VMP[rx] to use the AMR narrow-band codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module amr-nb to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
aligned (Only in Prosody version 2 (TiNG))
Packet alignment (bandwidth efficient mode). 0 if packet is not aligned, otherwise packet is aligned.
gsmefr (Only in Prosody version 2 (TiNG))
Configures the codec to perform GSM-EFR equivalent decoding. This will assume non-aligned packets, non-sorted bits and 12.2 kHz mode encoding.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_comfort_noise

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_comfort_noise(struct sm_vmprx_codec_comfort_noise_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_comfort_noise_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_COMFORT_NOISE_PARMS;

Description

Configures a comfort noise 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.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_evrc

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_evrc(struct sm_vmprx_codec_evrc_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_evrc_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT post_filter;					/* in */
	enum kSMEVRCRTPMode {
		kSMEVRCRTPModeHeaderless,
		kSMEVRCRTPModeRFC2658,
		kSMEVRCRTPModeRFC3558,
	} rtp_mode;						/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_EVRC_PARMS;

Description

Configures the VMP[rx] to use the Enhanced Variable Rate Codec (EVRC), setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module evrc to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
post_filter (Only in Prosody version 2 (TiNG))
Configures whether or not to use a post-filter. It is used if this value is non-zero.
rtp_mode (Only in Prosody version 2 (TiNG))
Selects the RTP format for this codec. There are two commonly-used specifications for how to pack the the encoded data into an RTP packet.
One of these values:
kSMEVRCRTPModeHeaderless
Encodes the bitstream as raw encoded bytes, with no headers. This requires that there is only one frame per packet.
kSMEVRCRTPModeRFC2658
Encodes the bitstream as specified in IETF RFC 2658. The header is one byte. This specification only allows for one frame per packet.
kSMEVRCRTPModeRFC3558
Encodes the bitstream as specified in IETF RFC 3558. The header is two bytes, plus one byte for every two frames in the packet.
plc_mode (Only in Prosody version 2 (TiNG))
Configures packet loss concealment for this codec.
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_g723_1

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_g723_1(struct sm_vmprx_codec_g723_1_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_g723_1_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT post_filter;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_G723_1_PARMS;

Description

Configures the VMP[rx] to use the G.723.1 codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module rtcp to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
post_filter (Only in Prosody version 2 (TiNG))
Configures whether or not to use a post-filter. It is used if this value is non-zero.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_g726

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_g726(struct sm_vmprx_codec_g726_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_g726_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT bits;						/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_G726_PARMS;

Description

Configures the VMP[rx] to use the G.726 codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module g726 to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
bits (Only in Prosody version 2 (TiNG))
The bit rate at which the codec runs, specified as the number of bits per sample. This must be 2, 3, 4, or 5.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_g728

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_g728(struct sm_vmprx_codec_g728_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_g728_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT rate;						/* in */
	tSM_INT post_filter;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_G728_PARMS;

Description

Configures the VMP[rx] to use the G.728 codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module g728 to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
rate (Only in Prosody version 2 (TiNG))
The decoding rate to use, in bits per second. G.728 supports three rates: 9600, 12800 and 16000.
post_filter (Only in Prosody version 2 (TiNG))
Configures whether or not to use a post-filter. It is used if this value is non-zero.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_g729ab

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_g729ab(struct sm_vmprx_codec_g729ab_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_g729ab_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_G729AB_PARMS;

Description

Configures an G.729 AB 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.

This requires the module g729ab to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_g729i

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_g729i(struct sm_vmprx_codec_g729i_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_g729i_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMG729IMode {
		kSMG729IModeG729D,
		kSMG729IModeG729,
		kSMG729IModeG729E,
	} g729_mode;						/* in */
} SM_VMPRX_CODEC_G729I_PARMS;

Description

Configures an G.729 I 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.

This requires the module g729i to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
g729_mode (Only in Prosody version 2 (TiNG))
Sets the data rate according to G.729 Annex D, to the basic G.729 standard, or to G.729 Annex E, respectively. This mode should be chosen to match the payload type.
One of these values:
kSMG729IModeG729D
G.729 Annex D
kSMG729IModeG729
G.729 standard
kSMG729IModeG729E
G.729 Annex E

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_gsmefr

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_gsmefr(struct sm_vmprx_codec_gsmefr_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_gsmefr_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_GSMEFR_PARMS;

Description

Configures the VMP[rx] to use the GSM-EFR codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module gsm-efr to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
plc_mode (Only in Prosody version 2 (TiNG))
Configures packet loss concealment for this codec.
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_gsmfr

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_gsmfr(struct sm_vmprx_codec_gsmfr_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_gsmfr_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMGSMVariant {
		kSMGSMVariantStandard,
		kSMGSMVariantMS,
	} variant;						/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_GSMFR_PARMS;

Description

Configures the VMP[rx] to use the GSM full-rate codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module gsm-fr to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
variant (Only in Prosody version 2 (TiNG))
Configures which GSM variant is to be used.
One of these values:
kSMGSMVariantStandard
Use the standard GSM 06.10 codec.
kSMGSMVariantMS
Decode packets using the alternate MS-GSM encoding scheme. The GSM 06.10 codec itself is identical, however the bitstream is packed with two frames in 65 bytes instead of one frame in 33 bytes.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_ilbc

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_ilbc(struct sm_vmprx_codec_ilbc_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_ilbc_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	tSM_INT frame_len;					/* in */
	tSM_INT enhancer;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_ILBC_PARMS;

Description

Configures the VMP[rx] to use the iLBC codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module ilbc to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
frame_len (Only in Prosody version 2 (TiNG))
Length of each frame which will be received, in milliseconds. This must be either 20 or 30.
enhancer (Only in Prosody version 2 (TiNG))
Configures whether or not to use an enhancer. It is used if this value is non-zero.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_melpe

This function is only in Preliminary Documentation.

Prototype Definition

int sm_vmprx_config_codec_melpe(struct sm_vmprx_codec_melpe_parms *codecp)

Parameters

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

Description

Configures a melpe 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.

This requires the module melpe to have been downloaded.

Fields

vmprx (Only in Preliminary Documentation)
The VMP[rx] to which to add the codec
payload_type (Only in Preliminary Documentation)
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:


Prosody RTP processing: API: sm_vmprx_config_codec_mulaw

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_mulaw(struct sm_vmprx_codec_mulaw_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_mulaw_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_MULAW_PARMS;

Description

Configures a mu-law 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.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_rfc2833

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_rfc2833(struct sm_vmprx_codec_rfc2833_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_rfc2833_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_RFC2833_PARMS;

Description

Configures an IETF RFC 2833 codec on 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.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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.
plc_mode (Only in Prosody version 2 (TiNG))
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_codec_rfc4040

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_codec_rfc4040(struct sm_vmprx_codec_rfc4040_parms *codecp)

Parameters

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

Description

Configures an IETF RFC 4040 codec on 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.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to which to add the codec
payload_type (Only in Prosody version 2 (TiNG))
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:


Prosody RTP processing: API: sm_vmprx_config_codec_smv

This function is only in Preliminary Documentation.

Prototype Definition

int sm_vmprx_config_codec_smv(struct sm_vmprx_codec_smv_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_codec_smv_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT payload_type;					/* in */
	enum kSMPLCMode plc_mode;				/* in */
} SM_VMPRX_CODEC_SMV_PARMS;

Description

Configures the VMP[rx] to use the SMV codec, setting the payload type mapping to payload_type. This supersedes any previous mapping that was in effect for this codec.

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

This requires the module smv to have been downloaded.

Fields

vmprx (Only in Preliminary Documentation)
The VMP[rx] to which to add the codec
payload_type (Only in Preliminary Documentation)
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.
plc_mode (Only in Preliminary Documentation)
Enables or disables PLC (packet loss concealment) as appropriate for the codec
One of these values:
kSMPLCModeDisabled
PLC Disabled
kSMPLCModeEnabled
PLC Enabled

Returns

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


Prosody RTP processing: API: sm_vmprx_config_dataloss

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_dataloss(struct sm_vmprx_dataloss_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmprx_dataloss_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT loss_threshold;					/* in */
} SM_VMPRX_DATALOSS_PARMS;

Description

Configures the data loss threshold for a VMP[rx]. When the VMP[rx] s running, sm_vmprx_status(), indicates whether or not data is currently being received. If no valid data is available for at least the data loss threshold since the last valid data, the status indicates that data is not being received. The status changes to indicate that data is being received when a valid data packet is received.

Packets which are discarded (for example, duplicates or those which fail authentication) are not considered valid data.

A data loss threshold of zero disables the reporting of data loss.

The VMP[rx] event is signalled when the first data packet is received, any time subsequently when the data loss threshold is reached, and any time when data arrives after data loss. When a VMP[rx] is first configured, it is already experiencing data loss (because there has obviously been no data for the data loss period, since there has never been data), so the VMP[rx] event is not signalled. If an application wants to have a data loss timeout to guard against no data ever being received, it needs to implement its own timer.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to be configured
loss_threshold (Only in Prosody version 2 (TiNG))
The threshold to use (in mS).

Returns

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


Prosody RTP processing: API: sm_vmprx_config_encryption_aes_cm

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_encryption_aes_cm(struct sm_vmprx_config_encryption_aes_cm_parms *pp)

Parameters

*pp
a structure of the following type:
typedef struct sm_vmprx_config_encryption_aes_cm_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT keylen;						/* in */
	char *key;						/* in */
} SM_VMPRX_CONFIG_ENCRYPTION_AES_CM_PARMS;

Description

Configures a VMP[rx] to use AES-CM encryption, as defined in IETF RFC 3711.

This requires the module securertp to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to configure
keylen (Only in Prosody version 2 (TiNG))
The length of the encryption key in octets.
key (Only in Prosody version 2 (TiNG))
The encryption key.

Returns

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


Prosody RTP processing: API: sm_vmprx_config_encryption_aes_f8

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_encryption_aes_f8(struct sm_vmprx_config_encryption_aes_f8_parms *pp)

Parameters

*pp
a structure of the following type:
typedef struct sm_vmprx_config_encryption_aes_f8_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT keylen;						/* in */
	char *key;						/* in */
} SM_VMPRX_CONFIG_ENCRYPTION_AES_F8_PARMS;

Description

Configures a VMP[rx] to use AES-f8 encryption, as defined in IETF RFC 3711.

This requires the module rtcp to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to configure
keylen (Only in Prosody version 2 (TiNG))
The length of the encryption key in octets.
key (Only in Prosody version 2 (TiNG))
The encryption key.

Returns

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


Prosody RTP processing: API: sm_vmprx_config_encryption_null

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_encryption_null(struct sm_vmprx_config_encryption_null_parms *pp)

Parameters

*pp
a structure of the following type:
typedef struct sm_vmprx_config_encryption_null_parms {
	tSMVMPrxId vmprx;					/* in */
} SM_VMPRX_CONFIG_ENCRYPTION_NULL_PARMS;

Description

Disables any encryption which may have been in use by a VMP[rx].

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to configure

Returns

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


Prosody RTP processing: API: sm_vmprx_config_jitter

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_jitter(struct sm_vmprx_jitter_parms *jitterp)

Parameters

*jitterp
a structure of the following type:
typedef struct sm_vmprx_jitter_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_UT32 max_delay_ms;					/* in */
	tSM_UT32 initial_delay_ms;				/* in */
} SM_VMPRX_JITTER_PARMS;

Description

Allows an application to confgure the jitter buffer belonging to a VMP[rx]. Default values are used for the jitter buffer when a VMP[rx] is created, so explicit configuration may not be necesary. Reconfiguration of the jitter buffer may result in audible artifacts in the audio stream during reconfiguration.

It is generally considered that the total end-to-end delay must be no more than about 150 milliseconds for acceptable usability. Unavoidable delay comes from two main sources: packetisation delay and propagation delay. A codec causes packetisation delay, for example, the G.711 codec sending packets each containing 20 mS of data must add 20 mS of delay. Propagation delay obviously varies with the distance covered, with the longest Earthbound link (halfway around the world) taking at least 67 mS, as limited by the speed of light. In practice, delays of about 10 to 25 mS can be found within the U.S.A., with international delays being longer (e.g. U.S.A. to U.K. about 50 to 60 mS). This means that the jitter buffer should generally be limited to 100 mS, with a smaller value used for long-distance calls or when using codecs which impose a longer packetisation delay..

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to be configured
max_delay_ms (Only in Prosody version 2 (TiNG))
Maximum allowable length for the jitter buffer in milliseconds. The default is 100.
initial_delay_ms (Only in Prosody version 2 (TiNG))
Initial amount of audio the jitter buffer should accumulate at startup. The default is 50.

Returns

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


Prosody RTP processing: API: sm_vmprx_config_tones

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_config_tones(struct sm_vmprx_tone_parms *tonep)

Parameters

*tonep
a structure of the following type:
typedef struct sm_vmprx_tone_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT regen_tones;					/* in */
	tSM_INT detect_tones;					/* in */
} SM_VMPRX_TONE_PARMS;

Description

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.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to be configured
regen_tones (Only in Prosody version 2 (TiNG))
Indicator of whether RFC2833 tones that are present in the data stream should be regenerated as audio data. A non-zero value instructs the VMP[rx] to regenerate these tones (see supported tones from RFC2833).
detect_tones (Only in Prosody version 2 (TiNG))
A non-zero value instructs the VMP[rx] to notify the user when an RFC2833 tone is detected in the RTP stream.

Returns

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


Prosody RTP processing: API: sm_vmprx_create

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_create(struct sm_vmprx_create_parms *vmprxp)

Parameters

*vmprxp
a structure of the following type:
typedef struct sm_vmprx_create_parms {
	tSMVMPrxId vmprx;					/* out */
	tSMModuleId module;					/* in */
	struct in_addr address;					/* in */
} SM_VMPRX_CREATE_PARMS;

Description

Allocates, on a specific module, a new VMP[rx] to receive incoming RTP data. If the call completes successfully, the parameter vmprx will be set to the identifier for that vmprx.

A VMP[rx] is automatically allocated a port number for incoming RTP data, this information may be obtained by calling sm_vmprx_get_ports() or by waiting for sm_vmprx_status() to return the port information. Any RTP data arriving at the VMP[rx] will be interpreted based on the cofiguration supplied by sm_vmprx_config_codec(). The VMP[rx] will discard any incoming packets that do not match it's current configuration settings.

This requires the module vmprx to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The newly created VMP[rx].
module (Only in Prosody version 2 (TiNG))
A value obtained from sm_open_module() which indicates the module where the VMP[rx] is to be allocated.
address (Only in Prosody version 2 (TiNG))
The address on which this VMP[rx] is to listen.

Returns

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


Prosody RTP processing: API: sm_vmprx_destroy

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_destroy(tSMVMPrxId vmprx)

Parameters

vmprx
A tSMVMPrxId that has been prevously created by a call to sm_vmprx_create().

Description

Destroys vmprx and invalidates the tSMVMPrxId. Normally, a VMP[rx] will only be destroyed when it is in the stopped state. If the VMP[rx] is not in the stopped state, it will be implicitly stopped. It is an error to refer to a VMP[rx] once it has been destroyed.

If a call to sm_vmprx_create() completes successfully, sm_vmprx_stop() should be used to stop to the VMP[rx] and move it into the stopped state.

Returns

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


Prosody RTP processing: API: sm_vmprx_get_datafeed

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_get_datafeed(struct sm_vmprx_datafeed_parms *datafeedp)

Parameters

*datafeedp
a structure of the following type:
typedef struct sm_vmprx_datafeed_parms {
	tSMVMPrxId vmprx;					/* in */
	tSMDatafeedId datafeed;					/* out */
} SM_VMPRX_DATAFEED_PARMS;

Description

Request a datafeed identifier from a VMP[rx]. This identifer can subsequently be used in a call to any of the *_datafeed_connect() functions to connect the output from the VMP[rx] to a destination. It is valid until the VMP[rx] is destroyed. Datafeed connections can only be made between objects allocated on the same tSMModuleId.

Requires the module datafeed to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] from which to obtain a datafeed
datafeed (Only in Prosody version 2 (TiNG))
The datafeed object associated with the VMP[rx]

Returns

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


Prosody RTP processing: API: sm_vmprx_get_event

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_get_event(struct sm_vmprx_event_parms *eventp)

Parameters

*eventp
a structure of the following type:
typedef struct sm_vmprx_event_parms {
	tSMVMPrxId vmprx;					/* in */
	tSMEventId event;					/* out */
} SM_VMPRX_EVENT_PARMS;

Description

If the call completes successfully event will hold the tSMEventId belonging to vmprx. The tSMEventId is valid until the VMP[rx] is destroyed using sm_vmprx_destroy(). This event will be signalled when a status change occurs on the VMP[rx]. When the event is signalled the user must call sm_vmprx_status() to discover the nature of the status change.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx]
event (Only in Prosody version 2 (TiNG))
The event identifier

Returns

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


Prosody RTP processing: API: sm_vmprx_get_ports

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_get_ports(struct sm_vmprx_port_parms *portp)

Parameters

*portp
a structure of the following type:
typedef struct sm_vmprx_port_parms {
	tSMVMPrxId vmprx;					/* in */
	int RTP_port;						/* out */
	int RTCP_port;						/* out */
	struct in_addr address;					/* out */
	tSM_UT32 nowait;					/* in */
} SM_VMPRX_PORT_PARMS;

Description

Retrieves the RTP and RTCP port numbers which have been allocated by this VMP[rx] and on which it is listening.

If the call completes successfully, RTP_port will contain the port number where RTP packets should be directed for this VMP[rx]. Similarly, RTCP_port will contain the port number where RTCP packets should be directed.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to be interrogated
RTP_port (Only in Prosody version 2 (TiNG))
The UDP port number on which this VMP[rx] is listening for RTP
RTCP_port (Only in Prosody version 2 (TiNG))
The UDP port number on which this VMP[rx] is listening for RTCP
address (Only in Prosody version 2 (TiNG))
The address on which this VMP[rx] is listening.
nowait (Only in Prosody version 2 (TiNG))
Selects blocking or non-blocking mode for this API call. In non-blocking mode the API call may return without the requested information. It is recommended that users wait for sm_vmprx_status() to inform the application that the port and address information is available, rather than using this API call. If the nowait flag is clear, the API call will block until the desired information is available, otherwise the API call will return immediately.

Returns

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


Prosody RTP processing: API: sm_vmprx_set_rtcphand

This function is only in Preliminary Documentation.

Prototype Definition

int sm_vmprx_set_rtcphand(struct sm_vmprx_set_rtcphand_parms *rvp)

Parameters

*rvp
a structure of the following type:
typedef struct sm_vmprx_set_rtcphand_parms {
	tSMVMPrxId vmprx;					/* in */
	tSMRTCPHandId rtcphand;					/* in */
} SM_VMPRX_SET_RTCPHAND_PARMS;

Description

Configures the RTCP handler which handles RTCP for the VMP[rx]

Fields

vmprx (Only in Preliminary Documentation)
The VMP[rx] to be configured
rtcphand (Only in Preliminary Documentation)
The RTCP handler to use. The value kSMNullRTCPHandId, means that no RTCP handler is to be used.

Prosody RTP processing: API: sm_vmprx_status

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_status(struct sm_vmprx_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_vmprx_status_parms {
	tSMVMPrxId vmprx;					/* in */
	enum kSMVMPrxStatus {
		kSMVMPrxStatusRunning,
		kSMVMPrxStatusStopped,
		kSMVMPrxStatusDetectTone,
		kSMVMPrxStatusEndTone,
		kSMVMPrxStatusGotPorts,
		kSMVMPrxStatusNewSSRC,
	} status;						/* out */
	union {
		struct {
			tSM_INT id;				/* out */
			double volume;				/* out */
			unsigned duration;			/* out */
		} tone;						/* out */
		struct {
			int RTP_Port;				/* out */
			int RTCP_Port;				/* out */
			struct in_addr address;			/* out */
		} ports;					/* out */
		struct {
			tSM_INT no_data;			/* out */
		} run;						/* out */
		struct {
			struct in_addr address;			/* out */
			int port;				/* out */
			int ssrc;				/* out */
		} ssrc;						/* out */
	} u;							/* out */
} SM_VMPRX_STATUS_PARMS;

Description

Returns the current status of the VMP[rx] or an error to indicate that an error has occurred.

When the VMP[rx] event, obtained from sm_vmprx_get_event(), is signalled the user must call this function to determine the nature of the status change. The change in status may indicate that an error occurred whilst processing a user request or it may be notifiying the user of a change to the previous state of the VMP[rx].

Fields

vmprx (Only in Prosody version 2 (TiNG))
The VMP[rx] to interrogate
status (Only in Prosody version 2 (TiNG))
One of these values:
kSMVMPrxStatusRunning
The VMP[rx] is running normally.
kSMVMPrxStatusStopped
Indicates that the VMP[rx] has stopped processing RTP and that it is safe to destroy
kSMVMPrxStatusDetectTone
Indicates that a tone has been received by the vmprx
kSMVMPrxStatusEndTone
Indicates that the tone being received by the vmprx has ended
kSMVMPrxStatusGotPorts
Indicates that port information is available. In addition to being reported with this status, this information can be retrieved with sm_vmprx_get_ports() at any time until the VMP[x] is stopped.
kSMVMPrxStatusNewSSRC
Indicates that a new SSRC value is being used.
u (Only in Prosody version 2 (TiNG))
Additional information relating to the current status of the VMP[rx]
tone
This field is only valid if the status is kSMVMPrxStatusDetectTone or kSMVMPrxStatusEndTone.
id
The RFC2833 identifier for the recognised tone
volume
The volume of the tone expressed in dBm0
duration
The duration of the tone.
ports
This field is only valid if the status is kSMVMPrxStatusGotPorts.
RTP_Port
The UDP port number on which this VMP[rx] is listening for RTP
RTCP_Port
The UDP port number on which this VMP[rx] is listening for RTCP
address
The address on which this VMP[rx] is listening.
run
This field is only valid if the status is kSMVMPrxStatusRunning.
no_data
Non zero when the VMP[rx] is experiencing a loss of data that has reached the threshold set by sm_vmprx_config_dataloss()
ssrc
This field is only valid if the status is kSMVMPrxStatusNewSSRC.
address
The address from which the SSRC was received.
port
The UDP port number from which the SSRC was received.
ssrc
The new SSRC value.

Returns

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


Prosody RTP processing: API: sm_vmprx_stop

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_stop(struct sm_vmprx_stop_parms *stopp)

Parameters

*stopp
a structure of the following type:
typedef struct sm_vmprx_stop_parms {
	tSMVMPrxId vmprx;					/* in */
} SM_VMPRX_STOP_PARMS;

Description

Requests that a VMP[rx] stops executing. The user will be notified that a VMP[rx] has terminated by a final status, kSMVMPrxStatusStopped, from sm_vmprx_status(). Once the stopped status notification has been received the VMP[rx] can be destroyed using sm_vmprx_destroy().

Once the VMP[rx] has stopped the event should no longer be used to wait for status notifications as it will be signalled permanently. The event is invalidated when sm_vmprx_destroy() is called.

Fields

vmprx (Only in Prosody version 2 (TiNG))
A tSMVMPrxId that has been previously created by a call to sm_vmprx_create().

Returns

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


Prosody RTP processing: API: sm_vmptx_config

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmptx_config(struct sm_vmptx_config_parms *configp)

Parameters

*configp
a structure of the following type:
typedef struct sm_vmptx_config_parms {
	tSMVMPtxId vmptx;					/* in */
	SOCKADDR_IN destination_rtp;				/* in */
	SOCKADDR_IN source_rtp;					/* in */
	int TOS_RTP;						/* in */
	SOCKADDR_IN destination_rtcp;				/* in */
	SOCKADDR_IN source_rtcp;				/* in */
	int TOS_RTCP;						/* in */
} SM_VMPTX_CONFIG_PARMS;

Description

Configures a VMP[tx] to send RTP and RTCP data to a device with the specified IP address and port numbers.

If the call completes successfully RTP data generated by the vmptx will be sent to the address and port as specified in destination_rtp. Any associated RTCP data will be delivered to the address and port specified by destination_rtcp. Specifying the source_rtp instructs the VMP[tx] to use the given IP address and port for outgoing RTP data. Specifying the source_rtcp instructs the VMP[tx] to use the given IP address and port for outgoing RTCP data.

This requires the module vmptx to have been downloaded.

Fields

vmptx (Only in Prosody version 2 (TiNG))
The VMP[tx] to configure
destination_rtp (Only in Prosody version 2 (TiNG))
The SOCKADDR_IN structure specifying the destination IP address and port for the RTP stream. A struct SOCKADDR_IN must be configured with an address family, an IP address and a port. Note that most operating systems define this structure such that fields are in network byte order. The structure must be correctly cast such that an IP V4 address is specified.
source_rtp (Only in Prosody version 2 (TiNG))
The SOCKADDR_IN structure allows you to specify the source IP address and port for the RTP stream. A struct SOCKADDR_IN must be configured with an address family. The IP address may be specified, or the value INADDR_ANY may be used to indicate that any suitable address may be used. The port number may be specified, or the value zero may be used to indicate that a suitable port number is to be automatically allocated and used. Note that most operating systems define this structure such that fields are in network byte order. The structure must be correctly cast such that an IP V4 address is specified.
TOS_RTP (Only in Prosody version 2 (TiNG))
The Type Of Service (TOS) indicator to be sent with RTP data
destination_rtcp (Only in Prosody version 2 (TiNG))
The SOCKADDR_IN structure specifying the destination IP address and port for the RTCP stream. A struct SOCKADDR_IN must be configured with an address family, an IP address and a port. Note that most operating systems define this structure such that fields are in network bytes order. The structure must be correctly cast such that an IP V4 address is specified.
source_rtcp (Only in Prosody version 2 (TiNG))
The SOCKADDR_IN structure allows you to specify the source IP address and port for the RTCP stream. A struct SOCKADDR_IN must be configured with an address family. The IP address may be specified, or the value INADDR_ANY may be used to indicate that any suitable address may be used. The port number may be specified, or the value zero may be used to indicate that a suitable port number is to be automatically allocated and used. Note that most operating systems define this structure such that fields are in network bytes order. The structure must be correctly cast such that an IP V4 address is specified.
TOS_RTCP (Only in Prosody version 2 (TiNG))
The Type Of Service (TOS) indicator to be sent with RTCP data

Returns

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


Prosody RTP processing: API: sm_vmptx_config_authentication_hmac_sha1

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmptx_config_authentication_hmac_sha1(struct sm_vmptx_config_authentication_hmac_sha1_parms *pp)

Parameters

*pp
a structure of the following type:
typedef struct sm_vmptx_config_authentication_hmac_sha1_parms {
	tSMVMPtxId vmptx;					/* in */
	tSM_INT keylen;						/* in */
	char *key;						/* in */
	tSM_INT taglen;						/* in */
} SM_VMPTX_CONFIG_AUTHENTICATION_HMAC_SHA1_PARMS;

Description

Configures a VMP[tx] to use HMAC-SHA1 authentication, as defined in IETF RFC 3711.

This requires the module securertp to have been downloaded.

Fields

vmptx (Only in Prosody version 2 (TiNG))
The VMP[tx] to configure
keylen (Only in Prosody version 2 (TiNG))
The length of the authentication key in octets.
key (Only in Prosody version 2 (TiNG))
The authentication key.
taglen (Only in Prosody version 2 (TiNG))
The length of the authentication tag in bits.

Returns

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


Prosody RTP processing: API: sm_vmptx_config_authentication_null

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmptx_config_authentication_null(struct sm_vmptx_config_authentication_null_parms *pp)

Parameters

*pp
a structure of the following type:
typedef struct sm_vmptx_config_authentication_null_parms {
	tSMVMPtxId vmptx;					/* in */
} SM_VMPTX_CONFIG_AUTHENTICATION_NULL_PARMS;

Description

Disables any authentication which may have been in use by a VMP[tx].

Fields

vmptx (Only in Prosody version 2 (TiNG))
The VMP[tx] to configure

Returns

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


Prosody RTP processing: API: sm_vmptx_config_codec

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmptx_config_codec(struct sm_vmptx_codec_parms *codecp)

Parameters

*codecp
a structure of the following type:
typedef struct sm_vmptx_codec_parms {
	tSMVMPtxId vmptx;					/* in */
	enum kSMCodecType codec;				/* in */
	tSM_INT payload_type;					/* in */
	enum kSMVMPTxVADMode {
		kSMVMPTxVADModeDisabled,
		kSMVMPTxVADModeEnabled,
		kSMVMPTxVADModeComfortNoise,
	} VADMode;						/* in *