[svn-commits] bbryant: branch bbryant/iax2_rotation r117181 - in /team/bbryant/iax2_rotatio...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon May 19 14:56:51 CDT 2008


Author: bbryant
Date: Mon May 19 14:56:50 2008
New Revision: 117181

URL: http://svn.digium.com/view/asterisk?view=rev&rev=117181
Log:
Merge my developer branch. 

Added:
    team/bbryant/iax2_rotation/contrib/scripts/install_prereq
      - copied unchanged from r117053, trunk/contrib/scripts/install_prereq
Modified:
    team/bbryant/iax2_rotation/   (props changed)
    team/bbryant/iax2_rotation/CHANGES
    team/bbryant/iax2_rotation/CREDITS
    team/bbryant/iax2_rotation/UPGRADE.txt
    team/bbryant/iax2_rotation/apps/app_chanspy.c
    team/bbryant/iax2_rotation/apps/app_externalivr.c
    team/bbryant/iax2_rotation/apps/app_jack.c
    team/bbryant/iax2_rotation/apps/app_queue.c
    team/bbryant/iax2_rotation/apps/app_rpt.c
    team/bbryant/iax2_rotation/apps/app_skel.c
    team/bbryant/iax2_rotation/apps/app_voicemail.c
    team/bbryant/iax2_rotation/apps/app_waituntil.c
    team/bbryant/iax2_rotation/cdr/cdr_csv.c
    team/bbryant/iax2_rotation/channels/Makefile
    team/bbryant/iax2_rotation/channels/chan_agent.c
    team/bbryant/iax2_rotation/channels/chan_alsa.c
    team/bbryant/iax2_rotation/channels/chan_iax2.c
    team/bbryant/iax2_rotation/channels/chan_local.c
    team/bbryant/iax2_rotation/channels/chan_sip.c
    team/bbryant/iax2_rotation/channels/chan_skinny.c
    team/bbryant/iax2_rotation/channels/chan_usbradio.c
    team/bbryant/iax2_rotation/channels/chan_zap.c
    team/bbryant/iax2_rotation/channels/console_gui.c
    team/bbryant/iax2_rotation/channels/console_video.c
    team/bbryant/iax2_rotation/channels/iax2-parser.h
    team/bbryant/iax2_rotation/channels/xpmr/sinetabx.h
    team/bbryant/iax2_rotation/channels/xpmr/xpmr.c
    team/bbryant/iax2_rotation/channels/xpmr/xpmr.h
    team/bbryant/iax2_rotation/channels/xpmr/xpmr_coef.h
    team/bbryant/iax2_rotation/configs/oss.conf.sample
    team/bbryant/iax2_rotation/configs/voicemail.conf.sample
    team/bbryant/iax2_rotation/doc/tex/channelvariables.tex
    team/bbryant/iax2_rotation/funcs/func_speex.c
    team/bbryant/iax2_rotation/funcs/func_timeout.c
    team/bbryant/iax2_rotation/include/asterisk/channel.h
    team/bbryant/iax2_rotation/include/asterisk/frame.h
    team/bbryant/iax2_rotation/include/asterisk/lock.h
    team/bbryant/iax2_rotation/include/asterisk/rtp.h
    team/bbryant/iax2_rotation/include/asterisk/strings.h
    team/bbryant/iax2_rotation/include/asterisk/utils.h
    team/bbryant/iax2_rotation/main/Makefile
    team/bbryant/iax2_rotation/main/abstract_jb.c
    team/bbryant/iax2_rotation/main/asterisk.c
    team/bbryant/iax2_rotation/main/autoservice.c
    team/bbryant/iax2_rotation/main/channel.c
    team/bbryant/iax2_rotation/main/features.c
    team/bbryant/iax2_rotation/main/frame.c
    team/bbryant/iax2_rotation/main/manager.c
    team/bbryant/iax2_rotation/main/pbx.c
    team/bbryant/iax2_rotation/main/rtp.c
    team/bbryant/iax2_rotation/main/sched.c
    team/bbryant/iax2_rotation/main/taskprocessor.c
    team/bbryant/iax2_rotation/main/udptl.c
    team/bbryant/iax2_rotation/main/utils.c
    team/bbryant/iax2_rotation/pbx/pbx_spool.c
    team/bbryant/iax2_rotation/res/res_agi.c
    team/bbryant/iax2_rotation/res/res_config_ldap.c
    team/bbryant/iax2_rotation/res/res_smdi.c
    team/bbryant/iax2_rotation/sample.call
    team/bbryant/iax2_rotation/utils/astcanary.c

Propchange: team/bbryant/iax2_rotation/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: team/bbryant/iax2_rotation/CHANGES
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/CHANGES?view=diff&rev=117181&r1=117180&r2=117181
==============================================================================
--- team/bbryant/iax2_rotation/CHANGES (original)
+++ team/bbryant/iax2_rotation/CHANGES Mon May 19 14:56:50 2008
@@ -59,6 +59,11 @@
    to be spoken instead of the channel name or number. For more information on the
    use of this option, issue the command "core show application ChanSpy" from the 
    Asterisk CLI.
+ * Chanspy has a new option, 'd', which allows the spy to use DTMF to swap between
+   spy modes. Use of this feature overrides the typical use of numeric DTMF. In other
+   words, if using the 'd' option, it is not possible to enter a number to append to
+   the first argument to Chanspy(). Pressing 4 will change to spy mode, pressing 5 will
+   change to whisper mode, and pressing 6 will change to barge mode.
 
 SIP Changes
 -----------
@@ -77,6 +82,8 @@
    testing and problem reporting!
  * Added ability to specify registration expiry time on a per registration basis in
    the register line.
+ * Added support for T140 RED - redundancy in T.140 to prevent text loss due to
+   lost packets.
 
 IAX Changes
 -----------
@@ -166,6 +173,7 @@
   * Originate now requires the Originate privilege and, if you want to call out
     to a subshell, it requires the System privilege, as well.  This was done to
     enhance manager security.
+  * Originate now accepts codec settings with "Codecs: alaw, ulaw, h264" 
   * New command: Atxfer. See doc/manager_1_1.txt for more details or 
     manager show command Atxfer from the CLI
 

