| 1 |
The IMS QoS Module |
| 2 |
|
| 3 |
Dragos Vingarzan |
| 4 |
|
| 5 |
Core Network Dynamics (ex FhG Fokus) |
| 6 |
<[email protected]> |
| 7 |
|
| 8 |
Jason Penton |
| 9 |
|
| 10 |
Smile Communications |
| 11 |
<[email protected]> |
| 12 |
|
| 13 |
Richard Good |
| 14 |
|
| 15 |
Smile Communications |
| 16 |
<[email protected]> |
| 17 |
|
| 18 |
Carsten Bock |
| 19 |
|
| 20 |
ng-voice GmbH |
| 21 |
<[email protected]> |
| 22 |
|
| 23 |
Dragos Vingarzan |
| 24 |
|
| 25 |
<vingarzan -at- gmail dot com> |
| 26 |
|
| 27 |
Copyright © 2007 FhG FOKUS |
| 28 |
|
| 29 |
Copyright © 2012 Smile Communications |
| 30 |
|
| 31 |
Copyright © 2015 ng-voice GmbH |
| 32 |
|
| 33 |
Copyright © 2016 Core Network Dynamics GmbH |
| 34 |
__________________________________________________________________ |
| 35 |
|
| 36 |
Table of Contents |
| 37 |
|
| 38 |
1. Admin Guide |
| 39 |
|
| 40 |
1. Overview |
| 41 |
2. Dependencies |
| 42 |
|
| 43 |
2.1. Kamailio Modules |
| 44 |
2.2. External Libraries or Applications |
| 45 |
|
| 46 |
3. Parameters |
| 47 |
|
| 48 |
3.1. rx_dest_realm (string) |
| 49 |
3.2. rx_forced_peer (string) |
| 50 |
3.3. rx_auth_expiry (integer) |
| 51 |
3.4. cdp_event_latency (integer) |
| 52 |
3.5. cdp_event_threshold (integer) |
| 53 |
3.6. cdp_event_latency_log (integer) |
| 54 |
3.7. authorize_video_flow (integer) |
| 55 |
3.8. cdp_event_list_size_threshold (integer) |
| 56 |
3.9. audio_default_bandwidth (integer) |
| 57 |
3.10. video_default_bandwidth (integer) |
| 58 |
3.11. early_qosrelease_reason (String) |
| 59 |
3.12. confirmed_qosrelease_headers (String) |
| 60 |
3.13. regex_sdp_ip_prefix_to_maintain_in_fd (String) |
| 61 |
3.14. terminate_dialog_on_rx_failure integer |
| 62 |
3.15. delete_contact_on_rx_failure integer |
| 63 |
3.16. include_rtcp_fd integer |
| 64 |
3.17. af_signaling_ip (String) |
| 65 |
3.18. af_signaling_ip6 (String) |
| 66 |
3.19. media_type (String) |
| 67 |
3.20. flow_protocol (String) |
| 68 |
3.21. omit_flow_ports integer |
| 69 |
3.22. rs_default_bandwidth integer |
| 70 |
3.23. rr_default_bandwidth integer |
| 71 |
3.24. suspend_transaction integer |
| 72 |
3.25. recv_mode integer |
| 73 |
3.26. dialog_direction integer |
| 74 |
3.27. trust_bottom_via (int) |
| 75 |
|
| 76 |
4. Functions |
| 77 |
|
| 78 |
4.1. Rx_AAR_Register(route_block, domain) |
| 79 |
4.2. Rx_AAR(route_block, direction, subscription_id, |
| 80 |
subscription_id_type) |
| 81 |
|
| 82 |
5. Statistics |
| 83 |
|
| 84 |
5.1. AAR Timeouts (aar_timeouts) |
| 85 |
5.2. Average AAR Response Time (aar_avg_response_time) |
| 86 |
|
| 87 |
List of Examples |
| 88 |
|
| 89 |
1.1. rx_dest_realm parameter usage |
| 90 |
1.2. rx_forced_peer parameter usage |
| 91 |
1.3. rx_auth_expiry parameter usage |
| 92 |
1.4. cdp_event_latency parameter usage |
| 93 |
1.5. cdp_event_threshold parameter usage |
| 94 |
1.6. cdp_event_latency_log parameter usage |
| 95 |
1.7. authorize_video_flow parameter usage |
| 96 |
1.8. cdp_event_list_size_threshold parameter usage |
| 97 |
1.9. audio_default_bandwidth parameter usage |
| 98 |
1.10. video_default_bandwidth parameter usage |
| 99 |
1.11. early_qosrelease_reason parameter usage |
| 100 |
1.12. confirmed_qosrelease_headers parameter usage |
| 101 |
1.13. regex_sdp_ip_prefix_to_maintain_in_fd parameter usage |
| 102 |
1.14. terminate_dialog_on_rx_failure parameter usage |
| 103 |
1.15. delete_contact_on_rx_failure parameter usage |
| 104 |
1.16. include_rtcp_fd parameter usage |
| 105 |
1.17. af_signaling_ip parameter usage |
| 106 |
1.18. af_signaling_ip6 parameter usage |
| 107 |
1.19. media_type parameter usage |
| 108 |
1.20. flow_protocol parameter usage |
| 109 |
1.21. omit_flow_ports parameter usage |
| 110 |
1.22. rs_default_bandwidth parameter usage |
| 111 |
1.23. rr_default_bandwidth parameter usage |
| 112 |
1.24. suspend_transaction parameter usage |
| 113 |
1.25. recv_mode parameter usage |
| 114 |
1.26. dialog_direction parameter usage |
| 115 |
1.27. trust_bottom_via parameter usage |
| 116 |
1.28. Rx_AAR_Register |
| 117 |
1.29. Rx_AAR |
| 118 |
|
| 119 |
Chapter 1. Admin Guide |
| 120 |
|
| 121 |
Table of Contents |
| 122 |
|
| 123 |
1. Overview |
| 124 |
2. Dependencies |
| 125 |
|
| 126 |
2.1. Kamailio Modules |
| 127 |
2.2. External Libraries or Applications |
| 128 |
|
| 129 |
3. Parameters |
| 130 |
|
| 131 |
3.1. rx_dest_realm (string) |
| 132 |
3.2. rx_forced_peer (string) |
| 133 |
3.3. rx_auth_expiry (integer) |
| 134 |
3.4. cdp_event_latency (integer) |
| 135 |
3.5. cdp_event_threshold (integer) |
| 136 |
3.6. cdp_event_latency_log (integer) |
| 137 |
3.7. authorize_video_flow (integer) |
| 138 |
3.8. cdp_event_list_size_threshold (integer) |
| 139 |
3.9. audio_default_bandwidth (integer) |
| 140 |
3.10. video_default_bandwidth (integer) |
| 141 |
3.11. early_qosrelease_reason (String) |
| 142 |
3.12. confirmed_qosrelease_headers (String) |
| 143 |
3.13. regex_sdp_ip_prefix_to_maintain_in_fd (String) |
| 144 |
3.14. terminate_dialog_on_rx_failure integer |
| 145 |
3.15. delete_contact_on_rx_failure integer |
| 146 |
3.16. include_rtcp_fd integer |
| 147 |
3.17. af_signaling_ip (String) |
| 148 |
3.18. af_signaling_ip6 (String) |
| 149 |
3.19. media_type (String) |
| 150 |
3.20. flow_protocol (String) |
| 151 |
3.21. omit_flow_ports integer |
| 152 |
3.22. rs_default_bandwidth integer |
| 153 |
3.23. rr_default_bandwidth integer |
| 154 |
3.24. suspend_transaction integer |
| 155 |
3.25. recv_mode integer |
| 156 |
3.26. dialog_direction integer |
| 157 |
3.27. trust_bottom_via (int) |
| 158 |
|
| 159 |
4. Functions |
| 160 |
|
| 161 |
4.1. Rx_AAR_Register(route_block, domain) |
| 162 |
4.2. Rx_AAR(route_block, direction, subscription_id, |
| 163 |
subscription_id_type) |
| 164 |
|
| 165 |
5. Statistics |
| 166 |
|
| 167 |
5.1. AAR Timeouts (aar_timeouts) |
| 168 |
5.2. Average AAR Response Time (aar_avg_response_time) |
| 169 |
|
| 170 |
1. Overview |
| 171 |
|
| 172 |
This module contains all method related to the IMS policy and charging |
| 173 |
control functions performed by an Application Function (e.g. P-CSCF) |
| 174 |
over the Rx interface. This module is dependent on the CDP (C Diameter |
| 175 |
Peer) modules for communicating with PCRF as specified in 3GPP |
| 176 |
specification TS 29.214. |
| 177 |
|
| 178 |
2. Dependencies |
| 179 |
|
| 180 |
2.1. Kamailio Modules |
| 181 |
2.2. External Libraries or Applications |
| 182 |
|
| 183 |
2.1. Kamailio Modules |
| 184 |
|
| 185 |
The Following modules must be loaded before this module: |
| 186 |
* IMS Dialog |
| 187 |
* Usrloc PCSCF |
| 188 |
* TM - Transaction Manager |
| 189 |
* CDP - C Diameter Peer |
| 190 |
* CDP_AVP - CDP AVP Applications |
| 191 |
|
| 192 |
2.2. External Libraries or Applications |
| 193 |
|
| 194 |
This module requires the internal IMS library. |
| 195 |
|
| 196 |
3. Parameters |
| 197 |
|
| 198 |
3.1. rx_dest_realm (string) |
| 199 |
3.2. rx_forced_peer (string) |
| 200 |
3.3. rx_auth_expiry (integer) |
| 201 |
3.4. cdp_event_latency (integer) |
| 202 |
3.5. cdp_event_threshold (integer) |
| 203 |
3.6. cdp_event_latency_log (integer) |
| 204 |
3.7. authorize_video_flow (integer) |
| 205 |
3.8. cdp_event_list_size_threshold (integer) |
| 206 |
3.9. audio_default_bandwidth (integer) |
| 207 |
3.10. video_default_bandwidth (integer) |
| 208 |
3.11. early_qosrelease_reason (String) |
| 209 |
3.12. confirmed_qosrelease_headers (String) |
| 210 |
3.13. regex_sdp_ip_prefix_to_maintain_in_fd (String) |
| 211 |
3.14. terminate_dialog_on_rx_failure integer |
| 212 |
3.15. delete_contact_on_rx_failure integer |
| 213 |
3.16. include_rtcp_fd integer |
| 214 |
3.17. af_signaling_ip (String) |
| 215 |
3.18. af_signaling_ip6 (String) |
| 216 |
3.19. media_type (String) |
| 217 |
3.20. flow_protocol (String) |
| 218 |
3.21. omit_flow_ports integer |
| 219 |
3.22. rs_default_bandwidth integer |
| 220 |
3.23. rr_default_bandwidth integer |
| 221 |
3.24. suspend_transaction integer |
| 222 |
3.25. recv_mode integer |
| 223 |
3.26. dialog_direction integer |
| 224 |
3.27. trust_bottom_via (int) |
| 225 |
|
| 226 |
3.1. rx_dest_realm (string) |
| 227 |
|
| 228 |
This is the name of the Diameter realm of the Diameter server |
| 229 |
(typically a PCRF). |
| 230 |
|
| 231 |
Default value is 'ims.smilecoms.com'. |
| 232 |
|
| 233 |
Example 1.1. rx_dest_realm parameter usage |
| 234 |
... |
| 235 |
modparam("ims_qos", "rx_dest_realm", "ims.smilecoms.com") |
| 236 |
... |
| 237 |
|
| 238 |
3.2. rx_forced_peer (string) |
| 239 |
|
| 240 |
FQDN of the Diameter server (typically a PCRF) to communicate with. If |
| 241 |
not set then realm routing is used. If you use this, the routing |
| 242 |
defined in your diameter xml configuration file (CDP) will be ignored |
| 243 |
and as a result you will lose the benefits of load balancing and |
| 244 |
failover. |
| 245 |
|
| 246 |
Default value is ''. |
| 247 |
|
| 248 |
Example 1.2. rx_forced_peer parameter usage |
| 249 |
... |
| 250 |
modparam("ims_qos", "rx_forced_peer", "pcrf.ims.smilecoms.com") |
| 251 |
... |
| 252 |
|
| 253 |
3.3. rx_auth_expiry (integer) |
| 254 |
|
| 255 |
This is the expiry length in seconds of the initiated Diameter |
| 256 |
sessions. |
| 257 |
|
| 258 |
Default value is 7200. |
| 259 |
|
| 260 |
Example 1.3. rx_auth_expiry parameter usage |
| 261 |
... |
| 262 |
modparam("ims_qos", "rx_auth_expiry", 14400) |
| 263 |
... |
| 264 |
|
| 265 |
3.4. cdp_event_latency (integer) |
| 266 |
|
| 267 |
This is a flag to determine whether or slow CDP responses should be |
| 268 |
reported in the log file. 1 is enabled and 0 is disabled. |
| 269 |
|
| 270 |
Default value is 1. |
| 271 |
|
| 272 |
Example 1.4. cdp_event_latency parameter usage |
| 273 |
... |
| 274 |
modparam("ims_qos", "cdp_event_latency", 1) |
| 275 |
... |
| 276 |
|
| 277 |
3.5. cdp_event_threshold (integer) |
| 278 |
|
| 279 |
This time in milliseconds is the limit we should report a CDP response |
| 280 |
as slow. i.e. if a CDP response exceeds this limit it will be reported |
| 281 |
in the log file. This is only relevant is cdp_event_latency is enabled |
| 282 |
(set to 0). |
| 283 |
|
| 284 |
Default value is 500. |
| 285 |
|
| 286 |
Example 1.5. cdp_event_threshold parameter usage |
| 287 |
... |
| 288 |
modparam("ims_qos", "cdp_event_threshold", 500) |
| 289 |
... |
| 290 |
|
| 291 |
3.6. cdp_event_latency_log (integer) |
| 292 |
|
| 293 |
This time log level at which we should report slow CDP responses. 0 is |
| 294 |
ERROR, 1 is WARN, 2 is INFO and 3 is DEBUG. This is only relevant is |
| 295 |
cdp_event_latency is enabled (set to 0) |
| 296 |
|
| 297 |
Default value is 0. |
| 298 |
|
| 299 |
Example 1.6. cdp_event_latency_log parameter usage |
| 300 |
... |
| 301 |
modparam("ims_qos", "cdp_event_latency_log", 1) |
| 302 |
... |
| 303 |
|
| 304 |
3.7. authorize_video_flow (integer) |
| 305 |
|
| 306 |
This is a flag that specifies whether or not to authorize video flows. |
| 307 |
1 means video flows will be authorized over Rx and 0 means video flows |
| 308 |
will not be authorized over Rx |
| 309 |
|
| 310 |
Default value is 1. |
| 311 |
|
| 312 |
Example 1.7. authorize_video_flow parameter usage |
| 313 |
... |
| 314 |
modparam("ims_qos", "authorize_video_flow", 0) |
| 315 |
... |
| 316 |
|
| 317 |
3.8. cdp_event_list_size_threshold (integer) |
| 318 |
|
| 319 |
This is a threshold on the size of the cdp event list. Once the queue |
| 320 |
exceeds this length a warning is logged. 0 disables this feature |
| 321 |
|
| 322 |
Default value is 0. |
| 323 |
|
| 324 |
Example 1.8. cdp_event_list_size_threshold parameter usage |
| 325 |
... |
| 326 |
modparam("ims_qos", "cdp_event_list_size_threshold", 10) |
| 327 |
... |
| 328 |
|
| 329 |
3.9. audio_default_bandwidth (integer) |
| 330 |
|
| 331 |
This parameters defines the default bandwidth for Audio, if no |
| 332 |
"b=AS"-Parameter is found in the SDP. |
| 333 |
|
| 334 |
Default value is 64 (64 kBit) |
| 335 |
|
| 336 |
Example 1.9. audio_default_bandwidth parameter usage |
| 337 |
... |
| 338 |
modparam("ims_qos", "audio_default_bandwidth", 32) |
| 339 |
... |
| 340 |
|
| 341 |
3.10. video_default_bandwidth (integer) |
| 342 |
|
| 343 |
This parameters defines the default bandwidth for Video, if no |
| 344 |
"b=AS"-Parameter is found in the SDP. |
| 345 |
|
| 346 |
Default value is 128 (128 kBit) |
| 347 |
|
| 348 |
Example 1.10. video_default_bandwidth parameter usage |
| 349 |
... |
| 350 |
modparam("ims_qos", "video_default_bandwidth", 256) |
| 351 |
... |
| 352 |
|
| 353 |
3.11. early_qosrelease_reason (String) |
| 354 |
|
| 355 |
This sets the default Reason, when a call is terminated in early stage |
| 356 |
due to QoS-failure. |
| 357 |
|
| 358 |
Default value is "QoS released", a call in early stage would be |
| 359 |
released with "488 QoS released". |
| 360 |
|
| 361 |
Example 1.11. early_qosrelease_reason parameter usage |
| 362 |
... |
| 363 |
modparam("ims_qos", "early_qosrelease_reason", "Sorry - QoS failed") |
| 364 |
... |
| 365 |
|
| 366 |
3.12. confirmed_qosrelease_headers (String) |
| 367 |
|
| 368 |
These headers are added to the BYE-Message, when a confirmed call is |
| 369 |
terminated due to a QoS failure. |
| 370 |
|
| 371 |
Default value is "", no Extra-Headers |
| 372 |
|
| 373 |
The headers must end with CRLF. |
| 374 |
|
| 375 |
Example 1.12. confirmed_qosrelease_headers parameter usage |
| 376 |
... |
| 377 |
modparam("ims_qos", "confirmed_qosrelease_headers", "X-Reason: QoS failed\r\n") |
| 378 |
... |
| 379 |
|
| 380 |
3.13. regex_sdp_ip_prefix_to_maintain_in_fd (String) |
| 381 |
|
| 382 |
The flow-description AVP is typically populated using IP:port |
| 383 |
information present in the SDP. Certain (buggy) UEs can change ports |
| 384 |
midway during calls which causes the flow-description to no longer |
| 385 |
match the traffic. This parameter allows the flow-description AVP to |
| 386 |
use to the any keyword instead of certain IP:port combinations in the |
| 387 |
SDP. The parameter is a regex that if set adds an extra filter for all |
| 388 |
IPs that do not match the regex with the any keyword in the |
| 389 |
flow-description AVP |
| 390 |
|
| 391 |
Default value is "", no extra filters added |
| 392 |
|
| 393 |
Example 1.13. regex_sdp_ip_prefix_to_maintain_in_fd parameter usage |
| 394 |
... |
| 395 |
modparam("ims_qos", "regex_sdp_ip_prefix_to_maintain_in_fd", "10.21.0.1") |
| 396 |
... |
| 397 |
|
| 398 |
3.14. terminate_dialog_on_rx_failure integer |
| 399 |
|
| 400 |
If set then active dialogs associated with an Rx session are torn down |
| 401 |
in the Rx session fails |
| 402 |
|
| 403 |
Default value is 1, dialogs are torn down |
| 404 |
|
| 405 |
Example 1.14. terminate_dialog_on_rx_failure parameter usage |
| 406 |
... |
| 407 |
modparam("ims_qos", "terminate_dialog_on_rx_failure", 0) |
| 408 |
... |
| 409 |
|
| 410 |
3.15. delete_contact_on_rx_failure integer |
| 411 |
|
| 412 |
If set then contacts associated with signalling Rx sessions are deleted |
| 413 |
if the Rx session fails |
| 414 |
|
| 415 |
Default value is 1, contacts are deleted |
| 416 |
|
| 417 |
Example 1.15. delete_contact_on_rx_failure parameter usage |
| 418 |
... |
| 419 |
modparam("ims_qos", "delete_contact_on_rx_failure", 0) |
| 420 |
... |
| 421 |
|
| 422 |
3.16. include_rtcp_fd integer |
| 423 |
|
| 424 |
If set then a flow description is added for media flows - next |
| 425 |
available odd port is used as the default for RTCP traffic |
| 426 |
|
| 427 |
Default value is 0, RTCP flow description not added |
| 428 |
|
| 429 |
Example 1.16. include_rtcp_fd parameter usage |
| 430 |
... |
| 431 |
modparam("ims_qos", "include_rtcp_fd", 1) |
| 432 |
... |
| 433 |
|
| 434 |
3.17. af_signaling_ip (String) |
| 435 |
|
| 436 |
Set P-CSCF IPv4 address to generate the flows for the UE - PCSCF |
| 437 |
signaling path. Used only for AAR register, Flow-Description AVP (507) |
| 438 |
|
| 439 |
Default value is 127.0.0.1 |
| 440 |
|
| 441 |
Example 1.17. af_signaling_ip parameter usage |
| 442 |
... |
| 443 |
modparam("ims_qos", "af_signaling_ip", "127.0.0.1") |
| 444 |
... |
| 445 |
|
| 446 |
3.18. af_signaling_ip6 (String) |
| 447 |
|
| 448 |
Set P-CSCF IPv6 address to generate the flows for the UE - PCSCF |
| 449 |
signaling path. Used only for AAR register, Flow-Description AVP (507) |
| 450 |
|
| 451 |
Default value is "" |
| 452 |
|
| 453 |
Example 1.18. af_signaling_ip6 parameter usage |
| 454 |
... |
| 455 |
modparam("ims_qos", "af_signaling_ip6", "fd16::205:2dee:ce4a:ab22") |
| 456 |
... |
| 457 |
|
| 458 |
3.19. media_type (String) |
| 459 |
|
| 460 |
Describe Media Type AVP(520) for AAR register |
| 461 |
|
| 462 |
Default value is 'control' |
| 463 |
|
| 464 |
Example 1.19. media_type parameter usage |
| 465 |
... |
| 466 |
modparam("ims_qos", "media_type", "audio") |
| 467 |
... |
| 468 |
|
| 469 |
3.20. flow_protocol (String) |
| 470 |
|
| 471 |
Describe Flow protocol for Flow-Description AVP (507). Used only for |
| 472 |
AAR register |
| 473 |
|
| 474 |
Default value is 'IP' |
| 475 |
|
| 476 |
Example 1.20. flow_protocol parameter usage |
| 477 |
... |
| 478 |
modparam("ims_qos", "flow_protocol", "UDP") |
| 479 |
... |
| 480 |
|
| 481 |
3.21. omit_flow_ports integer |
| 482 |
|
| 483 |
If set to 1 ommit ports for Flow-Description AVP (507). Used only for |
| 484 |
AAR register |
| 485 |
|
| 486 |
Default value is 0, Add ports to Flow-Description AVP (507) |
| 487 |
|
| 488 |
Example 1.21. omit_flow_ports parameter usage |
| 489 |
... |
| 490 |
modparam("ims_qos", "omit_flow_ports", 1) |
| 491 |
... |
| 492 |
|
| 493 |
3.22. rs_default_bandwidth integer |
| 494 |
|
| 495 |
Describe default RS-Bandwidth AVP(522) for AAR |
| 496 |
|
| 497 |
Default value is 0 |
| 498 |
|
| 499 |
Example 1.22. rs_default_bandwidth parameter usage |
| 500 |
... |
| 501 |
modparam("ims_qos", "rs_default_bandwidth", 600) |
| 502 |
... |
| 503 |
|
| 504 |
3.23. rr_default_bandwidth integer |
| 505 |
|
| 506 |
Describe default RR-Bandwidth AVP(521) for AAR |
| 507 |
|
| 508 |
Default value is 0 |
| 509 |
|
| 510 |
Example 1.23. rr_default_bandwidth parameter usage |
| 511 |
... |
| 512 |
modparam("ims_qos", "rr_default_bandwidth", 2000) |
| 513 |
... |
| 514 |
|
| 515 |
3.24. suspend_transaction integer |
| 516 |
|
| 517 |
If enabled, suspends the tm transaction while doing the AAR. |
| 518 |
|
| 519 |
Default value is 1 (enabled) |
| 520 |
|
| 521 |
Example 1.24. suspend_transaction parameter usage |
| 522 |
... |
| 523 |
modparam("ims_qos", "suspend_transaction", 0) |
| 524 |
... |
| 525 |
|
| 526 |
3.25. recv_mode integer |
| 527 |
|
| 528 |
If set to 0, rx_aar_register() takes the received-from address values |
| 529 |
(IP, port, proto) from the IP frame. If set to 1, it takes them from |
| 530 |
Via header. |
| 531 |
|
| 532 |
Default value is 0 |
| 533 |
|
| 534 |
Example 1.25. recv_mode parameter usage |
| 535 |
... |
| 536 |
modparam("ims_qos", "recv_mode", 1) |
| 537 |
... |
| 538 |
|
| 539 |
3.26. dialog_direction integer |
| 540 |
|
| 541 |
If set to 1, DLG_MOBILE_ORIGINATING is set to |
| 542 |
rx_add_media_component_description_avp() instead of DLG_MOBILE_REGISTER |
| 543 |
(which corresponds to value 3). |
| 544 |
|
| 545 |
Default value is 3 |
| 546 |
|
| 547 |
Example 1.26. dialog_direction parameter usage |
| 548 |
... |
| 549 |
modparam("ims_qos", "dialog_direction", 1) |
| 550 |
... |
| 551 |
|
| 552 |
3.27. trust_bottom_via (int) |
| 553 |
|
| 554 |
If set to 1 it will trust the bottom Via as the UE IP/port/transport |
| 555 |
when doing client identification. |
| 556 |
|
| 557 |
Normally, the UE identification should be done on IPsec SPIs and source |
| 558 |
IP/port of the packets. In some cases the ims_* modules trust the top |
| 559 |
Via on requests and the bottom Via on responses. In some (better) cases |
| 560 |
this trusts the received-from IP (or the alias in the Contact header). |
| 561 |
|
| 562 |
This parameter allows for an external-to-Kamailio IPsec functionality |
| 563 |
to be used. That will be in charge of guaranteeing that the bottom Via |
| 564 |
header is always correct (on requests; on responses the P-CSCF itself |
| 565 |
should guarantee unmodified Via headers stack). Then the code here will |
| 566 |
always use the bottom Via as the source of truth for IMS UE |
| 567 |
identification. |
| 568 |
|
| 569 |
Note: this will prefer the standard received and rport values, if |
| 570 |
present, over the actual Via sent-by host and port. |
| 571 |
|
| 572 |
Note: !! trusting the Via header has security drawbacks, as it might be |
| 573 |
easily spoofed by an attacker. Hence, without extra security, the |
| 574 |
P-CSCF shouldn't trust the Via header for client identification on |
| 575 |
requests and the ims_registrar_pcscf module would require a fix or |
| 576 |
extension for that. !! |
| 577 |
|
| 578 |
See also the same parameter in the ims_registrar_pcscf module. |
| 579 |
|
| 580 |
Default value is 0 (trust received-from IP and alias in Contact, and, |
| 581 |
unfortunately somewhat wrongly top/bottom Via on requests/responses). |
| 582 |
|
| 583 |
Example 1.27. trust_bottom_via parameter usage |
| 584 |
... |
| 585 |
modparam("ims_qos", "trust_bottom_via", 1) |
| 586 |
... |
| 587 |
|
| 588 |
4. Functions |
| 589 |
|
| 590 |
4.1. Rx_AAR_Register(route_block, domain) |
| 591 |
4.2. Rx_AAR(route_block, direction, subscription_id, |
| 592 |
subscription_id_type) |
| 593 |
|
| 594 |
4.1. Rx_AAR_Register(route_block, domain) |
| 595 |
|
| 596 |
Perform an AAR on Diameter RX interface to subscribe to signalling |
| 597 |
status. This purpose of this is tell a Diameter server (typically a |
| 598 |
PCRF) to inform the requesting Diameter client on changes to the status |
| 599 |
of signalling bearer for the same framed IP address. For more details |
| 600 |
see 3GGP TS 29.214. |
| 601 |
|
| 602 |
Meaning of the parameters is as follows: |
| 603 |
* Route block to resume after async UAR Diameter reply. |
| 604 |
* domain that usrloc_pcscf uses to store user information. |
| 605 |
|
| 606 |
Return codes: |
| 607 |
* -1 - error: There was an error, so we must either ignore it (no |
| 608 |
subscription) or send 403 (depends on behaviour you want) |
| 609 |
0 - Success: AAR-Request sent, reply is processed asynchronously. |
| 610 |
1 - Success: No need to send AAR-Request, as a subscription still |
| 611 |
exists (continue as normal) |
| 612 |
|
| 613 |
This function can be used from REQUEST_ROUTE. |
| 614 |
|
| 615 |
p.s. this is executed asynchronously. See example on how to retrieve |
| 616 |
return value |
| 617 |
|
| 618 |
Example 1.28. Rx_AAR_Register |
| 619 |
... |
| 620 |
if(Rx_AAR_Register("REG_AAR_REPLY","location")==0){ |
| 621 |
exit; |
| 622 |
} |
| 623 |
... |
| 624 |
route[REG_AAR_REPLY] |
| 625 |
{ |
| 626 |
switch ($avp(s:aar_return_code)) { |
| 627 |
case 1: |
| 628 |
xlog("L_DBG", "Diameter: AAR success on subscription to signalling\n |
| 629 |
"); |
| 630 |
break; |
| 631 |
default: |
| 632 |
xlog("L_ERR", "Diameter: AAR failed on subscription to signalling\n" |
| 633 |
); |
| 634 |
t_reply("403", "Can't register to QoS for signalling"); |
| 635 |
exit; |
| 636 |
} |
| 637 |
... |
| 638 |
|
| 639 |
4.2. Rx_AAR(route_block, direction, subscription_id, subscription_id_type) |
| 640 |
|
| 641 |
Perform an AAR on Diameter RX interface to request resource |
| 642 |
authorisation from a Diameter server (typically a PCRF). For more |
| 643 |
details see 3GGP TS 29.214. |
| 644 |
|
| 645 |
Meaning of the parameters is as follows: |
| 646 |
* Route block to resume after async UAR Diameter reply. |
| 647 |
* direction of this message - orig, term, etc. |
| 648 |
* subscription_id to hard code subscription ID for AAR. Used for some |
| 649 |
broken PCRFs. Leave blank to use default |
| 650 |
* subscription_id_type to hard code subscription ID type for AAR. |
| 651 |
Only applicable if subscription_id is set. Set to -1 to use |
| 652 |
default. This is as per RFC 4006: END_USER_E164 0, END_USER_IMSI 1, |
| 653 |
END_USER_SIP_URI 2, END_USER_NAI 3, END_USER_PRIVATE 4 |
| 654 |
|
| 655 |
This function can be used only from ONREPLY_ROUTE, only for replies to |
| 656 |
INVITE, UPDATE, PRACK. The reply and request must have SDP, for this |
| 657 |
function to work properly. |
| 658 |
|
| 659 |
p.s. this is executed asynchronously. See example on how to retrieve |
| 660 |
return value |
| 661 |
|
| 662 |
Example 1.29. Rx_AAR |
| 663 |
... |
| 664 |
if(Rx_AAR("ORIG_SESSION_AAR_REPLY","orig","",-1)==0){ |
| 665 |
exit; |
| 666 |
} |
| 667 |
... |
| 668 |
route[ORIGN_SESSION_AAR_REPLY] |
| 669 |
{ |
| 670 |
if ($avp(s:aar_return_code) != 1) { |
| 671 |
xlog("L_ERR", "IMS: AAR failed Orig\n"); |
| 672 |
dlg_terminate("all", "Sorry no QoS available"); |
| 673 |
} else { |
| 674 |
xlog("L_DBG", "Diameter: Orig AAR success on media authorization\n"); |
| 675 |
} |
| 676 |
} |
| 677 |
... |
| 678 |
|
| 679 |
5. Statistics |
| 680 |
|
| 681 |
5.1. AAR Timeouts (aar_timeouts) |
| 682 |
5.2. Average AAR Response Time (aar_avg_response_time) |
| 683 |
|
| 684 |
5.1. AAR Timeouts (aar_timeouts) |
| 685 |
|
| 686 |
The number of timeouts on sending an AAR. i.e. no response to AAR. |
| 687 |
|
| 688 |
5.2. Average AAR Response Time (aar_avg_response_time) |
| 689 |
|
| 690 |
The average response time in milliseconds for AAR-AAA transaction. |