Skip to content

ukarim/smscsim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4975a56 · Aug 16, 2024

History

16 Commits
Aug 10, 2024
Aug 10, 2024
Aug 10, 2024
Dec 1, 2020
Nov 27, 2020
Aug 10, 2024
Sep 30, 2023
Nov 8, 2020
Aug 10, 2024
Aug 10, 2024
Aug 10, 2024
Aug 16, 2024

Repository files navigation

smscsim

Run tests

Lightweight, zero-dependency and stupid SMSc simulator.

Usage

  1. Use prebuild docker image (from hub.docker.com)
docker run -p 2775:2775 -p 12775:12775 ukarim/smscsim
  1. Build from sources (need golang compiler)
go build
./smscsim

then, just configure your smpp client to connect to localhost:2775

Features

Delivery reports (DLR)

If it was requested by submit_sm packet, delivery receipt will be returned after 2 sec with a message state always set to DELIVERED.

MO messages

Mobile originated messages (from smsc to smpp client) can be sent using special web page available at http://localhost:12775 . MO message will be delivered to the selected smpp session using a deliver_sm PDU.

Warning

  • simulator implements only a small subset of the SMPP3.4 specification and supports only the following PDUs:
    • bind_transmitter, bind_receiver, bind_transceiver
    • unbind
    • submit_sm
    • enquire_link
    • deliver_sm_resp
  • simulator does not perform PDU validation

Env variables

  • SMSC_PORT - override default smpp port
  • WEB_PORT - override default web port
  • FAILED_SUBMITS - if this is set to true, submit_sm requests will fail
    • for submit_sm with even sequence number smscsim will return submit_sm_resp with command_status set to 0x00000008 (System Error)
    • for submit_sm with odd sequence number smscsim will return DLR with UNDELIVERABLE message state