Python SIP Take Two (Part 1)

More than a year ago I wrote Python binding for PJSIP. It was alright, we can have some Python applications done using this wrapper. But, it’s not really having the impact that I expected. I’m talking about programming experience here and not popularity or things like that.

I mean, Python programming is supposed to be easy, and above all else, fun and enjoyable. But the wrapper is not doing that. I don’t know what it is, maybe it still smells too much like C, or maybe it’s the lack of documentation, or both, or something else. Bottom line I was not too impressed, so I’ve always thought about redoing it.

And now it’s done!

With the new module, we now do the absractions in two layers. The lower layer is the _pjsua C extension which exports PJSUA API to Python. This is similar to how the old Python extension was implemented. But now we also add a higher layer abstraction, object oriented, pure Python module on top of this. And that is the pjsua.py module.

The pjsua module provides high level API for constructing Session Initiation Protocol (SIP) multimedia user agent applications (a.k.a Voice over IP/VoIP softphones). It wraps together the signaling, media, and NAT traversal functionality into easy to use call control API, account management, buddy list management, presence, and instant messaging, along with multimedia features such as local conferencing, file streaming, local playback, and voice recording, and powerful NAT traversal techniques utilizing STUN, TURN, and ICE.

Hopefully it really is easier and more fun to use now.

Ready to go? We’ve also created more thorough documentation this time, start your development from this page: Python SIP Tutorial

And stay tuned for next parts of this post, we may have some interesting applications to publish (hints: I’m thinking about SIP client program for Nokia S60 platform, with PyS60. Wish me luck!).

6 Responses to “Python SIP Take Two (Part 1)”

you know i’m a newbie to python/symbian c++ s60 programming and i’ve little background in this stuff like this, but you really make me want to learn mobile programming/ python sip. i’ll be very grateful if u have the SIP client program for Nokia S60 platform done/examples/source code + materials.

I am busy going through/testing out your documentation/source codes for python sip (part 1 and 2) and i fully concur with the others on this blog you really know what you’re talking about.

Honestly, i only began to understand this stuff properly. Please do know that here in this part of Africa (western cape – south africa) a handful of programmers do appreciate your effort to showing/leading with this aspect of mobile programing.

I love this Python interface. I think is really nice to use it. My experience i VoIP is not extensive but I have been using OPAL for my project. But decide to look for a new SIP lib that allowed me to process many calls at once. This BRILIANT API allowed me to do that .. and in my favorite language, Python.

Great work guys!!!

Did not take long to compile the main library (after creating the config_site.h 😉 ).

@Thiago RSS: When building make sure you are building the “Release” and not the debug (which is the default setting).