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 c52986f..1e3d5cd 100755
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
@@ -362,6 +362,7 @@
     public static final int QTI_CONFIG_VOWIFI_ROAMING_MODE_PREFERENCE = 1003;
     public static final int CALL_COMPOSER_MODE = 1004;
     public static final int B2C_ENRICHED_CALLING_MODE = 1005;
+    public static final int DATA_CHANNEL_MODE = 1006;
 
     /**
      * Key values for the pre alerting call elements
@@ -455,6 +456,14 @@
     public static final int B2C_ENRICHED_CALLING_ENABLED = 1;
 
     /**
+     * User setting to control whether ims data channel is allowed
+     * Type: int (0 for disable, 1 for enabled);
+     */
+    public static final String DATA_CHANNEL = "qti.settings.data_channel";
+    public static final int DATA_CHANNEL_DISABLED = 0;
+    public static final int DATA_CHANNEL_ENABLED = 1;
+
+    /**
      * Constants used by clients as part of registration status change indication.
      * Below constants will be notified when modem is unable to get the geo location information.
      */
@@ -522,4 +531,7 @@
      *  - activate CFx before register operation
      *  - query CFNL while network does not support CFNL feature */
     public static final int CODE_UT_CF_SERVICE_NOT_REGISTERED = 850;
+    // Data Channel call information
+    public static final String EXTRA_DATA_CHANNEL_MODEM_CALL_ID = "modemCallId";
+    public static final String EXTRA_IS_DATA_CHANNEL_CALL = "isDcCall";
 }
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCarrierConfigs.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCarrierConfigs.java
index 477cabd..ebdc1b6 100755
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCarrierConfigs.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCarrierConfigs.java
@@ -197,4 +197,10 @@
      */
     public static final String KEY_IS_PRIVATE_NETWORK =
         "is_private_network";
+
+    /* Config to determine if Carrier supports ims data channel
+     * true - if data channel is support else false
+     */
+     public static final String KEY_CARRIER_DATA_CHANNEL_SUPPORTED =
+         "carrier_data_channel_supported_bool";
 }
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtBase.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtBase.java
index 2755507..c63c29d 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtBase.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtBase.java
@@ -118,6 +118,12 @@
         }
 
         @Override
+        public void setDataChannelCapabilityListener(int phoneId,
+                IQtiImsExtListener listener) {
+           onSetDataChannelCapabilityListener(phoneId, listener);
+        }
+
+        @Override
         public int getRcsAppConfig(int phoneId) {
             return onGetRcsAppConfig(phoneId);
 
@@ -185,6 +191,11 @@
         public boolean isExitScbmFeatureSupported(int phoneId) {
             return onIsExitScbmFeatureSupported(phoneId);
         }
+
+        @Override
+        public boolean isDataChannelEnabled(int phoneId) {
+            return onIsDataChannelEnabled(phoneId);
+        }
     };
 
     private QtiImsExtBinder mQtiImsExtBinder;
@@ -298,4 +309,14 @@
         // no-op
         return false;
     }
+
+    protected void onSetDataChannelCapabilityListener(int phoneId,
+            IQtiImsExtListener listener) {
+        // no-op
+    }
+
+    protected boolean onIsDataChannelEnabled(int phoneId) {
+        // no-op
+        return false;
+    }
 }
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtListenerBaseImpl.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtListenerBaseImpl.java
index d98f119..0dac915 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtListenerBaseImpl.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtListenerBaseImpl.java
@@ -106,5 +106,9 @@
     @Override
     public void onScbmExited(boolean status) {
     }
+
+    @Override
+    public void notifyDataChannelCapability(int phoneId, boolean dcCapability) {
+    }
 }
 
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtManager.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtManager.java
index 97a8297..42eae0d 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtManager.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiImsExtManager.java
@@ -423,4 +423,32 @@
         }
     }
 
