Subject: Adds a parameter 'dialdebounce' to wctdm.
Author: Tilghman Lesher <tlesher@digium.com>
Bug: https://issues.asterisk.org/view.php?id=16339
Bug-Debian: http://bugs.debian.org/546329
Last-Update: 2009-12-19

For UK rotary phones, set dialdebounce=32 . E.g. in
/etc/modprobe.d/dahdi.conf add the line:

  options wctdm dialdebounce=32

--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -284,6 +284,7 @@ static unsigned int battdebounce;
 static unsigned int battalarm;
 static unsigned int battthresh;
 static int ringdebounce = DEFAULT_RING_DEBOUNCE;
+static int dialdebounce = 8 * 8 /* times 4, because must be a multiple of 4ms */;
 static int fwringdetect = 0;
 static int debug = 0;
 static int robust = 0;
@@ -1002,7 +1003,7 @@ static inline void wctdm_proslic_check_h
 	hook = (res & 1);
 	if (hook != fxs->lastrxhook) {
 		/* Reset the debounce (must be multiple of 4ms) */
-		fxs->debounce = 8 * (4 * 8);
+		fxs->debounce = dialdebounce * 4;
 #if 0
 		printk(KERN_DEBUG "Resetting debounce card %d hook %d, %d\n",
 		       card, hook, fxs->debounce);
@@ -2641,6 +2642,7 @@ module_param(battdebounce, uint, 0600);
 module_param(battalarm, uint, 0600);
 module_param(battthresh, uint, 0600);
 module_param(ringdebounce, int, 0600);
+module_param(dialdebounce, int, 0600);
 module_param(fwringdetect, int, 0600);
 module_param(alawoverride, int, 0600);
 module_param(fastpickup, int, 0600);
