[asterisk-commits] mmichelson: branch mmichelson/direct_media r382658 - /team/mmichelson/direct_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 7 16:26:53 CST 2013


Author: mmichelson
Date: Thu Mar  7 16:26:50 2013
New Revision: 382658

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382658
Log:
Add a bit more debugging so I can see the events.



Modified:
    team/mmichelson/direct_media/res/res_sip_session.c

Modified: team/mmichelson/direct_media/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/direct_media/res/res_sip_session.c?view=diff&rev=382658&r1=382657&r2=382658
==============================================================================
--- team/mmichelson/direct_media/res/res_sip_session.c (original)
+++ team/mmichelson/direct_media/res/res_sip_session.c Thu Mar  7 16:26:50 2013
@@ -1001,10 +1001,10 @@
 	pjsip_endpt_schedule_timer(ast_sip_get_pjsip_endpoint(), &session->rescheduled_reinvite, &tv);
 }
 
-static void print_debug_details(const char *function, pjsip_inv_session *inv, pjsip_transaction *tsx)
+static void print_debug_details(const char *function, pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_event *e)
 {
 	struct ast_sip_session *session;
-	ast_debug(3, "Function %s called\n", function);
+	ast_debug(3, "Function %s called on event %s\n", function, pjsip_event_str(e->type));
 	if (!inv) {
 		ast_debug(3, "Transaction %p does not belong to an inv_session?\n", tsx);
 		ast_debug(3, "The transaction state is %s\n", pjsip_tsx_state_str(tsx->state));
@@ -1025,6 +1025,7 @@
 	if (tsx) {
 		ast_debug(3, "The transaction involved in this state change is %p\n", tsx);
 		ast_debug(3, "The current transaction state is %s\n", pjsip_tsx_state_str(tsx->state));
+		ast_debug(3, "The transaction state change event is %s\n", pjsip_event_str(e->body.tsx_state.type));
 	} else {
 		ast_debug(3, "There is no transaction involved in this state change\n");
 	}
@@ -1140,7 +1141,7 @@
 {
 	struct ast_sip_session *session = inv->mod_data[session_module.id];
 
-	print_debug_details(__PRETTY_FUNCTION__, inv, NULL);
+	print_debug_details(__PRETTY_FUNCTION__, inv, NULL, e);
 
 	ast_debug(3, "on_state_changed callback called. Event dump to follow\n");
 	ast_debug(3, "inv state is %s, event type is %s\n", pjsip_inv_state_name(inv->state), pjsip_event_str(e->type));
@@ -1191,7 +1192,7 @@
 static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_transaction *tsx, pjsip_event *e)
 {
 	struct ast_sip_session *session = inv->mod_data[session_module.id];
-	print_debug_details(__PRETTY_FUNCTION__, inv, tsx);
+	print_debug_details(__PRETTY_FUNCTION__, inv, tsx, e);
 	if (!session) {
 		/* Transaction likely timed out after the call was hung up. Just
 		 * ignore such transaction changes




More information about the asterisk-commits mailing list