refreshRegistration method
Refresh registration of the all existing accounts (with default or specified regExpire>0)
Implementation
@override
Future<void> refreshRegistration() async {
try {
for (AccountModel acc in _accounts) {
final int expireSec = (acc.expireTime == null) ? 300 : acc.expireTime!;
if (expireSec != 0) {
PjsipConnectFlutter().registerAccount(acc.myAccId, expireSec);
}
}
} on PlatformException catch (err) {
_logs?.print(
'Can\'t refresh accounts registration: ${err.code} ${err.message}',
);
return Future.error((err.message == null) ? err.code : err.message!);
}
}