ernaniaz / phonetones

JavaScript telephony tone generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phonetones

GitHub release GitHub license

This is a simple JavaScript library to generate a telephony audio tones into web browser.

Usage

You need to instantiate a new object informing the country and tone. You can use 'custom' as country and specify a tone in Sipura/Linksys format. The library currently has only United States and Brazil tones, but you can easily add your country tones. You can refer to Asterisk DAHDI zonedata file.

Example

var busy = new PhoneTones ( { country: 'us', tone: 'busy'});

$('#busy').on ( 'mouseover', function () { busy.play (); });
$('#busy').on ( 'mouseout', function () { busy.stop (); });

This will play an USA busy tone when mouse over element with ID busy on the page.

License

MIT License.

About

JavaScript telephony tone generator

License:MIT License


Languages

Language:JavaScript 100.0%