--- title: "Part 6: Embedding the Dial Pad" slug: "part-6-embedding-the-dial-pad" updated: 2022-07-14T08:32:18Z published: 2022-07-14T08:32:18Z canonical: "developer.comm100.com/part-6-embedding-the-dial-pad" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Part 6: Embedding the Dial Pad ## Introduction In this tutorial, You will learn how to add a dial pad to the top bar of the Agent Console. When the agent uses the Comm100 Agent Console, we hope that the agent can handle the phone request at the same time. When there is a call in, the agent can get notified in the Agent Console and can quickly answer the call. At the same time, it is also very convenient to use the dial pad to call specific customer. So we want to add a dial pad to the top of the Comm100 Agent Console. ![image.png](https://cdn.document360.io/c74d881b-a484-4687-85e4-c23c20d25ce2/Images/Documentation/image%2892%29.png) ## Step-by-Step Instructions We use the Comm100 [app](/x2/docs/app) to [extend the top bar](/x2/docs/extend-agent-console-by-apps) UI and interact with the Agent Console by referencing the Comm100 Client SDK. The tutorial covers the following tasks: 1. [Adding a Phone Button in Agent Console](/docs/part-6-embedding-the-dial-pad#adding-a-phone-button-in-agent-console) 2. [Developing a Dial Pad Page in Vincall](/docs/part-6-embedding-the-dial-pad#developing-a-dial-pad-page-in-vincall) 3. [Add Event Handle for Message Event in Vincall App](/docs/part-6-embedding-the-dial-pad#add-event-handle-for-message-event-in-vincall-app) ### Adding a Phone Button in Agent Console You can find out all related files in **vincall-app** project about this step. 1. Add the following definition in the app's manifest. The position of this file is placed to **src/assets/manifest.json** . ``` { "agentConsole": { "widgets": { "topBar": { "id": "vincall-phone", "url": "./phone.html", "icon": "./images/default.png", "tooltip": "Available" } } } } ``` - id: `vincall-phone`. We just have to make sure it's unique in the app - url: `./phone.html`. It will locate to a page in the app package, which we'll implement later. - icon: `./images/default.png`. The image in the package will be displayed on the top bar after loading. - tooltip: `Available`. Indicates that the phone status is available by default. The corresponding text is displayed when the mouse is moved over. 1. Implement the function of the `main.tsx` page. Here we will not repeat the entire front-end construction process, but only explain the key code of this page. The position of this file is placed to **src/pages/phone/main.tsx**. ``` import React, { useEffect, useRef } from "react"; import { render } from "react-dom"; import { receiveMessageHandle } from "./messageHandle"; import { popperContentUrl } from "src/config"; import { initPopover } from "../../helper/popperManager"; import { registerEvents } from "./eventHandle"; const App = () => { const iframeRef = useRef(); useEffect(() => { window.addEventListener("message", receiveMessageHandle, false); registerEvents(iframeRef.current?.contentWindow); initPopover(); }, []); return (