<br><br><div class="gmail_quote">On Wed, Mar 31, 2010 at 5:53 PM, Terry Wilson <span dir="ltr"><<a href="mailto:twilson@digium.com">twilson@digium.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
So, there have been some changes in how CDRs work over the course of the 1.4 branch (and other branches). What I'm trying to do is figure out what the "correct" behavior should be. For example, for a dialplan example that looks like:<br>
<br>
[default]<br>
exten => _XXXX,1,ForkCDR<br>
exten => _XXXX,n,Dial(SIP/${EXTEN})<br>
exten => _XXXX,n,Hangup<br>
<br>
the following CDR entries are created<br>
tags/1.4.0:<br>
"","","6004","default","","OSS/dsp","","ForkCDR","","2010-03-31 23:20:49","2010-03-31 23:20:49","2010-03-31 23:20:55",6,6,"ANSWERED","DOCUMENTATION","1270077649.1",""<br>
"","","6004","default","","OSS/dsp","SIP/6004-0259f770","Dial","SIP/6004","2010-03-31 23:20:49","2010-03-31 23:20:49","2010-03-31 23:20:55",6,6,"ANSWERED","DOCUMENTATION","1270077649.1",""<br>
<br>
branches/1.4:<br>
"","","6004","default","","Console/dsp","","Dial","SIP/6004","2010-03-31 23:26:15","2010-03-31 23:26:15","2010-03-31 23:26:28",13,13,"ANSWERED","DOCUMENTATION","1270077975.0",""<br>
"","","6004","default","","Console/dsp","SIP/6004-00000000","Dial","SIP/6004","2010-03-31 23:26:15","2010-03-31 23:26:15","2010-03-31 23:26:28",13,13,"ANSWERED","DOCUMENTATION","1270077975.0",""<br>
<br>
You'll notice that the lastapp in the first record of each is different with a ForkCDR record followed by a Dial record being the original behavior, and two Dial records being the new behavior. Now, it seems obvious to me that having two Dial() records would be incorrect. But, I'm a little dubious about ForkCDR being the lastapp as well. It doesn't seem like particularly useful information as it overwrites what the last action that was taken before the CDR was forked, and that you can tell a CDR was forked anyway by there being multiple CDRs with the same uniqueid. But, since pbx.c sets the lastapp as soon as ForkCDR is called, I can understand why this would be the case. And of course, it seems like we should be minimizing the behavior changes.<br>
<br>
So, I was wondering if some people could weigh in on what they thought the correct behavior was so I can write some tests that enforce that behavior in the future. I'm currently leaning towards just making things behave the way they did in the original 1.4.0 release. I'm pretty sure one of the causes of the change was r195881 in May of 2009.<br>
<br>
Terry<br>
<font color="#888888">--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Steve Murphy<br>ParseTree Corp<br><br>