Index: pjproject/trunk/pjsip-apps/src/pjsua/main.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/pjsua/main.c	(revision 323)
+++ pjproject/trunk/pjsip-apps/src/pjsua/main.c	(revision 324)
@@ -571,5 +571,5 @@
 		if (status == PJ_SUCCESS)
 		    status = pjsip_inv_send_msg(pjsua.calls[current_call].inv,
-						tdata, NULL);
+						tdata);
 
 		if (status != PJ_SUCCESS)
Index: pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h	(revision 323)
+++ pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h	(revision 324)
@@ -187,5 +187,4 @@
  *
  * @param endpt		The endpoint instance.
- * @param app_module	Application module.
  * @param callback	Callback structure.
  *
@@ -193,5 +192,4 @@
  */
 PJ_DECL(pj_status_t) pjsip_inv_usage_init(pjsip_endpoint *endpt,
-					  pjsip_module *app_module,
 					  const pjsip_inv_callback *cb);
 
@@ -519,9 +517,4 @@
  * @param inv		The invite session.
  * @param tdata		The message to be sent.
- * @param token		The token is an arbitrary application data that 
- *			will be put in the transaction's mod_data array, 
- *			at application module's index. Application can inspect
- *			this value when the framework reports the completion
- *			of the transaction that sends this message.
  *
  * @return		PJ_SUCCESS if transaction can be initiated 
@@ -532,6 +525,5 @@
  */
 PJ_DECL(pj_status_t) pjsip_inv_send_msg(pjsip_inv_session *inv,
-					pjsip_tx_data *tdata,
-					void *token );
+					pjsip_tx_data *tdata);
 
 
@@ -559,4 +551,13 @@
 
 
+/**
+ * Get state names for INVITE session state.
+ *
+ * @param state		The invite state.
+ *
+ * @return		String describing the state.
+ */
+PJ_DECL(const char *) pjsip_inv_state_name(pjsip_inv_state state);
+
 
 PJ_END_DECL
Index: pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c	(revision 323)
+++ pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c	(revision 324)
@@ -34,4 +34,16 @@
 #define THIS_FILE	"sip_invite_session.c"
 
+static const char *inv_state_names[] =
+{
+    "NULL      ",
+    "CALLING   ",
+    "INCOMING  ",
+    "EARLY     ",
+    "CONNECTING",
+    "CONFIRMED ",
+    "DISCONNCTD",
+    "TERMINATED",
+};
+
 /*
  * Static prototypes.
@@ -67,5 +79,4 @@
     pjsip_endpoint	*endpt;
     pjsip_inv_callback	 cb;
-    pjsip_module	*app_user;
 } mod_inv = 
 {
@@ -317,5 +328,4 @@
  */
 PJ_DEF(pj_status_t) pjsip_inv_usage_init( pjsip_endpoint *endpt,
-					  pjsip_module *app_module,
 					  const pjsip_inv_callback *cb)
 {
@@ -323,5 +333,5 @@
 
     /* Check arguments. */
-    PJ_ASSERT_RETURN(endpt && app_module && cb, PJ_EINVAL);
+    PJ_ASSERT_RETURN(endpt && cb, PJ_EINVAL);
 
     /* Some callbacks are mandatory */
@@ -335,5 +345,4 @@
 
     mod_inv.endpt = endpt;
-    mod_inv.app_user = app_module;
 
     /* Register the module. */
@@ -361,4 +370,16 @@
 }
 
+
+/*
+ * Get INVITE state name.
+ */
+PJ_DEF(const char *) pjsip_inv_state_name(pjsip_inv_state state)
+{
+    PJ_ASSERT_RETURN(state >= PJSIP_INV_STATE_NULL && 
+		     state <= PJSIP_INV_STATE_DISCONNECTED,
+		     "??");
+
+    return inv_state_names[state];
+}
 
 /*
@@ -1549,6 +1570,5 @@
  */
 PJ_DEF(pj_status_t) pjsip_inv_send_msg( pjsip_inv_session *inv,
-					pjsip_tx_data *tdata,
-					void *token )
+					pjsip_tx_data *tdata)
 {
     pj_status_t status;
@@ -1572,5 +1592,4 @@
 
 	tsx->mod_data[mod_inv.mod.id] = tsx_inv_data;
-	tsx->mod_data[mod_inv.app_user->id] = token;
 
     } else {
@@ -1718,5 +1737,5 @@
 	} else {
 	    /* Re-send BYE. */
-	    status = pjsip_inv_send_msg(inv, tdata, NULL );
+	    status = pjsip_inv_send_msg(inv, tdata);
 	}
 
