From 18a6c3a41508c4ca6958aa6dc4498a9450f6c8c0 Mon Sep 17 00:00:00 2001 From: Jonathan Rose Date: Fri, 18 Mar 2011 19:05:20 +0000 Subject: Adds an option to FollowMe that isn't useful for the bug it was made to solve. Still, due to the nature of FollowMe, it makes sense to have this option since it keeps apps bound to channels that would otherwise go away from being lost. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311427 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_followme.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'apps/app_followme.c') diff --git a/apps/app_followme.c b/apps/app_followme.c index 8b9f1061b..c53264b14 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -86,6 +86,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") + @@ -168,7 +173,8 @@ enum { FOLLOWMEFLAG_RECORDNAME = (1 << 1), FOLLOWMEFLAG_UNREACHABLEMSG = (1 << 2), FOLLOWMEFLAG_DISABLEHOLDPROMPT = (1 << 3), - FOLLOWMEFLAG_NOANSWER = (1 << 4) + FOLLOWMEFLAG_NOANSWER = (1 << 4), + FOLLOWMEFLAG_DISABLEOPTIMIZATION = (1 << 5), }; AST_APP_OPTIONS(followme_opts, { @@ -177,6 +183,7 @@ AST_APP_OPTIONS(followme_opts, { AST_APP_OPTION('n', FOLLOWMEFLAG_UNREACHABLEMSG ), AST_APP_OPTION('d', FOLLOWMEFLAG_DISABLEHOLDPROMPT ), AST_APP_OPTION('N', FOLLOWMEFLAG_NOANSWER ), + AST_APP_OPTION('l', FOLLOWMEFLAG_DISABLEOPTIMIZATION ), }); static int ynlongest = 0; @@ -838,9 +845,9 @@ static void findmeexec(struct fm_args *tpargs) } if (!strcmp(tpargs->context, "")) - snprintf(dialarg, sizeof(dialarg), "%s", number); + snprintf(dialarg, sizeof(dialarg), "%s%s", number, ast_test_flag(&tpargs->followmeflags, FOLLOWMEFLAG_DISABLEOPTIMIZATION) ? "/n" : ""); else - snprintf(dialarg, sizeof(dialarg), "%s@%s", number, tpargs->context); + snprintf(dialarg, sizeof(dialarg), "%s@%s%s", number, tpargs->context, ast_test_flag(&tpargs->followmeflags, FOLLOWMEFLAG_DISABLEOPTIMIZATION) ? "/n" : ""); tmpuser = ast_calloc(1, sizeof(*tmpuser)); if (!tmpuser) { -- cgit v1.2.3