WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

#include <siptypes.hpp>

Inheritance diagram for pj::TransportConfig:
pj::PersistentObject

Public Member Functions

 TransportConfig ()
 
void fromPj (const pjsua_transport_config &prm)
 
pjsua_transport_config toPj () const
 
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

unsigned port
 
unsigned portRange
 
bool randomizePort
 
string publicAddress
 
string boundAddress
 
TlsConfig tlsConfig
 
pj_qos_type qosType
 
pj_qos_params qosParams
 

Detailed Description

Parameters to create a transport instance.

Constructor & Destructor Documentation

◆ TransportConfig()

pj::TransportConfig::TransportConfig ( )

Default constructor initialises with default values

Member Function Documentation

◆ fromPj()

void pj::TransportConfig::fromPj ( const pjsua_transport_config prm)

Convert from pjsip

◆ toPj()

pjsua_transport_config pj::TransportConfig::toPj ( ) const

Convert to pjsip

◆ readObject()

virtual void pj::TransportConfig::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::TransportConfig::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

◆ port

unsigned pj::TransportConfig::port

UDP port number to bind locally. This setting MUST be specified even when default port is desired. If the value is zero, the transport will be bound to any available port, and application can query the port by querying the transport info.

◆ portRange

unsigned pj::TransportConfig::portRange

Specify the port range for socket binding, relative to the start port number specified in port. Note that this setting is only applicable for media transport when the start port number is non zero. Media transport is configurable via account setting, i.e: AccountMediaConfig::transportConfig, please check the media transport config docs for more info.

Available ports are in the range of [port, port + portRange].

Default value is zero.

◆ randomizePort

bool pj::TransportConfig::randomizePort

Specify whether to randomly pick the starting port number from the range of [port, port + port_range]. This setting is used only if both port and port_range are non-zero, and only applicable for the port selection of UDP and loop media transport.

Default is PJ_FALSE.

◆ publicAddress

string pj::TransportConfig::publicAddress

Optional address to advertise as the address of this transport. Application can specify any address or hostname for this field, for example it can point to one of the interface address in the system, or it can point to the public address of a NAT router where port mappings have been configured for the application.

Note: this option can be used for both UDP and TCP as well!

◆ boundAddress

string pj::TransportConfig::boundAddress

Optional address where the socket should be bound to. This option SHOULD only be used to selectively bind the socket to particular interface (instead of 0.0.0.0), and SHOULD NOT be used to set the published address of a transport (the public_addr field should be used for that purpose).

Note that unlike public_addr field, the address (or hostname) here MUST correspond to the actual interface address in the host, since this address will be specified as bind() argument.

◆ tlsConfig

TlsConfig pj::TransportConfig::tlsConfig

This specifies TLS settings for TLS transport. It is only be used when this transport config is being used to create a SIP TLS transport.

◆ qosType

pj_qos_type pj::TransportConfig::qosType

QoS traffic type to be set on this transport. When application wants to apply QoS tagging to the transport, it's preferable to set this field rather than qosParam fields since this is more portable.

Default is QoS not set.

◆ qosParams

pj_qos_params pj::TransportConfig::qosParams

Set the low level QoS parameters to the transport. This is a lower level operation than setting the qosType field and may not be supported on all platforms.

Default is QoS not set.


The documentation for this struct was generated from the following file:
  • siptypes.hpp

 


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