enableSessionTimer method

  1. @override
Future<int> enableSessionTimer({
  1. int timerSeconds = 90,
  2. int refreshMode = 0,
})
override

Enables SIP session timers (RFC 4028).

Invokes the native 'enableSessionTimer' method via MethodChannel.

Returns 0 on success, -1 or error code on failure.

Implementation

@override
Future<int> enableSessionTimer({
  int timerSeconds = 90,
  int refreshMode = 0,
}) async {
  final args = {'timerSeconds': timerSeconds, 'refreshMode': refreshMode};
  _logCall('enableSessionTimer', args);
  try {
    final result = await methodChannel.invokeMethod<int>(
      'enableSessionTimer',
      args,
    );
    _logResponse('enableSessionTimer', result);
    return result ?? -1;
  } on PlatformException catch (e) {
    _logError('enableSessionTimer', e);
    return -1;
  }
}