TxConfig

public struct TxConfig

This structure is intended to used for Telnyx SDK configurations.

Properties

  • 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 }

Initializers

  • 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
    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 default

    serverConfiguration

    (Optional) To define a custom signaling server and TURN/ STUN servers. As default we use the internal Telnyx Production servers.

Methods

  • Validate if TxConfig parameters are valid

    Throws

    Throws TxConfig parameters errors

    Declaration

    Swift

    public func validateParams() throws