call method
Implementation
Future<bool> call(String target,
{bool voiceonly = false,
MediaStream? mediaStream,
List<String>? headers}) async {
if (_ua != null && _ua!.isConnected()) {
Map<String, dynamic> options = buildCallOptions(voiceonly);
if (mediaStream != null) {
options['mediaStream'] = mediaStream;
}
List<dynamic> extHeaders = options['extraHeaders'] as List<dynamic>;
extHeaders.addAll(headers ?? <String>[]);
_ua!.call(target, options);
return true;
} else {
logger.error(
'Not connected, you will need to register.', null, StackTraceNJ());
}
return false;
}