How to determine whether customer or agent disconnected the call in CUIS reporting.
That is going to depend on your switch. If you are working with Aspect then there is a CFLAG1 field that depending on whether the call was inbound or outbound its either "I" or "H".
For inbound:
case when cd.CFLAG1='I' then 'Yes' else 'No' end as [Termed By Rep],
For outbound:
case when cd.CFLAG1='H' then 'Yes' else 'No' end as [Termed By Rep],
For Cisco I would have to look it up in the schema.
Let me know if you need it for cisco.
Thanks.