[asterisk-commits] rmudgett: branch rmudgett/call_waiting r252972 - /team/rmudgett/call_waiting/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 16 17:39:48 CDT 2010


Author: rmudgett
Date: Tue Mar 16 17:39:43 2010
New Revision: 252972

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=252972
Log:
The caller hears a burst of noise when a call waiting call is answered and connects.

1) The dialing, digital, and outgoing flags need to be transferred when 
ISDN B channels are switched.  (The noise burst was not heard on trunk 
level code because the dialing flag was not transferred when B channels 
were switched.) 

2) The dialing flag is used as a receive squelch for ISDN calls until 
connected.  Do not clear the dialing flag until the call is connected or a 
progress indication ie indicates inband information is available.  (The 
noise burst was heard on C.3 level code because the dialing flag was 
cleared when the PROCEEDING message came in.) 

Modified:
    team/rmudgett/call_waiting/channels/chan_dahdi.c
    team/rmudgett/call_waiting/channels/sig_pri.c

Modified: team/rmudgett/call_waiting/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/chan_dahdi.c?view=diff&rev=252972&r1=252971&r2=252972
==============================================================================
--- team/rmudgett/call_waiting/channels/chan_dahdi.c (original)
+++ team/rmudgett/call_waiting/channels/chan_dahdi.c Tue Mar 16 17:39:43 2010
@@ -799,7 +799,10 @@
 	unsigned int didtdd:1;				/*!< flag to say its done it once */
 	/*! \brief TRUE if analog type line dialed no digits in Dial() */
 	unsigned int dialednone:1;
-	/*! \brief TRUE if in the process of dialing digits or sending something. */
+	/*!
+	 * \brief TRUE if in the process of dialing digits or sending something.
+	 * \note This is used as a receive squelch for ISDN until connected.
+	 */
 	unsigned int dialing:1;
 	/*! \brief TRUE if the transfer capability of the call is digital. */
 	unsigned int digital:1;
@@ -2721,6 +2724,14 @@
 	new_chan->dsp_features = old_chan->dsp_features;
 	old_chan->dsp = NULL;
 	old_chan->dsp_features = 0;
+
+	/* Transfer flags from the old channel. */
+	new_chan->dialing = old_chan->dialing;
+	new_chan->digital = old_chan->digital;
+	new_chan->outgoing = old_chan->outgoing;
+	old_chan->dialing = 0;
+	old_chan->digital = 0;
+	old_chan->outgoing = 0;
 }
 
 static int sig_pri_tone_to_dahditone(enum sig_pri_tone tone)

Modified: team/rmudgett/call_waiting/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/call_waiting/channels/sig_pri.c?view=diff&rev=252972&r1=252971&r2=252972
==============================================================================
--- team/rmudgett/call_waiting/channels/sig_pri.c (original)
+++ team/rmudgett/call_waiting/channels/sig_pri.c Tue Mar 16 17:39:43 2010
@@ -3562,28 +3562,30 @@
 				}
 				chanpos = pri_find_principle(pri, e->proceeding.channel, e->proceeding.call);
 				if (chanpos > -1) {
+					struct ast_frame f = { AST_FRAME_CONTROL, };
+
 					sig_pri_lock_private(pri->pvts[chanpos]);
 					sig_pri_handle_subcmds(pri, chanpos, e->e, e->proceeding.channel,
 						e->proceeding.subcmds, e->proceeding.call);
 					if (!pri->pvts[chanpos]->proceeding) {
-						struct ast_frame f = { AST_FRAME_CONTROL, .subclass.integer = AST_CONTROL_PROCEEDING, };
-
 						ast_debug(1, "Queuing frame from PRI_EVENT_PROCEEDING on channel %d/%d span %d\n",
 							pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset,pri->span);
+						f.subclass.integer = AST_CONTROL_PROCEEDING;
 						pri_queue_frame(pri->pvts[chanpos], &f, pri);
-						if (!pri->pvts[chanpos]->no_b_channel
+						pri->pvts[chanpos]->proceeding = 1;
+					}
+					if (!pri->pvts[chanpos]->progress
+						&& !pri->pvts[chanpos]->no_b_channel
 #ifdef PRI_PROGRESS_MASK
-							&& (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)
+						&& (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)
 #else
-							&& e->proceeding.progress == 8
+						&& e->proceeding.progress == 8
 #endif
-							) {
-							/* Bring voice path up */
-							f.subclass.integer = AST_CONTROL_PROGRESS;
-							pri_queue_frame(pri->pvts[chanpos], &f, pri);
-							pri->pvts[chanpos]->progress = 1;
-						}
-						pri->pvts[chanpos]->proceeding = 1;
+						) {
+						/* Bring voice path up */
+						f.subclass.integer = AST_CONTROL_PROGRESS;
+						pri_queue_frame(pri->pvts[chanpos], &f, pri);
+						pri->pvts[chanpos]->progress = 1;
 						sig_pri_set_dialing(pri->pvts[chanpos], 0);
 					}
 					sig_pri_unlock_private(pri->pvts[chanpos]);
@@ -4768,13 +4770,15 @@
 				if (!pri_grab(p, p->pri)) {
 					pri_proceeding(p->pri->pri,p->call, PVT_TO_CHANNEL(p),
 						p->no_b_channel || p->digital ? 0 : 1);
+					p->proceeding = 1;
+					if (!p->no_b_channel && !p->digital) {
+						sig_pri_set_dialing(p, 0);
+					}
 					pri_rel(p->pri);
 				} else {
 					ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->pri->span);
 				}
 			}
-			p->proceeding = 1;
-			sig_pri_set_dialing(p, 0);
 		}
 		/* don't continue in ast_indicate */
 		res = 0;




More information about the asterisk-commits mailing list