Liblinphone  3.12.0
Typedefs | Enumerations | Functions
Network parameters

Controlling network parameters (ports, mtu...). More...

Typedefs

typedef enum _LinphoneAuthMethod LinphoneAuthMethod
 Enum describing the authentication methods.
 
typedef enum _LinphoneFirewallPolicy LinphoneFirewallPolicy
 Policy to use to pass through firewalls. More...
 
typedef enum _LinphoneLimeState LinphoneLimeState
 
typedef struct _LinphoneNatPolicy LinphoneNatPolicy
 Policy to use to pass through NATs/firewalls.
 

Enumerations

enum  _LinphoneAuthMethod {
  LinphoneAuthHttpDigest,
  LinphoneAuthTls
}
 Enum describing the authentication methods. More...
 
enum  _LinphoneFirewallPolicy {
  LinphonePolicyNoFirewall,
  LinphonePolicyUseNatAddress,
  LinphonePolicyUseStun,
  LinphonePolicyUseIce,
  LinphonePolicyUseUpnp
}
 Policy to use to pass through firewalls. More...
 
enum  _LinphoneLimeState {
  LinphoneLimeDisabled,
  LinphoneLimeMandatory,
  LinphoneLimePreferred
}
 

Functions

void linphone_core_enable_lime (LinphoneCore *lc, LinphoneLimeState val)
 Tells to LinphoneCore to use Linphone Instant Messaging encryption. More...
 
LinphoneLimeState linphone_core_lime_enabled (const LinphoneCore *lc)
 Returns the lime state. More...
 
bool_t linphone_core_lime_available (const LinphoneCore *lc)
 Tells if lime is available. More...
 
bool_t linphone_core_ipv6_enabled (LinphoneCore *lc)
 Tells whether IPv6 is enabled or not. More...
 
void linphone_core_enable_ipv6 (LinphoneCore *lc, bool_t val)
 Turns IPv6 support on or off. More...
 
int linphone_core_get_audio_port (const LinphoneCore *lc)
 Gets the UDP port used for audio streaming. More...
 
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. More...
 
LinphoneRangelinphone_core_get_audio_ports_range (const LinphoneCore *lc)
 Get the audio port range from which is randomly chosen the UDP port used for audio streaming. More...
 
int linphone_core_get_video_port (const LinphoneCore *lc)
 Gets the UDP port used for video streaming. More...
 
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. More...
 
LinphoneRangelinphone_core_get_video_ports_range (const LinphoneCore *lc)
 Get the video port range from which is randomly chosen the UDP port used for video streaming. More...
 
int linphone_core_get_text_port (const LinphoneCore *lc)
 Gets the UDP port used for text streaming. More...
 
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. More...
 
LinphoneRangelinphone_core_get_text_ports_range (const LinphoneCore *lc)
 Get the text port range from which is randomly chosen the UDP port used for text streaming. More...
 
void linphone_core_set_audio_port (LinphoneCore *lc, int port)
 Sets the UDP port used for audio streaming. More...
 
void linphone_core_set_video_port (LinphoneCore *lc, int port)
 Sets the UDP port used for video streaming. More...
 
void linphone_core_set_text_port (LinphoneCore *lc, int port)
 Sets the UDP port used for text streaming. More...
 
LINPHONE_DEPRECATED void linphone_core_set_sip_port (LinphoneCore *lc, int port)
 Sets the UDP port to be used by SIP. More...
 
LINPHONE_DEPRECATED int linphone_core_get_sip_port (LinphoneCore *lc)
 Gets the UDP port used by SIP. More...
 
LinphoneStatus linphone_core_set_sip_transports (LinphoneCore *lc, const LinphoneSipTransports *transports)
 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. More...
 
LinphoneStatus linphone_core_get_sip_transports (LinphoneCore *lc, LinphoneSipTransports *transports)
 Retrieves the port configuration used for each transport (udp, tcp, tls). More...
 
void linphone_core_get_sip_transports_used (LinphoneCore *lc, LinphoneSipTransports *tr)
 Retrieves the real port number assigned for each sip transport (udp, tcp, tls). More...
 
LinphoneStatus linphone_core_set_transports (LinphoneCore *lc, const LinphoneTransports *transports)
 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. More...
 
LinphoneTransportslinphone_core_get_transports (LinphoneCore *lc)
 Retrieves the port configuration used for each transport (udp, tcp, tls). More...
 
LinphoneTransportslinphone_core_get_transports_used (LinphoneCore *lc)
 Retrieves the real port number assigned for each sip transport (udp, tcp, tls). More...
 
LinphoneTransportslinphone_transports_ref (LinphoneTransports *transports)
 Increment refcount. More...
 
