TokenConfig constructor

TokenConfig({
  1. required String sipToken,
  2. required String sipCallerIDName,
  3. required String sipCallerIDNumber,
  4. String? notificationToken,
  5. bool? autoReconnect,
  6. required LogLevel logLevel,
  7. required bool debug,
  8. String? ringTonePath,
  9. String? ringbackPath,
  10. CustomLogger? customLogger,
  11. int? reconnectionTimeout,
  12. Region region = Region.auto,
  13. bool fallbackOnRegionFailure = true,
  14. 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,
});