[Asterisk-cvs] asterisk/apps app_rpt.c,1.12,1.13

jim at lists.digium.com jim at lists.digium.com
Sat Jun 26 15:43:02 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv19229/apps

Modified Files:
	app_rpt.c 
Log Message:
Fixed autopatch so that it would take digits from link peer.


Index: app_rpt.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_rpt.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- app_rpt.c	26 Jun 2004 19:08:57 -0000	1.12
+++ app_rpt.c	26 Jun 2004 19:28:55 -0000	1.13
@@ -3,7 +3,7 @@
  * Asterisk -- A telephony toolkit for Linux.
  *
  * Radio Repeater / Remote Base program 
- *  version 0.9 6/26/04
+ *  version 0.10 6/26/04
  * 
  * Copyright (C) 2002-2004, Jim Dixon, WB6NIL
  *
@@ -110,7 +110,7 @@
 #include <tonezone.h>
 #include <linux/zaptel.h>
 
-static  char *tdesc = "Radio Repeater / Remote Base  version 0.9  06/26/2004";
+static  char *tdesc = "Radio Repeater / Remote Base  version 0.10  06/26/2004";
 static char *app = "Rpt";
 
 static char *synopsis = "Radio Repeater/Remote Base Control System";
@@ -1104,8 +1104,6 @@
 struct rpt_link *l;
 struct	ast_frame wf;
 
-	/* if we are a remote, we dont want to do this */
-	if (myrpt->remote) return;
 	wf.frametype = AST_FRAME_TEXT;
 	wf.subclass = 0;
 	wf.offset = 0;
@@ -1169,6 +1167,27 @@
 		return;
 	}
 	ast_mutex_lock(&myrpt->lock);
+	if (myrpt->callmode == 1)
+	{
+		myrpt->exten[myrpt->cidx++] = c;
+		myrpt->exten[myrpt->cidx] = 0;
+		/* if this exists */
+		if (ast_exists_extension(myrpt->pchannel,myrpt->ourcontext,myrpt->exten,1,NULL))
+		{
+			myrpt->callmode = 2;
+			rpt_telemetry(myrpt,PROC,NULL);
+		}
+		/* if can continue, do so */
+		if (!ast_canmatch_extension(myrpt->pchannel,myrpt->ourcontext,myrpt->exten,1,NULL)) 
+		{
+			/* call has failed, inform user */
+			myrpt->callmode = 4;
+		}
+	}
+	if ((myrpt->callmode == 2) || (myrpt->callmode == 3))
+	{
+		myrpt->mydtmf = c;
+	}
 	if (c == '*')
 	{
 		myrpt->rem_dtmfidx = 0;




More information about the svn-commits mailing list