Skip to content

Instantly share code, notes, and snippets.

View mateusleguir's full-sized avatar
👨‍🎓
Focusing

Mateus L. Silva mateusleguir

👨‍🎓
Focusing
View GitHub Profile
@riceo
riceo / deliver_sm.py
Last active April 29, 2025 22:45 — forked from zspine/deliver_sm.py
Fork of zspine/deliver_sm.py, updated to work with changes in Jasmin SMS since the original was created + fixes a rabbitmq bug. This script will take a submit_sm PDU, send an OK back to the originator whilst replaying it to jasmin as a deliver_sm, effectively converting a submit_sm to deliver_sm. Also will send back a DELIVRD DLR!
# V0.75
# Bump the above version when modifying this script / pushing to the CLI -
# it's a nice way to confirm that the right code is running on jasmin.
import pickle
import logging
import uuid
import pika
import time
import pickle
from twisted.internet.defer import inlineCallbacks
from twisted.internet import reactor
from twisted.internet.protocol import ClientCreator
from twisted.python import log
from txamqp.protocol import AMQClient
from txamqp.client import TwistedDelegate
import txamqp.spec