[asterisk-dev] [Code Review] testing CDR(accountcode) being carried over into local channels
Terry Wilson
reviewboard at asterisk.org
Thu Mar 8 15:00:38 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1765/#review5782
-----------------------------------------------------------
Looks good except for the permutation thing.
/asterisk/trunk/lib/python/asterisk/cdr.py
<https://reviewboard.asterisk.org/r/1765/#comment10586>
I would prefer a solution that scales better than factorially since we have no idea how many records will be available. Iterating through 2.4e18 permutations for 20 records would be unpleasant.
Perhaps removing matched items from the list would be "good enough" as long as people write sane tests with regexes that match single records.
- Terry
On Feb. 28, 2012, 4:06 p.m., wdoekes wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1765/
> -----------------------------------------------------------
>
> (Updated Feb. 28, 2012, 4:06 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> There's a change in the CDRs between 1.6.2 and 1.8 with regards to the CDR(accountcode).
>
> I created an example:
>
> exten => 1,1,Set(CDR(accountcode)=initial)
> exten => 1,n,Dial(Local/2 at default)
> exten => 2,1,Dial(Local/3 at default)
> exten => 3,1,Set(CDR(accountcode)=third)
>
> Master.csv of 1.6.2:
>
> "third","","3","default","","Local/3 at default-ABCD;2","","Hangup","","2012-02-22 00:00:00","2012-02-22 00:00:00","2012-02-22 00:00:00",0,0,"ANSWERED","DOCUMENTATION","1329946580.5",""
> "initial","","2","default","","Local/2 at default-ABCD;2","Local/3 at default-ABCD;1","Dial","Local/3 at default","2012-02-22 00:00:00","2012-02-22 00:00:00","2012-02-22 00:00:00",0,0,"ANSWERED","DOCUMENTATION","1329946580.3",""
> "initial","","1","default","","Local/1 at default-ABCD;2","Local/2 at default-ABCD;1","Dial","Local/2 at default","2012-02-22 00:00:00","2012-02-22 00:00:00","2012-02-22 00:00:00",0,0,"ANSWERED","DOCUMENTATION","1329946580.1",""
> "","","1","default","","Local/1 at default-ABCD;1","","Echo","","2012-02-22 00:00:00","2012-02-22 00:00:00","2012-02-22 00:00:00",0,0,"ANSWERED","DOCUMENTATION","1329946580.0",""
>
> .. seems logically ordered.
>
> Master.csv of 1.8:
>
> "","","2","default","","Local/2 at default-ABCD;2","Local/3 at default-ABCD;1","Dial","Local/3 at default","2012-02-22 00:00:00","2012-02-22 00:00:00","2012-02-22 00:00:00",0,0,"ANSWERED","DOCUMENTATION","1329946580.3",""
> "third","","3","default","","Local/3 at default-ABCD;2","","Hangup","","2012-02-22 00:00:00","2012-02-22 00:00:00","2012-02-22 00:00:00",0,0,"ANSWERED","DOCUMENTATION","1329946580.5",""
> "initial","","1","default","","Local/1 at default-ABCD;2","Local/2 at default-ABCD;1","Dial","Local/2 at default","2012-02-22 00:00:00","2012-02-22 00:00:00","2012-02-22 00:00:00",0,0,"ANSWERED","DOCUMENTATION","1329946580.1",""
> "","","1","default","","Local/1 at default-ABCD;1","","Echo","","2012-02-22 00:00:00","2012-02-22 00:00:00","2012-02-22 00:00:00",0,0,"ANSWERED","DOCUMENTATION","1329946580.0",""
>
> .. has disorder where the first record should be second, and I'm missing the CDR(accountcode) in said record.
>
> I don't know if CSV ordering is important (although the CDR tests' add_expectation() seems to imply they are fixed), but not having the CDR(accountcode) propagated to the Local channels is an undesirable change.
>
>
> This addresses bug ASTERISK-19384.
> https://issues.asterisk.org/jira/browse/ASTERISK-19384
>
>
> Diffs
> -----
>
> /asterisk/trunk/lib/python/asterisk/cdr.py 3071
> /asterisk/trunk/tests/cdr/cdr_accountcode/configs/ast1/cdr.conf PRE-CREATION
> /asterisk/trunk/tests/cdr/cdr_accountcode/configs/ast1/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/cdr/cdr_accountcode/run-test PRE-CREATION
> /asterisk/trunk/tests/cdr/cdr_accountcode/test-config.yaml PRE-CREATION
> /asterisk/trunk/tests/cdr/tests.yaml 3071
>
> Diff: https://reviewboard.asterisk.org/r/1765/diff
>
>
> Testing
> -------
>
> See above.
>
> Can someone confirm that the CSV of 1.6.2 is the "correct" one?
>
>
> Thanks,
>
> wdoekes
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120308/1fbc451c/attachment-0001.htm>
More information about the asterisk-dev
mailing list