Set ORIGINATE_STATUS instead of OUTGOING_STATUS to match the documentation
authorTerry Wilson <twilson@digium.com>
Fri, 9 Jan 2009 01:15:43 +0000 (01:15 +0000)
committerTerry Wilson <twilson@digium.com>
Fri, 9 Jan 2009 01:15:43 +0000 (01:15 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167973 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_originate.c

index 12055d8..15d34a5 100644 (file)
@@ -168,29 +168,29 @@ static int originate_exec(struct ast_channel *chan, void *data)
 
 return_cleanup:
        if (res) {
-               pbx_builtin_setvar_helper(chan, "OUTGOING_STATUS", "FAILED");
+               pbx_builtin_setvar_helper(chan, "ORIGINATE_STATUS", "FAILED");
        } else {
                switch (outgoing_status) {
                case 0:
                case AST_CONTROL_ANSWER:
-                       pbx_builtin_setvar_helper(chan, "OUTGOING_STATUS", "SUCCESS");
+                       pbx_builtin_setvar_helper(chan, "ORIGINATE_STATUS", "SUCCESS");
                        break;
                case AST_CONTROL_BUSY:
-                       pbx_builtin_setvar_helper(chan, "OUTGOING_STATUS", "BUSY");
+                       pbx_builtin_setvar_helper(chan, "ORIGINATE_STATUS", "BUSY");
                        break;
                case AST_CONTROL_CONGESTION:
-                       pbx_builtin_setvar_helper(chan, "OUTGOING_STATUS", "CONGESTION");
+                       pbx_builtin_setvar_helper(chan, "ORIGINATE_STATUS", "CONGESTION");
                        break;
                case AST_CONTROL_HANGUP:
-                       pbx_builtin_setvar_helper(chan, "OUTGOING_STATUS", "HANGUP");
+                       pbx_builtin_setvar_helper(chan, "ORIGINATE_STATUS", "HANGUP");
                        break;
                case AST_CONTROL_RINGING:
-                       pbx_builtin_setvar_helper(chan, "OUTGOING_STATUS", "RINGING");
+                       pbx_builtin_setvar_helper(chan, "ORIGINATE_STATUS", "RINGING");
                        break;
                default:
                        ast_log(LOG_WARNING, "Unknown originate status result of '%d'\n",
                                        outgoing_status);
-                       pbx_builtin_setvar_helper(chan, "OUTGOING_STATUS", "UNKNOWN");
+                       pbx_builtin_setvar_helper(chan, "ORIGINATE_STATUS", "UNKNOWN");
                        break;
                }
        }