aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-05 16:46:47 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-05 16:46:47 +0000
commita17700ba803b10ebbb90dbe3f4e2cec12d027d92 (patch)
tree5ca674f8851be82aa3f1d9b569113d0fa02ce386
parent29a6f4d8e6884bce6faf039b4f7902c3408a88b6 (diff)
Change cdr_manager to use a "CDR" level, rather than the (overcrowded) "call" level.
(Closes issue #11015) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91173 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--CHANGES2
-rw-r--r--UPGRADE.txt4
-rw-r--r--cdr/cdr_manager.c2
-rw-r--r--configs/manager.conf.sample4
-rw-r--r--include/asterisk/manager.h2
-rw-r--r--main/manager.c1
6 files changed, 12 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index 34ca72d21..3380c62cc 100644
--- 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
------------------
diff --git a/UPGRADE.txt b/UPGRADE.txt
index 82374eb59..06828c683 100644
--- a/UPGRADE.txt
+++ b/UPGRADE.txt
@@ -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.
+
diff --git a/cdr/cdr_manager.c b/cdr/cdr_manager.c
index b6f5deb6a..8b2ab215d 100644
--- a/cdr/cdr_manager.c
+++ b/cdr/cdr_manager.c
@@ -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"
diff --git a/configs/manager.conf.sample b/configs/manager.conf.sample
index dceec1378..b4d6a0909 100644
--- a/configs/manager.conf.sample
+++ b/configs/manager.conf.sample
@@ -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
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index 79a1998d0..a57e890fd 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -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
diff --git a/main/manager.c b/main/manager.c
index 6b3bf700b..4c2a340b7 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -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" },
};