retrieve stats from asterisk cdr database