The ECharts for SIP Servlets development kit includes a handy tool for quickly generating the directories and files necessary for developing and testing a SIP servlet application: either a back-to-back user agent or proxy. After installing the development kit, set the environment variable EDK_HOME to the development kit’s path and modify the system executable search path to include the development kit’s bin directory. The bin directory contains the appgen executable. For example, on a Unix-based system running BASH use the commands:
Then run the appgen command in the directory you wish to create your application directory in. The appgen tool will prompt you to answer a short series of questions and then generate a skeleton application directory. Here’s an example of using it to generate a back-to-back user agent application:
In this example, a subdirectory called myApp is created in the directory appgen was run in. The myApp directory contains a skeleton ECharts machine called MyAppFSM.ech, located in the application directory’s src/examples/features/myApp directory, that is ready for you to customize. The myApp directory also contains the ant build files required to compile the application, generate a war file and, optionally, deploy the application. To customize the build to suit your environment edit the build.properties and env.properties files in the top-level application directory, and the sip.xml and web.xml files in the application’s SarContent/WEB-INF directory. appgen also generates KitCAT-based test case templates and associated build files under the myApp/test directory. These test cases are JUnit-based and can be built and run by invoking ant test from the command line.