Generate "failed" context on busy, too
authorMark Spencer <markster@digium.com>
Wed, 23 Jun 2004 20:46:58 +0000 (20:46 +0000)
committerMark Spencer <markster@digium.com>
Wed, 23 Jun 2004 20:46:58 +0000 (20:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3290 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx.c

diff --git a/pbx.c b/pbx.c
index 697c016..4d96962 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -3942,7 +3942,9 @@ int ast_pbx_outgoing_exten(char *type, int format, void *data, int timeout, char
                                        ast_verbose(VERBOSE_PREFIX_4 "Channel %s was never answered.\n", chan->name);
                                ast_hangup(chan);
                        }
-               } else {
+               }
+
+               if(res < 0) { /* the call failed for some reason */
                        /* create a fake channel and execute the "failed" extension (if it exists) within the requested context */
                        /* check if "failed" exists */
                        if (ast_exists_extension(chan, context, "failed", 1, NULL)) {