---
title: Connect Jasmin SMS Gateway to TelecomsXchange
url: https://help.telecomsxchange.com/integrations/jasmin/
audience: Integrations
summary: In jCli, add an smppccm connector with host smpp01.telecomsxchange.com, port
  2776, bind transceiver and your account's SMPP System Id and SMPP Password, then
  route to it with an MT route. Jasmin's HTTP API accepts only digits in to, so add
  the tech prefix with an MT interceptor script that rewrites destination_addr to
  80039#447700900123. To sell SMS, create a Jasmin user with TelecomsXchange's credentials
  and let it bind to the SMPP Server API.
updated: '2026-10-23'
verified_commit: 83b4ebc96d0081a25213776d5a8871bd04941125
---

# Connect Jasmin SMS Gateway to TelecomsXchange

> In jCli, add an smppccm connector with host smpp01.telecomsxchange.com, port 2776, bind transceiver and your account's SMPP System Id and SMPP Password, then route to it with an MT route. Jasmin's HTTP API accepts only digits in to, so add the tech prefix with an MT interceptor script that rewrites destination_addr to 80039#447700900123. To sell SMS, create a Jasmin user with TelecomsXchange's credentials and let it bind to the SMPP Server API.

## Jasmin to TelecomsXchange over SMPP

1. **Your application**: HTTP API /send or SMPP Server API
2. **Jasmin** (via `to=447700900123`): MT interceptor, MT route, smppcc connector
3. **TelecomsXchange** (via `80039#447700900123`): smpp01, TCP 2776
4. **Seller's SMSC**: The SMS route you purchased

