[Asterisk-Dev] Re: [aidan@ifax.com: Re: E&M Wink problems]

Aidan Van Dyk aidan at ifax.com
Thu Feb 3 13:39:23 MST 2005


* Aidan Van Dyk <aidan at ifax.com> [050203 15:22]:
> Any chance on this patch being pushed to v1.0 branch?  I've attached a
> copy of it agains cvs 1.0 branch.
> 
> It just removes the hardcoded 250 ms value and replaces it with a
> configurable emdigitwait.
> 
> This is already in CVS head.

Sorry - missed part of the patch pulling it apart... Attached is one
which has been applied and compiled on a clean checkout of 1.0 branch.

a.
-- 
Aidan Van Dyk                                             aidan at ifax.com
Senior Software Developer                          +1 215 438-4638 x8103
iFAX Solutions, Inc.                                http://www.ifax.com/
-------------- next part --------------
===== channels/chan_zap.c 1.356 vs edited =====
--- 1.356/channels/chan_zap.c	2005-01-29 03:43:59 -05:00
+++ edited/channels/chan_zap.c	2005-02-03 15:29:23 -05:00
@@ -155,6 +155,8 @@ static char *config = "zapata.conf";
 
 #define zt_close(fd) if(fd > 0) close(fd);
 
+static int cur_emdigitwait = 250; /* Wait time in ms for digits on EM channel */
+
 static char context[AST_MAX_EXTENSION] = "default";
 static char callerid[256] = "";
 
@@ -546,6 +548,7 @@ static struct zt_pvt {
 	int dtmfrelax;		/* whether to run in relaxed DTMF mode */
 	int fake_event;
 	int zaptrcallerid;	/* should we use the callerid from incoming call on zap transfer or not */
+	int emdigitwait;
 	int sendcalleridafter;
 #ifdef ZAPATA_PRI
 	struct zt_pri *pri;
@@ -4715,7 +4718,7 @@ static void *ss_thread(void *data)
 				break;
 			    default:
 				/* If we got it, get the rest */
-				res = my_getsigstr(chan,dtmfbuf + 1,' ',250);
+				res = my_getsigstr(chan,dtmfbuf + 1,' ', p->emdigitwait);
 				break;
 			}
 		}
@@ -6473,6 +6476,7 @@ static struct zt_pvt *mkintf(int channel
 		tmp->restrictcid = restrictcid;
 		tmp->use_callingpres = use_callingpres;
 		tmp->priindication_oob = priindication_oob;
+		tmp->emdigitwait = cur_emdigitwait;
 		if (tmp->usedistinctiveringdetection) {
 			if (!tmp->use_callerid) {
 				ast_log(LOG_NOTICE, "Distinctive Ring detect requires 'usecallerid' be on\n");
===== configs/zapata.conf.sample 1.32 vs edited =====
--- 1.32/configs/zapata.conf.sample	2005-01-06 15:05:22 -05:00
+++ edited/configs/zapata.conf.sample	2005-02-03 15:17:15 -05:00
@@ -138,6 +138,8 @@ signalling=fxo_ls
 ;    rxwink:      Receiver wink time (default 300ms)
 ;    rxflash:     Receiver flashtime (default 1250ms)
 ;    debounce:    Debounce timing (default 600ms)
+;    emdigitwait: Time to wait for DID digits on E&M links (default 250ms) (Increase to 500
+;		  or so if you are not getting all DID digits on your E&M link)
 ;
 rxwink=300		; Atlas seems to use long (250ms) winks
 ;


More information about the asterisk-dev mailing list