Appendix A: Example FunctionΒΆ

This example function that was created using the SCE shows a called function that validates the PIN and destination entered by a caller.

_images/samplefunction_appendixA.png

The first PAC (in the top, left corner) is a Drop to Java PAC that calls a Java method to authenticate the PIN entered by the caller.

If the method cannot be successfully called, a Play and Collect PAC instructs the media server to play a message informing the caller that the authentication could not be performed, and an End Session PAC then terminates the call. If the method is called successfully, a Test Values and Branch PAC checks to see if the PIN entered by the caller is valid.

If the PIN is not valid, the Play and Collect PAC instructs the media server to play a message informing the caller that the PIN number is not valid, and an End Session PAC terminates the call. A PIN could be invalid if it is locked, expired, or unauthorized. If the PIN is valid, another Drop to Java PAC authenticates the destination.

If the authentication does not succeed, a Play and Collect PAC instructs the media server to play a message informing the caller that the authentication could not be performed, and an End Session PAC terminates the call. If the authentication succeeds, another Test Values and Branch PAC checks if the destination is valid.

If the destination is not valid, the Play and Collect PAC instructs the media server to play a message informing the caller that the destination is invalid, and an End Session PAC terminates the call. If the destination is valid, the Call a Function PAC calls a function that connects the caller to the destination.

When the call is connected, the Perform Timer Operations PAC sets a timer for the call, and then the Return from a Function PAC waits for the timer to expire, or for the call to be terminated, before returning control back to the calling function.