void linphone_transports_unref (LinphoneTransports *transports)
 Decrement refcount and possibly free the object. More...
 
void * linphone_transports_get_user_data (const LinphoneTransports *transports)
 Gets the user data in the LinphoneTransports object. More...
 
void linphone_transports_set_user_data (LinphoneTransports *transports, void *data)
 Sets the user data in the LinphoneTransports object. More...
 
int linphone_transports_get_udp_port (const LinphoneTransports *transports)
 Gets the UDP port in the LinphoneTransports object. More...
 
int linphone_transports_get_tcp_port (const LinphoneTransports *transports)
 Gets the TCP port in the LinphoneTransports object. More...
 
int linphone_transports_get_tls_port (const LinphoneTransports *transports)
 Gets the TLS port in the LinphoneTransports object. More...
 
int linphone_transports_get_dtls_port (const LinphoneTransports *transports)
 Gets the DTLS port in the LinphoneTransports object. More...
 
void linphone_transports_set_udp_port (LinphoneTransports *transports, int port)
 Sets the UDP port in the LinphoneTransports object. More...
 
void linphone_transports_set_tcp_port (LinphoneTransports *transports, int port)
 Sets the TCP port in the LinphoneTransports object. More...
 
void linphone_transports_set_tls_port (LinphoneTransports *transports, int port)
 Sets the TLS port in the LinphoneTransports object. More...
 
void linphone_transports_set_dtls_port (LinphoneTransports *transports, int port)
 Sets the DTLS port in the LinphoneTransports object. More...
 
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. More...
 
const char * linphone_core_get_stun_server (const LinphoneCore *lc)
 Get the STUN server address being used. More...
 
bool_t linphone_core_upnp_available (void)
 Return the availability of uPnP. More...
 
LinphoneUpnpState linphone_core_get_upnp_state (const LinphoneCore *lc)
 Return the internal state of uPnP. More...
 
const char * linphone_core_get_upnp_external_ipaddress (const LinphoneCore *lc)
 Return the external ip address of router. More...
 
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. More...
 
const char * linphone_core_get_nat_address (const LinphoneCore *lc)
 Get the public IP address of NAT being used. More...
 
LINPHONE_DEPRECATED void linphone_core_set_firewall_policy (LinphoneCore *lc, LinphoneFirewallPolicy pol)
 Set the policy to use to pass through firewalls. More...
 
LINPHONE_DEPRECATED LinphoneFirewallPolicy linphone_core_get_firewall_policy (const LinphoneCore *lc)
 Get the policy that is used to pass through firewalls. More...
 
void linphone_core_set_nat_policy (LinphoneCore *lc, LinphoneNatPolicy *policy)
 Set the policy to use to pass through NATs/firewalls. More...
 
LinphoneNatPolicylinphone_core_get_nat_policy (const LinphoneCore *lc)
 Get The policy that is used to pass through NATs/firewalls. More...
 
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. More...
 
bool_t linphone_core_is_network_reachable (LinphoneCore *lc)
 return network state either as positioned by the application or by linphone itself.
 
void linphone_core_set_sip_network_reachable (LinphoneCore *lc, bool_t value)
 This method is called by the application to notify the linphone core library when the SIP network is reachable. More...
 
void linphone_core_set_media_network_reachable (LinphoneCore *lc, bool_t value)
 This method is called by the application to notify the linphone core library when the media (RTP) network is reachable. More...
 
void linphone_core_enable_keep_alive (LinphoneCore *lc, bool_t enable)
 Enables signaling keep alive, small udp packet sent periodically to keep udp NAT association. More...
 
bool_t linphone_core_keep_alive_enabled (LinphoneCore *lc)
 Is signaling keep alive enabled. More...
 
void linphone_core_set_sip_dscp (LinphoneCore *lc, int dscp)
 Set the DSCP field for SIP signaling channel. More...
 
int linphone_core_get_sip_dscp (const LinphoneCore *lc)
 Get the DSCP field for SIP signaling channel. More...
 
void linphone_core_set_audio_dscp (LinphoneCore *lc, int dscp)
 Set the DSCP field for outgoing audio streams. More...
 
int linphone_core_get_audio_dscp (const LinphoneCore *lc)
 Get the DSCP field for outgoing audio streams. More...
 
void linphone_core_set_video_dscp (LinphoneCore *lc, int dscp)
 Set the DSCP field for outgoing video streams. More...
 
int linphone_core_get_video_dscp (const LinphoneCore *lc)
 Get the DSCP field for outgoing video streams. More...
 
void linphone_core_enable_sdp_200_ack (LinphoneCore *lc, bool_t enable)
 Control when media offer is sent in SIP INVITE. More...
 
