case when A.status = \'ACTIVATED\' and m.caller is not null then \'ACTIVE\' when A.status = \'ACTIVATED\' and m.caller is null and n.callingparty is not null then \'AINACTIV