Modified: team/bbryant/iax2_rotation/CREDITS
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/CREDITS?view=diff&rev=117181&r1=117180&r2=117181
==============================================================================
--- team/bbryant/iax2_rotation/CREDITS (original)
+++ team/bbryant/iax2_rotation/CREDITS Mon May 19 14:56:50 2008
@@ -19,6 +19,9 @@
 
 John Todd, TalkPlus, Inc.  and JR Richardson, Ntegrated Solutions. - for funding
     the development of SIP Session Timers support.
+
+Omnitor AB, Gunnar Hellström, for funding work with videocaps, T.140 RED,
+originate with video/text and many more contributions.
 
 === WISHLIST CONTRIBUTERS ===
 Jeremy McNamara - SpeeX support

Modified: team/bbryant/iax2_rotation/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/UPGRADE.txt?view=diff&rev=117181&r1=117180&r2=117181
==============================================================================
--- team/bbryant/iax2_rotation/UPGRADE.txt (original)
+++ team/bbryant/iax2_rotation/UPGRADE.txt Mon May 19 14:56:50 2008
@@ -75,7 +75,7 @@
   Examples of situations that would require this option are web interfaces to
   voicemail or an email client in the case of using IMAP storage.
 * The externnotify script should accept an additional (last) parameter
-  containing the string "URGENT" if there are new urgent messages in the INBOX.
+  containing the number of urgent messages in the INBOX.
 
 Applications:
 

Modified: team/bbryant/iax2_rotation/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/apps/app_chanspy.c?view=diff&rev=117181&r1=117180&r2=117181
==============================================================================
--- team/bbryant/iax2_rotation/apps/app_chanspy.c (original)
+++ team/bbryant/iax2_rotation/apps/app_chanspy.c Mon May 19 14:56:50 2008
@@ -64,7 +64,8 @@
 "    - Dialing a series of digits followed by # builds a channel name to append\n"
 "      to 'chanprefix'. For example, executing ChanSpy(Agent) and then dialing\n"
 "      the digits '1234#' while spying will begin spying on the channel\n"
-"      'Agent/1234'.\n"
+"      'Agent/1234'. Note that this feature will be overriden if the 'd' option\n"
+"       is used\n"
 "  Note: The X option supersedes the three features above in that if a valid\n"
 "        single digit extension exists in the correct context ChanSpy will\n"
 "        exit to it. This also disables choosing a channel based on 'chanprefix'\n"
@@ -73,6 +74,11 @@
 "    b                      - Only spy on channels involved in a bridged call.\n"
 "    B                      - Instead of whispering on a single channel barge in on both\n"
 "                             channels involved in the call.\n"
+"    d                      - Override the typical numeric DTMF functionality and instead\n"
+"                             use DTMF to switch between spy modes.\n"
+"                                     4 = spy mode\n"
+"                                     5 = whisper mode\n"
+"                                     6 = barge mode\n"
 "    g(grp)                 - Only spy on channels in which one or more of the groups \n"
 "                             listed in 'grp' matches one or more groups from the\n"
 "                             SPYGROUP variable set on the channel to be spied upon.\n"
@@ -126,6 +132,13 @@
 "        exit to it.\n"
 "  Options:\n"
 "    b                      - Only spy on channels involved in a bridged call.\n"
+"    B                      - Instead of whispering on a single channel barge in on both\n"
+"                             channels involved in the call.\n"
+"    d                      - Override the typical numeric DTMF functionality and instead\n"
+"                             use DTMF to switch between spy modes.\n"
+"                                     4 = spy mode\n"
+"                                     5 = whisper mode\n"
+"                                     6 = barge mode\n"
 "    g(grp)                 - Only spy on channels in which one or more of the groups \n"
 "                             listed in 'grp' matches one or more groups from the\n"
 "                             SPYGROUP variable set on the channel to be spied upon.\n"
@@ -162,19 +175,20 @@
 ;
 
 enum {
-	OPTION_QUIET     = (1 << 0),    /* Quiet, no announcement */
-	OPTION_BRIDGED   = (1 << 1),    /* Only look at bridged calls */
-	OPTION_VOLUME    = (1 << 2),    /* Specify initial volume */
-	OPTION_GROUP     = (1 << 3),    /* Only look at channels in group */
-	OPTION_RECORD    = (1 << 4),
-	OPTION_WHISPER   = (1 << 5),
-	OPTION_PRIVATE   = (1 << 6),    /* Private Whisper mode */
-	OPTION_READONLY  = (1 << 7),    /* Don't mix the two channels */
-	OPTION_EXIT      = (1 << 8),    /* Exit to a valid single digit extension */
-	OPTION_ENFORCED  = (1 << 9),    /* Enforced mode */
-	OPTION_NOTECH    = (1 << 10),   /* Skip technology name playback */
-	OPTION_BARGE     = (1 << 11),   /* Barge mode (whisper to both channels) */
-	OPTION_NAME      = (1 << 12),   /* Say the name of the person on whom we will spy */
+	OPTION_QUIET             = (1 << 0),    /* Quiet, no announcement */
+	OPTION_BRIDGED           = (1 << 1),    /* Only look at bridged calls */
+	OPTION_VOLUME            = (1 << 2),    /* Specify initial volume */
+	OPTION_GROUP             = (1 << 3),    /* Only look at channels in group */
+	OPTION_RECORD            = (1 << 4),
+	OPTION_WHISPER           = (1 << 5),
+	OPTION_PRIVATE           = (1 << 6),    /* Private Whisper mode */
+	OPTION_READONLY          = (1 << 7),    /* Don't mix the two channels */
+	OPTION_EXIT              = (1 << 8),    /* Exit to a valid single digit extension */
+	OPTION_ENFORCED          = (1 << 9),    /* Enforced mode */
+	OPTION_NOTECH            = (1 << 10),   /* Skip technology name playback */
+	OPTION_BARGE             = (1 << 11),   /* Barge mode (whisper to both channels) */
+	OPTION_NAME              = (1 << 12),   /* Say the name of the person on whom we will spy */
+	OPTION_DTMF_SWITCH_MODES = (1 << 13),   /*Allow numeric DTMF to switch between chanspy modes */
 } chanspy_opt_flags;
 
 enum {
@@ -200,6 +214,7 @@
 	AST_APP_OPTION('X', OPTION_EXIT),
 	AST_APP_OPTION('s', OPTION_NOTECH),
 	AST_APP_OPTION_ARG('n', OPTION_NAME, OPT_ARG_NAME),
+	AST_APP_OPTION('d', OPTION_DTMF_SWITCH_MODES),
 });
 
 
