[asterisk-commits] rmudgett: branch rmudgett/bch_shift_v1.8 r311610 - /team/rmudgett/bch_shift_v...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 23 15:10:35 CDT 2011


Author: rmudgett
Date: Wed Mar 23 15:10:31 2011
New Revision: 311610

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311610
Log:
Make RESTART request not destroy call and update hangup/restart verbose messages.

Modified:
    team/rmudgett/bch_shift_v1.8/channels/sig_pri.c

Modified: team/rmudgett/bch_shift_v1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.8/channels/sig_pri.c?view=diff&rev=311610&r1=311609&r2=311610
==============================================================================
--- team/rmudgett/bch_shift_v1.8/channels/sig_pri.c (original)
+++ team/rmudgett/bch_shift_v1.8/channels/sig_pri.c Wed Mar 23 15:10:31 2011
@@ -5719,8 +5719,9 @@
 						pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
 						pri->pvts[chanpos]->call = NULL;
 					}
-					ast_verb(3, "Channel %d/%d, span %d got hangup, cause %d\n",
-						pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, e->hangup.cause);
+					ast_verb(3, "Span %d: Channel %d/%d got hangup, cause %d\n",
+						pri->span, pri->pvts[chanpos]->logicalspan,
+						pri->pvts[chanpos]->prioffset, e->hangup.cause);
 				} else {
 					/* Continue hanging up the call. */
 					pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause);
@@ -5732,14 +5733,10 @@
 					&& !pri->pvts[chanpos]->resetting) {
 					ast_verb(3,
 						"Span %d: Forcing restart of channel %d/%d since channel reported in use\n",
-						pri->span, PRI_SPAN(e->hangup.channel),
-						PRI_CHANNEL(e->hangup.channel));
+						pri->span, pri->pvts[chanpos]->logicalspan,
+						pri->pvts[chanpos]->prioffset);
 					pri->pvts[chanpos]->resetting = 1;
 					pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[chanpos]));
-					if (pri->pvts[chanpos]->call) {
-						pri_destroycall(pri->pri, pri->pvts[chanpos]->call);
-						pri->pvts[chanpos]->call = NULL;
-					}
 				}
 #endif	/* defined(FORCE_RESTART_UNAVAIL_CHANS) */
 				if (e->hangup.aoc_units > -1)
@@ -5857,8 +5854,9 @@
 						pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
 #endif	/* defined(HAVE_PRI_AOC_EVENTS) */
 					}
-					ast_verb(3, "Channel %d/%d, span %d got hangup request, cause %d\n",
-						PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span, e->hangup.cause);
+					ast_verb(3, "Span %d: Channel %d/%d got hangup request, cause %d\n",
+						pri->span, pri->pvts[chanpos]->logicalspan,
+						pri->pvts[chanpos]->prioffset, e->hangup.cause);
 				} else {
 					/*
 					 * Continue hanging up the call even though
@@ -5873,14 +5871,10 @@
 					&& !pri->pvts[chanpos]->resetting) {
 					ast_verb(3,
 						"Span %d: Forcing restart of channel %d/%d since channel reported in use\n",
-						pri->span, PRI_SPAN(e->hangup.channel),
-						PRI_CHANNEL(e->hangup.channel));
+						pri->span, pri->pvts[chanpos]->logicalspan,
+						pri->pvts[chanpos]->prioffset);
 					pri->pvts[chanpos]->resetting = 1;
 					pri_reset(pri->pri, PVT_TO_CHANNEL(pri->pvts[chanpos]));
-					if (pri->pvts[chanpos]->call) {
-						pri_destroycall(pri->pri, pri->pvts[chanpos]->call);
-						pri->pvts[chanpos]->call = NULL;
-					}
 				}
 #endif	/* defined(FORCE_RESTART_UNAVAIL_CHANS) */
 
@@ -5914,7 +5908,8 @@
 				sig_pri_lock_private(pri->pvts[chanpos]);
 				pri->pvts[chanpos]->call = NULL;
 				if (pri->pvts[chanpos]->owner) {
-					ast_verb(3, "Channel %d/%d, span %d got hangup ACK\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
+					ast_verb(3, "Span %d: Channel %d/%d got hangup ACK\n", pri->span,
+						pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset);
 				}
 #ifdef SUPPORT_USERUSER
 				if (!ast_strlen_zero(e->hangup.useruserinfo)) {




More information about the asterisk-commits mailing list