# Receive Your First Emergency Text

In this tutorial, we will add Ella PSAP to a network running Ella Core and Ella SMSC, text 911 from a phone, and reply to it from Ella PSAP.

You can expect to spend about 15 minutes completing this tutorial.

## Pre-requisites

To complete this tutorial, you will need:

- A host running Ella Core and Ella SMSC, integrated.
- A phone attached to Ella Core, with an MSISDN, that can send and receive SMS.
- [Docker](<https://www.docker.com/>) on the host.

## 1\. Create the ESME of the emergency service

In the Ella SMSC UI, go to **SMPP** and click **Add ESME**. Set:

- **System ID**: `tcc`
- **User**: the email you log in with
- **Password**: `tcc12345`
- **Allowed networks**: `127.0.0.1/32`

Click **Add**. The ESME `tcc` shows in the list, with no session.

## 2\. Create the emergency service

Go to **Emergency** and click **Add Service**. Set:

- **Name**: `text-to-911`
- **Numbers**: `911`
- **ESMEs**: `tcc`
- **Bounce-back text**: `Text to 911 is not available. Please make a voice call to 911.`

Click **Add**. The service shows `tcc` as not bound.

## 3\. Start Ella PSAP

On the host, create a directory for Ella PSAP and its configuration file:

```
mkdir ella-psap
cd ella-psap
```

Create `psap.yaml`:

psap.yaml

```
element_id: psap.example.org
db:
  path: /data/psap.db
api:
  address: 0.0.0.0
  port: 5040
```

Start Ella PSAP:

```
docker run -d --name ella-psap --network host \
  -v "$PWD/psap.yaml:/psap.yaml:ro" -v ella-psap-data:/data \
  ghcr.io/ellanetworks/ella-psap:latest
```

## 4\. Initialize Ella PSAP

Open your browser at `http://<host-ip>:5040`. The **Initialize Ella PSAP** page opens.

Create the first user:

- Email: `admin@ellanetworks.com`
- Password: `adminadmin`

Click **Create**. The **Dashboard** opens.

## 5\. Connect Ella PSAP to Ella SMSC

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

- **Name**: `ella-smsc`
- **Addresses**: `127.0.0.1:2775`
- **Texts system ID**: `tcc`
- **Texts password**: `tcc12345`

Click **Add**. Within a few seconds, the SMSC's status turns **Bound**.

In the Ella SMSC UI, on the **Emergency** page, `tcc` shows as bound.

## 6\. Text 911

On the phone, send a text to `911`:

```
Help, I need an ambulance.
```

In the Ella PSAP UI, a red banner shows **Emergency text waiting**, and a chime sounds once you have clicked anywhere in the page.

## 7\. Reply

Click **Open** in the banner. The incident shows your text. Type a reply:

```
This is 911. Where are you?
```

Press **Enter**. The reply shows **Sent**, then **Delivered**.

The phone receives the reply from `911`.

## 8\. Clean up

Stop and remove Ella PSAP and its data:

```
docker rm -f ella-psap
docker volume rm ella-psap-data
```
