BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

pj::AccountNatConfig Struct Reference

#include <account.hpp>

Inheritance diagram for pj::AccountNatConfig:
pj::PersistentObject

Public Member Functions

 AccountNatConfig ()
 
virtual void readObject (const ContainerNode &node) throw (Error)
 
virtual void writeObject (ContainerNode &node) const throw (Error)
 
- Public Member Functions inherited from pj::PersistentObject
virtual ~PersistentObject ()
 
virtual void readObject (const ContainerNode &node)=0 throw (Error)
 
virtual void writeObject (ContainerNode &node) const =0 throw (Error)
 

Data Fields

pjsua_stun_use sipStunUse
 
pjsua_stun_use mediaStunUse
 
pjsua_upnp_use sipUpnpUse
 
pjsua_upnp_use mediaUpnpUse
 
pjsua_nat64_opt nat64Opt
 
bool iceEnabled
 
pj_ice_sess_trickle iceTrickle
 
int iceMaxHostCands
 
bool iceAggressiveNomination
 
unsigned iceNominatedCheckDelayMsec
 
int iceWaitNominationTimeoutMsec
 
bool iceNoRtcp
 
bool iceAlwaysUpdate
 
bool turnEnabled
 
string turnServer
 
pj_turn_tp_type turnConnType
 
string turnUserName
 
int turnPasswordType
 
string turnPassword
 
int contactRewriteUse
 
int contactRewriteMethod
 
int contactUseSrcPort
 
int viaRewriteUse
 
int sdpNatRewriteUse
 
int sipOutboundUse
 
string sipOutboundInstanceId
 
string sipOutboundRegId
 
unsigned udpKaIntervalSec
 
string udpKaData
 

Detailed Description

Account's NAT (Network Address Translation) settings. This will be specified in AccountConfig.

Constructor & Destructor Documentation

◆ AccountNatConfig()

pj::AccountNatConfig::AccountNatConfig ( )
inline

Member Function Documentation

◆ readObject()

virtual void pj::AccountNatConfig::readObject ( const ContainerNode node)
throw (Error
)
virtual

Read this object from a container node.

Parameters
nodeContainer to read values from.

Implements pj::PersistentObject.

◆ writeObject()

virtual void pj::AccountNatConfig::writeObject ( ContainerNode node) const
throw (Error
)
virtual

Write this object to a container node.

Parameters
nodeContainer to write values to.

Implements pj::PersistentObject.

Field Documentation

◆ sipStunUse

pjsua_stun_use pj::AccountNatConfig::sipStunUse

Control the use of STUN for the SIP signaling.

Default: PJSUA_STUN_USE_DEFAULT

◆ mediaStunUse

pjsua_stun_use pj::AccountNatConfig::mediaStunUse

Control the use of STUN for the media transports.

Default: PJSUA_STUN_USE_DEFAULT

◆ sipUpnpUse

pjsua_upnp_use pj::AccountNatConfig::sipUpnpUse

Control the use of UPnP for the SIP signaling.

Default: PJSUA_UPNP_USE_DEFAULT

◆ mediaUpnpUse

pjsua_upnp_use pj::AccountNatConfig::mediaUpnpUse

Control the use of UPnP for the media transports.

Default: PJSUA_UPNP_USE_DEFAULT

◆ nat64Opt

pjsua_nat64_opt pj::AccountNatConfig::nat64Opt

Specify NAT64 options.

Default: PJSUA_NAT64_DISABLED

◆ iceEnabled

bool pj::AccountNatConfig::iceEnabled

Enable ICE for the media transport.

Default: False

◆ iceTrickle

pj_ice_sess_trickle pj::AccountNatConfig::iceTrickle

Set trickle ICE mode for ICE media transport.

Default: PJ_ICE_SESS_TRICKLE_DISABLED

◆ iceMaxHostCands

int pj::AccountNatConfig::iceMaxHostCands

Set the maximum number of ICE host candidates.

Default: -1 (maximum not set)

◆ iceAggressiveNomination

bool pj::AccountNatConfig::iceAggressiveNomination

Specify whether to use aggressive nomination.

Default: True

◆ iceNominatedCheckDelayMsec

unsigned pj::AccountNatConfig::iceNominatedCheckDelayMsec

For controlling agent if it uses regular nomination, specify the delay to perform nominated check (connectivity check with USE-CANDIDATE attribute) after all components have a valid pair.

Default value is PJ_ICE_NOMINATED_CHECK_DELAY.

◆ iceWaitNominationTimeoutMsec

int pj::AccountNatConfig::iceWaitNominationTimeoutMsec

For a controlled agent, specify how long it wants to wait (in milliseconds) for the controlling agent to complete sending connectivity check with nominated flag set to true for all components after the controlled agent has found that all connectivity checks in its checklist have been completed and there is at least one successful (but not nominated) check for every component.

Default value for this option is ICE_CONTROLLED_AGENT_WAIT_NOMINATION_TIMEOUT. Specify -1 to disable this timer.

◆ iceNoRtcp

bool pj::AccountNatConfig::iceNoRtcp

Disable RTCP component.

Default: False