+    /**
+     * Used by client to register call back listener with vendor for
+     * UNSOL indication when data channel capability updated.
+     */
+    public void setDataChannelCapabilityListener(int phoneId, IQtiImsExtListener listener)
+            throws QtiImsException {
+        validateInvariants(phoneId);
+        try {
+            mQtiImsExt.setDataChannelCapabilityListener(phoneId, listener);
+        } catch(RemoteException e) {
+            throw new QtiImsException("Remote ImsService setDataChannelCapabilityListener : "
+                    + e);
+        }
+    }
+    /**
+     * Used by clients to check if IMS service data channel is enabled/disabled
+     * @param phoneId indicates the phone instance which triggered the request
+     * @return boolean
+     */
+    public boolean isDataChannelEnabled(int phoneId)
+            throws QtiImsException {
+        validateInvariants(phoneId);
+        try {
+            return mQtiImsExt.isDataChannelEnabled(phoneId);
+        } catch (RemoteException e) {
+            throw new QtiImsException("Remote ImsService isDataChannelEnabled: " + e);
+        }
+    }
 }
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/internal/IQtiImsExt.aidl b/ims/ims-ext-common/src/org/codeaurora/ims/internal/IQtiImsExt.aidl
index 153db12..8e960a2 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/internal/IQtiImsExt.aidl
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/internal/IQtiImsExt.aidl
@@ -341,4 +341,25 @@
       * @throws RemoteException if calling the IMS service results in an error.
       */
      boolean isExitScbmFeatureSupported(int phoneId);
+
+   /**
+     * setDataChannelCapabilityListener
+     * Set data channel capability listener.
+     *
+     * @param phoneId indicates the phone instance which triggered the request
+     * @param listener an IQtiImsExtListener instance to indicate the response
+     * @return void
+     */
+    oneway void setDataChannelCapabilityListener(int phoneId, IQtiImsExtListener listener);
+
+    /**
+     * isDataChannelEnabled
+     * Retrieves whether IMS service data channel is enabled/disabled
+     *
+     * @param phoneId indicates the phone instance which triggered the request
+     * @return boolean
+     *
+     *@throws RemoteException if calling the IMS service results in an error.
+     */
+    boolean isDataChannelEnabled(int phoneId);
 }
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/internal/IQtiImsExtListener.aidl b/ims/ims-ext-common/src/org/codeaurora/ims/internal/IQtiImsExtListener.aidl
index 8d5db4f..3d3c73c 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/internal/IQtiImsExtListener.aidl
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/internal/IQtiImsExtListener.aidl
@@ -197,4 +197,12 @@
      */
    void onScbmExited(boolean status);
 
+   /** Notifies client on data channel capability
+     * @param phoneId indicates the phone instance which triggered the request
+     * @param dcCapability
+     *        if true  : has data channel capability
+     *        if false : no data channel capability
+     * @return void.
+     */
+   void notifyDataChannelCapability(int phoneId, boolean dcCapability);
 }
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 0a26676..6f482ee 100755
--- a/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/utils/QtiImsExtUtils.java
@@ -823,4 +823,27 @@
         return isCarrierConfigEnabled(phoneId, context,
                 QtiCarrierConfigs.KEY_CARRIER_SEND_MEDIA_CONFIG_SUPPORTED);
     }
+
+    // Returns true if Carrier supports data channel
+    public static boolean isDataChannelSupported(int phoneId, Context context) {
+        return isCarrierConfigEnabled(phoneId, context,
+                QtiCarrierConfigs.KEY_CARRIER_DATA_CHANNEL_SUPPORTED);
+    }
+
+    // Stores user setting for data channel
+    public static void setDataChannelUserPreference(ContentResolver contentResolver,
+            int phoneId, boolean turnOn) {
+        final int value = turnOn ? QtiCallConstants.DATA_CHANNEL_ENABLED :
+                QtiCallConstants.DATA_CHANNEL_DISABLED;
+        android.provider.Settings.Global.putInt(contentResolver,
+                QtiCallConstants.DATA_CHANNEL + phoneId, value);
+    }
+
+    // retrieves the stored user setting from the database per phone id
+    public static int getDataChannelUserPreference(ContentResolver contentResolver,
+            int phoneId) {
+        return android.provider.Settings.Global.getInt(contentResolver,
+                QtiCallConstants.DATA_CHANNEL + phoneId,
+                QtiCallConstants.DATA_CHANNEL_DISABLED);
+    }
 }
