Index: include/asterisk/manager.h =================================================================== --- include/asterisk/manager.h (revision 68594) +++ include/asterisk/manager.h (working copy) @@ -61,6 +61,7 @@ #define EVENT_FLAG_USER (1 << 6) /* Ability to read/set user info */ #define EVENT_FLAG_CONFIG (1 << 7) /* Ability to modify configurations */ #define EVENT_FLAG_DTMF (1 << 8) /* Ability to read DTMF events */ +#define EVENT_FLAG_CDR (1 << 9) /* Ability to read CDRs */ /* Export manager structures */ #define AST_MAX_MANHEADERS 128 Index: main/manager.c =================================================================== --- main/manager.c (revision 68594) +++ main/manager.c (working copy) @@ -317,6 +317,7 @@ { EVENT_FLAG_USER, "user" }, { EVENT_FLAG_CONFIG, "config" }, { EVENT_FLAG_DTMF, "dtmf" }, + { EVENT_FLAG_CDR, "cdr" }, { -1, "all" }, { 0, "none" }, }; @@ -390,7 +391,7 @@ return -1; for (p = string; *p; p++) - if (*p < '0' || *p > '9') + if (*p < '0' || *p > '10') break; if (!p) /* all digits */ return atoi(string); Index: cdr/cdr_manager.c =================================================================== --- cdr/cdr_manager.c (revision 68594) +++ cdr/cdr_manager.c (working copy) @@ -108,7 +108,7 @@ localtime_r(&t, &timeresult); strftime(strEndTime, sizeof(strEndTime), DATE_FORMAT, &timeresult); - manager_event(EVENT_FLAG_CALL, "Cdr", + manager_event(EVENT_FLAG_CDR, "Cdr", "AccountCode: %s\r\n" "Source: %s\r\n" "Destination: %s\r\n"