Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
topos: new module - topology stripping
- provides topology hiding by stripping the headers with SIP routing details
- Loading branch information
Showing
10 changed files
with
1,079 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# topos module makefile | ||
# | ||
# | ||
# WARNING: do not run this directly, it should be run by the master Makefile | ||
|
||
include ../../Makefile.defs | ||
auto_gen= | ||
NAME=topos.so | ||
LIBS= | ||
|
||
DEFS+=-DKAMAILIO_MOD_INTERFACE | ||
|
||
SERLIBPATH=../../lib | ||
SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1 | ||
SER_LIBS+=$(SERLIBPATH)/srutils/srutils | ||
|
||
include ../../Makefile.modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
TOPOS Module | ||
|
||
Daniel-Constantin Mierla | ||
|
||
<miconda@gmail.com> | ||
|
||
Edited by | ||
|
||
Daniel-Constantin Mierla | ||
|
||
<miconda@gmail.com> | ||
|
||
Copyright � 2016 FhG FOKUS | ||
__________________________________________________________________ | ||
|
||
Table of Contents | ||
|
||
1. Admin Guide | ||
|
||
1. Overview | ||
2. Dependencies | ||
|
||
2.1. Kamailio Modules | ||
2.2. External Libraries or Applications | ||
|
||
3. Parameters | ||
|
||
3.1. db_url (str) | ||
3.2. mask_callid (int) | ||
3.3. sanity_checks (int) | ||
|
||
List of Examples | ||
|
||
1.1. Set db_url parameter | ||
1.2. Set mask_callid parameter | ||
1.3. Set sanity_checks parameter | ||
|
||
Chapter 1. Admin Guide | ||
|
||
Table of Contents | ||
|
||
1. Overview | ||
2. Dependencies | ||
|
||
2.1. Kamailio Modules | ||
2.2. External Libraries or Applications | ||
|
||
3. Parameters | ||
|
||
3.1. db_url (str) | ||
3.2. mask_callid (int) | ||
3.3. sanity_checks (int) | ||
|
||
1. Overview | ||
|
||
This module offers topology hiding by stripping the SIP routing headers | ||
that show topology details. The script interpreter gets the SIP | ||
messages with full content, so all existing functionality is preserved. | ||
|
||
The module is transparent for the configuration writer. It only needs | ||
to be loaded (tune the parameters if needed). | ||
|
||
2. Dependencies | ||
|
||
2.1. Kamailio Modules | ||
2.2. External Libraries or Applications | ||
|
||
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. | ||
* database module - to store the data for topology stripping and | ||
restoring. | ||
|
||
2.2. External Libraries or Applications | ||
|
||
The following libraries or applications must be installed before | ||
running Kamailio with this module loaded: | ||
* none. | ||
|
||
3. Parameters | ||
|
||
3.1. db_url (str) | ||
3.2. mask_callid (int) | ||
3.3. sanity_checks (int) | ||
|
||
3.1. db_url (str) | ||
|
||
Database URL. | ||
|
||
Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". | ||
|
||
Example 1.1. Set db_url parameter | ||
... | ||
modparam("topos", "db_url", "dbdriver://username:password@dbhost/dbname") | ||
... | ||
|
||
3.2. mask_callid (int) | ||
|
||
Whether to replace or not the Call-ID with another unique id generated | ||
by Kamailio. | ||
|
||
Default value is 0 (do not mask). | ||
|
||
Example 1.2. Set mask_callid parameter | ||
... | ||
modparam("topos", "mask_callid", 1) | ||
... | ||
|
||
3.3. sanity_checks (int) | ||
|
||
If set to 1, topoh module will bind to sanity module in order to | ||
perform sanity checks over received SIP request. Default sanity checks | ||
are done. It is useful to check if received request is well formated | ||
before proceeding to encoding/decoding. | ||
|
||
Default value is 0 (do not bind to sanity module). | ||
|
||
Example 1.3. Set sanity_checks parameter | ||
... | ||
modparam("topoh", "sanity_checks", 1) | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
docs = topos.xml | ||
|
||
docbook_dir = ../../../docbook | ||
include $(docbook_dir)/Makefile.module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding='ISO-8859-1'?> | ||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" | ||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ | ||
|
||
<!-- Include general documentation entities --> | ||
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml"> | ||
%docentities; | ||
|
||
]> | ||
|
||
<book xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<bookinfo> | ||
<title>TOPOS Module</title> | ||
<productname class="trade">kamailio.org</productname> | ||
<authorgroup> | ||
<author> | ||
<firstname>Daniel-Constantin</firstname> | ||
<surname>Mierla</surname> | ||
<email>miconda@gmail.com</email> | ||
</author> | ||
<editor> | ||
<firstname>Daniel-Constantin</firstname> | ||
<surname>Mierla</surname> | ||
<email>miconda@gmail.com</email> | ||
</editor> | ||
</authorgroup> | ||
<copyright> | ||
<year>2016</year> | ||
<holder>&fhg;</holder> | ||
</copyright> | ||
</bookinfo> | ||
<toc></toc> | ||
|
||
<xi:include href="topos_admin.xml"/> | ||
|
||
|
||
</book> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
<?xml version="1.0" encoding='ISO-8859-1'?> | ||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" | ||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ | ||
|
||
<!-- Include general documentation entities --> | ||
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml"> | ||
%docentities; | ||
|
||
]> | ||
<!-- Module User's Guide --> | ||
|
||
<chapter> | ||
|
||
<title>&adminguide;</title> | ||
|
||
<section> | ||
<title>Overview</title> | ||
<para> | ||
This module offers topology hiding by stripping the SIP routing | ||
headers that show topology details. | ||
The script interpreter gets the SIP messages with full content, | ||
so all existing functionality is preserved. | ||
</para> | ||
<para> | ||
The module is transparent for the configuration writer. It only needs to be | ||
loaded (tune the parameters if needed). | ||
</para> | ||
</section> | ||
<section> | ||
<title>Dependencies</title> | ||
<section> | ||
<title>&kamailio; Modules</title> | ||
<para> | ||
The following modules must be loaded before this module: | ||
<itemizedlist> | ||
<listitem> | ||
<para> | ||
<emphasis>rr module</emphasis> - server must perform record | ||
routing to ensure in-dialog requests are encoded/decoded. | ||
</para> | ||
</listitem> | ||
<listitem> | ||
<para> | ||
<emphasis>database module</emphasis> - to store the data | ||
for topology stripping and restoring. | ||
</para> | ||
</listitem> | ||
</itemizedlist> | ||
</para> | ||
</section> | ||
<section> | ||
<title>External Libraries or Applications</title> | ||
<para> | ||
The following libraries or applications must be installed before running | ||
&kamailio; with this module loaded: | ||
<itemizedlist> | ||
<listitem> | ||
<para> | ||
<emphasis>none</emphasis>. | ||
</para> | ||
</listitem> | ||
</itemizedlist> | ||
</para> | ||
</section> | ||
</section> | ||
<section> | ||
<title>Parameters</title> | ||
<section id="topos.p.db_url"> | ||
<title><varname>db_url</varname> (str)</title> | ||
<para> | ||
Database URL. | ||
</para> | ||
<para> | ||
<emphasis> | ||
Default value is <quote>&defaultdb;</quote>. | ||
</emphasis> | ||
</para> | ||
<example> | ||
<title>Set <varname>db_url</varname> parameter</title> | ||
<programlisting format="linespecific"> | ||
... | ||
modparam("topos", "db_url", "&exampledb;") | ||
... | ||
</programlisting> | ||
</example> | ||
</section> | ||
<section id="topos.p.mask_callid"> | ||
<title><varname>mask_callid</varname> (int)</title> | ||
<para> | ||
Whether to replace or not the Call-ID with another | ||
unique id generated by &kamailio;. | ||
</para> | ||
<para> | ||
<emphasis> | ||
Default value is 0 (do not mask). | ||
</emphasis> | ||
</para> | ||
<example> | ||
<title>Set <varname>mask_callid</varname> parameter</title> | ||
<programlisting format="linespecific"> | ||
... | ||
modparam("topos", "mask_callid", 1) | ||
... | ||
</programlisting> | ||
</example> | ||
</section> | ||
<section id="topos.p.sanity_checks"> | ||
<title><varname>sanity_checks</varname> (int)</title> | ||
<para> | ||
If set to 1, topoh module will bind to sanity module in order | ||
to perform sanity checks over received SIP request. Default | ||
sanity checks are done. It is useful to check if received request | ||
is well formated before proceeding to encoding/decoding. | ||
</para> | ||
<para> | ||
<emphasis> | ||
Default value is 0 (do not bind to sanity module). | ||
</emphasis> | ||
</para> | ||
<example> | ||
<title>Set <varname>sanity_checks</varname> parameter</title> | ||
<programlisting format="linespecific"> | ||
... | ||
modparam("topoh", "sanity_checks", 1) | ||
... | ||
</programlisting> | ||
</example> | ||
</section> | ||
|
||
</section> | ||
</chapter> | ||
|
Oops, something went wrong.