diff --git a/InCallUI/res/layout/primary_call_info.xml b/InCallUI/res/layout/primary_call_info.xml
index 251ded3..681519b 100644
--- a/InCallUI/res/layout/primary_call_info.xml
+++ b/InCallUI/res/layout/primary_call_info.xml
@@ -110,24 +110,67 @@
         </GridLayout>
         <!-- End of call_banner -->
 
+        <LinearLayout android:id="@+id/supplementary_info_container"
+            style="@style/PrimaryCallInfoSupplementaryInfoContainer"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical|right"
+            android:orientation="vertical"
+            android:background="@color/incall_secondary_info_background"
+            android:animateLayoutChanges="true">
 
-        <!-- The "call state label": In some states, this shows a special
-             indication like "Dialing" or "Incoming call" or "Call ended".
-             It's unused for the normal case of an active ongoing call. -->
-        <TextView android:id="@+id/callStateLabel"
-                  android:layout_width="match_parent"
-                  android:layout_height="wrap_content"
-                  android:paddingTop="@dimen/provider_info_top_bottom_padding"
-                  android:paddingBottom="@dimen/provider_info_top_bottom_padding"
-                  android:paddingStart="@dimen/call_banner_side_padding"
-                  android:paddingEnd="@dimen/call_banner_side_padding"
-                  android:gravity="end"
-                  android:textAppearance="?android:attr/textAppearanceSmall"
-                  android:textColor="@color/incall_call_banner_text_color"
-                  android:textAllCaps="true"
-                  android:background="@color/incall_secondary_info_background"
-                  android:singleLine="true"
-                  android:ellipsize="end"/>
+            <!-- Shown when a gateway provider is used during any outgoing call. -->
+            <LinearLayout android:id="@+id/providerInfo"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingTop="@dimen/provider_info_top_bottom_padding"
+                android:paddingBottom="@dimen/provider_info_top_bottom_padding"
+                android:paddingStart="@dimen/call_banner_side_padding"
+                android:paddingEnd="@dimen/call_banner_side_padding"
+                android:gravity="end"
+                android:orientation="horizontal"
+                android:background="@android:color/transparent"
+                android:visibility="gone">
+                <TextView android:id="@+id/providerLabel"
+                    android:layout_width="0px"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="6"
+                    android:textAppearance="?android:attr/textAppearanceSmall"
+                    android:textAllCaps="true"
+                    android:textColor="@color/incall_call_banner_text_color"
+                    android:singleLine="true"
+                    android:ellipsize="marquee" />
+                <TextView android:id="@+id/providerAddress"
+                    android:layout_width="0px"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="4"
+                    android:gravity="end"
+                    android:paddingStart="8dp"
+                    android:textAppearance="?android:attr/textAppearanceSmall"
+                    android:textAllCaps="true"
+                    android:textColor="@color/incall_call_banner_text_color"
+                    android:singleLine="true"
+                    android:ellipsize="middle" />
+            </LinearLayout>
+
+            <!-- The "call state label": In some states, this shows a special
+                 indication like "Dialing" or "Incoming call" or "Call ended".
+                 It's unused for the normal case of an active ongoing call. -->
+            <TextView android:id="@+id/callStateLabel"
+                      android:layout_width="match_parent"
+                      android:layout_height="wrap_content"
+                      android:paddingTop="@dimen/provider_info_top_bottom_padding"
+                      android:paddingBottom="@dimen/provider_info_top_bottom_padding"
+                      android:paddingStart="@dimen/call_banner_side_padding"
+                      android:paddingEnd="@dimen/call_banner_side_padding"
+                      android:gravity="end"
+                      android:textAppearance="?android:attr/textAppearanceSmall"
+                      android:textColor="@color/incall_call_banner_text_color"
+                      android:textAllCaps="true"
+                      android:background="@color/incall_secondary_info_background"
+                      android:singleLine="true"
+                      android:ellipsize="end"/>
+        </LinearLayout>
 
     </LinearLayout>
 
diff --git a/InCallUI/res/values/styles.xml b/InCallUI/res/values/styles.xml
index 415db36..4570653 100644
--- a/InCallUI/res/values/styles.xml
+++ b/InCallUI/res/values/styles.xml
@@ -152,7 +152,7 @@
     <style name="PrimaryCallInfoPrimaryCallBanner">
         <item name="android:layout_alignParentTop">true</item>
     </style>
-    <style name="PrimaryCallInfoSecondaryInfoContainer">
+    <style name="PrimaryCallInfoSupplementaryInfoContainer">
         <item name="android:layout_below">@id/primary_call_banner</item>
     </style>
 
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 65a75d7..da87f99 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -46,6 +46,9 @@
     private TextView mCallStateLabel;
     private ImageView mPhoto;
     private TextView mElapsedTime;
+    private View mProviderInfo;
+    private TextView mProviderLabel;
+    private TextView mProviderNumber;
 
     // Secondary caller info
     private ViewStub mSecondaryCallInfo;
@@ -69,7 +72,7 @@
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        getPresenter().init(ServiceFactory.newPhoneNumberService(getActivity()));
+        getPresenter().init(getActivity(), ServiceFactory.newPhoneNumberService(getActivity()));
     }
 
     @Override
