[asterisk-dev] [Code Review] Fix setting CDR accountcode/userfield in hangup exten

Mark Michelson reviewboard at asterisk.org
Tue Mar 13 17:24:05 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1794/#review5803
-----------------------------------------------------------

Ship it!


Go for it.

- Mark


On March 6, 2012, 11:37 a.m., Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1794/
> -----------------------------------------------------------
> 
> (Updated March 6, 2012, 11:37 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> As a result of a (ok, *my*) previous attempt at fixing a CDR bug (when I knew that it is *always* a mistake to try to fix CDR bugs), setting CDR variables in the hangup extension was broken.
> 
> The previous patch copies over CDR variables from the channel in case they were set during the bridge via custom feature codes. Unfortunately, if there is a hangup extension, the bridge CDR is actually swapped out with the channel CDR. In this case, we would be overwriting any changes that happened in the hangup extension with most-likely blank values. This patch just modifies the original patch to not do the copy if we previously did the hangup extension stuff.
> 
> So I am now "fixing" CDRs, which should never be "fixed", because in my arrogance I felt that I could really fix a "small" bug in them. Let this be a lesson to you.
> 
> P.S. Yes, I'm aware that I'm breaking my own rule yet again. Somebody should probably tie me down so that I can't touch the code anymore.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/features.c 358376 
> 
> Diff: https://reviewboard.asterisk.org/r/1794/diff
> 
> 
> Testing
> -------
> 
> I tested that setting the accountcode during the bridge still works, and that setting in the hangup extension also works.
> 
> 
> Thanks,
> 
> Terry
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120313/84685262/attachment.htm>


More information about the asterisk-dev mailing list