Browse code

modules: readme files regenerated - peering ... [skip ci]

Kamailio Dev authored on 02/10/2018 10:31:39
Showing 1 changed files
... ...
@@ -69,6 +69,8 @@ Chapter 1. Admin Guide
69 69
    verify from a broker if source or destination of a SIP request is a
70 70
    trusted peer.
71 71
 
72
+   This module is obsolete and will be removed in the next release.
73
+
72 74
    In order to participate in the trust community provided by a broker,
73 75
    each SIP provider registers the domains (host parts of SIP URIs) that
74 76
    they serve with the broker. When a SIP proxy of a provider needs to
Browse code

modules: readme files regenerated - acc ... [skip ci]

Kamailio Dev authored on 28/02/2018 17:03:37 • The Root committed on 28/02/2018 19:11:36
Showing 1 changed files
... ...
@@ -101,7 +101,7 @@ Chapter 1. Admin Guide
101 101
 2.2. External Libraries or Applications
102 102
 
103 103
    The following libraries or applications must be installed before
104
-   compilling Kamailio with this module loaded:
104
+   compiling Kamailio with this module loaded:
105 105
      * radiusclient-ng 0.5.0 or higher -- library and development files.
106 106
        See http://developer.berlios.de/projects/radiusclient-ng/.
107 107
 
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,227 @@
1
+Peering Module
2
+
3
+Juha Heinanen
4
+
5
+   <jh@tutpro.com>
6
+
7
+Edited by
8
+
9
+Juha Heinanen
10
+
11
+   <jh@tutpro.com>
12
+
13
+   Copyright © 2008 Juha Heinanen
14
+     __________________________________________________________________
15
+
16
+   Table of Contents
17
+
18
+   1. Admin Guide
19
+
20
+        1. Overview
21
+        2. Dependencies
22
+
23
+              2.1. Kamailio Modules
24
+              2.2. External Libraries or Applications
25
+
26
+        3. Parameters
27
+
28
+              3.1. radius_config (string)
29
+              3.2. verify_destination_service_type (integer)
30
+              3.3. verify_source_service_type (integer)
31
+
32
+        4. Functions
33
+
34
+              4.1. verify_destination()
35
+              4.2. verify_source()
36
+
37
+   List of Examples
38
+
39
+   1.1. radius_config parameter usage
40
+   1.2. verify_destination_service_type parameter usage
41
+   1.3. verify_source_service_type parameter usage
42
+   1.4. verify_destination() usage
43
+   1.5. verify_source() usage
44
+
45
+Chapter 1. Admin Guide
46
+
47
+   Table of Contents
48
+
49
+   1. Overview
50
+   2. Dependencies
51
+
52
+        2.1. Kamailio Modules
53
+        2.2. External Libraries or Applications
54
+
55
+   3. Parameters
56
+
57
+        3.1. radius_config (string)
58
+        3.2. verify_destination_service_type (integer)
59
+        3.3. verify_source_service_type (integer)
60
+
61
+   4. Functions
62
+
63
+        4.1. verify_destination()
64
+        4.2. verify_source()
65
+
66
+1. Overview
67
+
68
+   The peering module allows SIP providers (operators or organizations) to
69
+   verify from a broker if source or destination of a SIP request is a
70
+   trusted peer.
71
+
72
+   In order to participate in the trust community provided by a broker,
73
+   each SIP provider registers the domains (host parts of SIP URIs) that
74
+   they serve with the broker. When a SIP proxy of a provider needs to
75
+   send a SIP request to a non-local domain, it can find out from the
76
+   broker using verify_destination() function if the non-local domain is
77
+   served by a trusted peer. If so, the provider receives from the broker
78
+   a hash of the SIP request and a timestamp that it includes in the
79
+   request to the non-local domain. When a SIP proxy of the non-local
80
+   domain receives the SIP request, it, in turn, can verify from the
81
+   broker using verify_source() function if the request came from a
82
+   trusted peer.
83
+
84
+   Verification functions communicate with the broker using Radius
85
+   protocol. Sample FreeRADIUS configuration files for broker's Radius
86
+   server are available from http://www.wirlab.net/tsi/.
87
+
88
+   Comments and suggestions for improvements are welcome.
89
+
90
+2. Dependencies
91
+
92
+   2.1. Kamailio Modules
93
+   2.2. External Libraries or Applications
94
+
95
+2.1. Kamailio Modules
96
+
97
+   The module depends on the following modules (in the other words the
98
+   listed modules must be loaded before this module):
99
+     * none
100
+
101
+2.2. External Libraries or Applications
102
+
103
+   The following libraries or applications must be installed before
104
+   compilling Kamailio with this module loaded:
105
+     * radiusclient-ng 0.5.0 or higher -- library and development files.
106
+       See http://developer.berlios.de/projects/radiusclient-ng/.
107
+
108
+3. Parameters
109
+
110
+   3.1. radius_config (string)
111
+   3.2. verify_destination_service_type (integer)
112
+   3.3. verify_source_service_type (integer)
113
+
114
+3.1. radius_config (string)
115
+
116
+   This is the location of the configuration file of Radius client
117
+   libraries.
118
+
119
+   Default value is “/usr/local/etc/radiusclient-ng/radiusclient.conf”.
120
+
121
+   Example 1.1. radius_config parameter usage
122
+modparam("peering", "radius_config", "/etc/broker/radiusclient.conf")
123
+
124
+3.2. verify_destination_service_type (integer)
125
+
126
+   This is the value of the Service-Type Radius attribute to be used, when
127
+   sender of SIP Request verifies the request's destination using
128
+   verify_destination() function.
129
+
130
+   Default value is the dictionary value of “Sip-Verify-Destination”
131
+   Service-Type.
132
+
133
+   Example 1.2. verify_destination_service_type parameter usage
134
+modparam("peering", "verify_destination_service_type", 21)
135
+
136
+3.3. verify_source_service_type (integer)
137
+
138
+   This is the value of the Service-Type Radius attribute to be used, when
139
+   receiver of SIP Request verifies the request's source using
140
+   verify_source() function.
141
+
142
+   Default value is the dictionary value of “Sip-Verify-Source”
143
+   Service-Type.
144
+
145
+   Example 1.3. verify_source_service_type parameter usage
146
+modparam("peering", "verify_source_service_type", 22)
147
+
148
+4. Functions
149
+
150
+   4.1. verify_destination()
151
+   4.2. verify_source()
152
+
153
+4.1. verify_destination()
154
+
155
+   Function verify_destination() queries from broker's Radius server if
156
+   domain (host part) of Request URI is served by a trusted peer. Radius
157
+   request contains the following attributes/values:
158
+     * User-Name - Request-URI host
159
+     * SIP-URI-User - Request-URI user
160
+     * SIP-From-Tag - From tag
161
+     * SIP-Call-Id - Call id
162
+     * Service-Type - verify_destination_service_type
163
+
164
+   Function returns value 1 if domain of Request URI is served by a
165
+   trusted peer and -1 otherwise. In case of positive result, the Radius
166
+   server returns a set of SIP-AVP reply attributes. The value of each
167
+   SIP-AVP is of form:
168
+
169
+   [#]name(:|#)value
170
+
171
+   Value of each SIP-AVP reply attribute is mapped to an Kamailio AVP.
172
+   Prefix # in front of name or value indicates a string name or string
173
+   value, respectively.
174
+
175
+   One of the SIP-AVP reply attributes contains a string that the source
176
+   peer must include "as is" in a P-Request-Hash: header when it sends the
177
+   SIP request to the destination peer. The string value may, for example,
178
+   be of form hash@timestamp, where hash contains a hash calculated by the
179
+   broker based on the attributes of the query and some local information
180
+   and timestamp is the time when the calculation was done.
181
+
182
+   AVP names used in reply attributes are assigned by the broker.
183
+
184
+   This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.
185
+
186
+   Example 1.4. verify_destination() usage
187
+...
188
+if (verify_destination()) {
189
+   append_hf("P-Request-Hash: $avp(i:200)\r\n");
190
+}
191
+...
192
+
193
+4.2. verify_source()
194
+
195
+   Function verify_source() queries the broker's Radius server whether the
196
+   SIP request was received from a trusted peer. The Radius request
197
+   contains the following attributes/values:
198
+     * User-Name - Request-URI host
199
+     * SIP-URI-User - Request-URI user
200
+     * SIP-From-Tag - From tag
201
+     * SIP-Call-Id - Call id
202
+     * SIP-Request-Hash - body of P-Request-Hash header
203
+     * Service-Type - verify_source_service_type
204
+
205
+   Function returns value 1 if SIP request was received from a trusted
206
+   peer and -1 otherwise. In case of positive result, Radius server may
207
+   return a set of SIP-AVP reply attributes. Value of each SIP-AVP is of
208
+   form:
209
+
210
+   [#]name(:|#)value
211
+
212
+   Value of each SIP-AVP reply attribute is mapped to an Kamailio AVP.
213
+   Prefix # in front of name or value indicates a string name or string
214
+   value, respectively.
215
+
216
+   AVP names used in reply attributes are assigned by the broker.
217
+
218
+   This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.
219
+
220
+   Example 1.5. verify_source() usage
221
+...
222
+if (is_present_hf("P-Request-Hash")) {
223
+   if (verify_source()) {
224
+      xlog("L_INFO", "Request came from trusted peer\n")
225
+   }
226
+}
227
+...