This is an archived page. It's not actively maintained.

Web Telephony API

Web Telephony is an API that makes it possible for web content to handle voice phone calls using JavaScript.

Concepts and usage

The Web Telephony API was created by Mozilla to satisfy the requirements for an API to control Firefox OS telephony capabilities. It is an internal-only API, because allowing 3rd party developers to gain control over such a critical device function is a major security concern.

The API's entry point is via the Navigator.mozTelephony property. This returns a Telephony object that provides access to the device's telephony system, with methods and properties for controlling the microphone and speakerphone, generating dial tones (DTMF), starting and receiving calls, and more.

When a call is initiated, either started by the device using Telephony.dial(), or received from elsewhere via the Telephony.onincoming handler, a TelephonyCall object is created to represent the call. This can be manipulated via its properties and methods to allow programmatic answering, hanging up, and putting on hold of calls, responding to different call states, and much more.

The TelephonyCallGroup interface is also available, for representing and controlling multi-person calls.

Note: For sample code showing how to get started with Web Telephony API, see Using the Web Telephony API.

Manifest permissions

To use this API in a Firefox OS app, the manifest.webapp file needs to contain the following:

"type": "certified",
"permissions": {
  "telephony": {
    "description": "Required to control telephony functions"

Web telephony interfaces

The entry point for the Web Telephony API; allows access to the Telephony object.
Provides control over device telephony functions.
Represents a telephone call, allowing control over functions such as answering and hanging up the call.
Represents an MMI call, allowing us to receive the result of the call.
Represents a multi-person call, providing functions to allow callers to be added and removed from the conference call, hanging up of the entire call, and more.
Represents events related to telephone calls.


Specification Status Comment
Web Telephony Draft Draft

Browser compatibility

For obvious reasons, support is primarily expected on mobile browsers.

Supported in Firefox OS 1.0.1.

See also

Using the Web Telephony API