bool_t linphone_core_sdp_200_ack_enabled (const LinphoneCore *lc)
 Media offer control param for SIP INVITE. More...
 
void linphone_core_set_http_proxy_host (LinphoneCore *lc, const char *host)
 Set http proxy address to be used for signaling during next channel connection. More...
 
void linphone_core_set_http_proxy_port (LinphoneCore *lc, int port)
 Set http proxy port to be used for signaling. More...
 
const char * linphone_core_get_http_proxy_host (const LinphoneCore *lc)
 Get http proxy address to be used for signaling. More...
 
int linphone_core_get_http_proxy_port (const LinphoneCore *lc)
 Get http proxy port to be used for signaling. More...
 
void linphone_core_set_tls_cert (LinphoneCore *lc, const char *tls_cert)
 Sets a TLS certificate used for TLS authentication The certificate won't be stored, you have to set it after each LinphoneCore startup. More...
 
void linphone_core_set_tls_key (LinphoneCore *lc, const char *tls_key)
 Sets a TLS key used for TLS authentication The key won't be stored, you have to set it after each LinphoneCore startup. More...
 
void linphone_core_set_tls_cert_path (LinphoneCore *lc, const char *tls_cert_path)
 Sets a TLS certificate path used for TLS authentication The path will be stored in the rc file and automatically restored on startup. More...
 
void linphone_core_set_tls_key_path (LinphoneCore *lc, const char *tls_key_path)
 Sets a TLS key path used for TLS authentication The path will be stored in the rc file and automatically restored on startup. More...
 
const char * linphone_core_get_tls_cert (const LinphoneCore *lc)
 Gets the TLS certificate. More...
 
const char * linphone_core_get_tls_key (const LinphoneCore *lc)
 Gets the TLS key. More...
 
const char * linphone_core_get_tls_cert_path (const LinphoneCore *lc)
 Gets the path to the TLS certificate file. More...
 
const char * linphone_core_get_tls_key_path (const LinphoneCore *lc)
 Gets the path to the TLS key file. More...
 
LinphoneNatPolicylinphone_core_create_nat_policy (LinphoneCore *lc)
 Create a new LinphoneNatPolicy object with every policies being disabled. More...
 
LinphoneNatPolicylinphone_core_create_nat_policy_from_config (LinphoneCore *lc, const char *ref)
 Create a new LinphoneNatPolicy by reading the config of a LinphoneCore according to the passed ref. More...
 
LinphoneNatPolicylinphone_nat_policy_ref (LinphoneNatPolicy *policy)
 Acquire a reference to the LinphoneNatPolicy object. More...
 
void linphone_nat_policy_unref (LinphoneNatPolicy *policy)
 Release reference to the LinphoneNatPolicy object. More...
 
void * linphone_nat_policy_get_user_data (const LinphoneNatPolicy *policy)
 Retrieve the user pointer associated with the LinphoneNatPolicy object. More...
 
void linphone_nat_policy_set_user_data (LinphoneNatPolicy *policy, void *ud)
 Assign a user pointer to the LinphoneNatPolicy object. More...
 
void linphone_nat_policy_clear (LinphoneNatPolicy *policy)
 Clear a NAT policy (deactivate all protocols and unset the STUN server). More...
 
bool_t linphone_nat_policy_stun_enabled (const LinphoneNatPolicy *policy)
 Tell whether STUN is enabled. More...
 
void linphone_nat_policy_enable_stun (LinphoneNatPolicy *policy, bool_t enable)
 Enable STUN. More...
 
bool_t linphone_nat_policy_turn_enabled (const LinphoneNatPolicy *policy)
 Tell whether TURN is enabled. More...
 
void linphone_nat_policy_enable_turn (LinphoneNatPolicy *policy, bool_t enable)
 Enable TURN. More...
 
bool_t linphone_nat_policy_ice_enabled (const LinphoneNatPolicy *policy)
 Tell whether ICE is enabled. More...
 
void linphone_nat_policy_enable_ice (LinphoneNatPolicy *policy, bool_t enable)
 Enable ICE. More...
 
bool_t linphone_nat_policy_upnp_enabled (const LinphoneNatPolicy *policy)
 Tell whether uPnP is enabled. More...
 
void linphone_nat_policy_enable_upnp (LinphoneNatPolicy *policy, bool_t enable)
 Enable uPnP. More...
 
const char * linphone_nat_policy_get_stun_server (const LinphoneNatPolicy *policy)
 Get the STUN/TURN server to use with this NAT policy. More...
 
void linphone_nat_policy_set_stun_server (LinphoneNatPolicy *policy, const char *stun_server)
 Set the STUN/TURN server to use with this NAT policy. More...
 
