JavaScript telephony framework