Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

This API is available on Firefox OS for internal applications only.

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

Navigator.mozTelephony
The entry point for the Web Telephony API; allows access to the Telephony object.
Telephony
Provides control over device telephony functions.
TelephonyCall
Represents a telephone call, allowing control over functions such as answering and hanging up the call.
MMICall
Represents an MMI call, allowing us to receive the result of the call.
TelephonyCallGroup
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.
CallEvent
Represents events related to telephone calls.

Specifications

Specification Status Comment
Web Telephony Draft Draft

Browser compatibility

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

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support No support No support No support No support
Feature Android Firefox Mobile (Gecko) Firefox OS (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support 12.0 (12.0) 1.0.1 No support No support No support

See also

Using the Web Telephony API

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, teoli, shmulim, Sheppy, ethertank, dbruant, fscholz
 Last updated by: chrisdavidmills,