Excerpt |
---|
This example written in C++ allows developers to manage VoipNow accounts and view information about calls. Download. |
Table of Contents | ||
---|---|---|
|
Note |
---|
This demonstrative code SHOULD NOT be used in production. It is designed to show how a client application interacts with the VoipNow SystemAPI. From this perspective, validations and error-checks aiming to demonstrate the most common mistakes are minimal and can be done easily. |
How To Install It
System Requirements for Linux
In order to be able to use the SystemAPI C++ example, you must have on your Linux system:
- GCC for Linux (for the demo, we used gcc version 4.18.25)
- gSOAP Toolkit for SOAP Web Services (reccomended recommended version: 2.78.1332)
- OpenSSL (for the demo, we used OpenSSL version 1.0.9.8e-fips-rhel51e)
Setup
STEP 1: Please download the example archive and extract the files to a location of your choice.
Command example for extracting the archive to a folder:
Code Block |
---|
mkdir <PATH_TO_DEMO_FOLDER>
unzip CPPSOAPDemo.zip -d <PATH_TO_DEMO_FOLDER> |
Note |
---|
The folder names and locations are not important. You should replace the locations in the example commands with the locations of your choice. |
the files from our GitHub repository:
Code Block |
---|
git clone https://github.com/4psa/systemapi-example-c.git |
You In the folder in which you extracted the example archive you should now find the following files in the systemapi-example-c folder:
File | Description |
---|---|
README.txt | Read me file that provides instructions on how to develop, compile and run SystemAPI applications. |
createDemoFiles.sh | Script that automatically generates the stub files and compiles the demo applications. |
Demo/DemoAddServiceProvider.cpp | Demo application that adds a new service provider. |
Demo/DemoAddOrganization.cpp | Demo application that adds a new organization to a service provider. |
Demo/DemoAddUser.cpp | Demo application that adds a new user to an organization. |
Demo/DemoAddExtension.cpp | Demo application that adds a new extension to an organization. |
Demo/DemoCallCosts.cpp | Demo application that makes a call report. |
Demo/RandomChargingPlan.cpp | Utility class that generates a random charging plan ID. |
Demo/utils.cpp | Miscellaneous utilitary functions. |
Demo/Makefile | Makefile that compiles and generates executables for the demo applications. |
...
Code Block |
---|
./createDemoFiles.sh <server_IP>hostname> <PATH_TO_GSOAP> <PATH_TO_SCHEMA_FILES> |
...
Parameter | Description |
---|---|
<server_IP>hostname> | The server's IPhostname. |
<PATH_TO_GSOAP> | Complete path to the folder where you extracted your gsoap . |
<PATH_TO_SCHEMA_FILES> | Complete path to the folder where you have the schema files. |
...
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.