refactoring + telephony state check