@@ -1852,5 +1871,5 @@
 
 		    /* Send the request. */
-		    status = pjsip_inv_send_msg(inv, tdata, NULL );
+		    status = pjsip_inv_send_msg(inv, tdata);
 		}
 
@@ -2272,5 +2291,5 @@
 		return;
 
-	    status = pjsip_inv_send_msg(inv, tdata, NULL);
+	    status = pjsip_inv_send_msg(inv, tdata);
 
 	}
@@ -2311,5 +2330,5 @@
 
 	    /* Send re-INVITE */
-	    status = pjsip_inv_send_msg( inv, tdata, NULL);
+	    status = pjsip_inv_send_msg( inv, tdata);
 
 	} else if (tsx->status_code==PJSIP_SC_CALL_TSX_DOES_NOT_EXIST ||
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 323)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 324)
@@ -191,5 +191,5 @@
     /* Send initial INVITE: */
 
-    status = pjsip_inv_send_msg(inv, tdata, NULL);
+    status = pjsip_inv_send_msg(inv, tdata);
     if (status != PJ_SUCCESS) {
 	pjsua_perror(THIS_FILE, "Unable to send initial INVITE request", 
@@ -375,5 +375,5 @@
 
     } else {
-	status = pjsip_inv_send_msg(inv, response, NULL);
+	status = pjsip_inv_send_msg(inv, response);
 	if (status != PJ_SUCCESS)
 	    pjsua_perror(THIS_FILE, "Unable to send 100 response", status);
@@ -837,5 +837,5 @@
     status = pjsip_inv_end_session(inv, st_code, NULL, &tdata);
     if (status == PJ_SUCCESS)
-	status = pjsip_inv_send_msg(inv, tdata, NULL);
+	status = pjsip_inv_send_msg(inv, tdata);
 
     if (status != PJ_SUCCESS) {
@@ -871,5 +871,5 @@
 	    inv->state != PJSIP_INV_STATE_CONFIRMED) 
 	{
-	    call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
+	    //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
 	}
 	return;
@@ -892,5 +892,5 @@
 		     "Unable to retrieve currently active local SDP", 
 		     status);
-	call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
+	//call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
 	return;
     }
@@ -902,5 +902,5 @@
 		     "Unable to retrieve currently active remote SDP", 
 		     status);
-	call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
+	//call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
 	return;
     }
@@ -920,5 +920,5 @@
 	pjsua_perror(THIS_FILE, "Unable to create media session", 
 		     status);
-	call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
+	//call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
 	return;
     }
@@ -950,5 +950,5 @@
 	pjmedia_session_destroy(call->session);
 	call->session = NULL;
-	call_disconnect(inv, PJSIP_SC_INTERNAL_SERVER_ERROR);
+	//call_disconnect(inv, PJSIP_SC_INTERNAL_SERVER_ERROR);
 	return;
     }
@@ -1080,5 +1080,5 @@
 	return;
 
-    status = pjsip_inv_send_msg(call->inv, tdata, NULL);
+    status = pjsip_inv_send_msg(call->inv, tdata);
     if (status != PJ_SUCCESS) {
 	pjsua_perror(THIS_FILE, 
@@ -1123,5 +1123,5 @@
     }
 
-    status = pjsip_inv_send_msg( call->inv, tdata, NULL);
+    status = pjsip_inv_send_msg( call->inv, tdata);
     if (status != PJ_SUCCESS) {
 	pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status);
@@ -1170,5 +1170,5 @@
     }
 
-    status = pjsip_inv_send_msg( call->inv, tdata, NULL);
+    status = pjsip_inv_send_msg( call->inv, tdata);
     if (status != PJ_SUCCESS) {
 	pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status);
@@ -1353,5 +1353,5 @@
 	if (pjsip_inv_end_session(call->inv, st_code, NULL, &tdata)==0) {
 	    if (tdata)
-		pjsip_inv_send_msg(call->inv, tdata, NULL);
+		pjsip_inv_send_msg(call->inv, tdata);
 	}
     }
@@ -1374,5 +1374,5 @@
 
     /* Initialize invite session module: */
-    status = pjsip_inv_usage_init(pjsua.endpt, &pjsua.mod, &inv_cb);
+    status = pjsip_inv_usage_init(pjsua.endpt, &inv_cb);
     
     return status;
