liblinphone  3.9.1
Typedefs | Enumerations | Functions
Controlling network parameters (ports, mtu...)

Typedefs

typedef enum _LinphoneFirewallPolicy LinphoneFirewallPolicy
 

Enumerations

enum  _LinphoneFirewallPolicy {
  LinphonePolicyNoFirewall,
  LinphonePolicyUseNatAddress,
  LinphonePolicyUseStun,
  LinphonePolicyUseIce,
  LinphonePolicyUseUpnp
}
 

Functions

int linphone_core_get_audio_port (const LinphoneCore *lc)
 
void linphone_core_get_audio_port_range (const LinphoneCore *lc, int *min_port, int *max_port)
 
int linphone_core_get_video_port (const LinphoneCore *lc)
 
void linphone_core_get_video_port_range (const LinphoneCore *lc, int *min_port, int *max_port)
 
int linphone_core_get_text_port (const LinphoneCore *lc)
 
void linphone_core_get_text_port_range (const LinphoneCore *lc, int *min_port, int *max_port)
 
void linphone_core_set_audio_port (LinphoneCore *lc, int port)
 
void linphone_core_set_video_port (LinphoneCore *lc, int port)
 
void linphone_core_set_text_port (LinphoneCore *lc, int port)
 
int linphone_core_get_sip_port (LinphoneCore *lc)
 
int linphone_core_set_sip_transports (LinphoneCore *lc, const LCSipTransports *tr_config)
 
int linphone_core_get_sip_transports (LinphoneCore *lc, LCSipTransports *tr)
 
void linphone_core_get_sip_transports_used (LinphoneCore *lc, LCSipTransports *tr)
 
void linphone_core_set_sip_port (LinphoneCore *lc, int port)
 
bool_t linphone_core_ipv6_enabled (LinphoneCore *lc)
 
void linphone_core_enable_ipv6 (LinphoneCore *lc, bool_t val)
 
void linphone_core_set_sip_dscp (LinphoneCore *lc, int dscp)
 
int linphone_core_get_sip_dscp (const LinphoneCore *lc)
 
void linphone_core_set_audio_dscp (LinphoneCore *lc, int dscp)
 
int linphone_core_get_audio_dscp (const LinphoneCore *lc)
 
void linphone_core_set_video_dscp (LinphoneCore *lc, int dscp)
 
int linphone_core_get_video_dscp (const LinphoneCore *lc)
 
void linphone_core_set_stun_server (LinphoneCore *lc, const char *server)
 
const char * linphone_core_get_stun_server (const LinphoneCore *lc)
 
bool_t linphone_core_upnp_available (void)
 
LinphoneUpnpState linphone_core_get_upnp_state (const LinphoneCore *lc)
 
const char * linphone_core_get_upnp_external_ipaddress (const LinphoneCore *lc)
 
void linphone_core_set_nat_address (LinphoneCore *lc, const char *addr)
 
const char * linphone_core_get_nat_address (const LinphoneCore *lc)
 
void linphone_core_set_firewall_policy (LinphoneCore *lc, LinphoneFirewallPolicy pol)
 
LinphoneFirewallPolicy linphone_core_get_firewall_policy (const LinphoneCore *lc)
 
void linphone_core_set_network_reachable (LinphoneCore *lc, bool_t value)
 
bool_t linphone_core_is_network_reachable (LinphoneCore *lc)
 
void linphone_core_enable_keep_alive (LinphoneCore *lc, bool_t enable)
 
bool_t linphone_core_keep_alive_enabled (LinphoneCore *lc)
 
void linphone_core_enable_sdp_200_ack (LinphoneCore *lc, bool_t enable)
 
bool_t linphone_core_sdp_200_ack_enabled (const LinphoneCore *lc)
 

Detailed Description

Typedef Documentation

◆ LinphoneFirewallPolicy

Policy to use to pass through firewalls.

Enumeration Type Documentation

◆ _LinphoneFirewallPolicy

Policy to use to pass through firewalls.

Enumerator
LinphonePolicyNoFirewall 

Do not use any mechanism to pass through firewalls

LinphonePolicyUseNatAddress 

Use the specified public adress

LinphonePolicyUseStun 

Use a STUN server to get the public address

LinphonePolicyUseIce 

Use the ICE protocol

LinphonePolicyUseUpnp 

Use the uPnP protocol

Function Documentation

◆ linphone_core_get_audio_port()

int linphone_core_get_audio_port ( const LinphoneCore lc)

Returns the UDP port used for audio streaming.

