Fix previous commit.
authorMatthew Nicholson <mnicholson@digium.com>
Thu, 22 Apr 2010 22:11:23 +0000 (22:11 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Thu, 22 Apr 2010 22:11:23 +0000 (22:11 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258675 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index 712da3d..b0366ad 100644 (file)
@@ -4522,8 +4522,19 @@ struct ast_channel *__ast_request_and_dial(const char *type, format_t format, co
                                        break;
 
                                case AST_CONTROL_BUSY:
+                                       ast_cdr_busy(chan->cdr);
+                                       *outstate = f->subclass.integer;
+                                       timeout = 0;
+                                       break;
+
                                case AST_CONTROL_CONGESTION:
+                                       ast_cdr_failed(chan->cdr);
+                                       *outstate = f->subclass.integer;
+                                       timeout = 0;
+                                       break;
+
                                case AST_CONTROL_ANSWER:
+                                       ast_cdr_answer(chan->cdr);
                                        *outstate = f->subclass.integer;
                                        timeout = 0;            /* trick to force exit from the while() */
                                        break;
@@ -6141,24 +6152,6 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
                                ast_clear_flag(c0, AST_FLAG_NBRIDGE);
                                ast_clear_flag(c1, AST_FLAG_NBRIDGE);
 
-                               case AST_CONTROL_BUSY:
-                                       ast_cdr_busy(chan->cdr);
-                                       *outstate = f->subclass;
-                                       timeout = 0;
-                                       break;
-
-                               case AST_CONTROL_CONGESTION:
-                                       ast_cdr_failed(chan->cdr);
-                                       *outstate = f->subclass;
-                                       timeout = 0;
-                                       break;
-
-                               case AST_CONTROL_ANSWER:
-                                       ast_cdr_answer(chan->cdr);
-                                       *outstate = f->subclass;
-                                       timeout = 0;            /* trick to force exit from the while() */
-                                       break;
-
                                if (c0->_softhangup == AST_SOFTHANGUP_UNBRIDGE || c1->_softhangup == AST_SOFTHANGUP_UNBRIDGE)
                                        continue;