The Call.invokeApplication() method allows one application to pass the telephone call to another voice application. The application to be invoked does not need a number-to-application mapping in the configuration database. Before being invoked, the application must be started and must issue a WVR.waitForCall(), so that it is waiting for a call, as shown in Figure 1.
An invoked application can invoke another application: the nesting of applications is not limited by the architecture.
try { // Make a call to another application, transfer data, and wait Call call = wvr.waitforcall(); Object javaObject = new Object(); call.invokeApplication("OtherApp", javaObject, true); }
When you use the Call.invokeApplication() method to invoke another application, the locale specified in the ApplicationProperties or the AppName entry for the invoked application is used; if no locale is specified for the invoked application, the current locale of the calling application is used. If the call is passed back to the invoking application, the locale is whatever the invoked application was using when it returned the call.
When you use the Call.invokeApplication() method to invoke another application, any text-to-speech and speech recognition definitions that were configured for the invoking application do not apply to the invoked application. If the invoked application returns to the invoking application, the text-to-speech and speech recognition definitions of the invoking application are reinstated.