TokenConfig constructor
- required String sipToken,
- required String sipCallerIDName,
- required String sipCallerIDNumber,
- String? notificationToken,
- bool? autoReconnect,
- required LogLevel logLevel,
- required bool debug,
- String? ringTonePath,
- String? ringbackPath,
- CustomLogger? customLogger,
- int? reconnectionTimeout,
- Region region = Region.auto,
- bool fallbackOnRegionFailure = true,
- bool forceRelayCandidate = false,
Creates an instance of TokenConfig which can be used to log in
Uses the sipToken
field to log in
sipCallerIDName
and sipCallerIDNumber
will be the Name and Number associated
notificationToken
is the token used to register the device for notifications if required (FCM or APNS)
The autoReconnect
flag decided whether or not to attempt a reconnect (3 attempts) in the case of a login failure with
a legitimate token
logLevel
is the log level to set for SDK Logging
debug
flag to enable debug logs which will collect stats for each call and provide WebRTC stats to view in the portal
ringTonePath
is the path to the ringtone file (audio to play when receiving a call)
ringbackPath
is the path to the ringback file (audio to play when calling)
customLogger
is a custom logger to use for logging - if left null the default logger will be used which uses the Logger package
Implementation
TokenConfig({
required this.sipToken,
required super.sipCallerIDName,
required super.sipCallerIDNumber,
super.notificationToken,
super.autoReconnect,
required super.logLevel,
required super.debug,
super.ringTonePath,
super.ringbackPath,
super.customLogger,
super.reconnectionTimeout,
super.region = Region.auto,
super.fallbackOnRegionFailure = true,
super.forceRelayCandidate = false,
});