[asterisk-dev] cdr changes from 1.4.4 to 1.4.5
José Luis Ledesma
jledesma at tecnobe.com
Tue Jun 19 12:00:02 CDT 2007
Dear all,
After updating our asterisk from 1.4.4 to 1.4.5 we have seen that our
billing application doesn't work. The reason, is that in the cdr->dst
instead of having the channel->macroexten (that corresponds to
${EXTEN}) , we have the channel->exten (that, in our case, correspongs
to 's').
After watching the code we found some changes in main/cdr.c:
@@ +879,9 -888,13 @@
/* Copy account code et-al */
ast_copy_string(cdr->accountcode,
c->accountcode, sizeof(cdr->accountcode));
- /* Destination information */ /* XXX privilege
macro* ? */
- ast_copy_string(cdr->dst, S_OR(c->macroexten,
c->exten), sizeof(cdr->dst));
- ast_copy_string(cdr->dcontext,
S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
+ if (!ast_check_hangup(c)) {
+ /* Destination information */ /* XXX
privilege macro* ? */
+ ast_copy_string(cdr->dst,
S_OR(c->macroexten, c->exten), sizeof(cdr->dst));
+ ast_copy_string(cdr->dcontext,
S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
+ }
}
}
We found that changing the '!ast_check_hangup(c)' for
'ast_check_hangup(c)' (without the !) it works as it should (the main
difference is the call to ast_cdr_update from the line 2416 in
main/pbx.c)...
So, I'm not sure if there will be any problem with this change... Or is
this just a bug?
best regards,
--
José Luis Ledesma
Tecnobe Tecnología S.L.
More information about the asterisk-dev
mailing list