register method
Configures SIP account credentials and server settings.
Invokes the native 'register' method via MethodChannel.
Returns 0 on success, -1 or error code on failure.
Implementation
@override
Future<int> register({required SipAccount account}) async {
final args = account.toMap();
_logCall('register', args);
try {
final result = await methodChannel.invokeMethod<int>('register', args);
_logResponse('register', result);
return result ?? -1;
} on PlatformException catch (e) {
_logError('register', e);
return -1;
}
}