grep "519\-3900" $1 > x.3900
grep "854\-3100" $1 > x.3100
grep "854\-2477" $1 > x.2477
for i in 3100 3900 2477; do
  a=`grep "NO CARRIER" x.$i | wc -l`
  b=`grep "BUSY" x.$i | wc -l`    
  c=`grep "DIALTONE" x.$i | wc -l`
  d=`grep "CONNECT" x.$i | wc -l`
  echo $i: $a $b $c $d
done
