[asterisk-commits] russell: trunk r68970 - in /trunk: apps/ channels/ include/asterisk/ pbx/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jun 12 08:58:28 MST 2007


Author: russell
Date: Tue Jun 12 10:58:28 2007
New Revision: 68970

URL: http://svn.digium.com/view/asterisk?view=rev&rev=68970
Log:
Completely remove all of the code related to jumping to priority n + 101.  yay!
(issue #9926, caio1982)

Modified:
    trunk/apps/app_authenticate.c
    trunk/apps/app_chanisavail.c
    trunk/apps/app_controlplayback.c
    trunk/apps/app_dial.c
    trunk/apps/app_image.c
    trunk/apps/app_minivm.c
    trunk/apps/app_osplookup.c
    trunk/apps/app_playback.c
    trunk/apps/app_privacy.c
    trunk/apps/app_queue.c
    trunk/apps/app_sendtext.c
    trunk/apps/app_system.c
    trunk/apps/app_transfer.c
    trunk/apps/app_url.c
    trunk/apps/app_voicemail.c
    trunk/channels/chan_agent.c
    trunk/include/asterisk/options.h
    trunk/pbx/pbx_config.c

Modified: trunk/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_authenticate.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_authenticate.c (original)
+++ trunk/apps/app_authenticate.c Tue Jun 12 10:58:28 2007
@@ -49,7 +49,6 @@
 enum {
 	OPT_ACCOUNT = (1 << 0),
 	OPT_DATABASE = (1 << 1),
-	OPT_JUMP = (1 << 2),
 	OPT_MULTIPLE = (1 << 3),
 	OPT_REMOVE = (1 << 4),
 } auth_option_flags;
@@ -57,7 +56,6 @@
 AST_APP_OPTIONS(auth_app_options, {
 	AST_APP_OPTION('a', OPT_ACCOUNT),
 	AST_APP_OPTION('d', OPT_DATABASE),
-	AST_APP_OPTION('j', OPT_JUMP),
 	AST_APP_OPTION('m', OPT_MULTIPLE),
 	AST_APP_OPTION('r', OPT_REMOVE),
 });
@@ -73,13 +71,10 @@
 "begins with the '/' character, it is interpreted as a file which contains a list of\n"
 "valid passwords, listed 1 password per line in the file.\n"
 "  When using a database key, the value associated with the key can be anything.\n"
-"Users have three attempts to authenticate before the channel is hung up. If the\n"
-"passsword is invalid, the 'j' option is specified, and priority n+101 exists,\n"
-"dialplan execution will continnue at this location.\n"
+"Users have three attempts to authenticate before the channel is hung up.\n"
 "  Options:\n"
 "     a - Set the channels' account code to the password that is entered\n"
 "     d - Interpret the given path as database key, not a literal file\n"
-"     j - Support jumping to n+101 if authentication fails\n"
 "     m - Interpret the given path as a file which contains a list of account\n"
 "         codes and password hashes delimited with ':', listed one per line in\n"
 "         the file. When one of the passwords is matched, the channel will have\n"
@@ -218,13 +213,9 @@
 		if (!res)
 			res = ast_waitstream(chan, "");
 	} else {
-		if (ast_test_flag(&flags,OPT_JUMP) && ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101) == 0) {
-			res = 0;
-		} else {
-			if (!ast_streamfile(chan, "vm-goodbye", chan->language))
-				res = ast_waitstream(chan, "");
-			res = -1;
-		}
+		if (!ast_streamfile(chan, "vm-goodbye", chan->language))
+			res = ast_waitstream(chan, "");
+		res = -1;
 	}
 	ast_module_user_remove(u);
 	return res;

Modified: trunk/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanisavail.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_chanisavail.c (original)
+++ trunk/apps/app_chanisavail.c Tue Jun 12 10:58:28 2007
@@ -62,13 +62,12 @@
 "  Options:\n"
 "    s - Consider the channel unavailable if the channel is in use at all\n"
 "    t - Simply checks if specified channels exist in the channel list\n"
-"        (implies option s) \n"
-"    j - Support jumping to priority n+101 if no channel is available\n";
+"        (implies option s) \n";
 
 
 static int chanavail_exec(struct ast_channel *chan, void *data)
 {
-	int res=-1, inuse=-1, option_state=0, priority_jump=0, string_compare=0;
+	int res=-1, inuse=-1, option_state=0, string_compare=0;
 	int status;
 	struct ast_module_user *u;
 	char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur;
@@ -94,8 +93,6 @@
 			option_state = 1;
 		if (strchr(args.options, 't'))
 			string_compare = 1;
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 	peers = args.reqchans;
 	if (peers) {
@@ -152,12 +149,6 @@
 	if (res < 1) {
 		pbx_builtin_setvar_helper(chan, "AVAILCHAN", "");
 		pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
-		if (priority_jump || ast_opt_priority_jumping) {
-			if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
-				ast_module_user_remove(u);
-				return -1;
-			}
-		}
 	}
 
 	ast_module_user_remove(u);

Modified: trunk/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_controlplayback.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_controlplayback.c (original)
+++ trunk/apps/app_controlplayback.c Tue Jun 12 10:58:28 2007
@@ -61,7 +61,6 @@
 "  pause   - Pause playback when this DTMF digit is received.\n"
 "  restart - Restart playback when this DTMF digit is received.\n"
 "Options:\n"
-"  j    - Jump to priority n+101 if the requested file is not found.\n"
 "  o(#) - Start at # ms from the beginning of the file.\n"
 "This application sets the following channel variables upon completion:\n"
 "  CPLAYBACKSTATUS -  This variable contains the status of the attempt as a text\n"
@@ -70,7 +69,6 @@
 "                     playback was at when it stopped.  -1 is end of file.\n";
 
 enum {
-	OPT_JUMP   = (1 << 0),
 	OPT_OFFSET = (1 << 1),
 };
 
@@ -81,7 +79,6 @@
 };
 
 AST_APP_OPTIONS(cpb_opts, BEGIN_OPTIONS
-	AST_APP_OPTION('j', OPT_JUMP),
 	AST_APP_OPTION_ARG('o', OPT_OFFSET, OPT_ARG_OFFSET),
 END_OPTIONS );
 
