Little dial typo fix and make WaitExten continue if nothing entered and there is...
authorMark Spencer <markster@digium.com>
Mon, 22 Nov 2004 22:40:06 +0000 (22:40 +0000)
committerMark Spencer <markster@digium.com>
Mon, 22 Nov 2004 22:40:06 +0000 (22:40 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4318 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c
pbx.c

index 564ff86..70f28ac 100755 (executable)
@@ -1066,7 +1066,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
                                                                if(macro_transfer_dest[res] == '^')
                                                                        macro_transfer_dest[res] = '|';
 
                                                                if(macro_transfer_dest[res] == '^')
                                                                        macro_transfer_dest[res] = '|';
 
-                                                       if(!ast_parsable_goto(chan, macro_transfer_dest))
+                                                       if(!ast_parseable_goto(chan, macro_transfer_dest))
                                                                go_on = 1;
                                                        
                                                }
                                                                go_on = 1;
                                                        
                                                }
diff --git a/pbx.c b/pbx.c
index 14fcf26..bc954d7 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -4836,9 +4836,12 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data)
                ms = 10000;
        res = ast_waitfordigit(chan, ms);
        if (!res) {
                ms = 10000;
        res = ast_waitfordigit(chan, ms);
        if (!res) {
-               if (ast_exists_extension(chan, chan->context, "t", 1, chan->cid.cid_num)) {
+               if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 1, chan->cid.cid_num)) {
                        if (option_verbose > 2)
                        if (option_verbose > 2)
-                               ast_verbose(VERBOSE_PREFIX_3 "Timeout on %s\n", chan->name);
+                               ast_verbose(VERBOSE_PREFIX_3 "Timeout on %s, continuing...\n", chan->name);
+               } else if (ast_exists_extension(chan, chan->context, "t", 1, chan->cid.cid_num)) {
+                       if (option_verbose > 2)
+                               ast_verbose(VERBOSE_PREFIX_3 "Timeout on %s, going to 't'\n", chan->name);
                        strncpy(chan->exten, "t", sizeof(chan->exten));
                        chan->priority = 0;
                } else {
                        strncpy(chan->exten, "t", sizeof(chan->exten));
                        chan->priority = 0;
                } else {