[svn-commits] rmudgett: trunk r347008 - in /trunk: ./ channels/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 5 11:44:19 CST 2011


Author: rmudgett
Date: Mon Dec  5 11:44:15 2011
New Revision: 347008

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=347008
Log:
Restore call progress code for analog ports.

Extracting sig_analog from chan_dahdi lost call progress detection
functionality.

* Fix analog ports from considering a call answered immediately after
dialing has completed if the callprogress option is enabled.

(closes issue ASTERISK-18841)
Reported by: Richard Miller
Patches:
      chan_dahdi.diff (license #5685) patch uploaded by Richard Miller (Modified by me)
      sig_analog.c.diff (license #5685) patch uploaded by Richard Miller (Modified by me)
      sig_analog.h.diff (license #5685) patch uploaded by Richard Miller
........

Merged revisions 347006 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 347007 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/channels/chan_dahdi.c
    trunk/channels/sig_analog.c
    trunk/channels/sig_analog.h

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=347008&r1=347007&r2=347008
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Mon Dec  5 11:44:15 2011
@@ -3615,7 +3615,18 @@
 	}
 }
 
-
+static int my_have_progressdetect(void *pvt)
+{
+	struct dahdi_pvt *p = pvt;
+
+	if ((p->callprogress & CALLPROGRESS_PROGRESS)
+		&& CANPROGRESSDETECT(p) && p->dsp && p->outgoing) {
+		return 1;
+	} else {
+		/* Don't have progress detection. */
+		return 0;
+	}
+}
 
 static struct analog_callback dahdi_analog_callbacks =
 {
@@ -3683,6 +3694,7 @@
 	.start_polarityswitch = my_start_polarityswitch,
 	.answer_polarityswitch = my_answer_polarityswitch,
 	.hangup_polarityswitch = my_hangup_polarityswitch,
+	.have_progressdetect = my_have_progressdetect,
 };
 
 /*! Round robin search locations. */

Modified: trunk/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_analog.c?view=diff&rev=347008&r1=347007&r2=347008
==============================================================================
--- trunk/channels/sig_analog.c (original)
+++ trunk/channels/sig_analog.c Mon Dec  5 11:44:15 2011
@@ -198,6 +198,15 @@
 		return p->calls->wait_event(p->chan_pvt);
 	}
 	return -1;
+}
+
+static int analog_have_progressdetect(struct analog_pvt *p)
+{
+	if (p->calls->have_progressdetect) {
+		return p->calls->have_progressdetect(p->chan_pvt);
+	}
+	/* Don't have progress detection. */
+	return 0;
 }
 
 enum analog_cid_start analog_str_to_cidstart(const char *value)
@@ -2744,7 +2753,9 @@
 					}
 				}
 				if (ast->_state == AST_STATE_DIALING) {
-					if (analog_check_confirmanswer(p) || (!p->dialednone
+					if (analog_have_progressdetect(p)) {
+						ast_debug(1, "Done dialing, but waiting for progress detection before doing more...\n");
+					} else if (analog_check_confirmanswer(p) || (!p->dialednone
 						&& ((mysig == ANALOG_SIG_EM) || (mysig == ANALOG_SIG_EM_E1)
 							|| (mysig == ANALOG_SIG_EMWINK) || (mysig == ANALOG_SIG_FEATD)
 							|| (mysig == ANALOG_SIG_FEATDMF_TA) || (mysig == ANALOG_SIG_FEATDMF)

Modified: trunk/channels/sig_analog.h
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_analog.h?view=diff&rev=347008&r1=347007&r2=347008
==============================================================================
--- trunk/channels/sig_analog.h (original)
+++ trunk/channels/sig_analog.h Mon Dec  5 11:44:15 2011
@@ -235,6 +235,7 @@
 	void (* const set_new_owner)(void *pvt, struct ast_channel *new_owner);
 
 	const char *(* const get_orig_dialstring)(void *pvt);
+	int (* const have_progressdetect)(void *pvt);
 };
 
 




More information about the svn-commits mailing list