diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
index 80e119a..07bcbbb 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2019-2020 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015, 2019-2021 The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -255,9 +255,16 @@
      * For TMO - 0 : Upon Request Mode (Disabled)
      *           1 : Automatic Mode (Full)
      * For Vzw - 1 : Automatic Mode (Full)
-     *
      */
-    public static final String PROPERTY_RTT_OPERATING_MODE = "persist.vendor.radio.rtt.operval";
+    public static final String QTI_IMS_RTT_OPERATING_MODE = "qti.settings.rtt_operation";
+
+    /**
+     * Whether dialing normal call is ON or OFF
+     * The value 1 - enable (Voice call), 0 - disable (RTT call)
+     * This is set through ImsSettings UI
+     */
+    public static final String QTI_IMS_CAN_START_RTT_CALL =
+            "qti.settings.can_start_rtt_call";
 
     // RTT default phone id
     public static final int RTT_DEFAULT_PHONE_ID = 0;
@@ -274,39 +281,18 @@
     // RTT Visibility On
     public static final int RTT_VISIBILITY_ENABLED = 1;
 
-   /**
-     * Broadcast Action: Send RTT Text Message
-     */
-    public static final String ACTION_SEND_RTT_TEXT =
-            "org.codeaurora.intent.action.send.rtt.text";
+    // RTT Call Type Off
+    public static final int RTT_CALL_TYPE_RTT = 0;
 
-   /**
-     * RTT Text Value
-     */
-    public static final String RTT_TEXT_VALUE =
-            "org.codeaurora.intent.action.rtt.textvalue";
+    // RTT Call Type On
+    public static final int RTT_CALL_TYPE_VOICE = 1;
 
-   /**
-     * Broadcast Action: RTT Operation
-     */
-    public static final String ACTION_RTT_OPERATION =
-            "org.codeaurora.intent.action.send.rtt.operation";
-
-   /**
-     * RTT Operation Type
-     */
-    public static final String RTT_OPERATION_TYPE =
-            "org.codeaurora.intent.action.rtt.operation.type";
-
-    // RTT Operation Type can be one of the following
-    // To request upgrade of regular call to RTT call
-    public static final int RTT_UPGRADE_INITIATE = 1;
-    // To accept incoming RTT upgrade request
-    public static final int RTT_UPGRADE_CONFIRM = 2;
-    // To reject incoming RTT upgrade request
-    public static final int RTT_UPGRADE_REJECT = 3;
-    // To request downgrade of RTT call to regular call
-    public static final int RTT_DOWNGRADE_INITIATE = 4;
+    // RTT Operating mode
+    // Dials normal voice call by default and provides an option
+    // to upgrade call to RTT in InCallUi.
+    public static final int RTT_UPON_REQUEST_MODE = 0;
+    // All the calls dialed are RTT calls by default.
+    public static final int RTT_AUTOMATIC_MODE = 1;
 
     // Recorder Auto-Scaling Factor
     public static final int RECORDER_SCALING_FACTOR = 8;
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java b/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java
index 706d73a..b91df68 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2015-2017, 2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2017, 2020-2021 The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -119,7 +119,6 @@
     //Value representing volte preference is NOT known
     public static final int QTI_IMS_VOLTE_PREF_UNKNOWN = 2;
 
-
     /* Incoming conference call extra key */
     public static final String QTI_IMS_INCOMING_CONF_EXTRA_KEY = "incomingConference";
 
@@ -548,6 +547,24 @@
                     Settings.Secure.RTT_CALLING_MODE + convertRttPhoneId(phoneId), value ? 1 : 0);
     }
 
