topoh Module

Daniel-Constantin Mierla

Edited by

Daniel-Constantin Mierla


Table of Contents

1. Admin Guide
1. Overview
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
3. Exported Parameters
3.1. mask_key (str)
3.2. mask_ip (str)
3.3. mask_callid (integer)
3.4. uparam_name (str)
3.5. uparam_prefix (str)
3.6. vparam_name (str)
3.7. vparam_prefix (str)
3.8. callid_prefix (str)
4. Exported Functions
4.1.

List of Examples

1.1. Set mask_key parameter
1.2. Set mask_ip parameter
1.3. Set mask_callid parameter
1.4. Set uparam_name parameter
1.5. Set uparam_prefix parameter
1.6. Set vparam_name parameter
1.7. Set vparam_prefix parameter
1.8. Set callid_prefix parameter

Chapter 1. Admin Guide

1. Overview

This module hides the routing headers that show topology details. It it is not affected by the server being transaction statless or stateful. The script interpretor gets the SIP messages decoded, so all functionality existing so far is preserved.

The module is transparent for config writer. It only needs to be loaded (tune the parameters if wanted). The SIP server can be restarted whitout affecting ongoing calls - once it is up, can encode/decode topology details, thus no call is lost.

By using same mask_key, many SIP servers can decode the message, for examlple, applicable for servers behind load balancers.

2. Dependencies

2.1. Kamailio Modules

The following modules must be loaded before this module:

  • rr module - server must perform record routing to ensure in-dialog requests are encoded/decoded.

2.2. External Libraries or Applications

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

  • None. In the future the module can be enhnaced to use a stronger encryption algorithm.

3. Exported Parameters

3.1. mask_key (str)

Keyword to mask the headers.

Default value is "_static_value_".

Example 1.1. Set mask_key parameter

...
modparam("topoh", "mask_key", "some secret here")
...

3.2. mask_ip (str)

IP address to be used in masked headers to build valid SIP URIs. Can be any IP address, does not affect routing when used on the main SIP server.

Default value is "10.1.1.10".

Example 1.2. Set mask_ip parameter

...
modparam("topoh", "mask_ip", "192.168.0.1")
...

3.3. mask_callid (integer)

Whether to encode or not the call-id. Some SIP extensions include the call-id in SIP message payload or header, so it is safe to not encode call-id in such cases. Well-known extensions such as call transfer or conference join will be added to work with encoded call-id.

Default value is 0 (do not mask).

Example 1.3. Set mask_callid parameter

...
modparam("topoh", "mask_callid", 1)
...

3.4. uparam_name (str)

Name of URI param where to store encoded value.

Default value is "line".

Example 1.4. Set uparam_name parameter

...
modparam("topoh", "uparam_name", "myparam")
...

3.5. uparam_prefix (str)

Prefix to be added in encoded URI params.

Default value is "sr-".

Example 1.5. Set uparam_prefix parameter

...
modparam("topoh", "uparam_prefix", "xyz")
...

3.6. vparam_name (str)

Name of Via param where to store encoded value.

Default value is "branch".

Example 1.6. Set vparam_name parameter

...
modparam("topoh", "vparam_name", "myv")
...

3.7. vparam_prefix (str)

Prefix to be added in encoded Via params.

Default value is "z9hG4bKsr-".

Example 1.7. Set vparam_prefix parameter

...
modparam("topoh", "vparam_prefix", "xyz")
...

3.8. callid_prefix (str)

Prefix to be added in encoded Call-ID: headers.

Default value is "!!:".

Example 1.8. Set callid_prefix parameter

...
modparam("topoh", "callid_prefix", "***")
...

4. Exported Functions

None.