@@ -159,11 +156,6 @@
 		pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
 	} else {
 		if (res < 0) {
-			if (ast_test_flag(&opts, OPT_JUMP) || ast_opt_priority_jumping) {
-				if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
-					ast_log(LOG_WARNING, "ControlPlayback tried to jump to priority n+101 as requested, but priority didn't exist\n");
-				}
-			}
 			res = 0;
 			pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "ERROR");
 		} else

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Tue Jun 12 10:58:28 2007
@@ -123,7 +123,6 @@
 "    H    - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
 "    i    - Asterisk will ignore any forwarding requests it may receive on this\n"
 "           dial attempt.\n"
-"    j    - Jump to priority n+101 if all of the requested channels were busy.\n"
 "    L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are\n"
 "           left. Repeat the warning every 'z' ms. The following special\n"
 "           variables can be used with this option:\n"
@@ -145,9 +144,7 @@
 "           finished executing.\n"
 "           * ABORT        Hangup both legs of the call.\n"
 "           * CONGESTION   Behave as if line congestion was encountered.\n"
-"           * BUSY         Behave as if a busy signal was encountered. This will also\n"
-"                          have the application jump to priority n+101 if the\n"
-"                          'j' option is set.\n"
+"           * BUSY         Behave as if a busy signal was encountered.\n"
 "           * CONTINUE     Hangup the called party and allow the calling party\n"
 "                          to continue dialplan execution at the next priority.\n"
 "           * GOTO:<context>^<exten>^<priority> - Transfer the call to the\n"
@@ -221,7 +218,6 @@
 	OPT_GO_ON =		(1 << 5),
 	OPT_CALLEE_HANGUP =	(1 << 6),
 	OPT_CALLER_HANGUP =	(1 << 7),
-	OPT_PRIORITY_JUMP =	(1 << 8),
 	OPT_DURATION_LIMIT =	(1 << 9),
 	OPT_MUSICBACK =		(1 << 10),
 	OPT_CALLEE_MACRO =	(1 << 11),
@@ -271,7 +267,6 @@
 	AST_APP_OPTION('h', OPT_CALLEE_HANGUP),
 	AST_APP_OPTION('H', OPT_CALLER_HANGUP),
 	AST_APP_OPTION('i', OPT_IGNORE_FORWARDING),
