Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Digium Phone API is a JavaScript toolset used to build custom apps.

At its most basic, a custom app is a zip file that contains an app.json file and a JavaScript file.

 

Zip File

An app is packaged into a zip file. The zip contains the app.json file, JavaScript file, and additional data (icons, language files, etc.).  

A Digium Phone uses the zip file to install the app.

app.json File

Each app requires a JSON file named app.json. The JSON file describes to the Digium Phone App Engine what the app is and what its settings are. See the article apparticle app.json for json for details.

JavaScript File

The following are the principal phone API modules comprising the toolset:

  • Core - Basic building blocks of any Digium Phone app. Used for functional programming.
  • Classes - Core classes available to every app.  Used for functional programming.
  • Extended - Libraries to add additional functional methods to a Digium Phone app.
  • Extended Classes - Additional libraries to add more functional class constructors.
  • UI Core (window) - Automatically defined object that enables app display for every app at runtime.
  • UI Classes (Widgets) - Basic graphical building blocks (class constructors).
  • UI Extended - Additional tools for building user interaction into your app.
  • UI Extended Classes - Additional UI class constructors for creating more than basic UI elements.

Links to these modules and their libraries are in the sidebar. See the Getting Started page the Getting Started page and the other Guides for other Guides for general instructions, and the Demos for the Demos for annotated sample programs to give you custom app examples.

 

Tip

The phone app programming model is single-threaded, event-driven. Avoid long-running processing loops because they limit the responsiveness of apps, and after a few seconds, they will cause your app to be killed.