--- main/manager.c.orig 2010-01-28 20:50:21.000000000 -0200 +++ main/manager.c 2010-04-16 09:55:31.000000000 -0300 @@ -1815,14 +1815,17 @@ /* if we look by name, we break after the first iteration */ while (c) { channels++; - if (c->_bridge) + if (c->_bridge) { snprintf(bridge, sizeof(bridge), "BridgedChannel: %s\r\nBridgedUniqueid: %s\r\n", c->_bridge->name, c->_bridge->uniqueid); - else + } else { bridge[0] = '\0'; + } + + if (c->cdr) { + elapsed_seconds = now.tv_sec - c->cdr->start.tv_sec; + } + if (c->pbx) { - if (c->cdr) { - elapsed_seconds = now.tv_sec - c->cdr->start.tv_sec; - } astman_append(s, "Event: Status\r\n" "Privilege: Call\r\n" @@ -1856,6 +1859,7 @@ "CallerIDName: %s\r\n" "Account: %s\r\n" "State: %s\r\n" + "Seconds: %ld\r\n" "%s" "Uniqueid: %s\r\n" "%s" @@ -1864,7 +1868,7 @@ S_OR(c->cid.cid_num, ""), S_OR(c->cid.cid_name, ""), c->accountcode, - ast_state2str(c->_state), bridge, c->uniqueid, idText); + ast_state2str(c->_state), (long)elapsed_seconds, bridge, c->uniqueid, idText); } ast_channel_unlock(c); if (!all)