Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

If you are not a programmer or at least a budding programmer you should now look the other way and pretend you never saw this page.

On the other hand if you think you are a dab hand at programming and want to do some really groovy stuff with your PBX then you have come to the right place.

Action Scripts allow you to write 'mini-programs' that actually chanage the way your PBX handles calls. In fact all of the Call Routing built into Noojee's PBX is done via Action Scripts.

BE WARNED: Action Scripts are extremely powerful and can easily cause your WHOLE PBX TO CRASH.

So don't say you were not warned!

Hopefully you have packed an extra pair of undies, because you are going to need them. So lets get into it.

What is a script

Essentially an ActionScript is a small piece of code written in Java (no NOT JavaScript) that can be used to control how a call is routed. Once you have created an Action Script it becomes part of the PBX's set of Step 'Actions' and can be used in any Route. Not only does the ActionScript allow you to define the routing logic, but you can also provide a mini-UI which is displayed when your Action Script is used in a Route Step. The purpose of the mini-UI is to allow the user to select one or more parameters which are passed to your Action Script at run time.

For example you may create a Route that requires the caller to enter a PIN code. As part of your Action Script you can create the UI that allows the Adminsitrator to enter the PIN code that the caller needs to enter.

Versions

To make your life easier Noojee PBX supports the concept of having multiple version of a given Action Scripts only one of which is designated as the 'Active' script. This allows you to start working on a script without affecting how your PBX is operating until you are ready to deploy the new version of you Script. 

You can create a new version of your script at any time by coping the context of your existing Script click the 'New' button under  the 'Script' tab and paste the original script. You can then start making changes which are saved to the new Script version.

Once you are happy with your Script you can make it active by selecting the version in the list of versions under the 'Script' tab and then selecting the 'Make Active' action and clicking the 'Apply' button.

Understanding Action Scripts

Each Route Step Action Script executes in the context of a call. As such you can directly control the Call as it progresses.

Idenfifying and Fixing errors

As you code your Script the system will automatically compile the script in the background. Any errors will be marked on the applicable line in the left hand margin. Hover you mouse over the error indicator to see the details of the error. Once you fix the problem the error indicator will disappear. 

  • No labels