Adds an option to FollowMe that isn't useful for the bug it was made to solve. Still...
authorJonathan Rose <jrose@digium.com>
Fri, 18 Mar 2011 19:05:20 +0000 (19:05 +0000)
committerJonathan Rose <jrose@digium.com>
Fri, 18 Mar 2011 19:05:20 +0000 (19:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311427 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
apps/app_followme.c

diff --git a/CHANGES b/CHANGES
index dde4ffc..6e3a49b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -77,6 +77,13 @@ MixMonitor
    (mixed) recording.  The mixed file name argument is optional now as long
    as at least one recording option is used.
 
    (mixed) recording.  The mixed file name argument is optional now as long
    as at least one recording option is used.
 
+FollowMe
+--------------------------
+ * Added a new option, l, which will disable local call optimization for
+   channels involved with the FollowMe thread.  Use this option to improve
+   compatability for a FollowMe call with certain dialplan apps, options, and
+   functions.
+
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
 ------------------------------------------------------------------------------
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
 ------------------------------------------------------------------------------
index 8b9f106..c53264b 100644 (file)
@@ -86,6 +86,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
                                        <option name="d">
                                                <para>Disable the 'Please hold while we try to connect your call' announcement.</para>
                                        </option>
                                        <option name="d">
                                                <para>Disable the 'Please hold while we try to connect your call' announcement.</para>
                                        </option>
+                                       <option name="l">
+                                               <para>Disable local call optimization so that applications with
+                                               audio hooks between the local bridge don't get dropped when the
+                                               calls get joined directly.</para>
+                                       </option>
                                </optionlist>
                        </parameter>
                </syntax>
                                </optionlist>
                        </parameter>
                </syntax>
@@ -168,7 +173,8 @@ enum {
        FOLLOWMEFLAG_RECORDNAME = (1 << 1),
        FOLLOWMEFLAG_UNREACHABLEMSG = (1 << 2),
        FOLLOWMEFLAG_DISABLEHOLDPROMPT = (1 << 3),
        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, {
 };
 
 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('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;
 });
 
 static int ynlongest = 0;
@@ -838,9 +845,9 @@ static void findmeexec(struct fm_args *tpargs)
                        }
 
                        if (!strcmp(tpargs->context, ""))
                        }
 
                        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
                        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) {
 
                        tmpuser = ast_calloc(1, sizeof(*tmpuser));
                        if (!tmpuser) {