Reference
Overview
The innovaphone SDK has 3 parts a developer needs to know to create apps for the app platform:
- The library to develop the app-service for the app platform itself (C++ or JS)
- The library to develop the app UI which runs in a browser or inside the myApps client (JS)
- Websocket Messages and APIs that are used for communication between the individual components.
Contents
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
iomux | Runtime for asynchronous programming model using callbacks and timers, providing the main loop for the app service. |
appservice | Base 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
task | Base class for encapsulating complex flows into single asynchronous tasks. |
callback | A helper interface to hide implementation details about callbacks from the using code. |
debug | Class for debug output and logging. |
valgrind | Interface 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. |
database | Access to the database of the app instance. |
System interfaces
socket | Sockets (Local, UDP, TCP, TLS). |
dns | Resolve DNS names. |
ethernet | Get local MAC addresses. |
network | Get local IP addresses. |
file | File and directory operations. |
command | Running commands on the operating system |
random | Random number generator. |
time | Get Date and time |
timezone | Helpful to make timezone relevant time calculation. |
guuid | Create GUIDs. |
process | Create child processes. |
stask | Run tasks in a separate thread with callbacks to the main thread. |
worker | Run intensive tasks in a separate process. |
system | Interface to access system information. |
users | System user tools. |
translation | Translation of Texts with an external service. |
App Platform Libraries
The libraries provide complex functionality that is often needed using App Platform interfaces.
Webserver
httpfile | Base class for static httpfiles that are part of the app binary. |
httpfiles_unzip | Library 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
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_api | Classes 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. |
services | Implementation of the Services API for communications between App Services. |
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)
media | Access to audio / video. |
appsharing | Access to application sharing. |
ringer | Playback and configuration of ringtones. |
apiwebsocket_client | A base class for providing and consuming client APIs in local services. |
Standalone Libraries
Parsing / encoding
json | A lightweight class to parse and create JSON. |
xml | A lightweight class to parse and create XML data. |
asn1 | Base classes for ASN.1 data structures. |
asn1_ber | Encoder / decoder library for the ASN.1 Basic Encoding Rules |
ans1_per | Encoder / decoder library for the ASN.1 Packed Encoding Rules |
base64 | Tools to encode / decode base64. |
uri | An URI parser. |
http_query_args | Tools to parse HTTP query arguments. |
httplib | A set of classes to parse and create HTTP headers. |
pdf | Creation of PDF documents. |
certificates | Class to handle certificates. |
zip | Simple librarary for creating small, uncompressed ZIP files. |
Data types and structures
str | A set helper functions for UTF-8 strings. |
btree | Bass class for binary trees. |
ilist | A ligthweight, stl::list like template to create lists. |
Encryption / hashes / checksums
cipher | Library for basic encryption which supports AES, DES and RC4. |
hash | Can be used to compute hash values and HMACs. |
crc | Tools to handle crc32 checksum. |
Other
language | Library for translated texts in app services. |
JavaScript library for App Services
App services can also be created using the JavaScript Runtime. It provides the following libraries and interfaces that you can use in your code:
Global scope | Functions and variables in the global scope. |
AppInstance | Information about the configuration of the app instance. |
AppWebsocketClient | Library for outgoing AppWebsocket connections. |
Config | Library for configuration. |
Crypto | Library for cryptography, including hash, hmac and encryption. |
Database | Library for database access. |
Dns | Library for DNS. |
Encoding | Library for conversion between different data types and encodings. |
HttpClient | Library for outgoing HTTP requests. |
SmtpClient | Library for sending emails. |
Network | Library for basic networking and general sockets (TCP, TLS, UDP). |
JsonApi | Library for providing JsonApis on incoming appwebsocket connection. Can be used for communication with the web application. |
PbxApi | Library for communicating with PBXes on incoming appwebsocket connections. |
Random | Library for creating random numbers or data. |
Timers | Library for timers. |
WebServer | Library for incoming HTTP requests. |
WebsocketClient | Library for outgoing Websocket connections. |
FileSystem | Library for reading files. |
JavaScript library for Apps
The UI for the app is written 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.
lib1 | The 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. |
appwebsocket | Library for authentication and communicating with the app service using a websocket connection. |
crypto | Library for encryption, decryption and hashes. |
crypto.ecdh | Library for ECDH(E) key agreement. |
config | Library for configuration of the app. |
countries | List of country names in English and in the local language. |
phonenumber | Library that contains various functions related to phone numbers. |
For building user interface using Javascript the SDK provides a slim library for creating and handling HTML elements.
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 in the contents of other apps (e.g. 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.phonelookup |
Lookup phone numbers in databases (e.g. local Outlook addressbook) to find name formation for incoming calls
|
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.events |
Send events, alarms and logs
|
com.innovaphone.manager |
Find app platforms, configure app platforms
|
com.innovaphone.files |
Get shared announcements
|
com.innovaphone.discussion |
Create an iframe containing a discussion
|
com.innovaphone.autostart |
Autostart without user interaction for hidden apps.
|
com.innovaphone.translation |
Get instant translations from external translation-services (eg. DeepL.com).
|
com.innovaphone.assistant |
Access a remotely hosted large language model LLM.
|
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.
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
|
PbxTableUsers |
User objects replication from the PBX to your app instance
|
Replication |
Replication of tables. Use "api":"PbxTableUsers" to replicate the PBX user objects to your app instance.
|
Services |
Finding and authenticating against other app services
|
Impersonation |
API to use other APIs on behalf of a given user
|
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.
Please note that the functionality of that legacy API is available using the Websocket APIs RCC and PbxAdminApi.
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.
|
PBX Interface
There are PBX-Interfaces, which can be used by an app.
Textmedia |
The PBX provides an interface for the transcription of Speech to Text.
|
Protocols
There are some protocols used by innovaphone Apps.
Sysclient |
The sysclient protocol is used by devices to register in the Devices App.
|
Push |
Protocol used between the PBX and the innovaphone Push service.
|
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.