Implement flags for AGI in the channel structure so taht "show channels" and
[asterisk/asterisk.git] / main / manager.c
index 15fbbc8..fa92408 100644 (file)
@@ -2718,9 +2718,13 @@ static int action_coreshowchannels(struct mansession *s, const struct message *m
                        "AccountCode: %s\r\n"
                        "BridgedChannel: %s\r\n"
                        "BridgedUniqueID: %s\r\n"
                        "AccountCode: %s\r\n"
                        "BridgedChannel: %s\r\n"
                        "BridgedUniqueID: %s\r\n"
-                       "\r\n", c->name, c->uniqueid, c->context, c->exten, c->priority, c->_state, ast_state2str(c->_state),
+                       "AGIstate: %s\r\n"
+                       "\r\n",
+                       c->name, c->uniqueid, c->context, c->exten, c->priority, c->_state, ast_state2str(c->_state),
                        c->appl ? c->appl : "", c->data ? S_OR(c->data, ""): "",
                        c->appl ? c->appl : "", c->data ? S_OR(c->data, ""): "",
-                       S_OR(c->cid.cid_num, ""), durbuf, S_OR(c->accountcode, ""), bc ? bc->name : "", bc ? bc->uniqueid : "");
+                       S_OR(c->cid.cid_num, ""), durbuf, S_OR(c->accountcode, ""), bc ? bc->name : "", bc ? bc->uniqueid : "",
+                       agi_state(c)
+                       );
                ast_channel_unlock(c);
                numchans++;
        }
                ast_channel_unlock(c);
                numchans++;
        }