+    // Sets global settings with call type preference
+    public static void setCanStartRttCall(boolean value, Context context, int phoneId) {
+        android.provider.Settings.Global.putInt(context.getContentResolver(),
+                    QtiCallConstants.QTI_IMS_CAN_START_RTT_CALL + convertRttPhoneId(phoneId),
+                    value ? QtiCallConstants.RTT_CALL_TYPE_VOICE
+                          : QtiCallConstants.RTT_CALL_TYPE_RTT);
+    }
+
+    // Returns true if can start RTT call
+    public static boolean canStartRttCall(Context context, int phoneId) {
+        if (!shallShowRttVisibilitySetting(phoneId, context)) {
+            return true;
+        }
+        return android.provider.Settings.Global.getInt(context.getContentResolver(),
+                QtiCallConstants.QTI_IMS_CAN_START_RTT_CALL + convertRttPhoneId(phoneId),
+                QtiCallConstants.RTT_CALL_TYPE_RTT) == QtiCallConstants.RTT_CALL_TYPE_RTT;
+    }
+
     // Returns value of RTT visibility
     public static int getRttVisibility(Context context) {
         return getRttVisibility(context, QtiCallConstants.RTT_DEFAULT_PHONE_ID);
@@ -595,16 +612,22 @@
             CarrierConfigManager.KEY_RTT_UPGRADE_SUPPORTED_BOOL);
     }
 
-    // Utility to get the RTT Mode that is set through adb property
-    // Mode can be either RTT_MODE_DISABLED or RTT_MODE_FULL
+    // Utility to get the RTT Mode that is set through ImsSettings
+    // Mode can be either RTT_UPON_REQUEST_MODE or RTT_AUTOMATIC_MODE
     public static int getRttOperatingMode(Context context) {
         return getRttOperatingMode(context, QtiCallConstants.RTT_DEFAULT_PHONE_ID);
     }
 
+    // Utility to get the RTT Operation Mode that is set through ImsSettings
+    // Mode can be either RTT_UPON_REQUEST_MODE or RTT_AUTOMATIC_MODE
+    // Takes a phoneId to support DSDS configuration.
     public static int getRttOperatingMode(Context context, int phoneId) {
-        int mode = SystemProperties.getInt(QtiCallConstants.PROPERTY_RTT_OPERATING_MODE +
-                convertRttPhoneId(phoneId), 0);
-        return mode;
+        if (shallShowRttVisibilitySetting(phoneId, context)) {
+            return QtiCallConstants.RTT_AUTOMATIC_MODE;
+        }
+        return android.provider.Settings.Global.getInt(context.getContentResolver(),
+                QtiCallConstants.QTI_IMS_RTT_OPERATING_MODE + convertRttPhoneId(phoneId),
+                QtiCallConstants.RTT_UPON_REQUEST_MODE);
     }
 
     // Returns true if Carrier supports RTT downgrade
@@ -621,6 +644,13 @@
                 QtiCarrierConfigs.KEY_SHOW_RTT_VISIBILITY_SETTING));
     }
 
+    // Returns true if Carrier supports merging RTT calls
+    // False otherwise
+    public static boolean isRttMergeSupported(int phoneId, Context context) {
+        return isCarrierConfigEnabled(phoneId, context,
+            CarrierConfigManager.KEY_ALLOW_MERGING_RTT_CALLS_BOOL);
+    }
+
     // Returns true if Carrier supports Cancel Modify Call
     public static boolean isCancelModifyCallSupported(int phoneId, Context context) {
         return (isCarrierConfigEnabled(phoneId, context,
@@ -668,4 +698,13 @@
                 QtiCallConstants.IMS_CALL_COMPOSER + phoneId,
                 QtiCallConstants.CALL_COMPOSER_DISABLED);
     }
+
+    // Sets RTT Operation Mode to global settings
+    // Takes a phoneId to support DSDS configuration.
+    public static void setRttOperatingMode(ContentResolver contentResolver, int phoneId,
+            int rttOpMode) {
+        android.provider.Settings.Global.putInt(contentResolver,
+                QtiCallConstants.QTI_IMS_RTT_OPERATING_MODE + convertRttPhoneId(phoneId),
+                rttOpMode);
+    }
 }
