Idefisk
Tools
Tutorials
Reviews
VoIP Providers
Archives
AsteriskGuru Archives
Mailing List Archives
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
[Asterisk-cvs] asterisk pbx.c,1.46,1.47
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
View previous topic
::
View next topic
Author
Message
markster at lists.digium.
Guest
Posted: Mon Sep 08, 2003 9:51 pm
Post subject: [Asterisk-cvs] asterisk pbx.c,1.46,1.47
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv32729
Modified Files:
pbx.c
Log Message:
Add ResetCDR application (with mods) (bug #235)
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** pbx.c 8 Sep 2003 16:08:07 -0000 1.46
--- pbx.c 8 Sep 2003 21:52:45 -0000 1.47
***************
*** 21,24 ****
--- 21,25 ----
#include <asterisk/callerid.h>
#include <asterisk/cdr.h>
+ #include <asterisk/config.h>
#include <asterisk/term.h>
#include <asterisk/manager.h>
***************
*** 157,160 ****
--- 158,162 ----
static int pbx_builtin_wait(struct ast_channel *, void *);
static int pbx_builtin_setlanguage(struct ast_channel *, void *);
+ static int pbx_builtin_resetcdr(struct ast_channel *, void *);
static int pbx_builtin_setaccount(struct ast_channel *, void *);
static int pbx_builtin_ringing(struct ast_channel *, void *);
***************
*** 264,267 ****
--- 266,275 ----
"invalid extension.\n" },
+ { "ResetCDR", pbx_builtin_resetcdr,
+ "Resets the Call Data Record",
+ " ResetCDR([options]): Causes the Call Data Record to be reset, optionally\n"
+ "storing the current CDR before zeroing it out (if 'w' option is specifed).\n"
+ "record WILL be stored. Always returns 0.\n" },
+
{ "ResponseTimeout", pbx_builtin_rtimeout,
"Set maximum timeout awaiting response",
***************
*** 4064,4067 ****
--- 4072,4085 ----
/* Copy the language as specified */
strncpy(chan->language, (char *)data, sizeof(chan->language)-1);
+ return 0;
+ }
+
+ static int pbx_builtin_resetcdr(struct ast_channel *chan, void *data)
+ {
+ /* Reset the CDR as specified */
+ if (data)
+ ast_cdr_reset(chan->cdr, strchr((char *)data, 'w') ? 1 : 0);
+ else
+ ast_cdr_reset(chan->cdr, 0);
return 0;
}
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
All times are GMT
Page
1
of
1
Jump to:
Select a forum
Asterisk Mailing Lists
----------------
Asterisk-Users
Asterisk-Dev
Asterisk-CVS
Asterisk-Biz
Asterisk-Doc
Asterisk-BSD
Asterisk-Announce
Asterisk Call Centers
Asterisk-Video
Asterisk-Speech-Rec
Bristuff-Users
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
Powered by
phpBB
© 2001, 2005 phpBB Group