is it possible to write USSD / SMS /SS7 apps in python

Banibrata Dutta banibrata.dutta at
Sat Jul 4 11:47:18 CEST 2009

QuoteGoke Aruna <pyklass at>

what am saying is reading the ITU info on USSD, is it possible to use python

to write the application SS7 with support for TCAP/MAP talking to E1
card to do the ss7 signalling.

As Chris mentioned "possible, but probably not easy". AFAIK, not much of
what you might need exists in form of existing Python modules, if that's
what you were thinking -- and especially in the Open-source form. The only
open-source initiative in the SS7 domain that I am aware of, is the openss7
(, which has 'some' software available. No personal
experience though, API's are C/C++ AFAIR, and last I'd checked, the status
wasn't 'practically usable' in functionality terms. If they offer
functionality of the ITU-T SS7 stack upto the TCAP layer, exposing a C/C++
API to create dialogs, create components, populate and send them etc. (usual
TCAP Primitives), then as Chris mentions, you could have Python wrappers
(ctypes, swig...). Then, for the MAP layer, which is largely ASN.1 BER
encoding/decoding, you'd need such functionality in Python. There are some
ASN.1 BER codec implementations having Python API/bindings, but AFAIK, they
are largely domain/application specific (s.a. for SNMP), and not generic or
robust enough. Given the API's however, writing any application s.a. for
performing some "business-logic" on receiving or before sending USSD / SMS
message in Python, that's a no-brainer ! :-)
If however, you want to implement the whole SS7 stack in Python --
everything that Chris wrote is accurate, and that's potentially (and the
most obvious) way you'd have to implement it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list