Minimalistic SMS capabilities for Django backed by Kannel or Gammu
Python Shell
Latest commit c87488f Dec 26, 2011 @rgaudin rgaudin typo



NoSMS is a lightweight django application providing SMS functionnality. It interacts natively with Kannel (SMPP) or Gammu (Modem).


  • python-gammu
  • Django
  • gammu


NoSMS is based on a regular Django model storing messages. A message has a text, identity, direction and status.

Messages status are: created, processed, error. Every 'created' message will be added to the send/process list.

Processed messages are never accessed and could be removed safely. Error messages are message which triggered an exception or problem during processing. Those are considered processed and won't be accessed again.

When NoSMS knows the problem is temporary, it leaves messages as created for later processing.

NoSMS respond to Kannel interface only: * receives incoming SMS as GET request from Kannel * sends outgoing SMS as GET request to Kannel

[NEW] NoSMS can also be used with Gammu-SMSd.

This is implemented with: * URL rule to receive messages in your Django configuration. * Django management command to loop on outgoing SMS submission.


# create new message from scratch
x = Message(identity="21345678", text="Hello World")

# create sms using helper
from nosms.utils import send_sms
send_sms("9893812", "Hello World")

# example handler
def myhandler(message):
    if message.text.startwith('hello'):
        message.respond("Thanks %s" % message.identity)
        message.status = Message.STATUS_PROCESSED
        return True
    return False


  1. Add NOSMS specific config variables to your file:
NOSMS_TRANSPORT = 'smsd' or 'kannel'

# your SMS handler
# A function which take a nosms.models.Message object as parameter
NOSMS_HANDLER = 'myapp.myhandler'

# Kannel configuration
# username and password are optionnal if you are using Gammu
  1. Add nosms to your INSTALLED_APPS in
  2. Add the URL pattern to your file:
(r'^nosms/', include('nosms.urls')),
  1. Launch the outgoing message command
./ nosms_outgoing
  1. Launch the incoming process
./ nosms_smsd_incoming OR ./ (fake kannel)