Shoretel - Outgoing calls query

余生颓废 提交于 2019-12-11 08:24:49

问题


I am trying to figure out which table/column stores the information about the number of outgoing calls an agent has made. I can get the total number of incoming calls using the query below, but I am not sure about how to get total outgoing calls. The database is MySQL and the application is Shoretel.

Any help would be greatly appreciated!

SELECT  sum(a_acd_answered) FROM ecc.agent, ecc.agnto where agent.agent_id = agnto.agent_id and a_date >= ''2014-03-09'' and a_date <= ''2014-03-15'' and agnto.agent_id = 9'

回答1:


If you want to know the statistical number, then here is the 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;

If you want to know the call details info, then it is better to use shorewarecdr schema by agent extension. Check the below query.

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;

Note: CallType=3 is for outbound.



来源:https://stackoverflow.com/questions/22418525/shoretel-outgoing-calls-query

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!