const char * linphone_nat_policy_get_stun_server_username (const LinphoneNatPolicy *policy)
 Get the username used to authenticate with the STUN/TURN server. More...
 
void linphone_nat_policy_set_stun_server_username (LinphoneNatPolicy *policy, const char *username)
 Set the username used to authenticate with the STUN/TURN server. More...
 
void linphone_nat_policy_resolve_stun_server (LinphoneNatPolicy *policy)
 Start a STUN server DNS resolution. More...
 
const struct addrinfo * linphone_nat_policy_get_stun_server_addrinfo (LinphoneNatPolicy *policy)
 Get the addrinfo representation of the STUN server address. More...
 

Detailed Description

Controlling network parameters (ports, mtu...).

Typedef Documentation

◆ LinphoneFirewallPolicy

Policy to use to pass through firewalls.

Deprecated:
Use LinphoneNatPolicy instead.

Enumeration Type Documentation

◆ _LinphoneAuthMethod

Enum describing the authentication methods.

Enumerator
LinphoneAuthHttpDigest 

Digest authentication requested.

LinphoneAuthTls 

Client certificate requested.

◆ _LinphoneFirewallPolicy

Policy to use to pass through firewalls.

Deprecated:
Use LinphoneNatPolicy instead.
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.

◆ _LinphoneLimeState

Enumerator
LinphoneLimeDisabled 

Lime is not used at all.

LinphoneLimeMandatory 

Lime is always used.

LinphoneLimePreferred 

Lime is used only if we already shared a secret with remote.

Function Documentation

◆ linphone_core_create_nat_policy()

LinphoneNatPolicy* linphone_core_create_nat_policy ( LinphoneCore lc)

Create a new LinphoneNatPolicy object with every policies being disabled.

Parameters
[in]lcLinphoneCore object
Returns
A new LinphoneNatPolicy object.

◆ linphone_core_create_nat_policy_from_config()

LinphoneNatPolicy* linphone_core_create_nat_policy_from_config ( LinphoneCore lc,
const char *  ref 
)

Create a new LinphoneNatPolicy by reading the config of a LinphoneCore according to the passed ref.

Parameters
[in]lcLinphoneCore object
[in]refThe reference of a NAT policy in the config of the LinphoneCore
Returns
A new LinphoneNatPolicy object.

◆ linphone_core_enable_ipv6()

void linphone_core_enable_ipv6 ( LinphoneCore lc,
bool_t  val 
)

Turns IPv6 support on or off.

Parameters
[in]lcLinphoneCore object
[in]valA boolean value telling whether to enable IPv6 support

◆ linphone_core_enable_keep_alive()

void linphone_core_enable_keep_alive ( LinphoneCore lc,
bool_t  enable 
)

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

Parameters
[in]lcLinphoneCore object
[in]enableA boolean value telling whether signaling keep alive is to be enabled

◆ linphone_core_enable_lime()

void linphone_core_enable_lime ( LinphoneCore lc,
LinphoneLimeState  val 
)

Tells to LinphoneCore to use Linphone Instant Messaging encryption.

Parameters
[in]lcLinphoneCore object
[in]valThe new lime state

◆ 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_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.

Parameters
[in]lcLinphoneCore object
Returns
The current DSCP value

◆ linphone_core_get_audio_port()

int linphone_core_get_audio_port ( const LinphoneCore lc)

Gets the UDP port used for audio streaming.

Parameters
[in]lcLinphoneCore object
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.

Parameters
[in]lcLinphoneCore object
[out]min_portThe lower bound of the audio port range being used
[out]max_portThe upper bound of the audio port range being used

◆ linphone_core_get_audio_ports_range()

LinphoneRange* linphone_core_get_audio_ports_range ( const LinphoneCore lc)

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

Parameters
[in]lcLinphoneCore object
Returns
a LinphoneRange object

◆ linphone_core_get_firewall_policy()

LINPHONE_DEPRECATED 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.
Deprecated:
Use linphone_core_get_nat_policy() instead

◆ linphone_core_get_http_proxy_host()

const char* linphone_core_get_http_proxy_host ( const LinphoneCore lc)

Get http proxy address to be used for signaling.

Parameters
[in]lcLinphoneCore object
Returns
hostname of IP adress of the http proxy (can be NULL to disable).

◆ linphone_core_get_http_proxy_port()

int linphone_core_get_http_proxy_port ( const LinphoneCore lc)

Get http proxy port to be used for signaling.

Parameters
[in]lcLinphoneCore object
Returns
port of the http proxy.

◆ 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_get_nat_policy()

LinphoneNatPolicy* linphone_core_get_nat_policy ( const LinphoneCore lc)

Get The policy that is used to pass through NATs/firewalls.

