Change cdr_manager to use a "CDR" level, rather than the (overcrowded) "call" level.
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 5 Dec 2007 16:46:47 +0000 (16:46 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 5 Dec 2007 16:46:47 +0000 (16:46 +0000)
(Closes issue #11015)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91173 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
UPGRADE.txt
cdr/cdr_manager.c
configs/manager.conf.sample
include/asterisk/manager.h
main/manager.c

diff --git a/CHANGES b/CHANGES
index 34ca72d..3380c62 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -23,6 +23,8 @@ AMI - The manager (TCP/TLS/HTTP)
   * Added a "ListAllVoicemailUsers" action that allows you to get a list of all
      the voicemail users setup.
   * Added 'DBDel' and 'DBDelTree' manager commands.
+  * cdr_manager now reports events via the "cdr" level, separating it from
+     the very verbose "call" level.
 
 Dialplan functions
 ------------------
index 82374eb..06828c6 100644 (file)
@@ -146,3 +146,7 @@ Manager:
 * The IAXpeers command output has been changed to more closely resemble the
   output of the SIPpeers command.
 
+* cdr_manager now reports at the "cdr" level, not at "call"  You may need to
+   change your manager.conf to add the level to existing AMI users, if they
+   want to see the CDR events generated.
+
index b6f5deb..8b2ab21 100644 (file)
@@ -146,7 +146,7 @@ static int manager_log(struct ast_cdr *cdr)
                pbx_substitute_variables_helper(&dummy, customfields->str, buf, sizeof(buf) - 1);
        }
 
-       manager_event(EVENT_FLAG_CALL, "Cdr",
+       manager_event(EVENT_FLAG_CDR, "Cdr",
            "AccountCode: %s\r\n"
            "Source: %s\r\n"
            "Destination: %s\r\n"
index dceec13..b4d6a09 100644 (file)
@@ -71,5 +71,5 @@ bindaddr = 0.0.0.0
 ;displayconnects = yes ; Display on CLI user login/logoff
 ;
 ; Authorization for various classes 
-;read = system,call,log,verbose,command,agent,user,config,dtmf,reporting
-;write = system,call,log,verbose,command,agent,user,config,dtmf,reporting
+;read = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr
+;write = system,call,log,verbose,command,agent,user,config,dtmf,reporting,cdr
index 79a1998..a57e890 100644 (file)
@@ -63,6 +63,8 @@
 #define EVENT_FLAG_CONFIG              (1 << 7) /* Ability to modify configurations */
 #define EVENT_FLAG_DTMF                (1 << 8) /* Ability to read DTMF events */
 #define EVENT_FLAG_REPORTING           (1 << 9) /* Reporting events such as rtcp sent */
+#define EVENT_FLAG_CDR                 (1 << 10) /* CDR events */
+
 /* Export manager structures */
 #define AST_MAX_MANHEADERS 128
 
index 6b3bf70..4c2a340 100644 (file)
@@ -309,6 +309,7 @@ static struct permalias {
        { EVENT_FLAG_CONFIG, "config" },
        { EVENT_FLAG_DTMF, "dtmf" },
        { EVENT_FLAG_REPORTING, "reporting" },
+       { EVENT_FLAG_CDR, "cdr" },
        { -1, "all" },
        { 0, "none" },
 };