Script Helper Module


Table of Contents

1. Admin Guide
1.1. Overview
1.2. How it works
1.3. Dependencies
1.3.1. OpenSIPS Modules
1.3.2. External Libraries or Applications
1.4. Exported Parameters
1.4.1. use_dialog (integer)
1.4.2. create_dialog_flags (string)
1.4.3. sequential_route (string)
1.5. Known Issues
2. Contributors
2.1. By Commit Statistics
2.2. By Commit Activity
3. Documentation
3.1. Contributors

List of Tables

2.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)
2.2. Most recently active contributors(1) to this module

List of Examples

1.1. Setting use_dialog
1.2. Setting create_dialog_flags
1.3. Setting sequential_route

Chapter 1. Admin Guide

1.1. Overview

The purpose of the Script Helper module is to simplify the scripting process in OpenSIPS when doing basic scenarios. At the same time, it is useful to script writers as it contains basic SIP routing logic, and thus it allows them to focus more on the particular aspects of their OpenSIPS routing code.

1.2. How it works

By simply loading the module, the following default logic will be embedded:

  • for initial SIP requests, the module will perform record routing before running the main request route

  • sequential SIP requests will be transparently handled - the module will perform loose routing, and the request route will not be run at all

Currently, the module may be further configured to embed the following optional logic:

  • dialog support (dialog module dependency - must be loaded before this module)

  • an additional route to be run before relaying sequential requests

1.3. Dependencies

1.3.1. OpenSIPS Modules

The following modules must be loaded before this module:

1.3.2. External Libraries or Applications

The following libraries or applications must be installed before running OpenSIPS with this module loaded:

  • None.

1.4. Exported Parameters

1.4.1. use_dialog (integer)

Enables dialog support. Note that the dialog module must be loaded before this module when setting this parameter.

Default value is 0 (disabled)

Example 1.1. Setting use_dialog

...
modparam("script_helper", "use_dialog", 1)
...

1.4.2. create_dialog_flags (string)

Flags used when creating dialogs. For details on these flags, please refer to the create_dialog() function of the dialog module.

Default value is "" (no flags are set)

Example 1.2. Setting create_dialog_flags

...
modparam("script_helper", "create_dialog_flags", "PpB")
...

1.4.3. sequential_route (string)

Optional route to be run just before sequential requests are relayed. If the exit script statement is used inside this route, the module assumes that the relaying logic has been handled.

By default, this parameter is not set

Example 1.3. Setting sequential_route

...
modparam("script_helper", "sequential_route", "sequential_handling")
...
route [sequential_handling]
{
...
}
...

1.5. Known Issues

The Max-Forwards header is currently not handled at all.

Chapter 2. Contributors

2.1. By Commit Statistics

Table 2.1. Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

 NameDevScoreCommitsLines ++Lines --
1. Liviu Chircu (@liviuchircu)191349946
2. Bogdan-Andrei Iancu (@bogdan-iancu)751310
3. Razvan Crainea (@razvancrainea)75108
4. Vlad Patrascu (@rvlad-patrascu)64913
5. Maksym Sobolyev (@sobomax)5334
6. Peter Lemenkov (@lemenkov)3111

(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)

(2) including any documentation-related commits, excluding merge commits. Regarding imported patches/code, we do our best to count the work on behalf of the proper owner, as per the "fix_authors" and "mod_renames" arrays in opensips/doc/build-contrib.sh. If you identify any patches/commits which do not get properly attributed to you, please submit a pull request which extends "fix_authors" and/or "mod_renames".

(3) ignoring whitespace edits, renamed files and auto-generated files

2.2. By Commit Activity

Table 2.2. Most recently active contributors(1) to this module

 NameCommit Activity
1. Liviu Chircu (@liviuchircu)Mar 2014 - May 2024
2. Razvan Crainea (@razvancrainea)Aug 2015 - Sep 2023
3. Bogdan-Andrei Iancu (@bogdan-iancu)Oct 2014 - May 2023
4. Maksym Sobolyev (@sobomax)Feb 2023 - Feb 2023
5. Vlad Patrascu (@rvlad-patrascu)May 2017 - Apr 2019
6. Peter Lemenkov (@lemenkov)Jun 2018 - Jun 2018

(1) including any documentation-related commits, excluding merge commits

Chapter 3. Documentation

3.1. Contributors

Last edited by: Peter Lemenkov (@lemenkov), Liviu Chircu (@liviuchircu).

Documentation Copyrights:

Copyright © 2014 www.opensips-solutions.com