It may be overridden by a NAT policy for a specific proxy config.

Parameters
[in]lcLinphoneCore object
Returns
LinphoneNatPolicy object in use.
See also
linphone_proxy_config_get_nat_policy()

◆ 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.

Parameters
[in]lcLinphoneCore object
Returns
The current DSCP value

◆ linphone_core_get_sip_port()

LINPHONE_DEPRECATED int linphone_core_get_sip_port ( LinphoneCore lc)

Gets the UDP port used by SIP.

Parameters
[in]lcLinphoneCore object
Returns
The UDP port used by SIP
Deprecated:
use linphone_core_get_sip_transports() instead.

◆ linphone_core_get_sip_transports()

LinphoneStatus linphone_core_get_sip_transports ( LinphoneCore lc,
LinphoneSipTransports transports 
)

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.

Parameters
[in]lcLinphoneCore object
[out]transportsA #LinphoneSipTransports structure that will receive the configured ports
Returns
0
Deprecated:

◆ linphone_core_get_sip_transports_used()

void linphone_core_get_sip_transports_used ( LinphoneCore lc,
LinphoneSipTransports 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
[in]lcLinphoneCore object
[out]trA #LinphoneSipTransports structure that will receive the ports being used
Deprecated:
Use linphone_core_get_transports_used instead

◆ 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_get_text_port()

int linphone_core_get_text_port ( const LinphoneCore lc)

Gets the UDP port used for text streaming.

Parameters
[in]lcLinphoneCore object
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.

Parameters
[in]lcLinphoneCore object
[out]min_portThe lower bound of the text port range being used
[out]max_portThe upper bound of the text port range being used

◆ linphone_core_get_text_ports_range()

LinphoneRange* linphone_core_get_text_ports_range ( const LinphoneCore lc)

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

Parameters
[in]lcLinphoneCore object
Returns
a LinphoneRange object

◆ linphone_core_get_tls_cert()

const char* linphone_core_get_tls_cert ( const LinphoneCore lc)

Gets the TLS certificate.

Parameters
lcLinphoneCore object
Returns
the TLS certificate or NULL if not set yet

◆ linphone_core_get_tls_cert_path()

const char* linphone_core_get_tls_cert_path ( const LinphoneCore lc)

Gets the path to the TLS certificate file.

Parameters
lcLinphoneCore object
Returns
the TLS certificate path or NULL if not set yet

◆ linphone_core_get_tls_key()

const char* linphone_core_get_tls_key ( const LinphoneCore lc)

Gets the TLS key.

Parameters
lcLinphoneCore object
Returns
the TLS key or NULL if not set yet

◆ linphone_core_get_tls_key_path()

const char* linphone_core_get_tls_key_path ( const LinphoneCore lc)

Gets the path to the TLS key file.

Parameters
lcLinphoneCore object
Returns
the TLS key path or NULL if not set yet

◆ linphone_core_get_transports()

LinphoneTransports* linphone_core_get_transports ( LinphoneCore lc)

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.

Parameters
[in]lcLinphoneCore object
Returns
A LinphoneTransports structure with the configured ports

◆ linphone_core_get_transports_used()

LinphoneTransports* linphone_core_get_transports_used ( LinphoneCore lc)

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
[in]lcLinphoneCore object
Returns
A LinphoneTransports structure with the ports being used

◆ 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_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_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.

Parameters
[in]lcLinphoneCore object
Returns
The current DSCP value

◆ linphone_core_get_video_port()

int linphone_core_get_video_port ( const LinphoneCore lc)

Gets the UDP port used for video streaming.

Parameters
[in]lcLinphoneCore object
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.

Parameters
[in]lcLinphoneCore object
[out]min_portThe lower bound of the video port range being used
[out]max_portThe upper bound of the video port range being used

◆ linphone_core_get_video_ports_range()

LinphoneRange* linphone_core_get_video_ports_range ( const LinphoneCore lc)

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

Parameters
[in]lcLinphoneCore object
Returns
a LinphoneRange object

◆ linphone_core_ipv6_enabled()

bool_t linphone_core_ipv6_enabled ( LinphoneCore lc)

Tells whether IPv6 is enabled or not.

Parameters
[in]lcLinphoneCore object
Returns
A boolean value telling whether IPv6 is enabled or not
See also
linphone_core_enable_ipv6() for more details on how IPv6 is supported in liblinphone.

◆ linphone_core_keep_alive_enabled()

bool_t linphone_core_keep_alive_enabled ( LinphoneCore lc)

Is signaling keep alive enabled.

Parameters
[in]lcLinphoneCore object
Returns
A boolean value telling whether signaling keep alive is enabled

◆ linphone_core_lime_available()

bool_t linphone_core_lime_available ( const LinphoneCore lc)

Tells if lime is available.

Parameters
[in]lcLinphoneCore object

◆ linphone_core_lime_enabled()

LinphoneLimeState linphone_core_lime_enabled ( const LinphoneCore lc)

Returns the lime state.

Parameters
[in]lcLinphoneCore object
Returns
The current lime state

◆ 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.

◆ 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.

Parameters
[in]lcLinphoneCore object
[in]dscpThe DSCP value to set

◆ 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 of -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.

Parameters
[in]lcLinphoneCore object
[in]portThe UDP port to use for audio streaming

◆ linphone_core_set_firewall_policy()

LINPHONE_DEPRECATED 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.
Deprecated:
Use linphone_core_set_nat_policy() instead.

◆ linphone_core_set_http_proxy_host()

void linphone_core_set_http_proxy_host ( LinphoneCore lc,
const char *  host 
)

Set http proxy address to be used for signaling during next channel connection.

Use linphone_core_set_network_reachable FASLE/TRUE to force channel restart.

Parameters
[in]lcLinphoneCore object
[in]hostHostname of IP adress of the http proxy (can be NULL to disable).

◆ linphone_core_set_http_proxy_port()

void linphone_core_set_http_proxy_port ( LinphoneCore lc,
int  port 
)

Set http proxy port to be used for signaling.

Parameters
[in]lcLinphoneCore object
[in]portof the http proxy.

◆ linphone_core_set_media_network_reachable()

void linphone_core_set_media_network_reachable ( LinphoneCore lc,
bool_t  value 
)

This method is called by the application to notify the linphone core library when the media (RTP) network is reachable.

This is for advanced usage, when SIP and RTP layers are required to use different interfaces. Most applications just need linphone_core_set_network_reachable().

◆ 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_set_nat_policy()

void linphone_core_set_nat_policy ( LinphoneCore lc,
LinphoneNatPolicy policy 
)

Set the policy to use to pass through NATs/firewalls.

It may be overridden by a NAT policy for a specific proxy config.

Parameters
[in]lcLinphoneCore object
[in]policyLinphoneNatPolicy object
See also
linphone_proxy_config_set_nat_policy()

◆ 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_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.

Parameters
[in]lcLinphoneCore object
[in]dscpThe DSCP value to set

◆ linphone_core_set_sip_network_reachable()

void linphone_core_set_sip_network_reachable ( LinphoneCore lc,
bool_t  value 
)

This method is called by the application to notify the linphone core library when the SIP network is reachable.

This is for advanced usage, when SIP and RTP layers are required to use different interfaces. Most applications just need linphone_core_set_network_reachable().

◆ linphone_core_set_sip_port()

LINPHONE_DEPRECATED void linphone_core_set_sip_port ( LinphoneCore lc,
int  port 
)

Sets the UDP port to be used by SIP.

Parameters
[in]lcLinphoneCore object
[in]portThe UDP port to be used by SIP
Deprecated:
use linphone_core_set_sip_transports() instead.

◆ linphone_core_set_sip_transports()

LinphoneStatus linphone_core_set_sip_transports ( LinphoneCore lc,
const LinphoneSipTransports transports 
)

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.

Parameters
[in]lcLinphoneCore object
[in]transportsA LinphoneSipTransports structure giving the ports to use
Returns
0
Deprecated:
Use linphone_core_set_transports instead

◆ 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_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.

Parameters
[in]lcLinphoneCore object
[in]portThe UDP port to use for text streaming

◆ linphone_core_set_tls_cert()

void linphone_core_set_tls_cert ( LinphoneCore lc,
const char *  tls_cert 
)

Sets a TLS certificate used for TLS authentication The certificate won't be stored, you have to set it after each LinphoneCore startup.

Parameters
lcLinphoneCore object
tls_certthe TLS certificate

◆ linphone_core_set_tls_cert_path()

void linphone_core_set_tls_cert_path ( LinphoneCore lc,
const char *  tls_cert_path 
)

Sets a TLS certificate path used for TLS authentication The path will be stored in the rc file and automatically restored on startup.

Parameters
lcLinphoneCore object
tls_cert_pathpath to the TLS certificate

◆ linphone_core_set_tls_key()

void linphone_core_set_tls_key ( LinphoneCore lc,
const char *  tls_key 
)

Sets a TLS key used for TLS authentication The key won't be stored, you have to set it after each LinphoneCore startup.

Parameters
lcLinphoneCore object
tls_keythe TLS key

◆ linphone_core_set_tls_key_path()

void linphone_core_set_tls_key_path ( LinphoneCore lc,
const char *  tls_key_path 
)

Sets a TLS key path used for TLS authentication The path will be stored in the rc file and automatically restored on startup.

Parameters
lcLinphoneCore object
tls_key_pathpath to the TLS key

◆ linphone_core_set_transports()

LinphoneStatus linphone_core_set_transports ( LinphoneCore lc,
const LinphoneTransports transports 
)

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.

Parameters
[in]lcLinphoneCore object
[in]transportsA LinphoneSipTransports structure giving the ports to use
Returns
0

◆ 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.

Parameters
[in]lcLinphoneCore object
[in]dscpThe DSCP value to set

◆ 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 of -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.

Parameters
[in]lcLinphoneCore object
[in]portThe UDP port to use for video streaming

◆ 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_nat_policy_clear()

void linphone_nat_policy_clear ( LinphoneNatPolicy policy)

Clear a NAT policy (deactivate all protocols and unset the STUN server).

Parameters
[in]policyLinphoneNatPolicy object.

◆ linphone_nat_policy_enable_ice()

void linphone_nat_policy_enable_ice ( LinphoneNatPolicy policy,
bool_t  enable 
)

Enable ICE.

ICE can be enabled without STUN/TURN, in which case only the local candidates will be used.

Parameters
[in]policyLinphoneNatPolicy object
[in]enableBoolean value telling whether to enable ICE.

◆ linphone_nat_policy_enable_stun()

void linphone_nat_policy_enable_stun ( LinphoneNatPolicy policy,
bool_t  enable 
)

Enable STUN.

If TURN is also enabled, TURN will be used instead of STUN.

Parameters
[in]policyLinphoneNatPolicy object
[in]enableBoolean value telling whether to enable STUN.

◆ linphone_nat_policy_enable_turn()

void linphone_nat_policy_enable_turn ( LinphoneNatPolicy policy,
bool_t  enable 
)

Enable TURN.

If STUN is also enabled, it is ignored and TURN is used.

Parameters
[in]policyLinphoneNatPolicy object
[in]enableBoolean value telling whether to enable TURN.

◆ linphone_nat_policy_enable_upnp()

void linphone_nat_policy_enable_upnp ( LinphoneNatPolicy policy,
bool_t  enable 
)

Enable uPnP.

This has the effect to disable every other policies (ICE, STUN and TURN).

Parameters
[in]policyLinphoneNatPolicy object
[in]enableBoolean value telling whether to enable uPnP.

◆ linphone_nat_policy_get_stun_server()

const char* linphone_nat_policy_get_stun_server ( const LinphoneNatPolicy policy)

Get the STUN/TURN server to use with this NAT policy.

Used when STUN or TURN are enabled.

Parameters
[in]policyLinphoneNatPolicy object
Returns
The STUN server used by this NAT policy.

◆ linphone_nat_policy_get_stun_server_addrinfo()

const struct addrinfo* linphone_nat_policy_get_stun_server_addrinfo ( LinphoneNatPolicy policy)

Get the addrinfo representation of the STUN server address.

WARNING: This function may block for up to 1 second.

Parameters
[in]policyLinphoneNatPolicy object
Returns
addrinfo representation of the STUN server address.

◆ linphone_nat_policy_get_stun_server_username()

const char* linphone_nat_policy_get_stun_server_username ( const LinphoneNatPolicy policy)

Get the username used to authenticate with the STUN/TURN server.

The authentication will search for a LinphoneAuthInfo with this username. If it is not set the username of the currently used LinphoneProxyConfig is used to search for a LinphoneAuthInfo.

Parameters
[in]policyLinphoneNatPolicy object
Returns
The username used to authenticate with the STUN/TURN server.

◆ linphone_nat_policy_get_user_data()

void* linphone_nat_policy_get_user_data ( const LinphoneNatPolicy policy)

Retrieve the user pointer associated with the LinphoneNatPolicy object.

Parameters
[in]policyLinphoneNatPolicy object.
Returns
The user pointer associated with the LinphoneNatPolicy object.

◆ linphone_nat_policy_ice_enabled()

bool_t linphone_nat_policy_ice_enabled ( const LinphoneNatPolicy policy)

Tell whether ICE is enabled.

Parameters
[in]policyLinphoneNatPolicy object
Returns
Boolean value telling whether ICE is enabled.

◆ linphone_nat_policy_ref()

LinphoneNatPolicy* linphone_nat_policy_ref ( LinphoneNatPolicy policy)

Acquire a reference to the LinphoneNatPolicy object.

Parameters
[in]policyLinphoneNatPolicy object.
Returns
The same LinphoneNatPolicy object.

◆ linphone_nat_policy_resolve_stun_server()

void linphone_nat_policy_resolve_stun_server ( LinphoneNatPolicy policy)

Start a STUN server DNS resolution.

Parameters
[in]policyLinphoneNatPolicy object

◆ linphone_nat_policy_set_stun_server()

void linphone_nat_policy_set_stun_server ( LinphoneNatPolicy policy,
const char *  stun_server 
)

Set the STUN/TURN server to use with this NAT policy.

Used when STUN or TURN are enabled.

Parameters
[in]policyLinphoneNatPolicy object
[in]stun_serverThe STUN server to use with this NAT policy.

◆ linphone_nat_policy_set_stun_server_username()

void linphone_nat_policy_set_stun_server_username ( LinphoneNatPolicy policy,
const char *  username 
)

Set the username used to authenticate with the STUN/TURN server.

The authentication will search for a LinphoneAuthInfo with this username. If it is not set the username of the currently used LinphoneProxyConfig is used to search for a LinphoneAuthInfo.

Parameters
[in]policyLinphoneNatPolicy object
[in]usernameThe username used to authenticate with the STUN/TURN server.

◆ linphone_nat_policy_set_user_data()

void linphone_nat_policy_set_user_data ( LinphoneNatPolicy policy,
void *  ud 
)

Assign a user pointer to the LinphoneNatPolicy object.

Parameters
[in]policyLinphoneNatPolicy object.
[in]udThe user pointer to associate with the LinphoneNatPolicy object.

◆ linphone_nat_policy_stun_enabled()

bool_t linphone_nat_policy_stun_enabled ( const LinphoneNatPolicy policy)

Tell whether STUN is enabled.

Parameters
[in]policyLinphoneNatPolicy object
Returns
Boolean value telling whether STUN is enabled.

◆ linphone_nat_policy_turn_enabled()

bool_t linphone_nat_policy_turn_enabled ( const LinphoneNatPolicy policy)

Tell whether TURN is enabled.

Parameters
[in]policyLinphoneNatPolicy object
Returns
Boolean value telling whether TURN is enabled.

◆ linphone_nat_policy_unref()

void linphone_nat_policy_unref ( LinphoneNatPolicy policy)

Release reference to the LinphoneNatPolicy object.

Parameters
[in]policyLinphoneNatPolicy object.

◆ linphone_nat_policy_upnp_enabled()

bool_t linphone_nat_policy_upnp_enabled ( const LinphoneNatPolicy policy)

Tell whether uPnP is enabled.

Parameters
[in]policyLinphoneNatPolicy object
Returns
Boolean value telling whether uPnP is enabled.

◆ linphone_transports_get_dtls_port()

int linphone_transports_get_dtls_port ( const LinphoneTransports transports)

Gets the DTLS port in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
Returns
the DTLS port

◆ linphone_transports_get_tcp_port()

int linphone_transports_get_tcp_port ( const LinphoneTransports transports)

Gets the TCP port in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
Returns
the TCP port

◆ linphone_transports_get_tls_port()

int linphone_transports_get_tls_port ( const LinphoneTransports transports)

Gets the TLS port in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
Returns
the TLS port

◆ linphone_transports_get_udp_port()

int linphone_transports_get_udp_port ( const LinphoneTransports transports)

Gets the UDP port in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
Returns
the UDP port

◆ linphone_transports_get_user_data()

void* linphone_transports_get_user_data ( const LinphoneTransports transports)

Gets the user data in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports
Returns
the user data

◆ linphone_transports_ref()

LinphoneTransports* linphone_transports_ref ( LinphoneTransports transports)

Increment refcount.

Parameters
[in]transportsLinphoneTransports object

◆ linphone_transports_set_dtls_port()

void linphone_transports_set_dtls_port ( LinphoneTransports transports,
int  port 
)

Sets the DTLS port in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
[in]portthe DTLS port

◆ linphone_transports_set_tcp_port()

void linphone_transports_set_tcp_port ( LinphoneTransports transports,
int  port 
)

Sets the TCP port in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
[in]portthe TCP port

◆ linphone_transports_set_tls_port()

void linphone_transports_set_tls_port ( LinphoneTransports transports,
int  port 
)

Sets the TLS port in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
[in]portthe TLS port

◆ linphone_transports_set_udp_port()

void linphone_transports_set_udp_port ( LinphoneTransports transports,
int  port 
)

Sets the UDP port in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
[in]portthe UDP port

◆ linphone_transports_set_user_data()

void linphone_transports_set_user_data ( LinphoneTransports transports,
void *  data 
)

Sets the user data in the LinphoneTransports object.

Parameters
[in]transportsthe LinphoneTransports object
[in]datathe user data

◆ linphone_transports_unref()

void linphone_transports_unref ( LinphoneTransports transports)

Decrement refcount and possibly free the object.

Parameters
[in]transportsLinphoneTransports object