Teletone

From FreeSWITCH Wiki
(Redirected from Mod spidermonkey teletone)
Jump to: navigation, search

The Teletone object lets you generate tones to the caller(s).

Contents

Methods

Properties

Example

Generates a beep for voicemail.

    use("TeleTone");
    var teletone = new TeleTone(session);
    teletone.addTone("d", 350.0, 440.0, 0.0);
    teletone.generate("v=4000;>=0;+=2;#(60,0)"); 

Example for JavaScript

Generate a beep in JavaScript

use("TeleTone");

//you may place around with %(1000, 0, 640) .  This means 1000ms of 640 tone
 var BONG ="v=-7;%(100,0,941.0,1477.0);v=-7;>=2;+=.1;%(1000, 0, 640)";

	var tts = new TeleTone(session);
	session.answer();
	tts.addTone("d",350.0,440.0,0.0);
	tts.generate(BONG);


See also