Index: pjproject/trunk/pjsip-apps/src/python/_pjsua.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/python/_pjsua.c	(revision 4607)
+++ pjproject/trunk/pjsip-apps/src/python/_pjsua.c	(revision 4609)
@@ -132,23 +132,24 @@
  */
 static void cb_on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
-                                pjsip_rx_data *rdata)
-{
-    PJ_UNUSED_ARG(rdata);
-
+				pjsip_rx_data *rdata)
+{
     if (PyCallable_Check(g_obj_callback->on_incoming_call)) {
-	PyObject *obj;
-
+	PyObj_pjsip_rx_data *obj;
+	
 	ENTER_PYTHON();
-
-	obj = Py_BuildValue("");
-
-        PyObject_CallFunction(
-                g_obj_callback->on_incoming_call,
-		"iiO",
-		acc_id,
-                call_id,
-		obj,
-		NULL
-        );
+	
+	obj = (PyObj_pjsip_rx_data*)
+	      PyObj_pjsip_rx_data_new(&PyTyp_pjsip_rx_data,
+				      NULL, NULL);
+	PyObj_pjsip_rx_data_import(obj, rdata);
+
+	PyObject_CallFunction(
+	    g_obj_callback->on_incoming_call,
+	    "iiO",
+	    acc_id,
+	    call_id,
+	    obj,
+	    NULL
+	);
 
 	Py_DECREF(obj);
@@ -4454,4 +4455,7 @@
     if (PyType_Ready(&PyTyp_pjsip_cred_info) < 0)
         return;
+    PyTyp_pjsip_rx_data.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&PyTyp_pjsip_rx_data) < 0)
+        return;
 
     /* LIB TRANSPORT */
@@ -4536,4 +4540,9 @@
     PyModule_AddObject(m, "Pjsip_Cred_Info",
         (PyObject *)&PyTyp_pjsip_cred_info
+    );
+
+    Py_INCREF(&PyTyp_pjsip_rx_data);
+    PyModule_AddObject(m, "Pjsip_Rx_Data",
+        (PyObject *)&PyTyp_pjsip_rx_data
     );
 
Index: pjproject/trunk/pjsip-apps/src/python/_pjsua.h
===================================================================
--- pjproject/trunk/pjsip-apps/src/python/_pjsua.h	(revision 4607)
+++ pjproject/trunk/pjsip-apps/src/python/_pjsua.h	(revision 4609)
@@ -1770,4 +1770,5 @@
 					  const pjsua_acc_config *cfg)
 {
+    PyObj_pjsua_transport_config *tconf;
     unsigned i;
 
@@ -1826,6 +1827,7 @@
 
     Py_XDECREF(obj->rtp_transport_cfg);
-    PyObj_pjsua_transport_config *tconf;
-    tconf = (PyObj_pjsua_transport_config*) PyObj_pjsua_transport_config_new(&PyTyp_pjsua_transport_config,NULL, NULL);
+    tconf = (PyObj_pjsua_transport_config*)
+	    PyObj_pjsua_transport_config_new(&PyTyp_pjsua_transport_config,
+					     NULL, NULL);
     PyObj_pjsua_transport_config_import(tconf, &cfg->rtp_cfg);
     obj->rtp_transport_cfg = (PyObject *) tconf;
@@ -1835,4 +1837,5 @@
 					  PyObj_pjsua_acc_config *obj)
 {
+    PyObj_pjsua_transport_config *tconf;
     unsigned i;
 
@@ -1881,7 +1884,6 @@
     cfg->srtp_secure_signaling = obj->srtp_secure_signaling;
 
-    PyObj_pjsua_transport_config *tconf;
-	tconf = (PyObj_pjsua_transport_config*)	obj->rtp_transport_cfg;
-	PyObj_pjsua_transport_config_export(&cfg->rtp_cfg, tconf);
+    tconf = (PyObj_pjsua_transport_config*)obj->rtp_transport_cfg;
+    PyObj_pjsua_transport_config_export(&cfg->rtp_cfg, tconf);
 }
 
@@ -3585,6 +3587,131 @@
 
 
-
 //////////////////////////////////////////////////////////////////////////////
