Cisco Unified Communications Manager Administration Guide, Release 9.1(1)
SIP normalization script setup
Downloads: This chapterpdf (PDF - 1.07MB) The complete bookPDF (PDF - 9.6MB) | Feedback

SIP normalization script setup

SIP normalization script setup

This chapter provides information about Cisco Unified Communications Manager SIP normalization script configuration.

Related References

About SIP normalization script setup

In Cisco Unified Communications Manager Administration, use theDevice > Device Settings > SIP Normalization Script menu path to configure SIP normalization and transparency scripts.

SIP trunks can connect to a variety of endpoints, including PBXs, gateways, and service providers. Each of these endpoints implements the SIP protocol a bit differently, causing a unique set of interoperability issues. To normalize messages per trunk, Cisco Unified Communications Manager allows you to add or update scripts to the system and then associate them with one or more SIP trunks. The normalization scripts that you create allow you to preserve, remove, or change the contents of any SIP headers or content bodies, known or unknown.

Transparency refers to the ability to pass information from one call leg to the other. REFER transparency allows Cisco Unified Communications Manager to pass on REFER requests to another endpoint rather than acting on them. REFER transparency is key in call center applications, where the agent sending the REFER (initiating the transfer) resides in a geographic area remote from both of the other call parties.

After you configure a script in Cisco Unified Communications Manager, you associate the script with a SIP trunk by configuring the Normalization Script fields in the Trunk Configuration window. You can only associate one script per trunk, but you can associate the same script to multiple trunks.

SIP normalization scripts configuration tips

You cannot edit the refer-passthrough script. If you want to use the content of the refer-passthrough script in a custom script, display the script in the SIP Normalization Script window. Copy the information from the Content field, click the Add New button to create a new script record, and paste the information from the refer-passthrough script into the new record.

Related References

SIP normalization script deletion

You cannot delete the refer-passthrough script.

SIP normalization script settings

The following table describes the SIP normalization script settings.

Table 1 SIP normalization script settings

Field

Description

Name

Enter a unique identifier for the script. The name can comprise up to 50 alphanumeric characters and can contain any combination of spaces, periods (.), hyphens (-), and underscore characters (_).

Description

Enter a descriptive name for the script.

Content

This field displays the content of the imported script. You can edit the script in this text box.

Script Execution Error Recovery Action

Choose the action that you want the system to perform when an execution error gets detected while executing a script message handler.

An execution error can occur due a number of issues, such as a script invokes one of the Cisco SIP Message APIs but passes in the wrong number of arguments, or a script passes a nil string to a string library API.

When an execution error gets detected, the system automatically exits the message handler at the point of the failure, restores the message to its original content prior to executing the message handler (in other words, performs message rollback), and continues as if the message handler was never invoked.

After the automatic error message handling, the system performs the action that you choose from the drop-down list box:

  • SIP Message Rollback Only—(Default) The script continues to execute for subsequent messages.
  • SIP Disable Script— Cisco Unified Communications Manager closes the script and does not execute it for subsequent messages. The Lua state remains closed and the system reclaims all of the memory. You must manually reset the trunk to re-enable the script.
  • SIP Reset Script— Cisco Unified Communications Manager closes and immediately reloads the script. When the script is closed, the Lua state is closed and the system reclaims all of the memory. Any state that the script maintains is lost. After the script reloads, Cisco Unified Communications Manager automatically uses the script for subsequent messages.
  • SIP Script Reset Trunk—The system immediately resets the trunk, which affects existing calls. Cisco Unified Communications Manager closes the script while the trunk resets. After the trunk restarts, Cisco Unified Communications Manager automatically reopens the script.

System Resource Error Recovery Action

Choose the action that you want Cisco Unified Communications Manager to take when a script aborts during execution because Memory Threshold and Lua Instruction Threshold values were exceeded.

Resource errors can occur when the script is loading, initializing, or executing a message handler. If the script fails to load or initialize, it is immediately disabled.

The configured System Resource Error Recovery Action does not apply to load and initialization errors. This action applies only to execution errors. Execution errors occur only while executing message handlers.