-	AST_APP_OPTION('j', OPT_PRIORITY_JUMP),
 	AST_APP_OPTION_ARG('L', OPT_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
 	AST_APP_OPTION_ARG('m', OPT_MUSICBACK, OPT_ARG_MUSICBACK),
 	AST_APP_OPTION_ARG('M', OPT_CALLEE_MACRO, OPT_ARG_CALLEE_MACRO),
@@ -532,7 +527,7 @@
 static struct ast_channel *wait_for_answer(struct ast_channel *in,
 	struct chanlist *outgoing, int *to, struct ast_flags *peerflags,
 	struct privacy_args *pa,
-	const struct cause_args *num_in, int priority_jump, int *result)
+	const struct cause_args *num_in, int *result)
 {
 	struct cause_args num = *num_in;
 	int prestart = num.busy + num.congestion + num.nochan;
@@ -573,8 +568,6 @@
 					strcpy(pa->status, "CONGESTION");
 				else if (num.nochan)
 					strcpy(pa->status, "CHANUNAVAIL");
-				if (ast_opt_priority_jumping || priority_jump)
-					ast_goto_if_exists(in, in->context, in->exten, in->priority + 101);
 			} else {
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "No one is available to answer at this time (%d:%d/%d/%d)\n", numlines, num.busy, num.congestion, num.nochan);
@@ -1125,15 +1118,9 @@
 		return 0;
 	} else if (pa->privdb_val == AST_PRIVACY_KILL ) {
 		ast_copy_string(pa->status, "DONTCALL", sizeof(pa->status));
-		if (ast_opt_priority_jumping || ast_test_flag(opts, OPT_PRIORITY_JUMP)) {
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
-		}
 		return 0; /* Is this right? */
 	} else if (pa->privdb_val == AST_PRIVACY_TORTURE ) {
 		ast_copy_string(pa->status, "TORTURE", sizeof(pa->status));
-		if (ast_opt_priority_jumping || ast_test_flag(opts, OPT_PRIORITY_JUMP)) {
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
-		}
 		return 0; /* is this right??? */
 	} else if (pa->privdb_val == AST_PRIVACY_UNKNOWN ) {
 		/* Get the user's intro, store it in priv-callerintros/$CID, 
@@ -1490,7 +1477,7 @@
 	}
 
 	time(&start_time);
-	peer = wait_for_answer(chan, outgoing, &to, peerflags, &pa, &num, ast_test_flag(&opts, OPT_PRIORITY_JUMP), &result);
+	peer = wait_for_answer(chan, outgoing, &to, peerflags, &pa, &num, &result);
 	
 	if (!peer) {
 		if (result) {
@@ -1600,12 +1587,7 @@
 
 				if (!strcasecmp(macro_result, "BUSY")) {
 					ast_copy_string(pa.status, macro_result, sizeof(pa.status));
-					if (ast_opt_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
-						if (!ast_goto_if_exists(chan, NULL, NULL, chan->priority + 101)) {
-							ast_set_flag(peerflags, OPT_GO_ON);
-						}
-					} else
-						ast_set_flag(peerflags, OPT_GO_ON);
+					ast_set_flag(peerflags, OPT_GO_ON);
 					res = -1;
 				} else if (!strcasecmp(macro_result, "CONGESTION") || !strcasecmp(macro_result, "CHANUNAVAIL")) {
 					ast_copy_string(pa.status, macro_result, sizeof(pa.status));

Modified: trunk/apps/app_image.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_image.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_image.c (original)
+++ trunk/apps/app_image.c Tue Jun 12 10:58:28 2007
@@ -53,8 +53,6 @@
 "If the channel supports image transport but the image send\n"
 "fails, the channel will be hung up. Otherwise, the dialplan\n"
 "continues execution.\n"
-"The option string may contain the following character:\n"
-"	'j' -- jump to priority n+101 if the channel doesn't support image transport\n"
 "This application sets the following channel variable upon completion:\n"
 "	SENDIMAGESTATUS		The status is the result of the attempt as a text string, one of\n"
 "		OK | NOSUPPORT \n";			
@@ -65,7 +63,6 @@
 	int res = 0;
 	struct ast_module_user *u;
 	char *parse;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(filename);
 		AST_APP_ARG(options);
@@ -83,14 +80,10 @@
 	}
 
 	if (args.options) {
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 
 	if (!ast_supports_images(chan)) {
 		/* Does not support transport */
-		if (priority_jump || ast_opt_priority_jumping)
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 		pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "NOSUPPORT");
 		ast_module_user_remove(u);
 		return 0;

Modified: trunk/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_minivm.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_minivm.c (original)
+++ trunk/apps/app_minivm.c Tue Jun 12 10:58:28 2007
@@ -1803,7 +1803,6 @@
 
 	if (res == ERROR_LOCK_PATH) {
 		ast_log(LOG_ERROR, "Could not leave voicemail. The path is already locked.\n");
-		/* Send the call to n+101 priority, where n is the current priority*/
 		pbx_builtin_setvar_helper(chan, "MINIVM_RECORD_STATUS", "FAILED");
 		res = 0;
 	}

Modified: trunk/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_osplookup.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_osplookup.c (original)
+++ trunk/apps/app_osplookup.c Tue Jun 12 10:58:28 2007
@@ -1316,7 +1316,6 @@
 	int res;
 	struct ast_module_user* u;
 	const char* provider = OSP_DEF_PROVIDER;
-	int priority_jump = 0;
 	struct varshead* headp;
 	struct ast_var_t* current;
 	const char* source = "";
@@ -1348,11 +1347,7 @@
 	if (option_debug)
 		ast_log(LOG_DEBUG, "OSPAuth: provider '%s'\n", provider);
 
-	if ((args.options) && (strchr(args.options, 'j'))) {
-		priority_jump = 1;
-	}
-	if (option_debug)
-		ast_log(LOG_DEBUG, "OSPAuth: priority jump '%d'\n", priority_jump);
+	}
 
 	headp = &chan->varshead;
 	AST_LIST_TRAVERSE(headp, current, entries) {
@@ -1392,12 +1387,7 @@
 		ast_log(LOG_DEBUG, "OSPAuth: %s\n", status);
 
 	if(res <= 0) {
-		if (priority_jump || ast_opt_priority_jumping) {
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
-			res = 0;
-		} else {
-			res = -1;
-		}
+		res = -1;
 	} else {
 		res = 0;
 	}
@@ -1420,7 +1410,6 @@
 	int res, cres;
 	struct ast_module_user* u;
 	const char* provider = OSP_DEF_PROVIDER;
-	int priority_jump = 0;
 	struct varshead* headp;
 	struct ast_var_t* current;
 	const char* srcdev = "";
@@ -1462,9 +1451,6 @@
 		ast_log(LOG_DEBUG, "OSPlookup: provider '%s'\n", provider);
 
 	if (args.options) {
-		if (strchr(args.options, 'j')) {
-			priority_jump = 1;
-		}
 		if (strchr(args.options, 'h')) {
 			callidtypes |= OSP_CALLID_H323;
 		}
@@ -1476,7 +1462,6 @@
 		}
 	}
 	if (option_debug) {
-		ast_log(LOG_DEBUG, "OSPLookup: priority jump '%d'\n", priority_jump);
 		ast_log(LOG_DEBUG, "OSPLookup: call id types '%d'\n", callidtypes);
 	}
 
