Reference

Overview

The innovaphone has 3 parts a developer needs to know to create own apps for the app platform: The C++ library to develop the app-service for the app platform itself, the JavaScript library top develop the UI which runs in a browser or inside the myApps client and the messages used for the communication between the app-service and the UI.
C++ library for App ServicesUsed to develop the app-service for the app platform itself.
JavaScript library for AppsA library to create the JavaScript UI for an app (if there is any).
APIs There are different kinds of APIs that can be used for communication between different components of the system (app, app service, PBX).
How to use the AppStore The AppStore can be used to publish apps.

C++ library for App Services

The C++ library of the innovaphone SDK is a set of interfaces and classes used to create C++ apps to run on the app platform. The services provide everything an app needs to be registered into the app manager, access the a database, manage configuration, communicate with a PBX, have access to the outside world by using sockets or an HTTP client, be accessed from outside by registering itself as kind of a plugin into the app platforms webserver and more. Even if standard C++ will be used to develop an app, the app must use the interfaces to work proberly within the app platorm.
The following interfaces and classes are provided by the C++ library:

App Service Interfaces

Fundamentals

iomuxRuntime for asynchronous programming model using callbacks and timers, providing the main loop for the app service.
appserviceBase classes for any App Service and App Instance. Handles the connection to the app platform manager that is used to start and stop instances and for logging.

Basic interfaces

taskBase class for encapsulating complex flows into single asynchronous tasks.
callbackA helper interface to hide implementation details about callbacks from the using code.
debugClass for debug output and logging.
valgrindInterface to check if valgrind is active.

App Platform Interfaces

These interfaces provide access to core components of the App Platform, such as webwerver, database, sockets and system inferfaces.

Platform interfaces

webserver_plugin Attach to the webserver to receive incoming websocket connections and HTTP requests.
databaseAccess to the database of the app instance.

System interfaces

socketSockets (Local, UDP, TCP, TLS).
dnsResolve DNS names.
ethernetGet local MAC addresses.
networkGet local IP addresses.
fileFile and directory operations.
command Running commands on the operating system
random Random number generator.
timeGet Date and time
timezoneHelpful to make timezone relevant time calculation.
guuid Create GUIDs.
processCreate child processes.
staskRun tasks in a separate thread with callbacks to the main thread.
worker Run intensive tasks in a separate process.
systemInterface to access system information.
usersSystem user tools.

App Platform Libraries

The libraries provide complex functionality that is often needed using App Platform interfaces.

Webserver

httpfileBase class for static httpfiles that are part of the app binary.
httpfiles_unzipLibrary for static httpfiles that are provided in a separate ZIP file.
appwebsocket Base class for incoming AppWebsocket sessions (from the app or the PBX).
app_updates Library for sending continous updates to the app sessions over the AppWebsocket connections.
webdavservice.h WebDAV server implementation using the WebserverPlugin and the DbFiles interface of the app instance.

Database

tasks_postgresql Initialization of database tables.
database_switch Share a database connection between many users.
dbfiles Store and read files from the database of the app instance.
config Configuration of app instances.

Network

websocket_client Websocket connections to other servers.
appwebsocket_client Connect to other app services using the AppWebsocket protocol.
appwebsocket_authenticator Connect to other app services using the AppWebsocket protocol.
http_client HTTP requests to other servers.
common/interface/smtp Sending emails
alarm_clientInterface for sending alarms and events (via POST) to an alarm server..

Files

files Read additional files that belong to the app service.
tasks_file Task-based library for reading and writing files.

Libraries for Appwebsocket APIs

json_apiClasses to hook into an appwebsocket connection to provide a JSON api interface.
pbx Implementation of the PbxApi on AppWebsocket connections from the PBX.
pbx_admin Implementation of the PbxAdmin API on AppWebsocket connections from the PBX.
replication Implementation of the Replication API on AppWebsocket connections from the PBX.
badgecount_signaling Accept subscriptions for badge counts on AppWebsocket connections using the "PbxSignal" API.

Libraries for launcher services (myApps launcher only)

mediaAccess to audio / video.
appsharingAccess to application sharing.
ringerPlayback and configuration of ringtones.
apiwebsocket_clientA base class for providing and consuming client APIs in local services.

Standalone Libraries

Parsing / encoding

jsonA lightweight class to parse and create JSON.
xmlA lightweight class to parse and create XML data.
asn1Base classes for ASN.1 data structures.
asn1_berEncoder / decoder library for the ASN.1 Basic Encoding Rules
ans1_perEncoder / decoder library for the ASN.1 Packed Encoding Rules
base64Tools to encode / decode base64.
uriAn URI parser.
http_query_argsTools to parse HTTP query arguments.
httplibA set of classes to parse and create HTTP headers.
pdfCreation of PDF documents.
certificatesClass to handle certificates.

Data types and structures

strA set helper functions for UTF-8 strings.
btreeBass class for binary trees.
ilistA ligthweight, stl::list like template to create lists.

Encryption / hashes / checksums

cipherLibrary for basic encryption which supports AES, DES and RC4.
hashCan be used to compute hash values and HMACs.
crcTools to handle crc32 checksum.

Other

languageLibrary for translated texts in app services.

JavaScript library for Apps

