register method
Register a SIP extension with username / password.
host is the SIP proxy (host or host:port); leave it empty to use the OMICall default.
fcmToken is the FCM token on Android and the APNS token on iOS.
Implementation
Future<OmiRegisterResult> register({
required String userName,
required String password,
required String realm,
required String fcmToken,
String host = "",
bool isVideo = true,
String projectId = "",
}) async {
final action = OmiAction(
actionName: OmiActionName.INIT_CALL_USER_PASSWORD,
data: {
'userName': userName,
'password': password,
'realm': realm,
'host': host,
'isVideo': isVideo,
'fcmToken': fcmToken,
'projectId': projectId,
},
);
return OmiRegisterResult.fromNative(await _controller.action(action));
}