◆ iceAlwaysUpdate

bool pj::AccountNatConfig::iceAlwaysUpdate

Always send re-INVITE/UPDATE after ICE negotiation regardless of whether the default ICE transport address is changed or not. When this is set to False, re-INVITE/UPDATE will be sent only when the default ICE transport address is changed.

Default: yes

◆ turnEnabled

bool pj::AccountNatConfig::turnEnabled

Enable TURN candidate in ICE.

◆ turnServer

string pj::AccountNatConfig::turnServer

Specify TURN domain name or host name, in in "DOMAIN:PORT" or "HOST:PORT" format.

◆ turnConnType

pj_turn_tp_type pj::AccountNatConfig::turnConnType

Specify the connection type to be used to the TURN server. Valid values are PJ_TURN_TP_UDP or PJ_TURN_TP_TCP.

Default: PJ_TURN_TP_UDP

◆ turnUserName

string pj::AccountNatConfig::turnUserName

Specify the username to authenticate with the TURN server.

◆ turnPasswordType

int pj::AccountNatConfig::turnPasswordType

Specify the type of password. Currently this must be zero to indicate plain-text password will be used in the password.

◆ turnPassword

string pj::AccountNatConfig::turnPassword

Specify the password to authenticate with the TURN server.

◆ contactRewriteUse

int pj::AccountNatConfig::contactRewriteUse

This option is used to update the transport address and the Contact header of REGISTER request. When this option is enabled, the library will keep track of the public IP address from the response of REGISTER request. Once it detects that the address has changed, it will unregister current Contact, update the Contact with transport address learned from Via header, and register a new Contact to the registrar. This will also update the public name of UDP transport if STUN is configured.

See also contactRewriteMethod field.

Default: 1 (PJ_TRUE / yes)

◆ contactRewriteMethod

int pj::AccountNatConfig::contactRewriteMethod

Specify how Contact update will be done with the registration, if contactRewriteEnabled is enabled. The value is bitmask combination of pjsua_contact_rewrite_method. See also pjsua_contact_rewrite_method.

Value PJSUA_CONTACT_REWRITE_UNREGISTER(1) is the legacy behavior.

Default value: PJSUA_CONTACT_REWRITE_METHOD (PJSUA_CONTACT_REWRITE_NO_UNREG | PJSUA_CONTACT_REWRITE_ALWAYS_UPDATE)

◆ contactUseSrcPort

int pj::AccountNatConfig::contactUseSrcPort

Specify if source TCP port should be used as the initial Contact address if TCP/TLS transport is used. Note that this feature will be automatically turned off when nameserver is configured because it may yield different destination address due to DNS SRV resolution. Also some platforms are unable to report the local address of the TCP socket when it is still connecting. In these cases, this feature will also be turned off.

Default: 1 (PJ_TRUE / yes).

◆ viaRewriteUse

int pj::AccountNatConfig::viaRewriteUse

This option is used to overwrite the "sent-by" field of the Via header for outgoing messages with the same interface address as the one in the REGISTER request, as long as the request uses the same transport instance as the previous REGISTER request.

Default: 1 (PJ_TRUE / yes)

◆ sdpNatRewriteUse

int pj::AccountNatConfig::sdpNatRewriteUse

This option controls whether the IP address in SDP should be replaced with the IP address found in Via header of the REGISTER response, ONLY when STUN and ICE are not used. If the value is FALSE (the original behavior), then the local IP address will be used. If TRUE, and when STUN and ICE are disabled, then the IP address found in registration response will be used.

Default: PJ_FALSE (no)

◆ sipOutboundUse

int pj::AccountNatConfig::sipOutboundUse

Control the use of SIP outbound feature. SIP outbound is described in RFC 5626 to enable proxies or registrar to send inbound requests back to UA using the same connection initiated by the UA for its registration. This feature is highly useful in NAT-ed deployemtns, hence it is enabled by default.

Note: currently SIP outbound can only be used with TCP and TLS transports. If UDP is used for the registration, the SIP outbound feature will be silently ignored for the account.

Default: 1 (PJ_TRUE / yes)

◆ sipOutboundInstanceId

string pj::AccountNatConfig::sipOutboundInstanceId

Specify SIP outbound (RFC 5626) instance ID to be used by this account. If empty, an instance ID will be generated based on the hostname of this agent. If application specifies this parameter, the value will look like "<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>" without the double-quotes.

Default: empty

◆ sipOutboundRegId

string pj::AccountNatConfig::sipOutboundRegId

Specify SIP outbound (RFC 5626) registration ID. The default value is empty, which would cause the library to automatically generate a suitable value.

Default: empty

◆ udpKaIntervalSec

unsigned pj::AccountNatConfig::udpKaIntervalSec

Set the interval for periodic keep-alive transmission for this account. If this value is zero, keep-alive will be disabled for this account. The keep-alive transmission will be sent to the registrar's address, after successful registration.

Default: 15 (seconds)

◆ udpKaData

string pj::AccountNatConfig::udpKaData

Specify the data to be transmitted as keep-alive packets.

Default: CR-LF


The documentation for this struct was generated from the following file:

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.