I'm new of here, so I take this to present myself: I'm from Italy and I worked mainly on oracle,mssql and mysql
a better solution that query the table once can be this (I assume you use oracle,but it can be translate easily)
select
sum(decode(ORIG_TERM_IND,'O',DUR,0)) CALLING,
sum(decode(ORIG_TERM_IND,'T',DUR,0)) CALLED
from table
group by login