Liblinphone
3.10.2
|
typedef enum _LinphoneFirewallPolicy LinphoneFirewallPolicy |
Policy to use to pass through firewalls.
typedef struct _LinphoneNatPolicy LinphoneNatPolicy |
Policy to use to pass through NATs/firewalls.
Policy to use to pass through firewalls.
Create a new LinphoneNatPolicy object with every policies being disabled.
[in] | lc | LinphoneCore object |
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.
[in] | lc | LinphoneCore object |
[in] | ref | The reference of a NAT policy in the config of the LinphoneCore |
void linphone_core_enable_ipv6 | ( | LinphoneCore * | lc, |
bool_t | val | ||
) |
Turns IPv6 support on or off.
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
void linphone_core_enable_sdp_200_ack | ( | LinphoneCore * | lc, |
bool_t | enable | ||
) |
Control when media offer is sent in SIP INVITE.
lc | the linphone core |
enable | true if INVITE has to be sent whitout SDP. |
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.
int linphone_core_get_audio_port | ( | const LinphoneCore * | lc | ) |
Returns the UDP port used for audio streaming.
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.
Get the policy that is used to pass through firewalls.
[in] | lc | LinphoneCore object. |
const char* linphone_core_get_http_proxy_host | ( | const LinphoneCore * | lc | ) |
Get http proxy address to be used for signaling.
[in] | lc | LinphoneCore object |
int linphone_core_get_http_proxy_port | ( | const LinphoneCore * | lc | ) |
Get http proxy port to be used for signaling.
[in] | lc | LinphoneCore object |
const char* linphone_core_get_nat_address | ( | const LinphoneCore * | lc | ) |
Get the public IP address of NAT being used.
[in] | lc | LinphoneCore object. |
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.
[in] | lc | LinphoneCore object |
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.
int linphone_core_get_sip_port | ( | LinphoneCore * | lc | ) |
Returns the UDP port used by SIP.
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.
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.
lc | the LinphoneCore |
tr | a LCSipTransports structure. |
const char* linphone_core_get_stun_server | ( | const LinphoneCore * | lc | ) |
Get the STUN server address being used.
[in] | lc | LinphoneCore object |
int linphone_core_get_text_port | ( | const LinphoneCore * | lc | ) |
Returns the UDP port used for text streaming.
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.
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).
lc | LinphoneCore |
LinphoneUpnpState linphone_core_get_upnp_state | ( | const LinphoneCore * | lc | ) |
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.
int linphone_core_get_video_port | ( | const LinphoneCore * | lc | ) |
Returns the UDP port used for video streaming.
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.
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.
bool_t linphone_core_is_network_reachable | ( | LinphoneCore * | lc | ) |
return network state either as positioned by the application or by linphone itself.
bool_t linphone_core_keep_alive_enabled | ( | LinphoneCore * | lc | ) |
Is signaling keep alive
Is signaling keep alive enabled
bool_t linphone_core_sdp_200_ack_enabled | ( | const LinphoneCore * | lc | ) |
Media offer control param for SIP INVITE.
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.
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.
void linphone_core_set_firewall_policy | ( | LinphoneCore * | lc, |
LinphoneFirewallPolicy | pol | ||
) |
Set the policy to use to pass through firewalls.
[in] | lc | LinphoneCore object. |
[in] | pol | The LinphoneFirewallPolicy to use. |
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.
[in] | lc | LinphoneCore object |
[in] | host | Hostname of IP adress of the http proxy (can be NULL to disable). |
void linphone_core_set_http_proxy_port | ( | LinphoneCore * | lc, |
int | port | ||
) |
Set http proxy port to be used for signaling.
[in] | lc | LinphoneCore object |
[in] | port | of the http proxy. |
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().
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.
[in] | lc | LinphoneCore object. |
[in] | addr | The public IP address of NAT to use. |
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.
[in] | lc | LinphoneCore object |
[in] | policy | LinphoneNatPolicy object |
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.
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.
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().
void linphone_core_set_sip_port | ( | LinphoneCore * | lc, |
int | port | ||
) |
Sets the UDP port to be used by SIP.
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.
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.
[in] | lc | LinphoneCore object |
[in] | server | The STUN server address to use. |
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.
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.
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.
bool_t linphone_core_upnp_available | ( | void | ) |
Return the availability of uPnP.
void linphone_nat_policy_clear | ( | LinphoneNatPolicy * | policy | ) |
Clear a NAT policy (deactivate all protocols and unset the STUN server).
[in] | policy | LinphoneNatPolicy object. |
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.
[in] | policy | LinphoneNatPolicy object |
[in] | enable | Boolean value telling whether to enable ICE. |
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.
[in] | policy | LinphoneNatPolicy object |
[in] | enable | Boolean value telling whether to enable STUN. |
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.
[in] | policy | LinphoneNatPolicy object |
[in] | enable | Boolean value telling whether to enable TURN. |
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).
[in] | policy | LinphoneNatPolicy object |
[in] | enable | Boolean value telling whether to enable uPnP. |
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.
[in] | policy | LinphoneNatPolicy object |
struct addrinfo* linphone_nat_policy_get_stun_server_addrinfo | ( | LinphoneNatPolicy * | policy | ) | [read] |
Get the addrinfo representation of the STUN server address. WARNING: This function may block for up to 1 second.
[in] | policy | LinphoneNatPolicy object |
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.
[in] | policy | LinphoneNatPolicy object |
void* linphone_nat_policy_get_user_data | ( | const LinphoneNatPolicy * | policy | ) |
Retrieve the user pointer associated with the LinphoneNatPolicy object.
[in] | policy | LinphoneNatPolicy object. |
bool_t linphone_nat_policy_ice_enabled | ( | const LinphoneNatPolicy * | policy | ) |
Tell whether ICE is enabled.
[in] | policy | LinphoneNatPolicy object |
LinphoneNatPolicy* linphone_nat_policy_ref | ( | LinphoneNatPolicy * | policy | ) |
Acquire a reference to the LinphoneNatPolicy object.
[in] | policy | LinphoneNatPolicy object. |
void linphone_nat_policy_resolve_stun_server | ( | LinphoneNatPolicy * | policy | ) |
Start a STUN server DNS resolution.
[in] | policy | LinphoneNatPolicy object |
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.
[in] | policy | LinphoneNatPolicy object |
[in] | stun_server | The STUN server to use with this NAT policy. |
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.
[in] | policy | LinphoneNatPolicy object |
[in] | username | The username used to authenticate with the STUN/TURN server. |
void linphone_nat_policy_set_user_data | ( | LinphoneNatPolicy * | policy, |
void * | ud | ||
) |
Assign a user pointer to the LinphoneNatPolicy object.
[in] | policy | LinphoneNatPolicy object. |
[in] | ud | The user pointer to associate with the LinphoneNatPolicy object. |
bool_t linphone_nat_policy_stun_enabled | ( | const LinphoneNatPolicy * | policy | ) |
Tell whether STUN is enabled.
[in] | policy | LinphoneNatPolicy object |
bool_t linphone_nat_policy_turn_enabled | ( | const LinphoneNatPolicy * | policy | ) |
Tell whether TURN is enabled.
[in] | policy | LinphoneNatPolicy object |
void linphone_nat_policy_unref | ( | LinphoneNatPolicy * | policy | ) |
Release reference to the LinphoneNatPolicy object.
[in] | policy | LinphoneNatPolicy object. |
bool_t linphone_nat_policy_upnp_enabled | ( | const LinphoneNatPolicy * | policy | ) |
Tell whether uPnP is enabled.
[in] | policy | LinphoneNatPolicy object |