logoutExtension method

Future<void> logoutExtension(
  1. SipInfoData sipInfoData
)

Implementation

Future<void> logoutExtension(SipInfoData sipInfoData) async {
  final SharedPreferences prefs = await SharedPreferences.getInstance();
  prefs.remove("HAS_DEVICE_TOKEN");
  pitelCall.unregister();

  final deviceTokenRes = await PushVoipNotif.getDeviceToken();
  await removeDeviceToken(
    deviceToken: deviceTokenRes,
    domain: sipInfoData.registerServer,
    extension: sipInfoData.accountName.toString(),
  );
}