When a resource error occurs while a script executes a message handler, the system automatically exits the message handler at the point of the failure, restores the message to its original content prior to executing the message handler (in other words, performs message rollback), and continues as if the message handler was never invoked.

After the automatic error message handling, the system performs the action that you choose from the drop-down list box:

  • SIP Disable Script—(Default) The script closes and does not execute for subsequent messages. The Lua state remains closed and the system reclaims all of the memory. You must manually reset the trunk to re-enable the script.
  • SIP Reset Script—The script closes and then immediately reloads. When the script closes, the Lua state closes and the system reclaims all of the memory. Any state that the script maintains is lost. After the script reloads, Cisco Unified Communications Manager automatically uses the script for subsequent messages.
  • SIP Script Reset Trunk—The system immediately resets the trunk, which affects existing calls. The script closes while the trunk resets. After the trunk restarts, the script reopens automatically.

Memory Threshold

Enter the memory threshold value in kilobytes. You must enter an integer into this field.

If memory usage exceeds 80 percent of this value, the SIPNormalizationScriptResourceWarning resource warning alarm gets generated. The script continues to execute until the memory usage exceeds 100 percent of this value.

If memory usage exceeds 100 percent during script loading or initialization, a script error alarm gets generated, and the script gets closed and disabled.

If memory usage exceeds 100 percent during script execution, a script error alarm gets generated, and Cisco Unified Communications Manager performs the action that the System Resource Error Recovery Action field specifies.

For example, if you enter 50 kilobytes into this field, the warning alarm gets generated if the script exceeds 40 kilobytes. The script continues to run until memory usage exceeds 50 kilobytes.

The default value specifies 50 kilobytes.

Lua Instruction Threshold

This field specifies the maximum number of Lua instructions that a given message handler is allowed to invoke. If a script exceeds 50 percent of this value, a resource warning alarm generates. The script continues to execute until the script exceeds 100 percent of this value.

If the script exceeds 100 percent of the Lua Instruction Threshold value during script loading or initialization script, the SIPNormalizationScriptResourceWarning resource warning alarm gets generated and Cisco Unified Communications Manager closes and disables the script.

If the script exceeds 100 percent of the Lua Instruction Threshold value during script execution, the SIPNormalizationScriptResourceWarning alarm gets generated and Cisco Unified Communications Manager performs the action that the System Resource Error Recovery Action field specifies.

For example, if you enter 1000 in this field, a warning alarm gets generated if the script exceeds 500 instructions. The script continues to run until it exceeds 1000 instructions.

The default value specifies 1000 instructions per message handler invocation.

Reset

Click this button to shut down, then restart, the internal trunk device or devices with which this script associates.

Import File

Click this button to import a script.

In the Import File popup window that opens, search for the file by clicking the Browse... button to the right of the Import File field. Use the File Upload popup window to navigate to the file to you want to upload. After you find the file, click the desired filename and click Open. The path to the chosen script file displays in the Import File field of the Import File popup window. To upload the specified script file, click Import File. To close the Import File popup window without taking any action, click Close.

After the script file uploads, the Status area of the Import File window tells you the result of the upload. The contents of the script file display in the Content field.

Related Information

Import SIP normalization script

Perform the following procedure to import a SIP normalization script into Cisco Unified Communications Manager.

Procedure
    Step 1   ChooseDevice > Device Settings > SIP Normalization Script.

    The Find and List SIP Normalization window displays.

    Step 2   Perform one of the followings tasks:
    1. To add a new script instance, click the Add New button. The SIP Normalization Script Configuration window displays.
    2. To update an existing script instance, locate the appropriate script instance, and click the name of the script that you want to update.
    Step 3   To import a script, click the Import File button.

    The Import File dialog box displays.

    Step 4   Click the Browse button to locate the file that you want to import, and click the Open button.
    Step 5   Click the Import File button.

    The contents of the script file display in the Content field.

    Step 6   Modify any of the necessary fields on the window.
    Step 7   Click Save and then click Reset.

    Related Information