# Connect to Ella IMS

Receive emergency calls from Ella IMS, and call callers back through it.

## Prerequisites

- **Ella IMS**: connected to the core network, with SIP trunks enabled.
- **Ella PSAP**: with SIP enabled in its [configuration file](<https://docs.ellanetworks.com/psap/reference/config_file/index.md>).

The examples use `10.90.3.10` for Ella PSAP and `10.90.3.2` for Ella IMS.

## 1\. Add the PSAP trunk to Ella IMS

In Ella IMS, go to **SIP Trunks** and click **Create Trunk**:

- **Name**: `ella-psap`.
- **Domain**: `10.90.3.10`.
- **Host**: `10.90.3.10`, **Port** `5060`, **Transport** `TCP`.
- **Inbound CIDRs**: `10.90.3.10/32`.
- Check **Trusted** and **Emergency**.

Click **Create**.

## 2\. Route emergency calls to it

In Ella IMS, go to **Emergency Calls**:

- On the **Routes** tab, click **Create Route**. Set **Name** to `ella-psap`, **Covers** to **Default**, add `ella-psap` under **Trunks**, and click **Create**.
- On the **Settings** tab, set **Provider** to your name and 24/7 support line, then turn on **Emergency Calls**.

## 3\. Add the trunk to Ella PSAP

In Ella PSAP, go to **Connections**, open the **SIP Trunks** tab, and click **Add**. Set:

- **Name**: `ella-ims`.
- **Inbound networks**: `10.90.3.2/32`.
- **Callback address**: `sip:10.90.3.2:5060;transport=tcp`.
- **Callback number**: the number callers see on a callback, such as `+16135550100`.
- **SMSC**: the SMSC of the same network, if Ella PSAP is [connected to Ella SMSC](<https://docs.ellanetworks.com/psap/how_to/connect_to_ella_smsc/index.md>).

Click **Add**.

In Ella IMS, the trunk's **State** on the **SIP Trunks** page turns `up`.

The same can be done with the [SIP Trunks API](<https://docs.ellanetworks.com/psap/reference/api/sip_trunks/index.md>).
