Prosody RTP processing: API: sm_vmprx_ice_stun_send_bind_request

Prototype Definition

int sm_vmprx_ice_stun_send_bind_request(struct sm_vmprx_ice_stun_send_bind_request_parms *requestp)

Parameters

*requestp
a structure of the following type:
typedef struct sm_vmprx_ice_stun_send_bind_request_parms {
	tSMVMPrxId vmprx;					/* in */
	int use_RTCP_port;					/* in */
	char transaction_id[12];				/* in */
	union {
		SOCKADDR_IN ipv4;				/* in */
		SOCKADDR_IN6 ipv6;				/* in */
	} destination;						/* in */
	tSM_UT32 priority;					/* in */
	tSM_INT use_candidate;					/* in */
} SM_VMPRX_ICE_STUN_SEND_BIND_REQUEST_PARMS;

Description

Sets up VMP[rx] to send periodic STUN bind requests at successively longer intervals starting from 500ms to destination address until a reply is received or 7 attempts have been made with no reply occuring. Multiple calls to this function can set up a VMP[rx] with multiple STUN bind destination addreses (up to a set of 16 simultainuous ongoing candidates). A destination address is removed from the set of candidates when a reply is received or a timeout is signalled (indicated by a sm_vmprx_status() kSMVMPrxStatusSTUNBindResponse).

This requires the module icestun to have been downloaded.

Fields

vmprx
A VMP[rx] running ICE compatible STUN.
use_RTCP_port
Which port to use as the source for the request. When non-zero, use the RTCP port. Otherwise, the RTP port is used
transaction_id
The transaction ID to use, in the same byte order as the packet.
destination
ipv4
The destination on the bind request when the VMP[rx] is an IPv4 endpoint.
ipv6
The destination on the bind request when the VMP[rx] is an IPv6 endpoint.
priority
The priority to assign to a learned peer reflexive address.
use_candidate
An indicator of whether to include the USE-CANDIDATE attribute.

Returns

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


This function is part of the Prosody RTP processing API.