SimpleJtapiPhoneMonitor-Designer - Wiki
Create a new project and select JtapiCallInitiated as the triggering event.#
To create a project:
- Launch the Cisco Unified Application Designer
- Select the File -> New Project option and enter the Project Name and Location in the "New Application Designer Project".
Figure 1. Adding a Project
Define The New Application Script and Trigger Event#
The next step in the creation of a project is to define the application script trigger. In the case of an application which should be invoked by an incoming JtapiCallInitiated event, the script will be triggered by the Metreos.Providers.Jtapi.JtapiCallInitiatedevent. The image below shows that the application's triggering event is OnJtapiCallInitiated.
Since we are interested in multiple other jtapi events, these events could be added to the script by simply dragging these events from the Jtapi toolbox (right pane) and dropping anywhere under the Functions and Events tree. All these dragged events are non triggering type. A function tab will be created for each of these dragged events.
Figure 2. Add An Application Script and Trigger/NonTriggering Events
Processing The Events#
Each of the events is represented by a function tab of its own. Following are the function tabs corresponding to each of the events we are servicing through the application. OnJtapiCallInitiated tab services the call initiated event. The image below shows it is using LogWrite to write the notification to the app server logs.
OnJtapiCallActive tab services the call active event. The image below shows it is using LogWrite to write the notification to the app server logs.
You would note that the above image shows the LogWrite is using a variable toPhone. It is a local variable and is initialized as shown below
OnJtapiGotDigits tab services the JtapiGotDigits event (when digits are entered on phone pad). The image below shows it is using LogWrite to write the notification to the app server logs.
There are two local variables shown on the image as well. The initialization of these 2 variables is shown below:
The code to print the digits is shown below:
OnJtapiCallInActive tab services the call inactive event. The image below shows it is using LogWrite to write the notification to the app server logs.
OnJtapiHangup tab services the hangup event. The image below shows it is using LogWrite to write the notification to the app server logs.
This concludes the application. it could be build and deployed to the CUAE server. The test phone needs to be added to the monitored device pool under Telephony Manager section in cuaeadmin console page.
Running the application#
Place an outbound call from the phone which was added to the monitored device pool. The outbound call triggers the application and verify the server logs to verify each of the action in phone is captured by CUAE through the application.