@@ -281,8 +296,22 @@
 	ast_mutex_t lock;
 };
 
+static void change_spy_mode(const char digit, struct ast_flags *flags)
+{
+	if (digit == '4') {
+		ast_clear_flag(flags, OPTION_WHISPER);
+		ast_clear_flag(flags, OPTION_BARGE);
+	} else if (digit == '5') {
+		ast_clear_flag(flags, OPTION_BARGE);
+		ast_set_flag(flags, OPTION_WHISPER);
+	} else if (digit == '6') {
+		ast_clear_flag(flags, OPTION_WHISPER);
+		ast_set_flag(flags, OPTION_BARGE);
+	}
+}
+
 static int channel_spy(struct ast_channel *chan, struct chanspy_ds *spyee_chanspy_ds, 
-	int *volfactor, int fd, const struct ast_flags *flags, char *exitcontext) 
+	int *volfactor, int fd, struct ast_flags *flags, char *exitcontext) 
 {
 	struct chanspy_translation_helper csth;
 	int running = 0, res, x = 0;
@@ -327,15 +356,14 @@
 		return 0;
 	}
 
-	if (ast_test_flag(flags, OPTION_BARGE)) {
-  		ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
-		ast_audiohook_init(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "Chanspy");
-  		start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
-		start_spying(ast_bridged_channel(spyee), spyer_name, &csth.bridge_whisper_audiohook);
-	} else if (ast_test_flag(flags, OPTION_WHISPER)) {
-		ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
-		start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
-  	}
+	ast_channel_lock(chan);
+	ast_set_flag(chan, AST_FLAG_END_DTMF_ONLY);
+	ast_channel_unlock(chan);
+
+ 	ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
+	ast_audiohook_init(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "Chanspy");
+  	start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
+	start_spying(ast_bridged_channel(spyee), spyer_name, &csth.bridge_whisper_audiohook);
 
 	ast_channel_unlock(spyee);
 	spyee = NULL;
@@ -417,7 +445,11 @@
 				ast_debug(2, "Exit by single digit did not work in chanspy. Extension %s does not exist in context %s\n", tmp, exitcontext);
 			}
 		} else if (res >= '0' && res <= '9') {
-			inp[x++] = res;
+			if (ast_test_flag(flags, OPTION_DTMF_SWITCH_MODES)) {
+				change_spy_mode(res, flags);
+			} else {
+				inp[x++] = res;
+			}
 		}
 
 		if (res == '*') {
@@ -445,21 +477,18 @@
 	else
 		ast_deactivate_generator(chan);
 
-	if (ast_test_flag(flags, OPTION_BARGE)) {
-		ast_audiohook_lock(&csth.whisper_audiohook);
-		ast_audiohook_detach(&csth.whisper_audiohook);
-		ast_audiohook_unlock(&csth.whisper_audiohook);
-		ast_audiohook_destroy(&csth.whisper_audiohook);
-		ast_audiohook_lock(&csth.bridge_whisper_audiohook);
-		ast_audiohook_detach(&csth.bridge_whisper_audiohook);
-		ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
-		ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
-	} else if (ast_test_flag(flags, OPTION_WHISPER)) {
-		ast_audiohook_lock(&csth.whisper_audiohook);
-		ast_audiohook_detach(&csth.whisper_audiohook);
-		ast_audiohook_unlock(&csth.whisper_audiohook);
-		ast_audiohook_destroy(&csth.whisper_audiohook);
-	}
+	ast_channel_lock(chan);
+	ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
+	ast_channel_unlock(chan);
+
+	ast_audiohook_lock(&csth.whisper_audiohook);
+	ast_audiohook_detach(&csth.whisper_audiohook);
+	ast_audiohook_unlock(&csth.whisper_audiohook);
+	ast_audiohook_destroy(&csth.whisper_audiohook);
+	ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+	ast_audiohook_detach(&csth.bridge_whisper_audiohook);
+	ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+	ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
 
 	ast_audiohook_lock(&csth.spy_audiohook);
 	ast_audiohook_detach(&csth.spy_audiohook);
@@ -580,7 +609,7 @@
 	return setup_chanspy_ds(next, chanspy_ds);
 }
 
-static int common_exec(struct ast_channel *chan, const struct ast_flags *flags,
+static int common_exec(struct ast_channel *chan, struct ast_flags *flags,
 	int volfactor, const int fd, const char *mygroup, const char *myenforced,
 	const char *spec, const char *exten, const char *context, const char *mailbox,
 	const char *name_context)

Modified: team/bbryant/iax2_rotation/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/apps/app_externalivr.c?view=diff&rev=117181&r1=117180&r2=117181
==============================================================================
--- team/bbryant/iax2_rotation/apps/app_externalivr.c (original)
+++ team/bbryant/iax2_rotation/apps/app_externalivr.c Mon May 19 14:56:50 2008
@@ -481,6 +481,7 @@
  	struct ast_channel *rchan;
  	char *command;
  	int res = -1;
+	int test_available_fd = -1;
   
  	FILE *eivr_commands = NULL;
  	FILE *eivr_errors = NULL;
@@ -500,6 +501,8 @@
  			goto exit;
  		}
 	}
+
+	test_available_fd = open("/dev/null", O_RDONLY);
  
  	setvbuf(eivr_events, NULL, _IONBF, 0);
  	setvbuf(eivr_commands, NULL, _IONBF, 0);