@@ -1595,12 +1580,7 @@
 	}
 
 	if(res <= 0) {
-		if (priority_jump || ast_opt_priority_jumping) {
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
-			res = 0;
-		} else {
-			res = -1;
-		}
+		res = -1;
 	} else {
 		res = 0;
 	}
@@ -1623,7 +1603,6 @@
 	int res;
 	struct ast_module_user* u;
 	const char* provider = OSP_DEF_PROVIDER;
-	int priority_jump = 0;
 	int cause = 0;
 	struct varshead* headp;
 	struct ast_var_t* current;
@@ -1665,12 +1644,6 @@
 	}
 	if (option_debug)
 		ast_log(LOG_DEBUG, "OSPlookup: provider '%s'\n", provider);
-
-	if ((args.options) && (strchr(args.options, 'j'))) {
-		priority_jump = 1;
-	}
-	if (option_debug)
-		ast_log(LOG_DEBUG, "OSPNext: priority jump '%d'\n", priority_jump);
 
 	result.inhandle = OSP_INVALID_HANDLE;
 	result.outhandle = OSP_INVALID_HANDLE;
@@ -1780,12 +1753,7 @@
 	}
 
 	if(res <= 0) {
-		if (priority_jump || ast_opt_priority_jumping) {
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
-			res = 0;
-		} else {
-			res = -1;
-		}
+		res = -1;
 	} else {
 		res = 0;
 	}
@@ -1807,7 +1775,6 @@
 {
 	int res = 1;
 	struct ast_module_user* u;
-	int priority_jump = 0;
 	int cause = 0;
 	struct varshead* headp;
 	struct ast_var_t* current;
@@ -1835,12 +1802,6 @@
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 
-	if ((args.options) && (strchr(args.options, 'j'))) {
-		priority_jump = 1;
-	}
-	if (option_debug)
-		ast_log(LOG_DEBUG, "OSPFinish: priority jump '%d'\n", priority_jump);
-
 	headp = &chan->varshead;
 	AST_LIST_TRAVERSE(headp, current, entries) {
 		if (!strcasecmp(ast_var_name(current), "OSPINHANDLE")) {
@@ -1923,12 +1884,7 @@
 	pbx_builtin_setvar_helper(chan, "OSPFINISHSTATUS", status);
 
 	if(!res) {
-		if (priority_jump || ast_opt_priority_jumping) {
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
-			res = 0;
-		} else {
-			res = -1;
-		}
+		res = -1;
 	} else {
 		res = 0;
 	}
@@ -2106,8 +2062,6 @@
 " ${OSPINHANDLE}:  The inbound call transaction handle\n"
 " ${OSPINTIMELIMIT}:  The inbound call duration limit in seconds\n"
 "\n"
-"The option string may contain the following character:\n"
-"	'j' -- jump to n+101 priority if the authentication was NOT successful\n"
 "This application sets the following channel variable upon completion:\n"
 "	OSPAUTHSTATUS	The status of the OSP Auth attempt as a text string, one of\n"
 "		SUCCESS | FAILED | ERROR\n";
@@ -2130,7 +2084,6 @@
 " ${OSPRESULTS}:  The number of OSP results total remaining\n"
 "\n"
 "The option string may contain the following character:\n"
-"	'j' -- jump to n+101 priority if the lookup was NOT successful\n"
 "	'h' -- generate H323 call id for the outbound call\n"
 "	's' -- generate SIP call id for the outbound call. Have not been implemented\n"
 "	'i' -- generate IAX call id for the outbound call. Have not been implemented\n"
@@ -2144,8 +2097,6 @@
 "  OSPNext(cause[|provider[|options]]):  Looks up the next OSP Destination for ${OSPOUTHANDLE}\n"
 "See OSPLookup for more information\n"
 "\n"
-"The option string may contain the following character:\n"
-"	'j' -- jump to n+101 priority if the lookup was NOT successful\n"
 "This application sets the following channel variable upon completion:\n"
 "	OSPNEXTSTATUS The status of the OSP Next attempt as a text string, one of\n"
 "		SUCCESS | FAILED | ERROR\n";
@@ -2157,8 +2108,6 @@
 "status, which should be one of BUSY, CONGESTION, ANSWER, NOANSWER, or CHANUNAVAIL\n"
 "or coincidentally, just what the Dial application stores in its ${DIALSTATUS}.\n"
 "\n"
-"The option string may contain the following character:\n"
-"	'j' -- jump to n+101 priority if the finish attempt was NOT successful\n"
 "This application sets the following channel variable upon completion:\n"
 "	OSPFINISHSTATUS The status of the OSP Finish attempt as a text string, one of\n"
 "		SUCCESS | FAILED | ERROR \n";

Modified: trunk/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_playback.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_playback.c (original)
+++ trunk/apps/app_playback.c Tue Jun 12 10:58:28 2007
@@ -59,9 +59,7 @@
 "specified, the application will return immediately should the channel not be\n"
 "off hook.  Otherwise, unless 'noanswer' is specified, the channel will\n"
 "be answered before the sound is played. Not all channels support playing\n"
-"messages while still on hook. If 'j' is specified, the application\n"
-"will jump to priority n+101 if present when a file specified to be played\n"
-"does not exist.\n"
+"messages while still on hook.\n"
 "This application sets the following channel variable upon completion:\n"
 " PLAYBACKSTATUS    The status of the playback attempt as a text string, one of\n"
 "               SUCCESS | FAILED\n"
@@ -384,7 +382,6 @@
 	int option_skip=0;
 	int option_say=0;
 	int option_noanswer = 0;
-	int priority_jump = 0;
 
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(filenames);
@@ -408,10 +405,7 @@
 			option_say = 1;
 		if (strcasestr(args.options, "noanswer"))
 			option_noanswer = 1;
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
-	}
-	
+	} 
 	if (chan->_state != AST_STATE_UP) {
 		if (option_skip) {
 			/* At the user's option, skip if the line is not up */
@@ -435,8 +429,6 @@
 				ast_stopstream(chan);
 			} else {
 				ast_log(LOG_WARNING, "ast_streamfile failed on %s for %s\n", chan->name, (char *)data);
-				if (priority_jump || ast_opt_priority_jumping)
-					ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 				res = 0;
 				mres = 1;
 			}

Modified: trunk/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_privacy.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_privacy.c (original)
+++ trunk/apps/app_privacy.c Tue Jun 12 10:58:28 2007
@@ -65,9 +65,6 @@
   "If you don't want to use the config file and have an i/o operation with\n"
   "every call, you can also specify maxretries and minlength as application\n"
   "parameters. Doing so supercedes any values set in privacy.conf.\n"
-  "The option string may contain the following character: \n"
-  "  'j' -- jump to n+101 priority after <maxretries> failed attempts to collect\n"
-  "         the minlength number of digits.\n"
   "The application sets the following channel variable upon completion: \n"
   "PRIVACYMGRSTATUS  The status of the privacy manager's attempt to collect \n"
   "                  a phone number from the user. A text string that is either:\n" 
@@ -87,7 +84,6 @@
 	struct ast_module_user *u;
 	struct ast_config *cfg = NULL;
 	char *parse = NULL;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(maxretries);
 		AST_APP_ARG(minlength);
@@ -126,9 +122,6 @@
 				else
 					ast_log(LOG_WARNING, "Invalid min length argument\n");
 			}
-			if (args.options)
-				if (strchr(args.options, 'j'))
-					priority_jump = 1;
 
 		}		
 
