--- main/manager.c.orig 2010-04-15 15:44:51.000000000 -0300 +++ main/manager.c 2010-04-16 09:47:09.000000000 -0300 @@ -1944,14 +1944,17 @@ } 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" @@ -1986,6 +1989,7 @@ "CallerIDName: %s\r\n" "Account: %s\r\n" "State: %s\r\n" + "Seconds: %ld\r\n" "%s" "Uniqueid: %s\r\n" "%s" @@ -1995,7 +1999,7 @@ S_OR(c->cid.cid_num, ""), S_OR(c->cid.cid_name, ""), c->accountcode, - ast_state2str(c->_state), bridge, c->uniqueid, str->str, idText); + ast_state2str(c->_state), (long)elapsed_seconds, bridge, c->uniqueid, str->str, idText); } ast_channel_unlock(c); if (!all)