aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-03 00:16:25 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-03 00:16:25 +0000
commit61b6de4e16736df453e61eead1ac1c574305e0f5 (patch)
treef2c79c5941fdf5b648ecb85706407379e93a3dd4 /main/pbx.c
parent213226fe9aec511d36531d2677b36785057144c6 (diff)
The CDRfix4/5/6 omnibus cdr fixes.
(closes issue #10927) Reported by: murf Tested by: murf, deeperror (closes issue #12907) Reported by: falves11 Tested by: murf, falves11 (closes issue #11849) Reported by: greyvoip As to 11849, I think these changes fix the core problems brought up in that bug, but perhaps not the more global problems created by the limitations of CDR's themselves not being oriented around transfers. Reopen if necc, but bug reports are not the best medium for enhancement discussions. We need to start a second-generation CDR standardization effort to cover transfers. (closes issue #11093) Reported by: rossbeer Tested by: greyvoip, murf git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@127663 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/main/pbx.c b/main/pbx.c
index cee4d9821..107840c9a 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -2371,17 +2371,6 @@ static int __ast_pbx_run(struct ast_channel *c)
}
if (!(c->pbx = ast_calloc(1, sizeof(*c->pbx))))
return -1;
- if (c->amaflags) {
- if (!c->cdr) {
- c->cdr = ast_cdr_alloc();
- if (!c->cdr) {
- ast_log(LOG_WARNING, "Unable to create Call Detail Record\n");
- free(c->pbx);
- return -1;
- }
- ast_cdr_init(c->cdr, c);
- }
- }
/* Set reasonable defaults */
c->pbx->rtimeout = 10;
c->pbx->dtimeout = 5;
@@ -2406,8 +2395,6 @@ static int __ast_pbx_run(struct ast_channel *c)
ast_copy_string(c->context, "default", sizeof(c->context));
}
}
- if (c->cdr && ast_tvzero(c->cdr->start))
- ast_cdr_start(c->cdr);
for (;;) {
char dst_exten[256]; /* buffer to accumulate digits */
int pos = 0; /* XXX should check bounds */
@@ -2553,8 +2540,6 @@ static int __ast_pbx_run(struct ast_channel *c)
if (res != AST_PBX_KEEPALIVE)
ast_softhangup(c, c->hangupcause ? c->hangupcause : AST_CAUSE_NORMAL_CLEARING);
if ((res != AST_PBX_KEEPALIVE) && ast_exists_extension(c, c->context, "h", 1, c->cid.cid_num)) {
- if (c->cdr && ast_opt_end_cdr_before_h_exten)
- ast_cdr_end(c->cdr);
set_ext_pri(c, "h", 1);
while(ast_exists_extension(c, c->context, c->exten, c->priority, c->cid.cid_num)) {
if ((res = ast_spawn_extension(c, c->context, c->exten, c->priority, c->cid.cid_num))) {
@@ -5179,18 +5164,6 @@ int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout,
if (sync) {
chan = __ast_request_and_dial(type, format, data, timeout, reason, cid_num, cid_name, &oh);
if (chan) {
- if (!chan->cdr) { /* check if the channel already has a cdr record, if not give it one */
- chan->cdr = ast_cdr_alloc(); /* allocate a cdr for the channel */
- if(!chan->cdr) {
- /* allocation of the cdr failed */
- free(chan->pbx);
- res = -1;
- goto outgoing_app_cleanup;
- }
- /* allocation of the cdr was successful */
- ast_cdr_init(chan->cdr, chan); /* initilize our channel's cdr */
- ast_cdr_start(chan->cdr);
- }
ast_set_variables(chan, vars);
if (account)
ast_cdr_setaccount(chan, account);
@@ -6409,7 +6382,6 @@ int ast_parseable_goto(struct ast_channel *chan, const char *goto_string)
ipri = chan->priority + (ipri * mode);
ast_explicit_goto(chan, context, exten, ipri);
- ast_cdr_update(chan);
return 0;
}