Se vuoi conoscere il numero statistico, ecco la query:
Select
(sum(ag.a_nacd_out)+sum(ag.a_internal_nacd_out)+sum(ag.a_external_nacd_out))Outbound
from ecc.agnto ag
join ecc.agent a on a.agent_id=ag.agent_id
where a.agent_id=57
and a_date between '2014-01-01' and '2014-01-10'
group by a.agent_id;
Se vuoi conoscere le informazioni sui dettagli della chiamata, allora è meglio usare shorewarecdr
schema per estensione agente. Controlla la query sottostante.
SELECT ID,CallerID,StartTime,EndTime,Extension,DialedNumber,CallType
FROM
shorewarecdr.`call`
where
Extension=1331
and date(StartTime) between '2014-01-01' and '2014-01-01'
and CallType=3;
Nota:CallType=3
è per l'uscita.