@@ -93,6 +96,9 @@
         mPhoto = (ImageView) view.findViewById(R.id.photo);
         mCallStateLabel = (TextView) view.findViewById(R.id.callStateLabel);
         mElapsedTime = (TextView) view.findViewById(R.id.elapsedTime);
+        mProviderInfo = view.findViewById(R.id.providerInfo);
+        mProviderLabel = (TextView) view.findViewById(R.id.providerLabel);
+        mProviderNumber = (TextView) view.findViewById(R.id.providerAddress);
     }
 
     @Override
@@ -122,7 +128,8 @@
 
     @Override
     public void setPrimary(String number, String name, boolean nameIsNumber, String label,
-            Drawable photo, boolean isConference) {
+            Drawable photo, boolean isConference, String gatewayLabel, String gatewayNumber) {
+        Log.d(this, "Setting primary call [" + gatewayLabel + "][" + gatewayNumber + "]");
 
         if (isConference) {
             name = getView().getResources().getString(R.string.card_title_conf_call);
@@ -139,6 +146,15 @@
             mPhoneNumber.setTextDirection(View.TEXT_DIRECTION_LTR);
         }
 
+        // Set any gateway information
+        if (!TextUtils.isEmpty(gatewayLabel) && !TextUtils.isEmpty(gatewayNumber)) {
+            mProviderLabel.setText(gatewayLabel);
+            mProviderNumber.setText(gatewayNumber);
+            mProviderInfo.setVisibility(View.VISIBLE);
+        } else {
+            mProviderInfo.setVisibility(View.GONE);
+        }
+
         // Set direction of the name field
 
         // set the name field.
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 5ab2529..f233d78 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -16,6 +16,9 @@
 
 package com.android.incallui;
 
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
 import android.graphics.drawable.Drawable;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
@@ -54,9 +57,9 @@
     private ContactCacheEntry mPrimaryContactInfo;
     private ContactCacheEntry mSecondaryContactInfo;
     private CallTimer mCallTimer;
+    private Context mContext;
 
     public CallCardPresenter() {
-
         // create the call timer
         mCallTimer = new CallTimer(new Runnable() {
             @Override
@@ -66,7 +69,8 @@
         });
     }
 
-    public void init(PhoneNumberService phoneNumberService) {
+    public void init(Context context, PhoneNumberService phoneNumberService) {
+        mContext = context;
         mPhoneNumberService = phoneNumberService;
     }
 
@@ -266,11 +270,14 @@
             final String name = getNameForCall(mPrimaryContactInfo);
             final String number = getNumberForCall(mPrimaryContactInfo);
             final boolean nameIsNumber = name != null && name.equals(mPrimaryContactInfo.number);
+            final String gatewayLabel = getGatewayLabel();
+            final String gatewayNumber = getGatewayNumber();
             ui.setPrimary(number, name, nameIsNumber, mPrimaryContactInfo.label,
-                    mPrimaryContactInfo.photo, mPrimary.isConferenceCall());
+                    mPrimaryContactInfo.photo, mPrimary.isConferenceCall(), gatewayLabel,
+                    gatewayNumber);
         } else {
             // reset to nothing (like at end of call)
-            ui.setPrimary(null, null, false, null, null, false);
+            ui.setPrimary(null, null, false, null, null, false, null, null);
         }
 
     }
@@ -300,6 +307,41 @@
         }
     }
 
+    /**
+     * Returns the gateway number for any existing outgoing call.
+     */
+    private String getGatewayNumber() {
+        if (hasOutgoingGatewayCall()) {
+            return mPrimary.getGatewayNumber();
+        }
+
+        return null;
+    }
+
+    /**
+     * Returns the label for the gateway app for any existing outgoing call.
+     */
+    private String getGatewayLabel() {
+        if (hasOutgoingGatewayCall() && getUi() != null) {
+            final PackageManager pm = mContext.getPackageManager();
+            try {
+                final ApplicationInfo info = pm.getApplicationInfo(mPrimary.getGatewayPackage(), 0);
+                return mContext.getString(R.string.calling_via_template,
+                        pm.getApplicationLabel(info).toString());
+            } catch (PackageManager.NameNotFoundException e) {
+            }
+        }
+        return null;
+    }
+
+    private boolean hasOutgoingGatewayCall() {
+        // We only display the gateway information while DIALING so return false for any othe
+        // call state.
+        return (mPrimary.getState() == Call.State.DIALING &&
+                !TextUtils.isEmpty(mPrimary.getGatewayNumber()) &&
+                !TextUtils.isEmpty(mPrimary.getGatewayPackage()));
+    }
+
     private void fetchImage(final String url) {
         if (url != null) {
             new AsyncTask<Void, Void, Bitmap>() {
@@ -374,7 +416,7 @@
     public interface CallCardUi extends Ui {
         void setVisible(boolean on);
         void setPrimary(String number, String name, boolean nameIsNumber, String label,
-                Drawable photo, boolean isConference);
+                Drawable photo, boolean isConference, String gatewayLabel, String gatewayNumber);
         void setSecondary(boolean show, String name, String label, Drawable photo);
         void setCallState(int state, Call.DisconnectCause cause, boolean bluetoothOn);
         void setPrimaryCallElapsedTime(boolean show, String duration);
