# Receiving Calls

{% hint style="warning" %}
Make sure to upgrade to the latest plugin version
{% endhint %}

## Twilio configuration

1. Go to your Twilio **Console**
2. Select the Twilio **Studio** Product > Flows
3. Create a **Flow** and give it a name (ex Incoming calls)
4. From the **Widget Library** under the Voice section, Drag and drop "**Connect Call To**"<br>

   <figure><img src="/files/MKBcYasY5CkvyXyXHJlh" alt=""><figcaption></figcaption></figure>
5. Under the widget **Config** > Connect Call To > From the dropdown Select "**Client User**" > then type "**the\_user\_id**". Make sure the user id matches your bubble Agent Identifier.
6.

```
<div align="center"><figure><img src="/files/KovIyM57eOMyMttSbbtE" alt="twilio-voice-bubble-client"><figcaption><p>This is the Bubble element properties in the Bubble editor</p></figcaption></figure></div>
```

7. **Connect** the "Incoming Call" trigger **to** the "Connect Caller To" widget
8. Go to Phone Numbers > Manage > Active Number > Select your Twilio number > **Call Comes In** dropdown **Select** Studio **Flow** > **Select** The **flow** you have created in Step 3 (ex Incoming Calls)

## Bubble app implementation

1. Go back to your Bubble **App** > **Workflows** > Click add an **event** > Twilio Client **Incoming Call** > Show Popup

![bubble app workflows](/files/DYvZmDLlT6XTSZuzeyKV)

2\. Add the UI elements needed: popup, text, and buttons **elements** (ex. show incoming number, accept, disconnect, ignore, reject buttons)

<figure><img src="/files/Fdkz8VUC7bRQjnCCmiKm" alt=""><figcaption></figcaption></figure>

3\. **Add actions** to the incoming call popup buttons (accept, reject, ignore, disconnect)

## Auto Reject Incoming calls

* This feature can be enabled or disabled on the client element. When enabled, the client will automatically reject incoming calls if the user is busy with another call.

<figure><img src="/files/7sEEs5O3HYrNkDIibwXd" alt=""><figcaption></figcaption></figure>

* The "Auto Rejected Call" event will trigger when a call is auto rejected. This can be useful if you want to alert the user or initiate other actions.

<figure><img src="/files/L4Tx3Y8EZwEoXKwxCAFM" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inova.us/v1/twilio-in-browser-call-plugin/receiving-calls.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