@@ -574,7 +577,7 @@
  		} else if (ready_fd == eivr_commands_fd) {
  			char input[1024];
  
- 			if (exception || feof(eivr_commands)) {
+ 			if (exception || (dup2(eivr_commands_fd, test_available_fd) == -1) || feof(eivr_commands)) {
  				ast_chan_log(LOG_WARNING, chan, "Child process went away\n");
  				res = -1;
   				break;
@@ -685,6 +688,10 @@
  
 exit:
  
+	if (test_available_fd > -1) {
+		close(test_available_fd);
+	}
+
 	if (eivr_events)
  		fclose(eivr_events);
  

Modified: team/bbryant/iax2_rotation/apps/app_jack.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/apps/app_jack.c?view=diff&rev=117181&r1=117180&r2=117181
==============================================================================
--- team/bbryant/iax2_rotation/apps/app_jack.c (original)
+++ team/bbryant/iax2_rotation/apps/app_jack.c Mon May 19 14:56:50 2008
@@ -977,12 +977,16 @@
 
 static int load_module(void)
 {
-	int res = 0;
-
-	res |= ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc);
-	res |= ast_custom_function_register(&jack_hook_function);
-
-	return res;
+	if (ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc)) {
+		return AST_MODULE_LOAD_DECLINE;
+	}
+
+	if (ast_custom_function_register(&jack_hook_function)) {
+		ast_unregister_application(jack_app);
+		return AST_MODULE_LOAD_DECLINE;
+	}
+
+	return AST_MODULE_LOAD_SUCCESS;
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JACK Interface");

Modified: team/bbryant/iax2_rotation/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/apps/app_queue.c?view=diff&rev=117181&r1=117180&r2=117181
==============================================================================
--- team/bbryant/iax2_rotation/apps/app_queue.c (original)
+++ team/bbryant/iax2_rotation/apps/app_queue.c Mon May 19 14:56:50 2008
@@ -199,7 +199,7 @@
 static char *app_aqm = "AddQueueMember" ;
 static char *app_aqm_synopsis = "Dynamically adds queue members" ;
 static char *app_aqm_descrip =
-"   AddQueueMember(queuename[,interface[,penalty[,options[,membername]]]]):\n"
+"   AddQueueMember(queuename[,interface[,penalty[,options[,membername[,stateinterface]]]]]):\n"
 "Dynamically adds interface to an existing queue.\n"
 "If the interface is already in the queue it will return an error.\n"
 "  This application sets the following channel variable upon completion:\n"
@@ -4239,7 +4239,7 @@
 	int penalty = 0;
 
 	if (ast_strlen_zero(data)) {
-		ast_log(LOG_WARNING, "AddQueueMember requires an argument (queuename[,[interface],[penalty][,options][,membername]])\n");
+		ast_log(LOG_WARNING, "AddQueueMember requires an argument (queuename[,interface[,penalty[,options[,membername[,stateinterface]]]]])\n");
 		return -1;
 	}
 

Modified: team/bbryant/iax2_rotation/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/apps/app_rpt.c?view=diff&rev=117181&r1=117180&r2=117181
==============================================================================
--- team/bbryant/iax2_rotation/apps/app_rpt.c (original)
+++ team/bbryant/iax2_rotation/apps/app_rpt.c Mon May 19 14:56:50 2008
@@ -1,7 +1,9 @@
+#define	NEW_ASTERISK
+/* #define OLD_ASTERISK */
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 2002-2005, Jim Dixon, WB6NIL
+ * Copyright (C) 2002-2008, Jim Dixon, WB6NIL
  *
  * Jim Dixon, WB6NIL <jim at lambdatel.com>
  * Serious contributions by Steve RoDgers, WA6ZFT <hwstar at rodgers.sdcoxmail.com>
@@ -16,16 +18,16 @@
  * the GNU General Public License Version 2. See the LICENSE file
  * at the top of the source tree.
  */
-
 /*! \file
  *
  * \brief Radio Repeater / Remote Base program 
- *  version 0.48 06/13/06
+ *  version 0.115 5/12/08 2055 EDT
  * 
  * \author Jim Dixon, WB6NIL <jim at lambdatel.com>
  *
  * \note Serious contributions by Steve RoDgers, WA6ZFT <hwstar at rodgers.sdcoxmail.com>
- * 
+ * \note Steven Henke, W9SH, <w9sh at arrl.net> added a few features here and there.
+ *
  * See http://www.zapatatelephony.org/app_rpt.html
  *
  *
@@ -51,18 +53,43 @@
  *
  * status cmds:
  *
- *  1 - Force ID
- *  2 - Give Time of Day
- *  3 - Give software Version
+ *  1 - Force ID (global)
+ *  2 - Give Time of Day (global)
+ *  3 - Give software Version (global)
+ *  11 - Force ID (local only)
+ *  12 - Give Time of Day (local only)
  *
  * cop (control operator) cmds:
  *
  *  1 - System warm boot
  *  2 - System enable
  *  3 - System disable
- *  4 - Test Tone On
+ *  4 - Test Tone On/Off
  *  5 - Dump System Variables on Console (debug)
  *  6 - PTT (phone mode only)
+ *  7 - Time out timer enable
+ *  8 - Time out timer disable
+ *  9 - Autopatch enable
+ *  10 - Autopatch disable
+ *  11 - Link enable
+ *  12 - Link disable
+ *  13 - Query System State
+ *  14 - Change System State
+ *  15 - Scheduler Enable
+ *  16 - Scheduler Disable
+ *  17 - User functions (time, id, etc) enable
+ *  18 - User functions (time, id, etc) disable
+ *  19 - Select alternate hang timer
+ *  20 - Select standard hang timer 
+ *  21 - Enable Parrot Mode
+ *  22 - Disable Parrot Mode
+ *  23 - Birdbath (Current Parrot Cleanup/Flush)
+ *  24 - Flush all telemetry
+ *  25 - Query last node un-keyed
+ *  26 - Query all nodes keyed/unkeyed
+ *  30 - Recall Memory Setting in Attached Xcvr
+ *  31 - Channel Selector for Parallel Programmed Xcvr
+ *  32 - Touchtone pad test: command + Digit string + # to playback all digits pressed
  *
  * ilink cmds:
  *
@@ -72,6 +99,12 @@
  *  4 - Enter command mode on specified link
  *  5 - System status
  *  6 - Disconnect all links
+ *  11 - Disconnect a previously permanently connected link
+ *  12 - Permanently connect specified link -- monitor only
+ *  13 - Permanently connect specified link -- tranceive
+ *  15 - Full system status (all nodes)
+ *  16 - Reconnect links disconnected with "disconnect all links"
+ *  200 thru 215 - (Send DTMF 0-9,*,#,A-D) (200=0, 201=1, 210=*, etc)
  *
  * remote cmds:
  *
@@ -102,7 +135,10 @@
  *  118 - Scan Up Fast
  *  119 - Transmit allowing auto-tune
  *  140 - Link Status (brief)
+ *  200 thru 215 - (Send DTMF 0-9,*,#,A-D) (200=0, 201=1, 210=*, etc)
  *
+ * playback cmds:
+ *  specify the name of the file to be played (for example, 25=rpt/foo)
  *
  *
  * 'duplex' modes:  (defaults to duplex=2)
@@ -131,14 +167,33 @@
 
 /* maximum digits in DTMF buffer, and seconds after * for DTMF command timeout */
 
+#ifdef OLD_ASTERISK
+#define ast_free free
+#define ast_malloc malloc
+#define ast_strdup strdup
+#endif
+
+
 #define	MAXDTMF 32
 #define	MAXMACRO 2048
-#define	MAXGOSUB 2048
+#define	MAXLINKLIST 512
+#define	LINKLISTTIME 10000
+#define	LINKLISTSHORTTIME 200
+#define	LINKPOSTTIME 30000
+#define	LINKPOSTSHORTTIME 200
+#define	KEYPOSTTIME 30000
+#define	KEYPOSTSHORTTIME 200
 #define	MACROTIME 100
-#define	GOSUBTIME 100
 #define	MACROPTIME 500
-#define	GOSUBPTIME 500
 #define	DTMF_TIMEOUT 3
+#define	KENWOOD_RETRIES 5
+#define	TOPKEYN 32
+#define	TOPKEYWAIT 3
+#define	TOPKEYMAXSTR 30
+
+#define	AUTHTELLTIME 7000
+#define	AUTHTXTIME 1000
+#define	AUTHLOGOUTTIME 25000
 
 #ifdef	__RPT_NOTCH
 #define	MAXFILTERS 10
@@ -146,10 +201,21 @@
 
 #define	DISC_TIME 10000  /* report disc after 10 seconds of no connect */
 #define	MAX_RETRIES 5
+#define	MAX_RETRIES_PERM 1000000000
 
 #define	REDUNDANT_TX_TIME 2000
 
 #define	RETRY_TIMER_MS 5000
+
+#define	PATCH_DIALPLAN_TIMEOUT 1500
+
+#ifdef OLD_ASTERISK
+#define	START_DELAY 10
+#else
+#define	START_DELAY 2
+#endif
+
+#define	RPT_LOCKOUT_SECS 10
 
 #define MAXPEERSTR 31
 #define	MAXREMSTR 15
@@ -157,22 +223,42 @@
 #define	DELIMCHR ','
 #define	QUOTECHR 34
 
+#define	MONITOR_DISK_BLOCKS_PER_MINUTE 38
+
+#define	DEFAULT_MONITOR_MIN_DISK_BLOCKS 10000
+#define	DEFAULT_REMOTE_INACT_TIMEOUT (15 * 60)
+#define	DEFAULT_REMOTE_TIMEOUT (60 * 60)
+#define	DEFAULT_REMOTE_TIMEOUT_WARNING (3 * 60)
+#define	DEFAULT_REMOTE_TIMEOUT_WARNING_FREQ 30
+
 #define	NODES "nodes"
+#define	EXTNODES "extnodes"
 #define MEMORY "memory"
 #define MACRO "macro"
-#define GOSUB "gosub"
 #define	FUNCTIONS "functions"
 #define TELEMETRY "telemetry"
 #define MORSE "morse"
+#define	TONEMACRO "tonemacro"
 #define	FUNCCHAR '*'
 #define	ENDCHAR '#'
+#define	EXTNODEFILE "/var/lib/asterisk/rpt_extnodes"
+#define	NODENAMES "rpt/nodenames"
+#define	PARROTFILE "/tmp/parrot_%s_%u"
+
+#define	PARROTTIME 1000
 
 #define	DEFAULT_IOBASE 0x378
 
+#define	DEFAULT_CIV_ADDR 0x58
+
 #define	MAXCONNECTTIME 5000
 
 #define MAXNODESTR 300
 
+#define MAXNODELEN 16
+
+#define MAXIDENTLEN 32
+
 #define MAXPATCHCONTEXT 100
 
 #define ACTIONSIZE 32
@@ -181,69 +267,122 @@
 
 #define REM_SCANTIME 100
 
-
-enum {REM_OFF, REM_MONITOR, REM_TX};
-
-enum {ID, PROC, TERM, COMPLETE, UNKEY, REMDISC, REMALREADY, REMNOTFOUND, REMGO,
-	CONNECTED, CONNFAIL, STATUS, TIMEOUT, ID1, STATS_TIME,
+#define	DTMF_LOCAL_TIME 250
+#define	DTMF_LOCAL_STARTTIME 500
+
+#define	IC706_PL_MEMORY_OFFSET 50
+
+#define	VOX_ON_DEBOUNCE_COUNT 3
+#define	VOX_OFF_DEBOUNCE_COUNT 20
+#define	VOX_MAX_THRESHOLD 10000.0
+#define	VOX_MIN_THRESHOLD 3000.0
+#define	VOX_TIMEOUT_MS 5000
+#define	VOX_RECOVER_MS 500
+#define	SIMPLEX_PATCH_DELAY 25
+#define	SIMPLEX_PHONE_DELAY 25
+
+#define	STATPOST_PROGRAM "/usr/bin/wget,-q,--output-document=/dev/null,--no-check-certificate"
+
+#define	ALLOW_LOCAL_CHANNELS
+
+enum {REM_OFF,REM_MONITOR,REM_TX};
+
+enum{ID,PROC,TERM,COMPLETE,UNKEY,REMDISC,REMALREADY,REMNOTFOUND,REMGO,
+	CONNECTED,CONNFAIL,STATUS,TIMEOUT,ID1, STATS_TIME, PLAYBACK,
 	STATS_VERSION, IDTALKOVER, ARB_ALPHA, TEST_TONE, REV_PATCH,
-	TAILMSG, MACRO_NOTFOUND, GOSUB_NOTFOUND, MACRO_BUSY, GOSUB_BUSY, LASTNODEKEY};
-
-enum {REM_SIMPLEX, REM_MINUS, REM_PLUS};
-
-enum {REM_LOWPWR, REM_MEDPWR, REM_HIPWR};
-
-enum {DC_INDETERMINATE, DC_REQ_FLUSH, DC_ERROR, DC_COMPLETE, DC_DOKEY};
-
-enum {SOURCE_RPT, SOURCE_LNK, SOURCE_RMT, SOURCE_PHONE, SOURCE_DPHONE};
-
-enum {DLY_TELEM, DLY_ID, DLY_UNKEY, DLY_CALLTERM};
-
-enum {REM_MODE_FM, REM_MODE_USB, REM_MODE_LSB, REM_MODE_AM};
-
-enum {HF_SCAN_OFF, HF_SCAN_DOWN_SLOW, HF_SCAN_DOWN_QUICK,
-	HF_SCAN_DOWN_FAST, HF_SCAN_UP_SLOW, HF_SCAN_UP_QUICK, HF_SCAN_UP_FAST};
+	TAILMSG, MACRO_NOTFOUND, MACRO_BUSY, LASTNODEKEY, FULLSTATUS,
+	MEMNOTFOUND, INVFREQ, REMMODE, REMLOGIN, REMXXX, REMSHORTSTATUS,
+	REMLONGSTATUS, LOGINREQ, SCAN, SCANSTAT, TUNE, SETREMOTE, TOPKEY,
+	TIMEOUT_WARNING, ACT_TIMEOUT_WARNING, LINKUNKEY, UNAUTHTX, PARROT,
+	STATS_TIME_LOCAL};
+
+
+enum {REM_SIMPLEX,REM_MINUS,REM_PLUS};
+
+enum {REM_LOWPWR,REM_MEDPWR,REM_HIPWR};
+
+enum {DC_INDETERMINATE, DC_REQ_FLUSH, DC_ERROR, DC_COMPLETE, DC_COMPLETEQUIET, DC_DOKEY};
+
+enum {SOURCE_RPT, SOURCE_LNK, SOURCE_RMT, SOURCE_PHONE, SOURCE_DPHONE, SOURCE_ALT};
+
+enum {DLY_TELEM, DLY_ID, DLY_UNKEY, DLY_CALLTERM, DLY_COMP, DLY_LINKUNKEY, DLY_PARROT};
+
+enum {REM_MODE_FM,REM_MODE_USB,REM_MODE_LSB,REM_MODE_AM};
+
+enum {HF_SCAN_OFF,HF_SCAN_DOWN_SLOW,HF_SCAN_DOWN_QUICK,
+      HF_SCAN_DOWN_FAST,HF_SCAN_UP_SLOW,HF_SCAN_UP_QUICK,HF_SCAN_UP_FAST};
 
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include <signal.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
 #include <search.h>
+#include <sys/types.h>
 #include <sys/stat.h>
+#include <errno.h>
 #include <dirent.h>
 #include <ctype.h>
+#include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/file.h>
 #include <sys/ioctl.h>
 #include <sys/io.h>
+#include <sys/vfs.h>
 #include <math.h>
+#ifdef OLD_ASTERISK
+#include <linux/zaptel.h>
+#include <tonezone.h>
+#else
+#include <zaptel/zaptel.h>
+#include <zaptel/tonezone.h>
+#endif
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
 #include "asterisk/utils.h"
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
+#include "asterisk/logger.h"
 #include "asterisk/channel.h"
 #include "asterisk/callerid.h"
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
 #include "asterisk/features.h"
+#include "asterisk/options.h"
 #include "asterisk/cli.h"
 #include "asterisk/config.h"
 #include "asterisk/say.h"
 #include "asterisk/localtime.h"
-#include "asterisk/app.h"
-
-#include "asterisk/zapata.h"
+#include "asterisk/cdr.h"
+#include "asterisk/options.h"
+#include "asterisk/manager.h"
+#include <termios.h>
+
+#ifdef	NEW_ASTERISK
+struct ast_flags config_flags = { CONFIG_FLAG_WITHCOMMENTS };
+#endif
+
+
+/* Start a tone-list going */
+int ast_playtones_start(struct ast_channel *chan, int vol, const char* tonelist, int interruptible);
+/*! Stop the tones from playing */
+void ast_playtones_stop(struct ast_channel *chan);
+
+static  char *tdesc = "Radio Repeater / Remote Base  version 0.115  5/12/2008";
 
 static char *app = "Rpt";
 
 static char *synopsis = "Radio Repeater/Remote Base Control System";
 
 static char *descrip = 
-"  Rpt(nodename[,options]):  Radio Remote Link or Remote Base Link Endpoint Process.\n"
+"  Rpt(nodename[|options][|M][|*]):  \n"
+"    Radio Remote Link or Remote Base Link Endpoint Process.\n"
 "\n"
 "    Not specifying an option puts it in normal endpoint mode (where source\n"
 "    IP and nodename are verified).\n"
@@ -254,7 +393,7 @@
 "            this if you have checked security already (like with an IAX2\n"
 "            user/password or something).\n"
 "\n"
-"        Rannounce-string[,timeout[,timeout-destination]] - Amateur Radio\n"
+"        Rannounce-string[|timeout[|timeout-destination]] - Amateur Radio\n"
 "            Reverse Autopatch. Caller is put on hold, and announcement (as\n"
 "            specified by the 'announce-string') is played on radio system.\n"
 "            Users of radio system can access autopatch, dial specified\n"
@@ -275,17 +414,66 @@
 "            this mode), the 'dphone_functions' parameter must be specified\n"
 "            for the node in 'rpt.conf'. Otherwise no DTMF control will be\n"
 "            available to the phone user.\n"
+"\n"
+"        S - Simplex Dumb Phone Control mode. This allows a regular phone user\n"
+"            audio-only access to the radio system. In this mode, the\n"
+"            transmitter is toggled on and off when the phone user presses the\n"
+"            funcchar (*) key on the telephone set. In addition, the transmitter\n"
+"            will turn off if the endchar (#) key is pressed. When a user first\n"
+"            calls in, the transmitter will be off, and the user can listen for\n"
+"            radio traffic. When the user wants to transmit, they press the *\n" 
+"            key, start talking, then press the * key again or the # key to turn\n"
+"            the transmitter off.  No other functions can be executed by the\n"
+"            user on the phone when this mode is selected. Note: If your\n"
+"            radio system is full-duplex, we recommend using either P or D\n"
+"            modes as they provide more flexibility.\n"
+"\n"
+"        q - Query Status. Sets channel variables and returns + 101 in plan.\n"
+"\n"
+"        M - Memory Channel Steer as MXX where XX is the memory channel number.\n"
+"\n"
+"        * - Alt Macro to execute (e.g. *7 for status)\n"
 "\n";
-
-static unsigned int vmajor = 0;
-static unsigned int vminor = 47;
-
-static int debug = 0;  /* FIXME Set this >0 for extra debug output */
+;
+
+static int debug = 0;  /* Set this >0 for extra debug output */
 static int nrpts = 0;
 
+static char remdtmfstr[] = "0123456789*#ABCD";
+
+enum {TOP_TOP,TOP_WON,WON_BEFREAD,BEFREAD_AFTERREAD};
+
+int max_chan_stat [] = {22000,1000,22000,100,22000,2000,22000};
+
+#define NRPTSTAT 7
+
+struct rpt_chan_stat
+{
+	struct timeval last;
+	long long total;
+	unsigned long count;
+	unsigned long largest;
+	struct timeval largest_time;
+};
+
 char *discstr = "!!DISCONNECT!!";
-static char *remote_rig_ft897 = "ft897";
-static char *remote_rig_rbi = "rbi";
+char *newkeystr = "!NEWKEY!";
+static char *remote_rig_ft897="ft897";
+static char *remote_rig_rbi="rbi";
+static char *remote_rig_kenwood="kenwood";
+static char *remote_rig_tm271="tm271";
+static char *remote_rig_ic706="ic706";
+static char *remote_rig_rtx150="rtx150";
+static char *remote_rig_rtx450="rtx450";
+static char *remote_rig_ppp16="ppp16";	  		// parallel port programmable 16 channels
+
+#define ISRIG_RTX(x) ((!strcmp(x,remote_rig_rtx150)) || (!strcmp(x,remote_rig_rtx450)))
+#define	IS_XPMR(x) (!strncasecmp(x->rxchanname,"rad",3))
+
+#ifdef	OLD_ASTERISK
+STANDARD_LOCAL_USER;
+LOCAL_USER_DECL;
+#endif
 
 #define	MSWAIT 200
 #define	HANGTIME 5000
@@ -296,9 +484,44 @@
 #define POLITEID 30000
 #define FUNCTDELAY 1500
 
+#define	MAXXLAT 20
+#define	MAXXLATTIME 3
+
+#define MAX_SYSSTATES 10
+
+struct vox {
+	float	speech_energy;
+	float	noise_energy;
+	int	enacount;
+	char	voxena;
+	char	lastvox;
+	int	offdebcnt;
+	int	ondebcnt;
+} ;
+
+#define	mymax(x,y) ((x > y) ? x : y)
+#define	mymin(x,y) ((x < y) ? x : y)
+
+struct rpt_topkey
+{
+char	node[TOPKEYMAXSTR];
+int	timesince;
+int	keyed;
+} ;
+
+struct rpt_xlat
+{
+char	funccharseq[MAXXLAT];
+char	endcharseq[MAXXLAT];
+char	passchars[MAXXLAT];
+int	funcindex;
+int	endindex;
+time_t	lastone;
+} ;
+
+static time_t	starttime = 0;
+
 static  pthread_t rpt_master_thread;
-
-struct timeval cancel_atimeout = { 0, 0 };
 
 struct rpt;
 
@@ -309,11 +532,17 @@
 	char	mode;			/* 1 if in tx mode */
 	char	isremote;
 	char	phonemode;
+	char	phonevox;		/* vox the phone */
 	char	name[MAXNODESTR];	/* identifier (routing) string */
 	char	lasttx;
+	char	lasttx1;
 	char	lastrx;
+	char	lastrealrx;
+	char	lastrx1;
 	char	connected;
 	char	hasconnected;
+	char	perma;
+	char	thisconnected;
 	char	outbound;
 	char	disced;
 	char	killme;
@@ -321,11 +550,31 @@
 	long	disctime;
 	long 	retrytimer;
 	long	retxtimer;
+	long	rerxtimer;
 	int	retries;
+	int	max_retries;
 	int	reconnects;
 	long long connecttime;
 	struct ast_channel *chan;	
 	struct ast_channel *pchan;	
+	char	linklist[MAXLINKLIST];
+	time_t	linklistreceived;
+	long	linklisttimer;
+	int	dtmfed;
+	int linkunkeytocttimer;
+	struct timeval lastlinktv;
+	struct	ast_frame *lastf1,*lastf2;
+	struct	rpt_chan_stat chan_stat[NRPTSTAT];
+	struct vox vox;
+	char wasvox;
+	int voxtotimer;
+	char voxtostate;
+	char newkey;
+#ifdef OLD_ASTERISK
+        AST_LIST_HEAD(, ast_frame) rxq;
+#else
+	AST_LIST_HEAD_NOLOCK(, ast_frame) rxq;
+#endif
 } ;
 
 struct rpt_lstat
@@ -337,7 +586,9 @@
 	char	mode;
 	char	outbound;
 	char	reconnects;
+	char	thisconnected;
 	long long	connecttime;
+	struct	rpt_chan_stat chan_stat[NRPTSTAT];
 } ;
 
 struct rpt_tele
