# Bind an SMPP ESME trunk

Configure your application to connect, or bind, to the DIDWW SMSC with the
credentials of your SMPP ESME trunk. Your application opens the connection to
the DIDWW SMPP server of the trunk's **Server location** and sends the bind
request.

## Before you begin

- An active DIDWW account is required. [Sign in to DIDWW](https://my.didww.com/users/sign_in).
- An SMPP ESME trunk is required. If you do not have one, see [Create an
  SMPP ESME trunk](create-smpp-esme-trunk.html).
- Have the trunk's **Host**, **System ID**, **Password**, and **System Type**
  ready. See [View SMPP ESME trunk credentials](view-smpp-esme-trunk-credentials.html).
- Make sure your firewall allows your application to open connections to the
  IP address of the trunk's **Server location**. See [Server locations
  and IP addresses](../../technical-data/smpp-specification.html#smpp-endpoints).
- If the trunk has **Allowed IP addresses**, make sure your application
  connects from one of them.

## Step 1: Configure the connection

Configure your application to connect to the DIDWW SMPP server of the trunk.

| Setting | Value |
| --- | --- |
| Host | The **Host** from the trunk's credentials. It matches the trunk's **Server location**: `us.sms-out.didww.com` for **US, NY** or `eu.sms-out.didww.com` for **NL, AMS**. |
| Port | `2775` for SMPP over plain TCP, or `2776` for SMPP over TLS. Both ports use the same credentials. |

On port `2776`, your application establishes the TLS connection before it
sends the bind request. The DIDWW certificate is issued for
`sms-out.didww.com`, so set the TLS server name (SNI) and hostname
verification to `sms-out.didww.com`. See [SMPP over TLS](../../technical-data/smpp-specification.html#smpp-tls).

## Step 2: Configure the bind parameters

Configure your application to send the following values in the bind request.

| Parameter | Value |
| --- | --- |
| `system_id` | The **System ID** from the trunk's credentials. |
| `password` | The **Password** from the trunk's credentials. |
| `system_type` | The trunk's **System Type**, exactly as shown in the credentials. The value is case-sensitive. If the trunk has no **System Type**, leave `system_type` empty. |

Use `bind_transceiver` to send and receive SMS over one bind. The DIDWW SMSC
also accepts `bind_transmitter` to only send SMS and `bind_receiver` to
only receive SMS.

Important

DIDWW rejects the bind with the `ESME_RBINDFAIL` (`0x0000000D`) command
status if the `system_id`, `password`, or `system_type` does not match
the trunk's credentials.

For the PDUs exchanged over the bind, encoding, and concatenated messages, see
the [SMPP specification](../../technical-data/smpp-specification.html#service-incoming-sms).

## Step 3: Confirm the bind

1. Start your application and check that the bind response has the `ESME_ROK`
   (`0x00000000`) command status.
2. In the DIDWW User Panel, check the trunk's connection status. While your
   application is bound, **Status** shows the bind type, for example
   `BIND_TRX` for a transceiver bind. See [Check SMPP ESME trunk
   connection status](check-smpp-esme-trunk-connection-status.html).

## Next steps

- To receive SMS, [assign the trunk](../../../../phone-numbers/my-numbers/how-to-guides/assign-sms-trunk.html#assigning-sms-trunk) to one or more
  DIDs that support inbound SMS. Messages sent to those DIDs are then
  delivered over the bind.
- To send A2P messages with a verified Sender ID, associate an active
  [Sender ID Verification](../../../sender-id-verifications/index.html) with the
  trunk.

## Related resources

- [SMPP specification](../../technical-data/smpp-specification.html#service-incoming-sms) - Review the PDUs, encoding,
  concatenation, and all available DIDWW endpoints.
- [Bind parameters for SMPP ESME trunks](../../technical-data/smpp-specification.html#smpp-bind-parameters) - Look up
  each bind parameter.
- [Send and receive SMS with OpenSIPS](../../../../integrations/opensips/sms.html#opensips-sms-integration) -
  Connect OpenSIPS 4.0 to an SMPP ESME trunk to send SMS, receive SMS, and
  receive delivery receipts.
- [View SMPP ESME trunk credentials](view-smpp-esme-trunk-credentials.html) -
  Look up the Host, Port, System ID, Password, and System Type of a trunk.
- [SMPP ESME trunk](../smpp-esme-trunk.html) - Understand how your
  application exchanges messages with DIDWW over the bind.
