zdk.objc
Instance Methods | Properties | List of all members
<ZDKStunConfig> Protocol Reference

STUN specific account configuration. More...

#import <ZDKStunConfig.h>

Inheritance diagram for <ZDKStunConfig>:
<ZDKZHandle>

Instance Methods

(BOOL) - isEqual:
 Compares the current configuration with the given one. More...
 
(NSString *) - handlesDescription
 
- Instance Methods inherited from <ZDKZHandle>
(long int) - handle
 
(void) - initialize
 
(void) - releaseReference
 
(NSString *) - handlesDescription
 

Properties

BOOL stunEnabled
 Configures the use of STUN functionality as described in RFC 3489. More...
 
NSString *_Nullable stunServer
 Configures the address of the STUN server. More...
 
int stunPort
 Configures the port of the STUN server. More...
 
int stunRefresh
 Configures the refresh period of the STUN server. More...
 
BOOL useDnsSrvRequests
 Configures the use of DNS SRV requests in a STUN server. More...
 
BOOL allowOnPrivateAddress
 Configures whether a STUN server on PRIVATE IP address may be used. More...
 
BOOL allowWithPrivateSipServer
 Configures whether a STUN may be used with SIP server on PRIVATE IP address. More...
 

Detailed Description

STUN specific account configuration.

The STUN server allows clients to find out their public address, the type of NAT they are behind and the Internet side port associated by the NAT with a particular local port. This information is used to set up communication between the client and the VoIP provider to establish a call. The STUN protocol is defined in RFC 3489.

STUN servers are usually contacted on UDP port 3478, however the server can hint clients to perform tests on alternate IP and port number too (STUN servers can have multiple IP addresses).

Method Documentation

◆ handlesDescription

- (NSString *) handlesDescription

Reimplemented from <ZDKZHandle>.

◆ isEqual:

- (BOOL) isEqual: (id< ZDKStunConfig >)  comp

Compares the current configuration with the given one.

Parameters
[in]compSTUN configuration to be compared
Returns
  • 0 - not equal
  • 1 - equal

Property Documentation

◆ allowOnPrivateAddress

- (BOOL) allowOnPrivateAddress
readwritenonatomicassign

Configures whether a STUN server on PRIVATE IP address may be used.

Configures whether to allow or not using STUN on PRIVATE address.

NOTE! It is not consider a failure to have configured or the resolved STUN server to be on PRIVATE address. In such a cases, the STUN is silently disabled (like done behind SYMMETRIC NATs for example).

Parameters
[in]value
  • 0 - disabled
  • 1 - enabled

◆ allowWithPrivateSipServer

- (BOOL) allowWithPrivateSipServer
readwritenonatomicassign

Configures whether a STUN may be used with SIP server on PRIVATE IP address.

Configures whether to allow or not using STUN with SIP server on PRIVATE address.

NOTE! It is not consider a failure to have configured or the resolved SIP server to be on PRIVATE address. In such a cases, the STUN is silently disabled (like done behind SYMMETRIC NATs for example).

Parameters
[in]value
  • 0 - disabled
  • 1 - enabled

◆ stunEnabled

- (BOOL) stunEnabled
readwritenonatomicassign

Configures the use of STUN functionality as described in RFC 3489.

Parameters
[in]value
  • 0 - disabled
  • 1 - enabled

◆ stunPort

- (int) stunPort
readwritenonatomicassign

Configures the port of the STUN server.

Specifies the port of the STUN server. The default port is 3478.

Parameters
[in]valueThe port of the server

◆ stunRefresh

- (int) stunRefresh
readwritenonatomicassign

Configures the refresh period of the STUN server.

Specifies how often to refresh the STUN server. The default is 30 seconds. The refresh can be used to keep the NAT mapping alive.

Parameters
[in]valueThe refresh period in milliseconds (30000 default)
See also
keepAlive()

◆ stunServer

- (NSString* _Nullable) stunServer
readwritenonatomicassign

Configures the address of the STUN server.

Configures the address (hostname) of the STUN server.

Parameters
[in]valueHostname of the server

◆ useDnsSrvRequests

- (BOOL) useDnsSrvRequests
readwritenonatomicassign

Configures the use of DNS SRV requests in a STUN server.

Configures the use of DNS SRV requests to find the given STUN server's address. This is disabled by default and must be explicitly set to non-zero for this to work.

If SRV requests are enabled, the STUN manager will use all results returned from the SRV query, should any actual STUN requests fail.

Parameters
[in]value
  • 0 - disabled
  • 1 - enabled

The documentation for this protocol was generated from the following file: