This page consistes of my collection of call detail records (cdr)
analysis one-liner scripts. I have used these for the dialogic control
switch (formarly veraz) icdr files over the years.
Dialogic control
switch gives a single line CDR for a call. Various fields are seperated by
delimiter semicolon (;). Although these one-liners were written specifically
for dialogic control switch, yet these can be adopted to various other
switch cdr formats by changing field numbers and delimiter. These can be run
on Linux/Solaris or Cygwin. You will find then handy in reconciling the CDR
or find a particular value quickly.
Here is an example of a cdr file.
Note: In solaris servers use "nawk" instead of "awk"
# awk ' BEGIN {FS=";"} {a[$7]++;b[$7]=b[$7]+$137}END{for
(i in a) print i,a[i],b[i]/60}' OFS=',' icdr*
S,2,3.41742
U,2,0
# awk 'BEGIN {FS=";"} ($137 > 300) {print $0}' OFS=';' icdr*
# awk 'BEGIN {FS=";"} ($58 == "InTGname") && ($59 == "OutTGname") && ($7 == "S") && (substr($35 $5,1,10)== "2009-07-17") {a[$7]++;b[$7]=b[$7]+$137}END{for (i in a) print i,a[i],b[i]/60}' OFS=','
icdr*
INPUT : ITG, Status, Date, FileRange
OUTPUT : ETG, Status, Count of
Given Status, Total MOU
# awk 'BEGIN {FS=";"} ($58 == "InTGname") && ($7 == "S") && (substr($35 $5,1,10)== "2009-07-17") {a[$59","$7]++;b[$59","$7]=b[$59","$7]+$137}END{for (i in a) print i,a[i],b[i]/60}' OFS=','
icdr*
# awk 'BEGIN {FS=";"} ($58 ==
"InTGname") && (substr($35 $5,1,10)== "2009-07-17")
{a[$59","$7]++;b[$59","$7]=b[$59","$7]+$137}END{for (i in a) print
i,a[i],b[i]/60}' OFS=',' icdr*
INPUT : Date, FileRange
OUTPUT : ITG, ETG, Status (S,E,U,I,R),
Count of Status, Total MOU
# awk 'BEGIN {FS=";"} (substr($35 $5,1,10)== "2009-07-17") {a[$58","$59","$7]++;b[$58","$59","$7]=b[$58","$59","$7]+$137}END{for (i in a) print i,a[i],b[i]/60}' OFS=','
icdr*
I am an IOT enthusiast with more than 20 years of experience in the IT sector. Specializing in telecom service's; follow me for some very innovative and best in class IOT products as I unfold my knowledge and passion for the subject.
Just me, myself and I, exploring the universe of uknownment. I have a heart of love and interests in technology, IOT and travel . And I want to share my world with you .