[Jasmin](https://www.jasminsms.com/) sends to TelecomsXchange through an SMPP client connector and takes your traffic over its HTTP API or SMPP Server API. Everything is configured in jCli, Jasmin's management console. This guide adds the connector, puts the route's tech prefix on every number with an MT interceptor, sets up receipts, and lets TelecomsXchange bind to Jasmin when you sell SMS. For the values themselves, see [Connect an SMPP platform](https://help.telecomsxchange.com/integrations/connect-smpp-platforms/).

## Before you start

- An [SMPP account](https://help.telecomsxchange.com/buyers/create-your-first-account/) with its **SMPP System Id** and **SMPP Password**. Set its **IP Address** to your Jasmin server's public IP, for example `203.0.113.10`.
- An [SMS route](https://help.telecomsxchange.com/buyers/find-and-buy-routes/) and its tech prefix, for example `80039`. Below, `TECH_PREFIX` stands for it.
- A sender ID registered on the account.
- Jasmin 0.10 or later with the interceptor service (`interceptord`) running, and jCli access: `telnet 127.0.0.1 8990`.

## How do I send SMS through TelecomsXchange?

1. Add the SMPP client connector:

```text
jcli : smppccm -a
> cid tcxc
> host smpp01.telecomsxchange.com
> port 2776
> username SYSTEM_ID
> password PASSWORD
> bind transceiver
> elink_interval 30
> submit_throughput 10
> ok
Successfully added connector [tcxc]
jcli : smppccm -1 tcxc
```

`SYSTEM_ID` and `PASSWORD` are the account's **SMPP System Id** and **SMPP Password**. Set `submit_throughput` (messages per second; Jasmin's default is 1) to your account's **SMPP Rate Limit (req/sec)** or lower.

2. Write the interceptor script, for example `/opt/jasmin-scripts/tcxc-prefix.py`. Jasmin runs it for every MT message before routing:

```python
# Prepend the TelecomsXchange tech prefix to destination_addr.
# 447700900123 or +447700900123 becomes 80039#447700900123.
TECH_PREFIX = b"80039#"   # your route's prefix, then '#'

pdu = routable.pdu
while pdu is not None:                       # every part of a long message
    dst = pdu.params["destination_addr"]
    if isinstance(dst, str):
        dst = dst.encode()
    dst = dst.lstrip(b"+")
    if not dst.startswith(TECH_PREFIX):
        pdu.params["destination_addr"] = TECH_PREFIX + dst
    pdu = getattr(pdu, "nextPdu", None)
```

3. Register it. A `DefaultInterceptor` runs for all MT traffic; use a `StaticMTInterceptor` with filters if only some traffic goes to TelecomsXchange:

```text
jcli : mtinterceptor -a
> type DefaultInterceptor
> script python3(/opt/jasmin-scripts/tcxc-prefix.py)
> ok
Successfully added MTInterceptor [DefaultInterceptor] with order:0
```

4. Route MT traffic to the connector. Interception runs before routing, so a route filter sees the prefixed number:

```text
jcli : mtrouter -a
> type DefaultRoute
> connector smppc(tcxc)
> rate 0.0
> ok
Successfully added MTRoute [DefaultRoute] with order:0
```

5. Create a group and a user for your application, then save everything:

```text
jcli : group -a
> gid apps
> ok
jcli : user -a
> username app
> password APP_PASS
> uid app
> gid apps
> ok
jcli : persist
```

6. Send through the HTTP API (port 1401 by default) with a plain number:

```bash
curl -G "http://127.0.0.1:1401/send" \
  --data-urlencode "username=app" \
  --data-urlencode "password=APP_PASS" \
  --data-urlencode "to=447700900123" \
  --data-urlencode "from=MyBrand" \
  --data-urlencode "content=Test from Jasmin" \
  --data-urlencode "dlr=yes" \
  --data-urlencode "dlr-url=http://127.0.0.1/dlr" \
  --data-urlencode "dlr-level=3"
```

Applications can also bind to Jasmin's SMPP Server API (port 2775 by default) with the same user and send `submit_sm`; the interceptor applies to both.

!!! warning
    After editing the script, add the interceptor again: Jasmin copies the script into its core when the rule is created, so changes to the file have no effect until then.

## How do I receive delivery receipts?

Request receipts per message: `dlr=yes` with a `dlr-url` and `dlr-level` on the HTTP API (`3` for both SMSC and terminal level), or `registered_delivery` on `submit_sm` from SMPP clients. Jasmin stores the `message_id` from TelecomsXchange's `submit_sm_resp`; when the `deliver_sm` with `id:<message_id>` and `stat:DELIVRD` arrives on the `tcxc` connector, it calls your `dlr-url` or sends a `deliver_sm` to your bound SMPP client.

Jasmin keeps unacknowledged messages for `dlr_expiry` seconds (86400 by default). Receipts reach Jasmin only while the connector is bound; keep `con_loss_retry` at its default `yes`.

## How do I receive SMS from TelecomsXchange as a seller?

Jasmin's SMPP Server API accepts binds natively. TelecomsXchange binds to it as a transceiver from `174.136.44.213`, as a Jasmin user.

1. Create a group and a user whose username and password are the **SMPP System Id** and **SMPP Password** you set on your TelecomsXchange SMS route:

```text
jcli : group -a
> gid tcxc
> ok
jcli : user -a
> username TCXC_SYSTEM_ID
> password TCXC_PASSWORD
> uid tcxc
> gid tcxc
> smpps_cred authorization bind yes
> smpps_cred quota max_bindings 4
> mt_messaging_cred authorization smpps_send yes
> ok
jcli : persist
```

A Jasmin username is 1 to 15 letters, digits, `_` or `-`, and a password at most 16 characters, so choose route credentials that fit.

2. Route the traffic TelecomsXchange sends you to your own connectors with MT routes, for example a `StaticMTRoute` with a `UserFilter` for `uid tcxc` and connector `smppc(my_operator)`. If you use the prefix interceptor above, give it a filter so it doesn't touch this user's traffic.
3. Allow `174.136.44.213` to the SMPP Server API port (2775 by default) on your firewall. Jasmin users have no IP restriction of their own.
4. On your route in **Routes → My Routes**, enter `IP:2775`, **SMPP Version** **3.4**, **Field for Messages** **short_message**, **TLS** **No**, and **Allowed BIND Sessions** no higher than `max_bindings`.

Jasmin answers each `submit_sm` with its own `message_id` and sends the receipt back to TelecomsXchange's bind when your operator connector reports delivery.

**Inbound SMS for numbers you sell**: add a second connector (`cid tcxc_did`) to the same host and port with `username did` and `password did` (or your custom DID credentials), and route messages for those numbers to it without the prefix interceptor. When you buy numbers, set the number's **SMPP Endpoint** to a Jasmin user, `smpp:USER:PASS:number@203.0.113.10:2775`; TelecomsXchange binds to it and delivers the SMS as MO.

## How do I test it?

1. In jCli, `smppccm -l` lists the `tcxc` connector; its **Session** should be `BOUND_TRX`. On TelecomsXchange, the account's **Bind Status** shows **ONLINE**.
2. Send the `curl` request above. Jasmin answers `Success "<message id>"`.
3. Check the connector log (for example `/var/log/jasmin/default-tcxc.log`) for the `SubmitSM` with `destination_addr: b'80039#447700900123'`, its response with status `ESME_ROK`, and the `DeliverSM` receipt.
4. Go to **Logs → SDR (SMS)**, choose **All Messages** and click **Search SMS**.

## What if something goes wrong?

| You see | What to do |
|---|---|
| Connector never reaches `BOUND_TRX`; log shows `ESME_RBINDFAIL` (`0x0D`) | Check `username` and `password` on the connector, and that Jasmin binds from the account's IP address or an additional allowed IP. |
| `ESME_RSUBMITFAIL` (`0x45`, 69) in the connector log | TelecomsXchange refused the message: no route or rate for the prefix, blocked route, low balance, sender ID not allowed or rate limit. Check **Failed Only** in the SDR. |
| HTTP API answers `Argument [to] has an invalid value` | You put `#` or another symbol in `to`. Send digits only and let the interceptor add the prefix. |
| Messages go to the default route | The interceptor didn't run: check `mtinterceptor -l`, that `interceptord` is running, and its log. |
| `ESME_RINVMSGLEN` (`0x01`) | The route takes single messages only. Let Jasmin split long content into parts. |
| Status `0xFE` (254) or `ESME_RSYSERR` (`0x08`) | The seller timed out or the platform failed to forward. Retry, or send through a routing group with a failover route. |
| Throttled sending | Raise `submit_throughput` up to your account's rate limit. |
| Selling: Test Bind "has FAILED" | The user's credentials don't match the route, or `smpps_cred authorization bind` is `no`. |
| Selling: "host/port is probably unreachable" | Jasmin's SMPP server isn't listening on that port or `174.136.44.213` is blocked. |

## References

- [Jasmin jCli modules: smppccm, user, group, mtrouter, mtinterceptor, filters](https://docs.jasminsms.com/en/latest/management/jcli/modules.html)
- [Jasmin message interception](https://docs.jasminsms.com/en/latest/interception/index.html)
- [Jasmin HTTP API](https://docs.jasminsms.com/en/latest/apis/ja-http/index.html)
- [Jasmin SMPP Server API](https://docs.jasminsms.com/en/latest/apis/smpp-server/index.html)
- [Jasmin source: HTTP /send parameter validation](https://github.com/jookies/jasmin/blob/master/jasmin/protocols/http/endpoints/send.py)

## Frequently asked questions

**Q: Why not put 80039#447700900123 in the HTTP API's to parameter?**

A: Jasmin's /send endpoint validates to against ^\+?\d+$, so a # is rejected. The MT interceptor adds the prefix after validation, for HTTP and SMPP clients alike.

**Q: Can Jasmin sell SMS routes on TelecomsXchange?**

A: Yes. Jasmin's SMPP Server API accepts binds from users created in jCli. Create a user with the system ID and password you set on your TelecomsXchange route; its messages are routed to your own connectors by your MT routes.

**Q: What submit_throughput should I set?**

A: Jasmin's default is 1 message per second. Raise it to your account's SMPP Rate Limit (req/sec), not above.

**Q: Do long messages work?**

A: Yes. Jasmin splits long content into UDH parts; each part is billed as one segment. The interceptor script below prefixes every part.