◆ linphone_core_get_audio_port_range()

void linphone_core_get_audio_port_range ( const LinphoneCore lc,
int *  min_port,
int *  max_port 
)

Get the audio port range from which is randomly chosen the UDP port used for audio streaming.

◆ linphone_core_get_video_port()

int linphone_core_get_video_port ( const LinphoneCore lc)

Returns the UDP port used for video streaming.

◆ linphone_core_get_video_port_range()

void linphone_core_get_video_port_range ( const LinphoneCore lc,
int *  min_port,
int *  max_port 
)

Get the video port range from which is randomly chosen the UDP port used for video streaming.

◆ linphone_core_get_text_port()

int linphone_core_get_text_port ( const LinphoneCore lc)

Returns the UDP port used for text streaming.

◆ linphone_core_get_text_port_range()

void linphone_core_get_text_port_range ( const LinphoneCore lc,
int *  min_port,
int *  max_port 
)

Get the video port range from which is randomly chosen the UDP port used for text streaming.

◆ linphone_core_set_audio_port()

void linphone_core_set_audio_port ( LinphoneCore lc,
int  port 
)

Sets the UDP port used for audio streaming. A value if -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.

◆ linphone_core_set_video_port()

void linphone_core_set_video_port ( LinphoneCore lc,
int  port 
)

Sets the UDP port used for video streaming. A value if -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.

◆ linphone_core_set_text_port()

void linphone_core_set_text_port ( LinphoneCore lc,
int  port 
)

Sets the UDP port used for text streaming. A value if -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.

◆ linphone_core_get_sip_port()

int linphone_core_get_sip_port ( LinphoneCore lc)

Returns the UDP port used by SIP.

Deprecated:
use linphone_core_get_sip_transports() instead.

◆ linphone_core_set_sip_transports()

int linphone_core_set_sip_transports ( LinphoneCore lc,
const LCSipTransports tr_config 
)

Sets the ports to be used for each of transport (UDP or TCP)

A zero value port for a given transport means the transport is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be choosen randomly by the system.

◆ linphone_core_get_sip_transports()

int linphone_core_get_sip_transports ( LinphoneCore lc,
LCSipTransports tr 
)

Retrieves the port configuration used for each transport (udp, tcp, tls). A zero value port for a given transport means the transport is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be chosen randomly by the system.

◆ linphone_core_get_sip_transports_used()

void linphone_core_get_sip_transports_used ( LinphoneCore lc,
LCSipTransports tr 
)

Retrieves the real port number assigned for each sip transport (udp, tcp, tls). A zero value means that the transport is not activated. If LC_SIP_TRANSPORT_RANDOM was passed to linphone_core_set_sip_transports(), the random port choosed by the system is returned.

Parameters
lcthe LinphoneCore
tra LCSipTransports structure.

◆ linphone_core_set_sip_port()

void linphone_core_set_sip_port ( LinphoneCore lc,
int  port 
)

Sets the UDP port to be used by SIP.

Deprecated:
use linphone_core_set_sip_transports() instead.

◆ linphone_core_ipv6_enabled()

bool_t linphone_core_ipv6_enabled ( LinphoneCore lc)

Returns TRUE if IPv6 is enabled.

See linphone_core_enable_ipv6() for more details on how IPv6 is supported in liblinphone.

◆ linphone_core_enable_ipv6()

void linphone_core_enable_ipv6 ( LinphoneCore lc,
bool_t  val 
)

Turns IPv6 support on or off.

Note
IPv6 support is exclusive with IPv4 in liblinphone: when IPv6 is turned on, IPv4 calls won't be possible anymore. By default IPv6 support is off.

◆ linphone_core_set_sip_dscp()

void linphone_core_set_sip_dscp ( LinphoneCore lc,
int  dscp 
)

Set the DSCP field for SIP signaling channel.

  • The DSCP defines the quality of service in IP packets.

◆ linphone_core_get_sip_dscp()

int linphone_core_get_sip_dscp ( const LinphoneCore lc)

Get the DSCP field for SIP signaling channel.

  • The DSCP defines the quality of service in IP packets.

◆ linphone_core_set_audio_dscp()

void linphone_core_set_audio_dscp ( LinphoneCore lc,
int  dscp 
)

Set the DSCP field for outgoing audio streams.

The DSCP defines the quality of service in IP packets.

◆ linphone_core_get_audio_dscp()

int linphone_core_get_audio_dscp ( const LinphoneCore lc)

Get the DSCP field for outgoing audio streams.