While the app-service, running on the app-platform, will be developed using C++, the UI for a service itself will be developed using JavaScript. The benefit is, that the UI runs inside a browser and the myApps client, the desktop or mobile devices. That also means, that the UI must be developed in a way to dynamically fit into the available size. For some of the base functionalities (like communication with the app-service, authenticating, loading of configuration, creating nodes), the JavaScript library provides some tools.

lib1The fundamental library that is needed for all apps. It defines that start object that is the interface to the app runtime inside myApps. It also includes functions for translated texts and events.
appwebsocketLibrary for authentication and communicating with the app service using a websocket connection.
cryptoLibrary for encryption, decryption and hashes.
configLibrary for configuration of the app.
countriesList of country names in English and in the local language.

For building user interface using Javascript the SDK provides a slim library for creating and handling HTML elements.

ui1.libDefines the node prototype that is used for all UI classes. Also it defines classes for simple items (div, input, checkbox) and a library for color schemes and dynamic translated UI texts.
ui1.svgSVG image
ui1.autocompleteinputInput field with auto-comletion
ui1.editorEditor for HTML content
ui1.fileFile selection dialog
ui1.listviewSortable list
ui1.playerAudio player
ui1.radiobuttonRadio button
ui1.scrollingContainer with styled scrollbar
ui1.switchOn/off switch
ui1.popupPopup
fontsCollection of fonts used in the innovaphone apps.

APIs

Client APIs

Client APIs are used for communication between (web-)apps running in myApps. HTML5 Window messaging is used for transport between the IFrames. Each API defines an identifier (like com.innovaphone.phone), an API model and messages. Each Provider can has its own model that can be used to publish status information. Each app can provide and consume APIs. Hidden apps can be used for providing APIs in the background, without an UI being shown to the user. There is a bridge between the myApps webclient and the launcher, so that client APIs can also be provided or consumed by components of the launcher. Permission to client APIs is granted per user by allowing access to the corresponding

com.innovaphone.client User details (display name, sip, phone number, email address, guid) Tiles on the home screen, Available phone apps, Profile app
com.innovaphone.launcher Push token, User activity status (auto apear offline), Support for popup windows (only on computers, not on smartphones) URLs and passwords for launcher services, Touch support, Locking state of smartphones
com.innovaphone.search Search for contact details
com.innovaphone.phone See registration status and current calls; Start calls; Provide call-related information to phone-app
com.innovaphone.phoneinfo Recv information about current calls in real-time
com.innovaphone.chat Start chats
com.innovaphone.avatar Base URL for profile picture, domain of the provider Key for authentication
com.innovaphone.calllist Get recent calls
com.innovaphone.devices Find/configure devices
com.innovaphone.devicesui Show device (by MAC address or name)
com.innovaphone.manager Find app platforms, configure app platforms
com.innovaphone.files Get shared announcements
com.innovaphone.discussion Create an iframe containing a discussion

App Service APIs

Service APIs are used for communication between App Services. Websocket is used for transport. Each API defines an identifier (like com.innovaphone.devices) and messages. The PBX API "Services" can be used to find Service PBX APIs and authenticate against them.

com.innovaphone.devices Used to create provisioning codes.
com.innovaphone.channels Used by the PBX to find a channels app service providers.

Launcher services

Launcher services accept websocket connections from apps. Apps can find and authenticate against launcher services using the Client API com.innovaphone.launcher. We used launcher services for call functionality that might be too load-intensive in a Client API (signalling, starting ring tones).

Media Audio, video, appSharing, headset buttons
Ringer Play ringtones

PBX APIs

The following APIs can be used with all AppWebsocket connections with the PBX. A permission for the API needs to be enabled at the app object.

Signal This is the generic JSON signaling signaling protocol, which is mapped by the PBX to any standard Voip Signaling like SIP or H.323
PbxSignal Protocol to register to the PBX and do signaling with the JSON signaling protocol
EpSignal This protocol allows to attach to a device registered to the innovaphone PBX and intercept all signaling to and from this device
RCC Perform remote call control operations with registered endpoints
PbxMessages The protocol to retrieve stored chat messages
PbxApi Presence monitoring and management of favourites
PbxAdminApi Configuration of the PBX and pseudo objects
Replication Replication of tables. Use "api":"PbxTableUsers" to replicate the PBX user objects to your app service.
Services Finding and authenticating against other app services

Separate from that the PBX supports the following websocket protocols that are not related to AppWebsocket connections.

myApps The protocol of the myApps client.

PBX REST and SOAP APIs

There are some REST and SOAP APIs that are supported by the PBX.

SOAP The PBX provides an Api for call-control and administration features with the standard SOAP protocol. With a wsdl file this SOAP API can be integrated in many development environment. In the future this legacy API will be ported to a Websocket interface. Implementations based in the current SOAP interface will remain working.
CDR The PBX creates Call Details records, which may be delivered using several methods. These CDRs are XML documents created for individual users/objects of the PBX describing a call as seen by this user.
Recording In phones as in gateway media-relay interfaces a recording URL can be configured, which is used to write media data of any calls to a HTTP server.

How to use the AppStore

After an app has been built, it can be published on the AppStore. Here you can find how to use the AppStore for this.