@@ -200,8 +193,6 @@
 			}
 			pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
 		} else {
-			if (priority_jump || ast_opt_priority_jumping)	
-				ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 			pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "FAILED");
 		}
 		if (cfg) 

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue Jun 12 10:58:28 2007
@@ -167,10 +167,7 @@
 static char *app_aqm_descrip =
 "   AddQueueMember(queuename[|interface[|penalty[|options[|membername]]]]):\n"
 "Dynamically adds interface to an existing queue.\n"
-"If the interface is already in the queue and there exists an n+101 priority\n"
-"then it will then jump to this priority.  Otherwise it will return an error\n"
-"The option string may contain zero or more of the following characters:\n"
-"       'j' -- jump to +101 priority when appropriate.\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"
 "     AQMSTATUS    The status of the attempt to add a queue member as a \n"
 "                     text string, one of\n"
@@ -183,10 +180,7 @@
 static char *app_rqm_descrip =
 "   RemoveQueueMember(queuename[|interface[|options]]):\n"
 "Dynamically removes interface to an existing queue\n"
-"If the interface is NOT in the queue and there exists an n+101 priority\n"
-"then it will then jump to this priority.  Otherwise it will return an error\n"
-"The option string may contain zero or more of the following characters:\n"
-"       'j' -- jump to +101 priority when appropriate.\n"
+"If the interface is NOT in the queue it will return an error.\n"
 "  This application sets the following channel variable upon completion:\n"
 "     RQMSTATUS      The status of the attempt to remove a queue member as a\n"
 "                     text string, one of\n"
@@ -203,13 +197,7 @@
 "any calls from being sent from the queue to the interface until it is\n"
 "unpaused with UnpauseQueueMember or the manager interface.  If no\n"
 "queuename is given, the interface is paused in every queue it is a\n"
-"member of.  If the interface is not in the named queue, or if no queue\n"
-"is given and the interface is not in any queue, it will jump to\n"
-"priority n+101, if it exists and the appropriate options are set.\n"
-"The application will fail if the interface is not found and no extension\n"
-"to jump to exists.\n"
-"The option string may contain zero or more of the following characters:\n"
-"       'j' -- jump to +101 priority when appropriate.\n"
+"member of. The application will fail if the interface is not found.\n"
 "  This application sets the following channel variable upon completion:\n"
 "     PQMSTATUS      The status of the attempt to pause a queue member as a\n"
 "                     text string, one of\n"
