For more sophisticated SNMP Trap processing, you can define an ASL script in a trap definition that is invoked during the processing of the trap. To define an ASL script, you add the keyword ASL, followed by the ASL script name, to the trap definition. For example:
BEGIN_TRAP .1.3.6.1.4.1.9.10.1 0 0 ClassName: System ASL: my-trap-rules.asl InstanceName:$SYS$ EventName: ColdStart Type: MOMENTARY END_TRAP
Notification attribute values are initially determined by the trap definitions. If an attribute value has not been defined by a trap definition, then the value for the attribute will come from the default section. The notification attribute values are exported (made available) from within the ASL script. The ASL script can override (change) default attribute values. After the ASL script completes, the notification is created with those sets of values.
The ASL script relies on two special types of variables: input/output and input-only. Input/output variables correspond to attributes of the notification and the parameters in the configuration file. The input-only variables correspond to the variables used in the configuration file (for example, $SYS$, $V4$, and $N$).
A DISCARD_TRAP variable is included with the input/output variables. The variable controls whether a given trap message is discarded or processed. The default is "FALSE" which means to process the trap. To override the default and discard the trap, create a rule in the hook script to process the trap, and within this rule set the DISCARD_TRAP to "TRUE."
In order to run the ASL script, you must place it in BASEDIR/smarts/local/rules/voip/icoi.