+/*
+ * PyObj_pjsip_rx_data
+ */
+typedef struct
+{
+    PyObject_HEAD
+
+    /* Type-specific fields go here. */
+    PyObject *msg_info_buffer;  // string
+    PyObject *msg_info_info;	// string
+
+} PyObj_pjsip_rx_data;
+
+/*
+ * PyObj_pjsip_rx_data_dealloc
+ * deletes rx_data from memory
+ */
+static void PyObj_pjsip_rx_data_delete(PyObj_pjsip_rx_data* self)
+{
+    Py_XDECREF(self->msg_info_buffer);
+    Py_XDECREF(self->msg_info_info);
+
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+static void PyObj_pjsip_rx_data_import(PyObj_pjsip_rx_data *obj, pjsip_rx_data *rx_data)
+{
+    Py_XDECREF(obj->msg_info_buffer);
+    obj->msg_info_buffer = PyString_FromString(rx_data->msg_info.msg_buf);
+    Py_XDECREF(obj->msg_info_info);
+    obj->msg_info_info = PyString_FromString(pjsip_rx_data_get_info(rx_data));
+}
+
+
+/*
+ * PyObj_pjsip_rx_data_new
+ * constructor for PyObj_pjsip_rx_data object
+ */
+static PyObject * PyObj_pjsip_rx_data_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+	PyObj_pjsip_rx_data *self;
+
+    PJ_UNUSED_ARG(args);
+    PJ_UNUSED_ARG(kwds);
+
+    self = (PyObj_pjsip_rx_data *)type->tp_alloc(type, 0);
+    if (self != NULL) {
+        self->msg_info_buffer = PyString_FromString("");
+        self->msg_info_info   = PyString_FromString("");
+    }
+
+    return (PyObject *)self;
+}
+
+
+
+/*
+ * PyObj_pjsip_rx_data_members
+ */
+static PyMemberDef PyObj_pjsip_rx_data_members[] =
+{
+    {
+        "msg_info_buffer", T_OBJECT_EX,
+        offsetof(PyObj_pjsip_rx_data, msg_info_buffer), 0,
+        "Entire SIP-Message"
+    },
+    {
+        "msg_info_info", T_OBJECT_EX,
+        offsetof(PyObj_pjsip_rx_data, msg_info_info), 0,
+        "Message Info"
+    },
+
+    {NULL}  /* Sentinel */
+};
+
+/*
+ * PyTyp_pjsip_rx_data
+ */
+static PyTypeObject PyTyp_pjsip_rx_data =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "_pjsua.Pjsip_Rx_Data",			/*tp_name*/
+    sizeof(PyObj_pjsip_rx_data),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)PyObj_pjsip_rx_data_delete,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "PJSIP request data information", /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    PyObj_pjsip_rx_data_members,  /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    PyObj_pjsip_rx_data_new,      /* tp_new */
+
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////
 
 #endif	/* __PY_PJSUA_H__ */
Index: pjproject/trunk/pjsip-apps/src/python/pjsua.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/python/pjsua.py	(revision 4607)
+++ pjproject/trunk/pjsip-apps/src/python/pjsua.py	(revision 4609)
@@ -898,5 +898,6 @@
         cfg.srtp_secure_signaling = self.srtp_secure_signaling
 
-        cfg.rtp_transport_cfg = self.rtp_transport_cfg._cvt_to_pjsua()
+        if (self.rtp_transport_cfg is not None):
+            cfg.rtp_transport_cfg = self.rtp_transport_cfg._cvt_to_pjsua()
         
         return cfg
@@ -979,6 +980,8 @@
         """Notification about incoming call.
 
-        Unless this callback is implemented, the default behavior is to
-        reject the call with default status code.
+        Application should implement one of on_incoming_call() or
+	on_incoming_call2(), otherwise, the default behavior is to
+        reject the call with default status code. Note that if both are
+	implemented, only on_incoming_call2() will be called.
 
         Keyword arguments:
@@ -987,4 +990,18 @@
         call.hangup()
 
+    def on_incoming_call2(self, call, rdata):
+        """Notification about incoming call, with received SIP message info.
+
+        Application should implement one of on_incoming_call() or
+	on_incoming_call2(), otherwise, the default behavior is to
+        reject the call with default status code. Note that if both are
+	implemented, only on_incoming_call2() will be called.
+
+        Keyword arguments:
+        call    -- the new incoming call
+        rdata   -- the received message
+        """
+        call.hangup()
+	
     def on_incoming_subscribe(self, buddy, from_uri, contact_uri, pres_obj):
         """Notification when incoming SUBSCRIBE request is received. 
@@ -2742,5 +2759,8 @@
         acc = self._lookup_account(acc_id)
         if acc:
-            acc._cb.on_incoming_call( Call(self, call_id) )
+            if 'on_incoming_call2' in acc._cb.__class__.__dict__:
+                acc._cb.on_incoming_call2( Call(self, call_id), rdata )
+            else:
+                acc._cb.on_incoming_call( Call(self, call_id) )
         else:
             _pjsua.call_hangup(call_id, 603, None, None)
