Skip to content

Instantly share code, notes, and snippets.

View MateusLeguir's full-sized avatar
:octocat:
Focusing

mateus MateusLeguir

:octocat:
Focusing
View GitHub Profile
@MateusLeguir
MateusLeguir / deliver_sm.py
Created August 30, 2023 16:27 — forked from riceo/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.64
# 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
from datetime import datetime
from jasmin.managers.content import DeliverSmContent