Title update
[asterisk/asterisk.git] / funcs / func_frame_trace.c
index 681f151..8e12aaf 100644 (file)
@@ -140,7 +140,7 @@ static struct ast_frame *hook_event_cb(struct ast_channel *chan, struct ast_fram
        }
 
        if (show_frame) {
-               ast_verbose("%s on Channel %s\n", event == AST_FRAMEHOOK_EVENT_READ ? "<--Read" : "--> Write", chan->name);
+               ast_verbose("%s on Channel %s\n", event == AST_FRAMEHOOK_EVENT_READ ? "<--Read" : "--> Write", ast_channel_name(chan));
                print_frame(frame);
        }
        return frame;
@@ -227,7 +227,7 @@ static void print_frame(struct ast_frame *frame)
                break;
        case AST_FRAME_CONTROL:
                ast_verbose("FrameType: CONTROL\n");
-               switch (frame->subclass.integer) {
+               switch ((enum ast_control_frame_type) frame->subclass.integer) {
                case AST_CONTROL_HANGUP:
                        ast_verbose("SubClass: HANGUP\n");
                        break;
@@ -315,7 +315,20 @@ static void print_frame(struct ast_frame *frame)
                case AST_CONTROL_MCID:
                        ast_verbose("SubClass: MCID\n");
                        break;
+               case AST_CONTROL_INCOMPLETE:
+                       ast_verbose("SubClass: INCOMPLETE\n");
+                       break;
+               case AST_CONTROL_END_OF_Q:
+                       ast_verbose("SubClass: END_OF_Q\n");
+                       break;
+               case AST_CONTROL_UPDATE_RTP_PEER:
+                       ast_verbose("SubClass: UPDATE_RTP_PEER\n");
+                       break;
+               case AST_CONTROL_PVT_CAUSE_CODE:
+                       ast_verbose("SubClass: PVT_CAUSE_CODE\n");
+                       break;
                }
+               
                if (frame->subclass.integer == -1) {
                        ast_verbose("SubClass: %d\n", frame->subclass.integer);
                }