Sample Application

The AnyFirewall™ package contains two sample applications to demonstrate the main features and capabilities of the AnyFirewall™ Engine. The VoIPApp project is the primary project with executable binary. It uses reSIProcate as SIP stack. The SimpleVoIPApp project is a simpler demonstration of AnyFirewall™ Engine. It does not use a complete SIP stack.
The requirement and structure of the VoIPApp project is described below.

System Requirements

The sample application is ready to compile with Microsoft Visual Studio 2005, Red Hat Enterprise Linux 4.4, or Mac OS X 10.5.

OpenSSL (0.9.7a) and GCC 3.4.6 (or greater) is required for the Linux and Mac OS X versions.


Windows Structure

The application project (VoIPApp) for Windows consists of the following subdirectories:

Bin/ Redistributable libraries from Visual Studio 2005 and AnyFirewall™ Engine dll, Audio Engine dll, and the pre-compiled sample program (in the Bin/Release sub-directory). Libs/ Eyeball AnyFirewall™ Engine and Eyeball Audio Engine header files. Network/ Management of SIP messages and audio packets, interface to AnyFirewall™ Engine. The files NetworkController.cpp/NetworkController.h in the Network subdirectory contain the code that interacts with the AnyFirewall™ Engine. In particular, the class NetworkController controls the application, i.e., creates and handles SIP messages and sends and receives audio packets.

VoipAppGUI/ Application user interface. It uses a couple of MFC classes to display the main application windows and to handle window messages.

The application project is located in the src/VoipApp subdirectory of the package.There are also three more directories included in this project for reSIProcate. They are resip, rutil and ares. The resip folder has two subdirectories: stack and dum. They are described in Integration with reSIProcate in Section 10.4. SIP Stack Integration.

Linux and Mac OS X Structure

The application project for Linux and Mac OS X consists of the following subdirectories:

lib/ Contains the AnyFirewall™ Engine shared object (Linux) or dynamic library (Mac OS X). include/ Eyeball AnyFirewall™ Engine header files. voipphone/ The sample application for AnyFirewall™ Engine, including a command-line user interface and a network handling class. The networkhandler.cpp/networkhandler.h files contain the code that interacts with the AnyFirewall™ Engine. The NetworkHandler class controls the application, i.e., creates and handles SIP messages and sends and receives audio packets. voipphone/SipUtil/ The class SipUtil is used to construct and parse SIP messages. It plays the role of a basic SIP stack. voipphone/Audio/ A library that contains the Linux playback and recording functions. voipphone/Codec/ Contains the g711 codec used by the application.

Compilation and execution instructions can be found in the README file in the voipphone directory.

Certain issues must be ensured before you run the sample application on Linux platform:

  • The lib directory must exist in the VoipAppLinux directory. If you see the lib as a file and you cannot open it, delete it and make a lib directory in VoipAppLinux directory. Then you can manually copy the AFE shared library from the directory AFE_Shared_Library.
  • The selinux must be disabled. Make sure it is disabled.
  • You must run the executable file through the shell script(
  • If you cannot hear voice or your peer cannot hear your voice, make sure that the audio capture is ON from the volume control. You can go there by System->preference->volume control. If the problem persists, you can try with installing creative sound card.
  • You can increase the verbosity of the by removing 2> /dev/null from the file. Error messages will be printed in the shell now.


The application exemplifies the usage of the AnyFirewall™ Engine API. The application allows making SIP calls to SIP softphones, gateways and devices. The source code of the sample application contains the functionality to generate SIP messages and in particular demonstrates how to generate SIP messages with SDP part compliant with the ICE RFC [3]. The application can also be used to call non-ICE compliant devices.

The application supports sending DTMF using the keyboard shortcut ALT-0, ALT-1, ALT-2, etc.