Page tree

Versions Compared

Key

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

Excerpt

This example written in C++ allows developers to manage VoipNow accounts and view information about calls. Download.

Table of Contents
maxLevel3

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:

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.txtRead me file that provides instructions on how to develop, compile and run SystemAPI applications.
createDemoFiles.shScript that automatically generates the stub files and compiles the demo applications.
Demo/DemoAddServiceProvider.cppDemo application that adds a new service provider.
Demo/DemoAddOrganization.cppDemo application that adds a new organization to a service provider.
Demo/DemoAddUser.cppDemo application that adds a new user to an organization.
Demo/DemoAddExtension.cppDemo application that adds a new extension to an organization.
Demo/DemoCallCosts.cppDemo application that makes a call report.

Demo/RandomChargingPlan.cpp
Demo/RandomChargingPlan.h

Utility class that generates a random charging plan ID.

Demo/utils.cpp
Demo/utils.h

Miscellaneous utilitary functions.
Demo/MakefileMakefile 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.