QOS 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. qos_flag (string)
1.5. Exported Functions
1.6. Exported Statistics
1.7. Exported MI Functions
1.8. Exported Pseudo-Variables
1.9. Installation and Running
2. Developer Guide
2.1. Available Functions
2.1.1. register_qoscb (qos, type, cb, param)
3. Contributors
3.1. By Commit Statistics
3.2. By Commit Activity
4. Documentation
4.1. Contributors

List of Tables

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

List of Examples

1.1. Set qos_flag parameter

Chapter 1. Admin Guide

1.1. Overview

The qos module provides a way to keep track of per dialog SDP session(s).

1.2. How it works

The qos module uses the dialog module to be notified of any new or updated dialogs. It will then look for and extract the SDP session (if present) from SIP requests and replies and keep track of it for the entire life of a dialog.

All of this happens with a properly configured dialog and qos module and setting the dialog flag and the qos flag at the time any INVITE sip message is seen. There is no config script function call required to set the SDP session tracking mechanism. See the dialog module users guide for more information.

A dialog can have one or more SDP sessions active in one of the following states:

  • pending - only one end point of the SDP session is known.

  • negotiated - both end points of the SDP session are known.

An SDP session can be established in one of the following scenarios:

  • INVITE/200ok - typical "INVITE" and "200 OK" SDP exchange.

  • 200ok/ACK - "200 OK" and "ACK" SDP exchange (for calls starting with an empty INVITE).

  • 183/PRACK - early media via "183 Session Progress" and "PRACK" (see rfc3959 for more information) - not implemented yet.

1.3. Dependencies

1.3.1. OpenSIPS Modules

The following modules must be loaded before this module:

  • dialog - dialog module and its decencies (tm).

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. qos_flag (string)

Keeping with OpenSIPS, the module will not do anything to any message unless instructed to do so via the config script. You must set the qos_flag value in the setflag() call of the INVITE you want the qos module to process. But before you can do that, you need to tell the qos module which flag value you are assigning to qos.

In most cases when ever you create a new dialog via create_dialog() function,you will want to set the qos flag. If create_dialog() is not called and the qos flag is set, it will not have any effect.

This parameter must be set of the module will not load.

Default value is Not set!.

Example 1.1. Set qos_flag parameter

...
modparam("qos", "qos_flag", "QOS_FLAG")
...
route {
  ...
  if ($rm=="INVITE") {
    setflag(QOS_FLAG); # Set the qos flag
	create_dialog(); # create the dialog
  }
  ...
}

1.5. Exported Functions

There are no exported functions that could be used in scripts.

1.6. Exported Statistics

There are no exported statistics for the qos module.

1.7. Exported MI Functions

There are no exported MI functions for the qos module. Check the dialog MI functions for a way to inspect the internals of a dialog.

1.8. Exported Pseudo-Variables

There are no exported pseudo-variables for the qos module.

1.9. Installation and Running

Just load the module and remember to set the flag.

Chapter 2. Developer Guide

2.1. Available Functions

2.1.1.  register_qoscb (qos, type, cb, param)

Register a new callback to the qos.

Meaning of the parameters is as follows:

  • struct qos_ctx_st* qos - qos to register callback to. If maybe NULL only for QOSCB_CREATED callback type, which is not a per qos type.

  • int type - types of callbacks; more types may be register for the same callback function; only QOSCB_CREATED must be register alone. Possible types:

    • QOSCB_CREATED - called when a new qos context is created - it's a global type (not associated to any qos).

    • QOSCB_ADD_SDP - called when a new SDP was added to the qos context - it's a per qos type.

    • QOSCB_UPDATE_SDP - called when an existing SDP is updated - it's a per qos type.

    • QOSCB_REMOVE_SDP - called when an existing SDP is removed - it's a per qos type.

    • QOSCB_TERMINATED - called when the qos is terminated.

  • qos_cb cb - callback function to be called. Prototype is: void (qos_cb) (struct qos_ctx_st *qos, int type, struct qos_cb_params *params);

  • void *param - parameter to be passed to the callback function.

Chapter 3. Contributors

3.1. By Commit Statistics

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

 NameDevScoreCommitsLines ++Lines --
1. Ovidiu Sas (@ovidiusas)233215213
2. Liviu Chircu (@liviuchircu)16134172
3. Bogdan-Andrei Iancu (@bogdan-iancu)1082516
4. Razvan Crainea (@razvancrainea)971919
5. Vlad Patrascu (@rvlad-patrascu)859996
6. Vlad Paiu (@vladpaiu)3156
7. Maksym Sobolyev (@sobomax)3133
8. Ezequiel Lovelle (@lovelle)3111
9. 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

3.2. By Commit Activity

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

 NameCommit Activity
1. Liviu Chircu (@liviuchircu)Jan 2013 - May 2024
2. Maksym Sobolyev (@sobomax)Feb 2023 - Feb 2023
3. Razvan Crainea (@razvancrainea)Oct 2011 - Jul 2020
4. Bogdan-Andrei Iancu (@bogdan-iancu)Jul 2009 - May 2020
5. Vlad Patrascu (@rvlad-patrascu)May 2017 - Apr 2019
6. Peter Lemenkov (@lemenkov)Jun 2018 - Jun 2018
7. Ezequiel Lovelle (@lovelle)Oct 2014 - Oct 2014
8. Ovidiu Sas (@ovidiusas)Dec 2008 - May 2012
9. Vlad Paiu (@vladpaiu)Jun 2011 - Jun 2011

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

Chapter 4. Documentation

4.1. Contributors

Last edited by: Liviu Chircu (@liviuchircu), Peter Lemenkov (@lemenkov), Vlad Patrascu (@rvlad-patrascu), Bogdan-Andrei Iancu (@bogdan-iancu), Vlad Paiu (@vladpaiu), Ovidiu Sas (@ovidiusas).

Documentation Copyrights:

Copyright © 2008 SOMA Networks, Inc.