TxConfig
public struct TxConfig
This structure is intended to used for Telnyx SDK configurations.
-
Undocumented
Declaration
Swift
public internal(set) var sipUser: String? { get }
-
Undocumented
Declaration
Swift
public internal(set) var password: String? { get }
-
Undocumented
Declaration
Swift
public internal(set) var token: String? { get }
-
Undocumented
Declaration
Swift
public internal(set) var pushNotificationConfig: TxPushConfig? { get }
-
Undocumented
Declaration
Swift
public internal(set) var ringBackTone: String? { get }
-
Undocumented
Declaration
Swift
public internal(set) var ringtone: String? { get }
-
Undocumented
Declaration
Swift
public internal(set) var reconnectClient: Bool { get }
-
Undocumented
Declaration
Swift
public internal(set) var pushEnvironment: PushEnvironment? { get }
-
init(sipUser:
password: pushDeviceToken: ringtone: ringBackTone: pushEnvironment: logLevel: reconnectClient: ) Constructor of the Telnyx SDK configuration: Login using sip user and password.
Declaration
Swift
public init(sipUser: String, password: String, pushDeviceToken: String? = nil, ringtone: String? = nil, ringBackTone: String? = nil, pushEnvironment: PushEnvironment? = nil, logLevel: LogLevel = .none, reconnectClient:Bool = true )
Parameters
sipUser
sipUser the SIP user
password
password the password of the SIP user.
pushDeviceToken
(Optional) the device push notification token. This is required to receive Inbound calls notifications.
ringtone
(Optional) The audio file name to be played when receiving an incoming call. e.g.: “my-ringtone.mp3”
ringBackTone
(Optional) The audio file to be played when calling. e.g.: “my-ringbacktone.mp3”
logLevel
(Optional) Can select the verbosity level of the SDK logs. Is set to
.none
as default -
Constructor of the Telnyx SDK configuration: Login using a token.
Declaration
Swift
public init(token: String, pushDeviceToken: String? = nil, ringtone: String? = nil, ringBackTone: String? = nil, pushEnvironment: PushEnvironment? = nil, logLevel: LogLevel = .none)
Parameters
token
Token generated from https://developers.telnyx.com/docs/v2/webrtc/quickstart
pushDeviceToken
(Optional) the device push notification token. This is required to receive Inbound calls notifications.
ringtone
(Optional) The audio file name to be played when receiving an incoming call. e.g.: “my-ringtone.mp3”
ringBackTone
(Optional) The audio file name to be played when calling. e.g.: “my-ringbacktone.mp3”
logLevel
(Optional) Can select the verbosity level of the SDK logs. Is set to
.none
as defaultserverConfiguration
(Optional) To define a custom
signaling server
andTURN/ STUN servers
. As default we use the internal Telnyx Production servers.
-
Validate if TxConfig parameters are valid
Throws
Throws TxConfig parameters errorsDeclaration
Swift
public func validateParams() throws