The DSCP defines the quality of service in IP packets.

◆ linphone_core_set_video_dscp()

void linphone_core_set_video_dscp ( LinphoneCore lc,
int  dscp 
)

Set the DSCP field for outgoing video streams.

The DSCP defines the quality of service in IP packets.

◆ linphone_core_get_video_dscp()

int linphone_core_get_video_dscp ( const LinphoneCore lc)

Get the DSCP field for outgoing video streams.

The DSCP defines the quality of service in IP packets.

◆ linphone_core_set_stun_server()

void linphone_core_set_stun_server ( LinphoneCore lc,
const char *  server 
)

Set the STUN server address to use when the firewall policy is set to STUN.

Parameters
[in]lcLinphoneCore object
[in]serverThe STUN server address to use.

◆ linphone_core_get_stun_server()

const char* linphone_core_get_stun_server ( const LinphoneCore lc)

Get the STUN server address being used.

Parameters
[in]lcLinphoneCore object
Returns
The STUN server address being used.

◆ linphone_core_upnp_available()

bool_t linphone_core_upnp_available ( void  )

Return the availability of uPnP.

Returns
true if uPnP is available otherwise return false.

◆ linphone_core_get_upnp_state()

LinphoneUpnpState linphone_core_get_upnp_state ( const LinphoneCore lc)

Return the internal state of uPnP.

Parameters
lcLinphoneCore
Returns
an LinphoneUpnpState.

◆ linphone_core_get_upnp_external_ipaddress()

const char* linphone_core_get_upnp_external_ipaddress ( const LinphoneCore lc)

Return the external ip address of router. In some cases the uPnP can have an external ip address but not a usable uPnP (state different of Ok).

Parameters
lcLinphoneCore
Returns
a null terminated string containing the external ip address. If the the external ip address is not available return null.

◆ linphone_core_set_nat_address()

void linphone_core_set_nat_address ( LinphoneCore lc,
const char *  addr 
)

Set the public IP address of NAT when using the firewall policy is set to use NAT.

Parameters
[in]lcLinphoneCore object.
[in]addrThe public IP address of NAT to use.

◆ linphone_core_get_nat_address()

const char* linphone_core_get_nat_address ( const LinphoneCore lc)

Get the public IP address of NAT being used.

Parameters
[in]lcLinphoneCore object.
Returns
The public IP address of NAT being used.

◆ linphone_core_set_firewall_policy()

void linphone_core_set_firewall_policy ( LinphoneCore lc,
LinphoneFirewallPolicy  pol 
)

Set the policy to use to pass through firewalls.

Parameters
[in]lcLinphoneCore object.
[in]polThe LinphoneFirewallPolicy to use.

◆ linphone_core_get_firewall_policy()

LinphoneFirewallPolicy linphone_core_get_firewall_policy ( const LinphoneCore lc)

Get the policy that is used to pass through firewalls.

Parameters
[in]lcLinphoneCore object.
Returns
The LinphoneFirewallPolicy that is being used.

◆ linphone_core_set_network_reachable()

void linphone_core_set_network_reachable ( LinphoneCore lc,
bool_t  value 
)

This method is called by the application to notify the linphone core library when network is reachable. Calling this method with true trigger linphone to initiate a registration process for all proxies. Calling this method disables the automatic network detection mode. It means you must call this method after each network state changes.

◆ linphone_core_is_network_reachable()

bool_t linphone_core_is_network_reachable ( LinphoneCore lc)

return network state either as positioned by the application or by linphone itself.

◆ linphone_core_enable_keep_alive()

void linphone_core_enable_keep_alive ( LinphoneCore lc,
bool_t  enable 
)

enable signaling keep alive. small udp packet sent periodically to keep udp NAT association

Enables signaling keep alive

◆ linphone_core_keep_alive_enabled()

bool_t linphone_core_keep_alive_enabled ( LinphoneCore lc)

Is signaling keep alive

Is signaling keep alive enabled

◆ linphone_core_enable_sdp_200_ack()

void linphone_core_enable_sdp_200_ack ( LinphoneCore lc,
bool_t  enable 
)

Control when media offer is sent in SIP INVITE.

Parameters
lcthe linphone core
enabletrue if INVITE has to be sent whitout SDP.

◆ linphone_core_sdp_200_ack_enabled()

bool_t linphone_core_sdp_200_ack_enabled ( const LinphoneCore lc)

Media offer control param for SIP INVITE.

Returns
true if INVITE has to be sent whitout SDP.