@@ -223,8 +211,6 @@
 "Unpauses (resumes calls to) a queue member.\n"
 "This is the counterpart to PauseQueueMember and operates exactly the\n"
 "same way, except it unpauses instead of pausing the given interface.\n"
-"The option string may contain zero or more of the following characters:\n"
-"       'j' -- jump to +101 priority when appropriate.\n"
 "  This application sets the following channel variable upon completion:\n"
 "     UPQMSTATUS       The status of the attempt to unpause a queue \n"
 "                      member as a text string, one of\n"
@@ -3180,7 +3166,6 @@
 {
 	struct ast_module_user *lu;
 	char *parse;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(queuename);
 		AST_APP_ARG(interface);
@@ -3199,8 +3184,6 @@
 	lu = ast_module_user_add(chan);
 
 	if (args.options) {
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 
 	if (ast_strlen_zero(args.interface)) {
@@ -3211,13 +3194,6 @@
 
 	if (set_member_paused(args.queuename, args.interface, 1)) {
 		ast_log(LOG_WARNING, "Attempt to pause interface %s, not found\n", args.interface);
-		if (priority_jump || ast_opt_priority_jumping) {
-			if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
-				pbx_builtin_setvar_helper(chan, "PQMSTATUS", "NOTFOUND");
-				ast_module_user_remove(lu);
-				return 0;
-			}
-		}
 		ast_module_user_remove(lu);
 		pbx_builtin_setvar_helper(chan, "PQMSTATUS", "NOTFOUND");
 		return -1;
@@ -3233,7 +3209,6 @@
 {
 	struct ast_module_user *lu;
 	char *parse;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(queuename);
 		AST_APP_ARG(interface);
@@ -3252,8 +3227,6 @@
 	lu = ast_module_user_add(chan);
 
 	if (args.options) {
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 
 	if (ast_strlen_zero(args.interface)) {
@@ -3264,13 +3237,6 @@
 
 	if (set_member_paused(args.queuename, args.interface, 0)) {
 		ast_log(LOG_WARNING, "Attempt to unpause interface %s, not found\n", args.interface);
-		if (priority_jump || ast_opt_priority_jumping) {
-			if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
-				pbx_builtin_setvar_helper(chan, "UPQMSTATUS", "NOTFOUND");
-				ast_module_user_remove(lu);
-				return 0;
-			}
-		}
 		ast_module_user_remove(lu);
 		pbx_builtin_setvar_helper(chan, "UPQMSTATUS", "NOTFOUND");
 		return -1;
@@ -3287,7 +3253,6 @@
 	int res=-1;
 	struct ast_module_user *lu;
 	char *parse, *temppos = NULL;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(queuename);
 		AST_APP_ARG(interface);
@@ -3314,8 +3279,6 @@
 	}
 
 	if (args.options) {
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 
 	switch (remove_from_queue(args.queuename, args.interface)) {
@@ -3328,8 +3291,6 @@
 	case RES_EXISTS:
 		if (option_debug)
 			ast_log(LOG_DEBUG, "Unable to remove interface '%s' from queue '%s': Not there\n", args.interface, args.queuename);
-		if (priority_jump || ast_opt_priority_jumping)
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 		pbx_builtin_setvar_helper(chan, "RQMSTATUS", "NOTINQUEUE");
 		res = 0;
 		break;
@@ -3350,7 +3311,6 @@
 	int res=-1;
 	struct ast_module_user *lu;
 	char *parse, *temppos = NULL;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(queuename);
 		AST_APP_ARG(interface);
@@ -3386,8 +3346,6 @@
 	}
 	
 	if (args.options) {
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 
 	if (ast_strlen_zero(args.membername))
@@ -3403,8 +3361,6 @@
 		break;
 	case RES_EXISTS:
 		ast_log(LOG_WARNING, "Unable to add interface '%s' to queue '%s': Already there\n", args.interface, args.queuename);
-		if (priority_jump || ast_opt_priority_jumping)
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 		pbx_builtin_setvar_helper(chan, "AQMSTATUS", "MEMBERALREADY");
 		res = 0;
 		break;

Modified: trunk/apps/app_sendtext.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_sendtext.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_sendtext.c (original)
+++ trunk/apps/app_sendtext.c Tue Jun 12 10:58:28 2007
@@ -58,11 +58,7 @@
 "      FAILURE      Transmission failed\n"
 "      UNSUPPORTED  Text transmission not supported by channel\n"
 "\n"
-"At this moment, text is supposed to be 7 bit ASCII in most channels.\n"
-"The option string many contain the following character:\n"
-"'j' -- jump to n+101 priority if the channel doesn't support\n"
-"       text transport\n";
-
+"At this moment, text is supposed to be 7 bit ASCII in most channels.\n";
 
 static int sendtext_exec(struct ast_channel *chan, void *data)
 {
@@ -70,7 +66,6 @@
 	struct ast_module_user *u;
 	char *status = "UNSUPPORTED";
 	char *parse = NULL;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(text);
 		AST_APP_ARG(options);
@@ -88,16 +83,12 @@
 	AST_STANDARD_APP_ARGS(args, parse);
 
 	if (args.options) {
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 
 	ast_channel_lock(chan);
 	if (!chan->tech->send_text) {
 		ast_channel_unlock(chan);
 		/* Does not support transport */
-		if (priority_jump || ast_opt_priority_jumping)
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 		ast_module_user_remove(u);
 		return 0;
 	}

Modified: trunk/apps/app_system.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_system.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_system.c (original)
+++ trunk/apps/app_system.c Tue Jun 12 10:58:28 2007
@@ -59,14 +59,7 @@
 "fails, the console should report a fallthrough. \n"
 "Result of execution is returned in the SYSTEMSTATUS channel variable:\n"
 "   FAILURE	Could not execute the specified command\n"
-"   SUCCESS	Specified command successfully executed\n"
-"\n"
-"Old behaviour:\n"
-"If the command itself executes but is in error, and if there exists\n"
-"a priority n + 101, where 'n' is the priority of the current instance,\n"
-"then  the  channel  will  be  setup to continue at that priority level.\n"
-"Note that this jump functionality has been deprecated and will only occur\n"
-"if the global priority jumping option is enabled in extensions.conf.\n";
+"   SUCCESS	Specified command successfully executed\n";
 
 static char *descrip2 =
 "  TrySystem(command): Executes a command  by  using  system().\n"
@@ -74,13 +67,7 @@
 "Result of execution is returned in the SYSTEMSTATUS channel variable:\n"
 "   FAILURE	Could not execute the specified command\n"
 "   SUCCESS	Specified command successfully executed\n"
-"   APPERROR	Specified command successfully executed, but returned error code\n"
-"\n"
-"Old behaviour:\nIf  the command itself executes but is in error, and if\n"
-"there exists a priority n + 101, where 'n' is the priority of the current\n"
-"instance, then  the  channel  will  be  setup  to continue at that\n"
-"priority level.  Otherwise, System will terminate.\n";
-
+"   APPERROR	Specified command successfully executed, but returned error code\n";
 
 static int system_exec_helper(struct ast_channel *chan, void *data, int failmode)
 {
@@ -108,9 +95,6 @@
 	} else {
 		if (res < 0) 
 			res = 0;
-		if (ast_opt_priority_jumping && res)
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
-
 		if (res != 0)
 			pbx_builtin_setvar_helper(chan, chanvar, "APPERROR");
 		else

Modified: trunk/apps/app_transfer.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_transfer.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_transfer.c (original)
+++ trunk/apps/app_transfer.c Tue Jun 12 10:58:28 2007
@@ -60,10 +60,7 @@
 "channel variable:\n"
 "       SUCCESS      Transfer succeeded\n"
 "       FAILURE      Transfer failed\n"
-"       UNSUPPORTED  Transfer unsupported by channel driver\n"
-"The option string many contain the following character:\n"
-"'j' -- jump to n+101 priority if the channel transfer attempt\n"
-"       fails\n";
+"       UNSUPPORTED  Transfer unsupported by channel driver\n";
 
 static int transfer_exec(struct ast_channel *chan, void *data)
 {
@@ -75,7 +72,6 @@
 	char *dest = NULL;
 	char *status;
 	char *parse;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(dest);
 		AST_APP_ARG(options);
@@ -94,8 +90,6 @@
 	AST_STANDARD_APP_ARGS(args, parse);
 
 	if (args.options) {
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 
 	dest = args.dest;
@@ -122,8 +116,6 @@
 
 	if (res < 0) {
 		status = "FAILURE";
-		if (priority_jump || ast_opt_priority_jumping)
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 		res = 0;
 	} else {
 		status = "SUCCESS";

Modified: trunk/apps/app_url.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_url.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_url.c (original)
+++ trunk/apps/app_url.c Tue Jun 12 10:58:28 2007
@@ -59,10 +59,6 @@
 "If the option 'wait' is specified, execution will wait for an\n"
 "acknowledgement that the URL has been loaded before continuing\n"
 "\n"
-"If jumping is specified as an option (the 'j' flag), the client does not\n"
-"support Asterisk \"html\" transport, and there exists a step with priority\n"
-"n + 101, then execution will continue at that step.\n"
-"\n"
 "SendURL continues normally if the URL was sent correctly or if the channel\n"
 "does not support HTML transport.  Otherwise, the channel is hung up.\n";
 
@@ -74,7 +70,6 @@
 	char *tmp;
 	char *options;
 	int local_option_wait=0;
-	int local_option_jump = 0;
 	struct ast_frame *f;
 	char *stringp=NULL;
 	char *status = "FAILURE";
@@ -94,13 +89,9 @@
 	options = strsep(&stringp, "|");
 	if (options && !strcasecmp(options, "wait"))
 		local_option_wait = 1;
-	if (options && !strcasecmp(options, "j"))
-		local_option_jump = 1;
 	
 	if (!ast_channel_supports_html(chan)) {
 		/* Does not support transport */
-		if (local_option_jump || ast_opt_priority_jumping)
-			 ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 		pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", "UNSUPPORTED");
 		ast_module_user_remove(u);
 		return 0;
@@ -135,8 +126,6 @@
 				case AST_HTML_NOSUPPORT:
 					/* Does not support transport */
 					status ="UNSUPPORTED";
-					if (local_option_jump || ast_opt_priority_jumping)
-			 			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 					res = 0;
 					ast_frfree(f);
 					goto out;

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue Jun 12 10:58:28 2007
@@ -211,7 +211,6 @@
 	OPT_UNAVAIL_GREETING = (1 << 2),
 	OPT_RECORDGAIN =       (1 << 3),
 	OPT_PREPEND_MAILBOX =  (1 << 4),
-	OPT_PRIORITY_JUMP =    (1 << 5),
 	OPT_AUTOPLAY =         (1 << 6),
 } vm_option_flags;
 
@@ -228,7 +227,6 @@
 	AST_APP_OPTION('u', OPT_UNAVAIL_GREETING),
 	AST_APP_OPTION_ARG('g', OPT_RECORDGAIN, OPT_ARG_RECORDGAIN),
 	AST_APP_OPTION('p', OPT_PREPEND_MAILBOX),
-	AST_APP_OPTION('j', OPT_PRIORITY_JUMP),
 	AST_APP_OPTION_ARG('a', OPT_AUTOPLAY, OPT_ARG_PLAYFOLDER),
 });
 
@@ -457,9 +455,7 @@
 	"           message. The units are whole-number decibels (dB).\n"
 	"    s    - Skip the playback of instructions for leaving a message to the\n"
 	"           calling party.\n"
-	"    u    - Play the 'unavailable greeting.\n"
-	"    j    - Jump to priority n+101 if the mailbox is not found or some other\n"
-	"           error occurs.\n";
+	"    u    - Play the 'unavailable greeting.\n";
 
 static char *synopsis_vmain = "Check Voicemail messages";
 
@@ -489,8 +485,7 @@
 	"    VMBOXEXISTSSTATUS - This will contain the status of the execution of the\n"
 	"                        MailboxExists application. Possible values include:\n"
 	"                        SUCCESS | FAILED\n\n"
-	"  Options:\n"
-	"    j - Jump to priority n+101 if the mailbox is found.\n";
+	"  Options: (none)\n";
 
 static char *synopsis_vmauthenticate = "Authenticate with Voicemail passwords";
 
@@ -2995,8 +2990,6 @@
 		ast_log(LOG_DEBUG, "Before find_user\n");
 	if (!(vmu = find_user(&svm, context, ext))) {
 		ast_log(LOG_WARNING, "No entry in voicemail config file for '%s'\n", ext);
-		if (ast_test_flag(options, OPT_PRIORITY_JUMP) || ast_opt_priority_jumping)
-			ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101);
 		pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
 		return res;
 	}
@@ -7008,7 +7001,7 @@
 				ast_module_user_remove(u);
 				return -1;
 			}
-			ast_copy_flags(&leave_options, &flags, OPT_SILENT | OPT_BUSY_GREETING | OPT_UNAVAIL_GREETING | OPT_PRIORITY_JUMP);
+			ast_copy_flags(&leave_options, &flags, OPT_SILENT | OPT_BUSY_GREETING | OPT_UNAVAIL_GREETING);
 			if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
 				int gain;
 
@@ -7039,10 +7032,6 @@
 
 	if (res == ERROR_LOCK_PATH) {
 		ast_log(LOG_ERROR, "Could not leave voicemail. The path is already locked.\n");
-		/*Send the call to n+101 priority, where n is the current priority*/
-		if (ast_test_flag(&leave_options, OPT_PRIORITY_JUMP) || ast_opt_priority_jumping)
-			if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
-				ast_log(LOG_WARNING, "Extension %s, priority %d doesn't exist.\n", chan->exten, chan->priority + 101);
 		pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
 		res = 0;
 	}
@@ -7122,7 +7111,6 @@
 	struct ast_module_user *u;
 	struct ast_vm_user svm;
 	char *context, *box;
-	int priority_jump = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(mbox);
 		AST_APP_ARG(options);
@@ -7146,8 +7134,6 @@
 	AST_STANDARD_APP_ARGS(args, box);
 
 	if (args.options) {
-		if (strchr(args.options, 'j'))
-			priority_jump = 1;
 	}
 
 	if ((context = strchr(args.mbox, '@'))) {
@@ -7157,9 +7143,6 @@
 
 	if (find_user(&svm, context, args.mbox)) {
 		pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "SUCCESS");
-		if (priority_jump || ast_opt_priority_jumping)
-			if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) 
-				ast_log(LOG_WARNING, "VM box %s@%s exists, but extension %s, priority %d doesn't exist\n", box, context, chan->exten, chan->priority + 101);
 	} else
 		pbx_builtin_setvar_helper(chan, "VMBOXEXISTSSTATUS", "FAILED");
 	ast_module_user_remove(u);

Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=68970&r1=68969&r2=68970
==============================================================================
--- trunk/channels/chan_agent.c (original)

[... 84 lines stripped ...]


More information about the asterisk-commits mailing list