@@ -349,6 +600,8 @@
 	int	mode;
 	struct rpt_link mylink;
 	char param[TELEPARAMSIZE];
+	int	submode;
+	unsigned int parrot;
 	pthread_t threadid;
 } ;
 
@@ -374,85 +627,163 @@
 } ;
 
 
+struct sysstate
+{
+	char txdisable;
+	char totdisable;
+	char linkfundisable;
+	char autopatchdisable;
+	char schedulerdisable;
+	char userfundisable;
+	char alternatetail;
+};
+
+/* rpt cmd support */
+#define CMD_DEPTH 1
+#define CMD_STATE_IDLE 0
+#define CMD_STATE_BUSY 1
+#define CMD_STATE_READY 2
+#define CMD_STATE_EXECUTING 3
+
+struct rpt_cmd_struct
+{
+    int state;
+    int functionNumber;
+    char param[MAXDTMF];
+    char digits[MAXDTMF];
+    int command_source;
+};
+
 static struct rpt
 {
 	ast_mutex_t lock;
+	ast_mutex_t remlock;
+	ast_mutex_t statpost_lock;
 	struct ast_config *cfg;
 	char reload;
+	char xlink;		 							// cross link state of a share repeater/remote radio
+	unsigned int statpost_seqno;
 
 	char *name;
 	char *rxchanname;
 	char *txchanname;
-	char *remote;
+	char remote;
+	char *remoterig;
+	struct	rpt_chan_stat chan_stat[NRPTSTAT];
+	unsigned int scram;
 
 	struct {
-		char ourcontext[80];
-		char ourcallerid[80];
-		char acctcode[21];
-		char ident[80];
-		char tonezone[80];
+		char *ourcontext;
+		char *ourcallerid;
+		char *acctcode;
+		char *ident;
+		char *tonezone;
 		char simple;
-		char functions[80];
-		char link_functions[80];
-		char phone_functions[80];
-		char dphone_functions[80];
-		char nodes[80];
+		char *functions;
+		char *link_functions;
+		char *phone_functions;
+		char *dphone_functions;
+		char *alt_functions;
+		char *nodes;
+		char *extnodes;
+		char *extnodefile;
 		int hangtime;
+		int althangtime;
 		int totime;
 		int idtime;
 		int tailmessagetime;
 		int tailsquashedtime;
 		int duplex;
 		int politeid;
-		char *tailmsgbuf;
-		AST_DECLARE_APP_ARGS(tailmsg,
-			AST_APP_ARG(msgs)[100];
-		);
-		char memory[80];
-		char macro[80];
-		char gosub[80];
-		char startupmacro[80];
-		char startupgosub[80];
+		char *tailmessages[500];
+		int tailmessagemax;
+		char	*memory;
+		char	*macro;
+		char	*tonemacro;
+		char	*startupmacro;
 		int iobase;
+		char *ioport;
 		char funcchar;
 		char endchar;
 		char nobusyout;
+		char notelemtx;
+		char propagate_dtmf;
+		char propagate_phonedtmf;
+		char linktolink;
+		unsigned char civaddr;
+		struct rpt_xlat inxlat;
+		struct rpt_xlat outxlat;
+		char *archivedir;
+		int authlevel;
+		char *csstanzaname;
+		char *skedstanzaname;
+		char *txlimitsstanzaname;
+		long monminblocks;
+		int remoteinacttimeout;
+		int remotetimeout;
+		int remotetimeoutwarning;
+		int remotetimeoutwarningfreq;
+		int sysstate_cur;
+		struct sysstate s[MAX_SYSSTATES];
+		char parrotmode;
+		int parrottime;
+		char *rptnode;
+		char remote_mars;
+		int voxtimeout_ms;
+		int voxrecover_ms;
+		int simplexpatchdelay;
+		int simplexphonedelay;
+		char *statpost_program;
+		char *statpost_url;
 	} p;
 	struct rpt_link links;
 	int unkeytocttimer;
+	time_t lastkeyedtime;
+	time_t lasttxkeyedtime;
 	char keyed;
+	char txkeyed;
 	char exttx;
 	char localtx;
 	char remoterx;
 	char remotetx;
 	char remoteon;
+	char remtxfreqok;
 	char tounkeyed;
 	char tonotify;
-	char enable;
 	char dtmfbuf[MAXDTMF];
 	char macrobuf[MAXMACRO];
-	char gosubbuf[MAXGOSUB];
 	char rem_dtmfbuf[MAXDTMF];
 	char lastdtmfcommand[MAXDTMF];
 	char cmdnode[50];
-	struct ast_channel *rxchannel, *txchannel;
-	struct ast_channel *pchannel, *txpchannel, *remchannel;
+	char nowchan;						// channel now
+	char waschan;						// channel selected initially or by command
+	char bargechan;						// barge in channel
+	char macropatch;					// autopatch via tonemacro state
+	char parrotstate;
+	int  parrottimer;
+	unsigned int parrotcnt;
+	struct ast_channel *rxchannel,*txchannel, *monchannel, *parrotchannel;
+	struct ast_channel *pchannel,*txpchannel, *zaprxchannel, *zaptxchannel;
+	struct ast_channel *voxchannel;
+	struct ast_frame *lastf1,*lastf2;
 	struct rpt_tele tele;
-	struct timeval lasttv, curtv;
-	pthread_t rpt_call_thread, rpt_thread;
-	time_t dtmf_time, rem_dtmf_time, dtmf_time_rem;
-	int tailtimer, totimer, idtimer, txconf, conf, callmode, cidx, scantimer, tmsgtimer, skedtimer;
-	int mustid, tailid;
+	struct timeval lasttv,curtv;
+	pthread_t rpt_call_thread,rpt_thread;
+	time_t dtmf_time,rem_dtmf_time,dtmf_time_rem;
+	int calldigittimer;
+	int tailtimer,totimer,idtimer,txconf,conf,callmode,cidx,scantimer,tmsgtimer,skedtimer;
+	int mustid,tailid;
 	int tailevent;
 	int telemrefcount;
-	int dtmfidx, rem_dtmfidx;
-	int dailytxtime, dailykerchunks, totalkerchunks, dailykeyups, totalkeyups, timeouts;
+	int dtmfidx,rem_dtmfidx;
+	int dailytxtime,dailykerchunks,totalkerchunks,dailykeyups,totalkeyups,timeouts;
 	int totalexecdcommands, dailyexecdcommands;
-	long retxtimer;
+	long	retxtimer;
+	long	rerxtimer;
 	long long totaltxtime;
 	char mydtmf;
 	char exten[AST_MAX_EXTENSION];
-	char freq[MAXREMSTR], rxpl[MAXREMSTR], txpl[MAXREMSTR];
+	char freq[MAXREMSTR],rxpl[MAXREMSTR],txpl[MAXREMSTR];
 	char offset;
 	char powerlevel;
 	char txplon;
@@ -461,16 +792,18 @@

[... 32311 lines stripped ...]



More information about the svn-commits mailing list