External: LinphoneTunnel

LinphoneTunnel

Linphone tunnel object.
Source:

Members

mode :linphone.TunnelMode

Set the tunnel mode. The tunnel mode can be 'enable', 'disable' or 'auto' If the mode is set to 'auto', the tunnel manager will try to established an RTP session with the tunnel server on the UdpMirrorPort. If the connection fail, the tunnel is automatically activated whereas the tunnel is automatically disabled if the connection succeed.
Type:
Source:

<readonly> servers :Array.<Object>

Get added servers
Type:
  • Array.<Object>
Source:

sipEnabled :boolean

Set whether SIP packets must be directly sent to a UA or pass through the tunnel
Type:
  • boolean
Source:

Methods

addServer(tunnel_config) → {void}

Add a tunnel server configuration.
Parameters:
Name Type Description
tunnel_config external:LinphoneTunnelConfig LinphoneTunnelConfig object
Source:
Returns:
Type
void

cleanServers() → {void}

Remove all tunnel server addresses previously entered with
Source:
Returns:
Type
void

connected() → {boolean}

Check whether the tunnel is connected
Source:
Returns:
Type
boolean

getHttpProxy(host, port, username, passwd) → {void}

Retrieve optional http proxy configuration previously set with
Parameters:
Name Type Description
host string http proxy host
port number http proxy port
username string Optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use NULL if not needed.
passwd string Optional http proxy password. Use NULL if not needed.
Source:
Returns:
Type
void

reconnect() → {void}

Force reconnection to the tunnel server. This method is useful when the device switches from wifi to Edge/3G or vice versa. In most cases the tunnel client socket won't be notified promptly that its connection is now zombie, so it is recommended to call this method that will cause the lost connection to be closed and new connection to be issued.
Source:
Returns:
Type
void

removeServer(tunnel_config) → {void}

Remove a tunnel server configuration.
Parameters:
Name Type Description
tunnel_config external:LinphoneTunnelConfig LinphoneTunnelConfig object
Source:
Returns:
Type
void

setHttpProxy(host, port, username, passwd) → {void}

Set an optional http proxy to go through when connecting to tunnel server.
Parameters:
Name Type Description
host string http proxy host
port number http proxy port
username string Optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use NULL if not needed.
passwd string Optional http proxy password. Use NULL if not needed.
Source:
Returns:
Type
void

setHttpProxyAuthInfo(username, passwd) → {void}

Set authentication info for the http proxy
Parameters:
Name Type Description
username string User name
passwd string Password
Source:
Returns:
Type
void