[Asterisk-cvs] asterisk/include/asterisk cdr.h,1.26,1.27
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Thu Jun 2 21:39:29 CDT 2005
- Previous message: [Asterisk-cvs] asterisk asterisk.c, 1.155, 1.156 cdr.c, 1.38,
1.39 channel.c, 1.196, 1.197 loader.c, 1.40, 1.41 pbx.c, 1.246,
1.247
- Next message: [Asterisk-cvs] asterisk pbx.c,1.247,1.248
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv4616/include/asterisk
Modified Files:
cdr.h
Log Message:
support configurable batch posting of CDRs (off by default) (bug #3883)
Index: cdr.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/cdr.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- cdr.h 30 May 2005 14:30:47 -0000 1.26
+++ cdr.h 3 Jun 2005 01:42:31 -0000 1.27
@@ -14,14 +14,15 @@
*
*/
-#ifndef _CDR_H
-#define _CDR_H
+#ifndef _ASTERISK_CDR_H
+#define _ASTERISK_CDR_H
#include <sys/time.h>
-#define AST_CDR_FLAG_KEEP_VARS (1 << 0)
+#define AST_CDR_FLAG_KEEP_VARS (1 << 0)
#define AST_CDR_FLAG_POSTED (1 << 1)
#define AST_CDR_FLAG_LOCKED (1 << 2)
#define AST_CDR_FLAG_CHILD (1 << 3)
+#define AST_CDR_FLAG_POST_DISABLED (1 << 4)
#define AST_CDR_NOANSWER (1 << 0)
#define AST_CDR_BUSY (1 << 1)
@@ -189,13 +190,22 @@
*/
extern void ast_cdr_end(struct ast_cdr *cdr);
-/*! Post the detail record */
+/*! Detaches the detail record for posting (and freeing) either now or at a
+ * later time in bulk with other records during batch mode operation */
/*!
- * \param cdr Which cdr to post
- * Actually outputs the CDR record to the CDR plugins installed
+ * \param cdr Which CDR to detach from the channel thread
+ * Prevents the channel thread from blocking on the CDR handling
* Returns nothing
*/
-extern void ast_cdr_post(struct ast_cdr *cdr);
+extern void ast_cdr_detach(struct ast_cdr *cdr);
+
+/*! Spawns (possibly) a new thread to submit a batch of CDRs to the backend engines */
+/*!
+ * \param shutdown Whether or not we are shutting down
+ * Blocks the asterisk shutdown procedures until the CDR data is submitted.
+ * Returns nothing
+ */
+extern void ast_cdr_submit_batch(int shutdown);
/*! Set the destination channel, if there was one */
/*!
@@ -265,4 +275,13 @@
extern struct ast_cdr *ast_cdr_append(struct ast_cdr *cdr, struct ast_cdr *newcdr);
-#endif /* _CDR_H */
+/*! Reload the configuration file cdr.conf and start/stop CDR scheduling thread */
+extern void ast_cdr_engine_reload(void);
+
+/*! Load the configuration file cdr.conf and possibly start the CDR scheduling thread */
+extern int ast_cdr_engine_init(void);
+
+/*! Submit any remaining CDRs and prepare for shutdown */
+extern void ast_cdr_engine_term(void);
+
+#endif /* _ASTERISK_CDR_H */
- Previous message: [Asterisk-cvs] asterisk asterisk.c, 1.155, 1.156 cdr.c, 1.38,
1.39 channel.c, 1.196, 1.197 loader.c, 1.40, 1.41 pbx.c, 1.246,
1.247
- Next message: [Asterisk-cvs] asterisk pbx.c,1.247,1.248
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list