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:


This function is part of the Prosody RTP processing API.