Sample CDR for https://srvscripts.com/tools/asr-and-acd-calculator/

asr-acd-sample-cdr.csv is a small, synthetic FreePBX-style CDR export (fictional 555-01xx numbers, two made-up trunks
"carrier-a" and "carrier-b"). Open it in the calculator and compare the result with the totals below. The totals were
worked out by hand from the rules on the tool page and again by expected_independent.py, a short Python script that
does not use the calculator's code; then the calculator was run on the same file. All three agree.

What is in the file (20 data rows)
  - 16 ordinary outbound calls over the two trunks, at 10:00-10:59 and 11:00-11:59
  - one call with two legs (the same linkedid): carrier-a FAILED, then carrier-b ANSWERED 80 s (a failover)
  - one internal call, extension 1001 to 1003, answered 35 s
  - one row whose duration is "abc" and one row with only 3 columns

Rules the calculator applies (and the recount follows)
  - Rows that cannot be read are skipped and counted: here row 12 (duration "abc") and row 13 (3 columns). 18 legs remain.
  - Legs with the same linkedid are one call, answered if any leg was answered, otherwise busy before no answer
    before failed. The call keeps the time of its first leg and the trunk of the deciding leg. So 18 legs = 17 calls,
    and the failover call counts once, as answered on carrier-b at 10:30.
  - Internal calls are NOT excluded: the 1001 -> 1003 call counts as a call on "PJSIP/1003" and as an "internal
    (4 digits)" destination. Filter internal calls out of the export first if you want carrier figures only.
  - ASR = answered / calls. NER = (answered + busy + no answer) / calls. ACD = billed seconds of answered calls /
    answered calls. Short = answered with 1 to 5 billed seconds; 0 s = answered with 0 billed seconds.
    Time to answer = duration - billsec of answered calls.

Expected totals (call legs grouped by linkedid, the default)
  Calls 17 | answered 10 | busy 2 | no answer 2 | failed 3
  ASR 58.8% | NER 82.4% | ACD 1:01 (614 s / 10) | short 1 (10%) | 0 s answered 1 (10%) | avg time to answer 7.2 s
  Per trunk:  PJSIP/carrier-a  8 calls, 5 answered, ASR 62.5%, NER 87.5%, ACD 0:48 (239 s)
              PJSIP/carrier-b  8 calls, 4 answered, ASR 50%,   NER 75%,   ACD 1:25 (340 s)
              PJSIP/1003       1 call,  1 answered (the internal call)
  Per hour:   10:00  9 calls, 6 answered, ASR 66.7%      11:00  8 calls, 4 answered, ASR 50%
  Warnings:   17.6% of calls FAILED; 10% of answered calls lasted 0 seconds; only 17 calls (small sample)

With "Group call legs" unticked: 18 calls, 10 answered, 4 failed, ASR 55.6%, NER 77.8%.

What building this file found
  The first run of the calculator merged carrier-a and carrier-b into one trunk "PJSIP/carrier", because it cut trunk
  names at the first dash. Fixed on 18 October 2026: only the channel's own suffix (such as -0000000a) is removed now,
  and this file is one of the calculator's automated tests.

Licence: free to copy and reuse. Checked on 18 October 2026.
