Boost logo

Boost :

From: Raghavan Kripakaran (rkripa_at_[hidden])
Date: 2002-04-01 23:12:29


I am using an open source Session Initiation Protocol (SIP) stack from My goal is to write python extensions, which will enable a
python users with SIP support. For example MSN-4.6 uses SIP to
setup/teardown phone calls over the internet.

VOCAL sip stack is multithreaded and implemented using C++. I have created
a simple C++ wrapper and created extensions using the boost python library,
which I am able to call from python.

I would like to have callbacks implemented in python, which gets called when
a SIP event or message is receieved by the sip stack. So I created a C++
wrapper class say 'Base' with virtual methods. Then I inherited a 'Derived'
class in python from the C++ class 'Base'. The python Derived virtual
methods were defined. I instantiated a Derived python object and passed it
on to the C++ wrapper, which I was expecting it to be called by the VOCAL
sip stack on receiving a SIP message over the wire. I am running into
threading issues when the VOCAL sip stack basically calls the python
callback derived object.

I am looking for pointers or any sample application which implements a
callback which is gets executed in the python enviroment, when a C++
extension modules gets a trigger.

If anyone has done a similar callback from C++ extension to a python object
please help me.

Please ignore if I have posted my question on the wrong list.



Boost list run by bdawes at, gregod at, cpdaniel at, john at