> For the complete documentation index, see [llms.txt](https://developer.ecall-messaging.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.ecall-messaging.com/api-references/smpp/session-management.md).

# Session management

### Supported commands

| Command            | Description                                   |
| ------------------ | --------------------------------------------- |
| `bind_receiver`    | Open a session to receive messages from eCall |
| `bind_transmitter` | Open a session to send messages to eCall      |
| `bind_transceiver` | Open a combined send and receive session      |
| `submit_sm`        | Submit an SMS message                         |
| `unbind`           | Close the session                             |
| `enquire_link`     | Keep the session alive                        |
| `deliver_sm`       | Receive delivery receipts or inbound SMS      |

### Unsupported commands

These commands are not supported:

| Command        |
| -------------- |
| `replace_sm`   |
| `cancel_sm`    |
| `submit_multi` |
| `data_sm`      |
| `query_sm`     |

If you send one of them, eCall returns `ESME_RINVCMDID` (`0x00000003`).

### Open a session

Open a session before you send or receive SMS data.

Use one of these `bind` commands:

| Command            | Description                                                                     |
| ------------------ | ------------------------------------------------------------------------------- |
| `bind_transmitter` | Send messages only. You only receive command responses.                         |
| `bind_receiver`    | Receive messages only. eCall currently sends delivery receipts on this session. |
| `bind_transceiver` | Send and receive on one session. This is the recommended mode for most clients. |

### Bind parameters

| Parameter           | Value                 |
| ------------------- | --------------------- |
| `system_id`         | Your eCall username   |
| `password`          | Your eCall password   |
| `system_type`       | `NULL`                |
| `interface_version` | `0x34` (decimal `52`) |
| `addr_ton`          | `NULL`                |
| `addr_npi`          | `NULL`                |
| `address_range`     | `NULL`                |

{% hint style="info" %}
eCall responds to each `bind` request with `eCallSmpp` in the `system_id` field.
{% endhint %}

### Keep the session alive

Use `enquire_link` when the session is idle.

The server closes the connection after **60 seconds** without traffic.

### Close the session

Use `unbind` to close the session explicitly.

This step is optional. eCall also closes the session when the TCP connection drops.
