Browse code

ims modules: readmes regenerated

Daniel-Constantin Mierla authored on 17/12/2015 09:28:39
Showing 4 changed files
... ...
@@ -15,9 +15,9 @@ Carlos Ruiz Diaz
15 15
    ng-voice GmbH
16 16
    <carlos@ng-voice.com>
17 17
 
18
-   Copyright © 2013 Smile Communications
18
+   Copyright � 2013 Smile Communications
19 19
 
20
-   Copyright © 2013 ng-voice GmbH
20
+   Copyright � 2013 ng-voice GmbH
21 21
      __________________________________________________________________
22 22
 
23 23
    Table of Contents
... ...
@@ -47,20 +47,25 @@ Carlos Ruiz Diaz
47 47
               4.7. cdp_event_latency(integer)
48 48
               4.8. cdp_event_threshold(integer)
49 49
               4.9. cdp_event_latency_log(integer)
50
-              4.10. origin_host(string)
51
-              4.11. origin_realm(string)
52
-              4.12. destination_host(string)
53
-              4.13. destination_realm(string)
54
-              4.14. service_context_id_root(string)
55
-              4.15. service_context_id_ext(string)
56
-              4.16. service_context_id_mnc(string)
57
-              4.17. service_context_id_mcc(string)
58
-              4.18. service_context_id_release(string)
50
+              4.10. single_ro_session_per_dialog(integer)
51
+              4.11. origin_host(string)
52
+              4.12. origin_realm(string)
53
+              4.13. destination_host(string)
54
+              4.14. destination_realm(string)
55
+              4.15. service_context_id_root(string)
56
+              4.16. service_context_id_ext(string)
57
+              4.17. service_context_id_mnc(string)
58
+              4.18. voice_service_identifier(string)
59
+              4.19. voice_rating_group(string)
60
+              4.20. video_service_identifier(string)
61
+              4.21. video_rating_group(string)
62
+              4.22. service_context_id_mcc(string)
63
+              4.23. service_context_id_release(string)
59 64
 
60 65
         5. Functions
61 66
 
62 67
               5.1. Ro_CCR(route_name, direction, charge_type, unit_type,
63
-                      reservation_units)
68
+                      reservation_units, domain
64 69
 
65 70
         6. Statistics
66 71
 
... ...
@@ -92,16 +97,21 @@ Carlos Ruiz Diaz
92 97
    1.7. cdp_event_latencyparameter usage
93 98
    1.8. cdp_event_thresholdparameter usage
94 99
    1.9. cdp_event_latency_logparameter usage
95
-   1.10. origin_hostparameter usage
96
-   1.11. origin_realmparameter usage
97
-   1.12. destination_hostparameter usage
98
-   1.13. destination_realmparameter usage
99
-   1.14. service_context_id_rootparameter usage
100
-   1.15. service_context_id_extparameter usage
101
-   1.16. service_context_id_mncparameter usage
102
-   1.17. service_context_id_mccparameter usage
103
-   1.18. service_context_id_releaseparameter usage
104
-   1.19. Ro_CCR
100
+   1.10. single_ro_session_per_dialogparameter usage
101
+   1.11. origin_hostparameter usage
102
+   1.12. origin_realmparameter usage
103
+   1.13. destination_hostparameter usage
104
+   1.14. destination_realmparameter usage
105
+   1.15. service_context_id_rootparameter usage
106
+   1.16. service_context_id_extparameter usage
107
+   1.17. service_context_id_mncparameter usage
108
+   1.18. voice_service_identifierparameter usage
109
+   1.19. voice_rating_groupparameter usage
110
+   1.20. video_service_identifierparameter usage
111
+   1.21. video_rating_groupparameter usage
112
+   1.22. service_context_id_mccparameter usage
113
+   1.23. service_context_id_releaseparameter usage
114
+   1.24. Ro_CCR
105 115
 
106 116
 Chapter 1. Admin Guide
107 117
 
... ...
@@ -130,20 +140,25 @@ Chapter 1. Admin Guide
130 140
         4.7. cdp_event_latency(integer)
131 141
         4.8. cdp_event_threshold(integer)
132 142
         4.9. cdp_event_latency_log(integer)
133
-        4.10. origin_host(string)
134
-        4.11. origin_realm(string)
135
-        4.12. destination_host(string)
136
-        4.13. destination_realm(string)
137
-        4.14. service_context_id_root(string)
138
-        4.15. service_context_id_ext(string)
139
-        4.16. service_context_id_mnc(string)
140
-        4.17. service_context_id_mcc(string)
141
-        4.18. service_context_id_release(string)
143
+        4.10. single_ro_session_per_dialog(integer)
144
+        4.11. origin_host(string)
145
+        4.12. origin_realm(string)
146
+        4.13. destination_host(string)
147
+        4.14. destination_realm(string)
148
+        4.15. service_context_id_root(string)
149
+        4.16. service_context_id_ext(string)
150
+        4.17. service_context_id_mnc(string)
151
+        4.18. voice_service_identifier(string)
152
+        4.19. voice_rating_group(string)
153
+        4.20. video_service_identifier(string)
154
+        4.21. video_rating_group(string)
155
+        4.22. service_context_id_mcc(string)
156
+        4.23. service_context_id_release(string)
142 157
 
143 158
    5. Functions
144 159
 
145 160
         5.1. Ro_CCR(route_name, direction, charge_type, unit_type,
146
-                reservation_units)
161
+                reservation_units, domain
147 162
 
148 163
    6. Statistics
149 164
 
... ...
@@ -320,17 +335,22 @@ Chapter 1. Admin Guide
320 335
    4.7. cdp_event_latency(integer)
321 336
    4.8. cdp_event_threshold(integer)
322 337
    4.9. cdp_event_latency_log(integer)
323
-   4.10. origin_host(string)
324
-   4.11. origin_realm(string)
325
-   4.12. destination_host(string)
326
-   4.13. destination_realm(string)
327
-   4.14. service_context_id_root(string)
328
-   4.15. service_context_id_ext(string)
329
-   4.16. service_context_id_mnc(string)
330
-   4.17. service_context_id_mcc(string)
331
-   4.18. service_context_id_release(string)
332
-
333
-4.1.  hash_size(int)
338
+   4.10. single_ro_session_per_dialog(integer)
339
+   4.11. origin_host(string)
340
+   4.12. origin_realm(string)
341
+   4.13. destination_host(string)
342
+   4.14. destination_realm(string)
343
+   4.15. service_context_id_root(string)
344
+   4.16. service_context_id_ext(string)
345
+   4.17. service_context_id_mnc(string)
346
+   4.18. voice_service_identifier(string)
347
+   4.19. voice_rating_group(string)
348
+   4.20. video_service_identifier(string)
349
+   4.21. video_rating_group(string)
350
+   4.22. service_context_id_mcc(string)
351
+   4.23. service_context_id_release(string)
352
+
353
+4.1. hash_size(int)
334 354
 
335 355
    The size of the hash table internally used to keep the
336 356
    Diameter-Ro-Session. A larger table is much faster but consumes more
... ...
@@ -343,12 +363,12 @@ Chapter 1. Admin Guide
343 363
 
344 364
    Default value is 4096.
345 365
 
346
-   Example 1.1.  hash_sizeparameter usage
366
+   Example 1.1. hash_sizeparameter usage
347 367
 ...
348 368
 modparam("ims_charging", "hash_size", 1024)
349 369
 ...
350 370
 
351
-4.2.  interim_update_credits(int)
371
+4.2. interim_update_credits(int)
352 372
 
353 373
    How much credit should be requested interim request? At the start of
354 374
    the call, we request the amout of seconds as per Command. For each
... ...
@@ -356,72 +376,74 @@ modparam("ims_charging", "hash_size", 1024)
356 376
 
357 377
    Default value is 30.
358 378
 
359
-   Example 1.2.  interim_update_creditsparameter usage
379
+   Example 1.2. interim_update_creditsparameter usage
360 380
 ...
361 381
 modparam("ims_charging", "interim_update_credits", 600)
362 382
 ...
363 383
 
364
-4.3.  timer_buffer(int)
384
+4.3. timer_buffer(int)
365 385
 
366 386
    How many seconds before expiry of our credit should we request more
367 387
    credit?
368 388
 
369 389
    Default value is 8.
370 390
 
371
-   Example 1.3.  timer_bufferparameter usage
391
+   Example 1.3. timer_bufferparameter usage
372 392
 ...
373 393
 modparam("ims_charging", "timer_buffer", 10)
374 394
 ...
375 395
 
376
-4.4.  ro_forced_peer(string)
396
+4.4. ro_forced_peer(string)
377 397
 
378
-   This is the optional name of the origin host of the Diameter server
379
-   (typically a Charging Server). If not set then realm routing is used.
398
+   FQDN of Diameter Peer (OCS) to use for communication (CCR). If you use
399
+   this, the routing defined in your diameter xml configuration file (CDP)
400
+   will be ignored and as a result you will lose the benefits of load
401
+   balancing and failover.
380 402
 
381 403
    Default value is ''.
382 404
 
383
-   Example 1.4.  ro_forced_peerparameter usage
405
+   Example 1.4. ro_forced_peerparameter usage
384 406
 ...
385 407
 modparam("ims_charging", "ro_forced_peer", "ocs.ims.smilecoms.com")
386 408
 ...
387 409
 
388
-4.5.  ro_auth_expiry(integer)
410
+4.5. ro_auth_expiry(integer)
389 411
 
390 412
    This is the expiry length in seconds of the initiated Diameter
391 413
    sessions.
392 414
 
393 415
    Default value is 7200.
394 416
 
395
-   Example 1.5.  ro_auth_expiryparameter usage
417
+   Example 1.5. ro_auth_expiryparameter usage
396 418
 ...
397 419
 modparam("ims_charging", "ro_auth_expiry", 14400)
398 420
 ...
399 421
 
400
-4.6.  ro_auth_expiry(integer)
422
+4.6. ro_auth_expiry(integer)
401 423
 
402 424
    This is the expiry length in seconds of the initiated Diameter
403 425
    sessions.
404 426
 
405 427
    Default value is 7200.
406 428
 
407
-   Example 1.6.  ro_auth_expiryparameter usage
429
+   Example 1.6. ro_auth_expiryparameter usage
408 430
 ...
409 431
 modparam("ims_charging", "ro_auth_expiry", 14400)
410 432
 ...
411 433
 
412
-4.7.  cdp_event_latency(integer)
434
+4.7. cdp_event_latency(integer)
413 435
 
414 436
    This is a flag to determine whether or slow CDP responses should be
415 437
    reported in the log file. 1 is enabled and 0 is disabled.
416 438
 
417 439
    Default value is 1.
418 440
 
419
-   Example 1.7.  cdp_event_latencyparameter usage
441
+   Example 1.7. cdp_event_latencyparameter usage
420 442
 ...
421 443
 modparam("ims_charging", "cdp_event_latency", 1)
422 444
 ...
423 445
 
424
-4.8.  cdp_event_threshold(integer)
446
+4.8. cdp_event_threshold(integer)
425 447
 
426 448
    This time in milliseconds is the limit we should report a CDP response
427 449
    as slow. i.e. if a CDP response exceeds this limit it will be reported
... ...
@@ -430,12 +452,12 @@ modparam("ims_charging", "cdp_event_latency", 1)
430 452
 
431 453
    Default value is 500.
432 454
 
433
-   Example 1.8.  cdp_event_thresholdparameter usage
455
+   Example 1.8. cdp_event_thresholdparameter usage
434 456
 ...
435 457
 modparam("ims_charging", "cdp_event_threshold", 500)
436 458
 ...
437 459
 
438
-4.9.  cdp_event_latency_log(integer)
460
+4.9. cdp_event_latency_log(integer)
439 461
 
440 462
    This time log level at which we should report slow CDP responses. 0 is
441 463
    ERROR, 1 is WARN, 2 is INFO and 3 is DEBUG. This is only relevant is
... ...
@@ -443,56 +465,72 @@ modparam("ims_charging", "cdp_event_threshold", 500)
443 465
 
444 466
    Default value is 0.
445 467
 
446
-   Example 1.9.  cdp_event_latency_logparameter usage
468
+   Example 1.9. cdp_event_latency_logparameter usage
447 469
 ...
448 470
 modparam("ims_charging", "cdp_event_latency_log", 1)
449 471
 ...
450 472
 
451
-4.10.  origin_host(string)
473
+4.10. single_ro_session_per_dialog(integer)
474
+
475
+   This tells the module whether it should do a single ro session per
476
+   dialog no matter how many times Ro_send_CCR is called from the config
477
+   file or initiate an ro session each time Ro_send_CCR is called. It is
478
+   useful for IMS charging where you might want to charge for on-net
479
+   originating and off-net originating calls but always have only a single
480
+   ro session.
481
+
482
+   Default value is 0.
483
+
484
+   Example 1.10. single_ro_session_per_dialogparameter usage
485
+...
486
+modparam("ims_charging", "single_ro_session_per_dialog", 1)
487
+...
488
+
489
+4.11. origin_host(string)
452 490
 
453 491
    Origin host to be used in Diameter messages to charging-server.
454 492
 
455 493
    Default value is "scscf.ims.smilecoms.com".
456 494
 
457
-   Example 1.10.  origin_hostparameter usage
495
+   Example 1.11. origin_hostparameter usage
458 496
 ...
459 497
 modparam("ims_charging", "origin_host", "scscf.kamailio-ims.org")
460 498
 ...
461 499
 
462
-4.11.  origin_realm(string)
500
+4.12. origin_realm(string)
463 501
 
464 502
    Origin Realm to be used in Diameter messages to charging-server.
465 503
 
466 504
    Default value is "ims.smilecome.com".
467 505
 
468
-   Example 1.11.  origin_realmparameter usage
506
+   Example 1.12. origin_realmparameter usage
469 507
 ...
470 508
 modparam("ims_charging", "origin_realm", "kamailio-ims.org")
471 509
 ...
472 510
 
473
-4.12.  destination_host(string)
511
+4.13. destination_host(string)
474 512
 
475 513
    Destination host to be used in Diameter messages to charging-server.
476 514
 
477 515
    Default value is 5s.
478 516
 
479
-   Example 1.12.  destination_hostparameter usage
517
+   Example 1.13. destination_hostparameter usage
480 518
 ...
481 519
 modparam("ims_charging", "destination_host", "ocs.kamailio-ims.org")
482 520
 ...
483 521
 
484
-4.13.  destination_realm(string)
522
+4.14. destination_realm(string)
485 523
 
486 524
    Destination realm to be used in Diameter messages to charging-server.
487 525
 
488 526
    Default value is "ims.smilecoms.com".
489 527
 
490
-   Example 1.13.  destination_realmparameter usage
528
+   Example 1.14. destination_realmparameter usage
491 529
 ...
492 530
 modparam("ims_charging", "destination_realm", "kamailio-ims.org")
493 531
 ...
494 532
 
495
-4.14.  service_context_id_root(string)
533
+4.15. service_context_id_root(string)
496 534
 
497 535
    This defines a root-element of the Service-Context-Id AVP used in the
498 536
    diameter-message
... ...
@@ -523,36 +561,80 @@ modparam("ims_charging", "destination_realm", "kamailio-ims.org")
523 561
 
524 562
    Default value is "32260@3gpp.org".
525 563
 
526
-   Example 1.14.  service_context_id_rootparameter usage
564
+   Example 1.15. service_context_id_rootparameter usage
527 565
 ...
528 566
 modparam("ims_charging", "service_context_id_root", "calls@kamailio-ims.org")
529 567
 ...
530 568
 
531
-4.15.  service_context_id_ext(string)
569
+4.16. service_context_id_ext(string)
532 570
 
533 571
    This defines the extension of the Service-Context-Id AVP used in the
534 572
    diameter-message.
535 573
 
536 574
    Default value is "ext".
537 575
 
538
-   Example 1.15.  service_context_id_extparameter usage
576
+   Example 1.16. service_context_id_extparameter usage
539 577
 ...
540 578
 modparam("ims_charging", "service_context_id_ext", "ext2")
541 579
 ...
542 580
 
543
-4.16.  service_context_id_mnc(string)
581
+4.17. service_context_id_mnc(string)
544 582
 
545 583
    This defines Mobile-Network-Code (MNC) of the Service-Context-Id AVP
546 584
    used in the diameter-message.
547 585
 
548 586
    Default value is "01".
549 587
 
550
-   Example 1.16.  service_context_id_mncparameter usage
588
+   Example 1.17. service_context_id_mncparameter usage
551 589
 ...
552 590
 modparam("ims_charging", "service_context_id_mnc", "42")
553 591
 ...
554 592
 
555
-4.17.  service_context_id_mcc(string)
593
+4.18. voice_service_identifier(string)
594
+
595
+   This defines the service identifier to be used for charging voice.
596
+
597
+   Default value is "1000".
598
+
599
+   Example 1.18. voice_service_identifierparameter usage
600
+...
601
+modparam("ims_charging", "voice_service_identifier", "1000")
602
+...
603
+
604
+4.19. voice_rating_group(string)
605
+
606
+   This defines the rating group to be used for charging voice.
607
+
608
+   Default value is "100".
609
+
610
+   Example 1.19. voice_rating_groupparameter usage
611
+...
612
+modparam("ims_charging", "voice_rating_group", "100")
613
+...
614
+
615
+4.20. video_service_identifier(string)
616
+
617
+   This defines the service identifier to be used for charging video.
618
+
619
+   Default value is "1001".
620
+
621
+   Example 1.20. video_service_identifierparameter usage
622
+...
623
+modparam("ims_charging", "video_service_identifier", "1000")
624
+...
625
+
626
+4.21. video_rating_group(string)
627
+
628
+   This defines the rating group to be used for charging video.
629
+
630
+   Default value is "200".
631
+
632
+   Example 1.21. video_rating_groupparameter usage
633
+...
634
+modparam("ims_charging", "video_rating_group", "100")
635
+...
636
+
637
+4.22. service_context_id_mcc(string)
556 638
 
557 639
    This defines Mobile-Country-Code (MCC) of the Service-Context-Id AVP
558 640
    used in the diameter-message.
... ...
@@ -562,19 +644,19 @@ modparam("ims_charging", "service_context_id_mnc", "42")
562 644
 
563 645
    Default value is "001".
564 646
 
565
-   Example 1.17.  service_context_id_mccparameter usage
647
+   Example 1.22. service_context_id_mccparameter usage
566 648
 ...
567 649
 modparam("ims_charging", "service_context_id_mcc", "262")
568 650
 ...
569 651
 
570
-4.18.  service_context_id_release(string)
652
+4.23. service_context_id_release(string)
571 653
 
572 654
    This defines Release of the Service-Context-Id AVP used in the
573 655
    diameter-message.
574 656
 
575 657
    Default value is "8" (Release 8).
576 658
 
577
-   Example 1.18.  service_context_id_releaseparameter usage
659
+   Example 1.23. service_context_id_releaseparameter usage
578 660
 ...
579 661
 modparam("ims_charging", "service_context_id_release", "262")
580 662
 ...
... ...
@@ -582,10 +664,10 @@ modparam("ims_charging", "service_context_id_release", "262")
582 664
 5. Functions
583 665
 
584 666
    5.1. Ro_CCR(route_name, direction, charge_type, unit_type,
585
-          reservation_units)
667
+          reservation_units, domain
586 668
 
587
-5.1.  Ro_CCR(route_name, direction, charge_type, unit_type,
588
-reservation_units)
669
+5.1. Ro_CCR(route_name, direction, charge_type, unit_type, reservation_units,
670
+domain
589 671
 
590 672
    Perform a CCR on Diameter Ro interface for Charging
591 673
 
... ...
@@ -600,13 +682,14 @@ reservation_units)
600 682
        (unused at the moment)
601 683
      * reservation_unitshow many units (at the moment seconds) should be
602 684
        reservated at the moment.
685
+     * domain- Logical domain within registrar.
603 686
 
604 687
    This function can be used from REQUEST_ROUTE.
605 688
 
606 689
    This method is executed asynchronously. See example on how to retrieve
607 690
    return value.
608 691
 
609
-   Example 1.19. Ro_CCR
692
+   Example 1.24. Ro_CCR
610 693
 ...
611 694
   xlog("L_DBG","Sending initial CCR Request for call\n");
612 695
   Ro_CCR("CHARGING_CCR_REPLY", "orig", "SCUR", "", "30");
... ...
@@ -15,9 +15,9 @@ Richard Good
15 15
    Smile Communications
16 16
    <richard.good@smilecoms.com>
17 17
 
18
-   Copyright © 2007 FhG FOKUS
18
+   Copyright � 2007 FhG FOKUS
19 19
 
20
-   Copyright © 2012 Smile Communications
20
+   Copyright � 2012 Smile Communications
21 21
      __________________________________________________________________
22 22
 
23 23
    Table of Contents
... ...
@@ -42,8 +42,10 @@ Richard Good
42 42
 
43 43
               4.1. I_scscf_select(initial)
44 44
               4.2. I_scscf_drop()
45
-              4.3. I_perform_user_authorization_request(capabalities)
46
-              4.4. I_perform_location_information_request()
45
+              4.3. I_perform_user_authorization_request(route_block,
46
+                      capabalities)
47
+
48
+              4.4. I_perform_location_information_request(route_block)
47 49
 
48 50
         5. Statistics
49 51
 
... ...
@@ -62,7 +64,7 @@ Richard Good
62 64
    1.6. I_scscf_select usage
63 65
    1.7. I_scscf_drop usage
64 66
    1.8. I_perform_user_authorization_request usage
65
-   1.9. proxy_authorize usage
67
+   1.9. I_perform_location_information_request()
66 68
 
67 69
 Chapter 1. Admin Guide
68 70
 
... ...
@@ -86,8 +88,10 @@ Chapter 1. Admin Guide
86 88
 
87 89
         4.1. I_scscf_select(initial)
88 90
         4.2. I_scscf_drop()
89
-        4.3. I_perform_user_authorization_request(capabalities)
90
-        4.4. I_perform_location_information_request()
91
+        4.3. I_perform_user_authorization_request(route_block,
92
+                capabalities)
93
+
94
+        4.4. I_perform_location_information_request(route_block)
91 95
 
92 96
    5. Statistics
93 97
 
... ...
@@ -163,7 +167,10 @@ modparam("ims_icscf","scscf_entry_expiry", 300)
163 167
 
164 168
 3.4. cxdx_forced_peer (string)
165 169
 
166
-   FQDN of Diameter Peer (HSS) to use for communication (MAR)
170
+   FQDN of Diameter Peer (HSS) to use for communication (UAR, LIR). If you
171
+   use this, the routing defined in your diameter xml configuration file
172
+   (CDP) will be ignored and as a result you will lose the benefits of
173
+   load balancing and failover.
167 174
 
168 175
    Default value is "".
169 176
 
... ...
@@ -187,8 +194,8 @@ modparam("ims_icscf", "cxdx_dest_realm", "ims.smilecoms.com")
187 194
 
188 195
    4.1. I_scscf_select(initial)
189 196
    4.2. I_scscf_drop()
190
-   4.3. I_perform_user_authorization_request(capabalities)
191
-   4.4. I_perform_location_information_request()
197
+   4.3. I_perform_user_authorization_request(route_block, capabalities)
198
+   4.4. I_perform_location_information_request(route_block)
192 199
 
193 200
 4.1. I_scscf_select(initial)
194 201
 
... ...
@@ -227,12 +234,13 @@ I_scscf_drop();
227 234
 
228 235
    .
229 236
 
230
-4.3. I_perform_user_authorization_request(capabalities)
237
+4.3. I_perform_user_authorization_request(route_block, capabalities)
231 238
 
232 239
    Perform a UAR on Diameter CXDX interface. This function will build a
233 240
    list of SCSCFs to be used and populate the SCSCF list for the request.
234 241
    On a succesful return of this message you can get the next available
235 242
    SCSCF by using the I_scscf_select functoin in 4.1.
243
+     * Route block to resume after async UAR Diameter reply.
236 244
      * capabilities - whether to request capabilities or not "1" - with
237 245
        capabilities, "0" - no capabilities.
238 246
 
... ...
@@ -243,47 +251,84 @@ I_scscf_drop();
243 251
 
244 252
    Example 1.8. I_perform_user_authorization_request usage
245 253
 ...
246
-            I_perform_user_authorization_request("0"); #0=REG/DEREG; 1=REG+Capab
247
-ilities
248
-            #this is async so to know status we have to check the reply avp
249
-            switch ($avp(s:uaa_return_code)){
250
-                case 1: #success
254
+I_perform_user_authorization_request("REG_UAR_REPLY","0"); #0=REG/DEREG; 1=REG+C
255
+apabilities
256
+exit;
257
+...
258
+route[REG_UAR_REPLY]
259
+{
260
+    #this is async so to know status we have to check the reply avp
261
+    switch ($avp(s:uaa_return_code)){
262
+            case 1: #success
251 263
                     if (I_scscf_select("0")){
252
-                        t_on_failure("register_failure");
253
-                        t_on_reply("register_reply");
254
-                        if (!t_relay()) {
255
-                            t_reply("500", "Error forwarding to SCSCF");
256
-                        }
264
+                            t_on_failure("register_failure");
265
+                            t_on_reply("register_reply");
266
+                            #now relay to appropriate SCSCF
267
+                            if (!t_relay()) {
268
+                                    t_reply("500", "Error forwarding to SCSCF");
269
+                            }
257 270
                     } else {#select failed
258
-                        I_scscf_drop();
259
-                        t_reply("500", "Server error on SCSCF Select (UAR)");
271
+                            I_scscf_drop();
272
+                            t_reply("500", "Server error on SCSCF Select (UAR)")
273
+;
260 274
                     }
261 275
                     break;
262
-                case -1: #failure
276
+            case -1: #failure
263 277
                     xlog("L_ERR", "UAR failure - error response sent from module
264
-");
278
+\n");
265 279
                     break;
266
-                case -2: #error
267
-                    xlog("L_ERR", "UAR error - sending error response now");
280
+            case -2: #error
281
+                    xlog("L_ERR", "UAR error - sending error response now\n");
268 282
                     t_reply("500", "UAR failed");
269 283
                     break;
270
-                default:
284
+            default:
271 285
                     xlog("L_ERR", "Unknown return code from UAR, value is [$avp(
272
-s:uaa_return_code)]");
286
+s:uaa_return_code)]\n");
273 287
                     t_reply("500", "Unknown response code from UAR");
274 288
                     break;
275
-            }
289
+    }
290
+}
276 291
 ...
277 292
 
278
-4.4. I_perform_location_information_request()
293
+4.4. I_perform_location_information_request(route_block)
294
+
295
+   Perform a LIR on Diameter CXDX interface.
296
+     * Route block to resume after async LIR Diameter reply.
279 297
 
280 298
    This function can be used from REQUEST_ROUTE.
281 299
 
282
-   Example 1.9. proxy_authorize usage
300
+   p.s. this is executed asynchronously. See example on how to retrieve
301
+   return value
302
+
303
+   Example 1.9. I_perform_location_information_request()
304
+...
305
+I_perform_location_information_request("SESSION_LIR_REPLY","0");
306
+exit;
283 307
 ...
284
-if (!proxy_authorize("$fd", "subscriber)) {
285
-proxy_challenge("$fd", "1");  # Realm will be autogenerated
286
-};
308
+route[SESSION_LIR_REPLY]
309
+{
310
+    if ($avp(lia_return_code) == 1) {
311
+            if (I_scscf_select("0")) {
312
+                    append_branch();
313
+                    t_on_reply("initial_request_reply");
314
+                    t_on_failure("initial_request_failure");
315
+                    if (!t_relay()) {
316
+                            t_reply("500","Error forwarding towards S-CSCF");
317
+                            break;
318
+                    }
319
+                    break;
320
+            } else {
321
+                    xlog("L_DBG", "dropping scscf list on initial request\n");
322
+                    I_scscf_drop();
323
+                    t_reply("500", "Server error on LIR select S-CSCF");
324
+                    break;
325
+            }
326
+    } else {
327
+            t_reply("500", "Server error on LIR");
328
+            break;
329
+    }
330
+    break;
331
+}
287 332
 ...
288 333
 
289 334
 5. Statistics
290 335
new file mode 100644
... ...
@@ -0,0 +1,698 @@
1
+IMS Usrloc PCSCF Module
2
+
3
+Jason Penton
4
+
5
+   Smile Communications
6
+
7
+Edited by
8
+
9
+Richard Good
10
+
11
+   Smile Communications
12
+
13
+   Copyright � 2012 Smile Communications
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. default_expires (int)
29
+              3.2. default_expires_range (int)
30
+              3.3. min_expires (int)
31
+              3.4. max_expires (int)
32
+              3.5. user_data_dtd (string)
33
+              3.6. user_data_xsd (string)
34
+              3.7. support_wildcardPSI (int)
35
+              3.8. scscf_name (string)
36
+              3.9. store_profile_dereg (int)
37
+              3.10. cxdx_dest_realm (string)
38
+              3.11. cxdx_forced_peer (string)
39
+              3.12. append_branches (integer)
40
+              3.13. method_filtering (integer)
41
+
42
+        4. Functions
43
+
44
+              4.1. save(async_reply_route, domain)
45
+              4.2. lookup(domain)
46
+              4.3. unregister(domain)
47
+              4.4. assign_server_unreg(aysnc_reply_route, domain,
48
+                      direction)
49
+
50
+              4.5. impu_registered(domain)
51
+              4.6. term_impu_registered(domain)
52
+              4.7. reg_fetch_contacts(domain, uri, profile)
53
+              4.8. reg_free_contacts(profile)
54
+              4.9. can_subscribe_to_reg(domain)
55
+              4.10. subscribe_to_reg(domain)
56
+              4.11. can_publish_reg(domain)
57
+              4.12. publish_reg(domain)
58
+
59
+        5. RPC Commands
60
+
61
+              5.1. ulpcscf.status
62
+
63
+        6. Statistics
64
+
65
+              6.1. registered contacts
66
+              6.2. impus
67
+              6.3. expired contacts
68
+
69
+   2. Frequently Asked Questions
70
+
71
+   List of Examples
72
+
73
+   1.1. Set default_expires parameter
74
+   1.2. Set default_expires_range parameter
75
+   1.3. Set min_expiresparameter
76
+   1.4. Set max_expiresparameter
77
+   1.5. Set user_data_dtdparameter
78
+   1.6. Set user_data_xsdparameter
79
+   1.7. Set support_wildcardPSIparameter
80
+   1.8. Set scscf_nameparameter
81
+   1.9. Set store_profile_deregparameter
82
+   1.10. Set cxdx_dest_realmparameter
83
+   1.11. Set cxdx_forced_peerparameter
84
+   1.12. Set cxdx_forced_peerparameter
85
+   1.13. Set cxdx_forced_peerparameter
86
+   1.14. save usage
87
+   1.15. lookup usage
88
+   1.16. unregister usage
89
+   1.17. impu_registered usage
90
+   1.18. term_impu_registered usage
91
+   1.19. reg_fetch_contacts usage
92
+   1.20. reg_free_contacts usage
93
+   1.21. can_subscribe_to_reg usage
94
+   1.22. subscribe_to_reg usage
95
+   1.23. can_publish_reg usage
96
+   1.24. publish_reg usage
97
+
98
+Chapter 1. Admin Guide
99
+
100
+   Table of Contents
101
+
102
+   1. Overview
103
+   2. Dependencies
104
+
105
+        2.1. Kamailio Modules
106
+        2.2. External Libraries or Applications
107
+
108
+   3. Parameters
109
+
110
+        3.1. default_expires (int)
111
+        3.2. default_expires_range (int)
112
+        3.3. min_expires (int)
113
+        3.4. max_expires (int)
114
+        3.5. user_data_dtd (string)
115
+        3.6. user_data_xsd (string)
116
+        3.7. support_wildcardPSI (int)
117
+        3.8. scscf_name (string)
118
+        3.9. store_profile_dereg (int)
119
+        3.10. cxdx_dest_realm (string)
120
+        3.11. cxdx_forced_peer (string)
121
+        3.12. append_branches (integer)
122
+        3.13. method_filtering (integer)
123
+
124
+   4. Functions
125
+
126
+        4.1. save(async_reply_route, domain)
127
+        4.2. lookup(domain)
128
+        4.3. unregister(domain)
129
+        4.4. assign_server_unreg(aysnc_reply_route, domain, direction)
130
+        4.5. impu_registered(domain)
131
+        4.6. term_impu_registered(domain)
132
+        4.7. reg_fetch_contacts(domain, uri, profile)
133
+        4.8. reg_free_contacts(profile)
134
+        4.9. can_subscribe_to_reg(domain)
135
+        4.10. subscribe_to_reg(domain)
136
+        4.11. can_publish_reg(domain)
137
+        4.12. publish_reg(domain)
138
+
139
+   5. RPC Commands
140
+
141
+        5.1. ulpcscf.status
142
+
143
+   6. Statistics
144
+
145
+        6.1. registered contacts
146
+        6.2. impus
147
+        6.3. expired contacts
148
+
149
+1. Overview
150
+
151
+   This module contains REGISTER processing logic for the S-CSCF. The
152
+   'storage engine' of this module is provided by the ims_usrloc_scscf
153
+   module:
154
+
155
+2. Dependencies
156
+
157
+   2.1. Kamailio Modules
158
+   2.2. External Libraries or Applications
159
+
160
+2.1. Kamailio Modules
161
+
162
+   The following modules must be loaded before this module:
163
+     * CDP
164
+     * CDP_AVP
165
+     * TM
166
+     * ims_usrloc_scscf
167
+
168
+2.2. External Libraries or Applications
169
+
170
+   The following libraries or applications must be installed before
171
+   running Kamailio with this module loaded:
172
+     * LibXML2 - used for parsing the XML Subscription information
173
+       obtained from the HSS (Home Subscriber Server)
174
+
175
+3. Parameters
176
+
177
+   3.1. default_expires (int)
178
+   3.2. default_expires_range (int)
179
+   3.3. min_expires (int)
180
+   3.4. max_expires (int)
181
+   3.5. user_data_dtd (string)
182
+   3.6. user_data_xsd (string)
183
+   3.7. support_wildcardPSI (int)
184
+   3.8. scscf_name (string)
185
+   3.9. store_profile_dereg (int)
186
+   3.10. cxdx_dest_realm (string)
187
+   3.11. cxdx_forced_peer (string)
188
+   3.12. append_branches (integer)
189
+   3.13. method_filtering (integer)
190
+
191
+3.1. default_expires (int)
192
+
193
+   If the processed message contains neither Expires HFs nor expires
194
+   contact parameters, this value will be used for newly created S-CSCF
195
+   usrloc records. The parameter contains number of second to expire (for
196
+   example use 3600 for one hour). If it is set to a lower value than the
197
+   "min_expires" parameter then it will be ignored. This parameter can be
198
+   modified via ser config framework. A random value in a specific
199
+   interval can be selected by using the default_expires_range parameter
200
+
201
+   Default value is 3600.
202
+
203
+   Example 1.1. Set default_expires parameter
204
+...
205
+        modparam("ims_registrar_scscf", "default_expires", 3600)
206
+...
207
+
208
+3.2. default_expires_range (int)
209
+
210
+   This parameter specifies that the expiry used for newly created S-CSCF
211
+   usrloc records are not fixed(when "default_expires" applies), but a
212
+   random value in the interval "[default_expires-default_expires_range%,
213
+   default_expires+default_expires_range%]". The value is between 0 and
214
+   100 and represent the maximim percentage from default_expires that will
215
+   be substracted or added when computing the value. Default in 0, meaning
216
+   default_expires is left unmodified. This parameter can be modified via
217
+   ser config framework.
218
+
219
+   Default value is 0.
220
+
221
+   Example 1.2. Set default_expires_range parameter
222
+...
223
+        modparam("ims_registrar_scscf", "default_expires_range", 30) # +- 30% fr
224
+om default_expires
225
+...
226
+
227
+3.3. min_expires (int)
228
+
229
+   The minimum expires value of a Contact, values lower than this minimum
230
+   will be automatically set to the minimum. Value 0 disables the
231
+   checking. This parameter can be modified via ser config framework.
232
+
233
+   Default value is 60.
234
+
235
+   Example 1.3. Set min_expiresparameter
236
+...
237
+        modparam("ims_registrar_scscf", "min_expires", 1800)
238
+...
239
+
240
+3.4. max_expires (int)
241
+
242
+   The maximum expires value of a Contact, values higher than this maximum
243
+   will be automatically set to the maximum. Value 0 disables the
244
+   checking. This parameter can be modified via ser config framework.
245
+
246
+   Default value is 0.
247
+
248
+   Example 1.4. Set max_expiresparameter
249
+...
250
+        modparam("ims_registrar_scscf", "max_expires", 3600)
251
+...
252
+
253
+3.5. user_data_dtd (string)
254
+
255
+   DTD to check the user data received in SAA (Server Assignment Answer).
256
+
257
+   Default value is NULL (none).
258
+
259
+   Example 1.5. Set user_data_dtdparameter
260
+...
261
+        modparam("ims_registrar_scscf", "user_data_dtd", "/usr/local/etc/kamaili
262
+o/CxDataType_Rel7.dtd")
263
+...
264
+
265
+3.6. user_data_xsd (string)
266
+
267
+   XSD to check the user data received in SAA (Server Assignment Answer).
268
+
269
+   Default value is NULL (none).
270
+
271
+   Example 1.6. Set user_data_xsdparameter
272
+...
273
+        modparam("ims_registrar_scscf", "user_data_xsd", "/usr/local/etc/kamaili
274
+o/CxDataType_Rel7.xsd")
275
+...
276
+
277
+3.7. support_wildcardPSI (int)
278
+
279
+   indicate support for wildcard PSI is subscription profile (SAA)
280
+
281
+   Default value is 0.
282
+
283
+   Example 1.7. Set support_wildcardPSIparameter
284
+...
285
+        modparam("ims_registrar_scscf", "support_wildcardPSI", 1)
286
+...
287
+
288
+3.8. scscf_name (string)
289
+
290
+   The name of the S-CSCF
291
+
292
+   Default value is sip:scscf.ims.smilecoms.com:6060.
293
+
294
+   Example 1.8. Set scscf_nameparameter
295
+...
296
+        modparam("ims_registrar_scscf", "scscf_name", "sip:scscf2.ims.smilecoms.
297
+com:6060")
298
+...
299
+
300
+3.9. store_profile_dereg (int)
301
+
302
+   Should the subscription profile be stored on de-registration
303
+
304
+   Default value 0.
305
+
306
+   Example 1.9. Set store_profile_deregparameter
307
+...
308
+        modparam("ims_registrar_scscf", "store_profile_dereg", 1)
309
+...
310
+
311
+3.10. cxdx_dest_realm (string)
312
+
313
+   Destination realm to be used in Diameter messages
314
+
315
+   Default value "ims.smilecoms.com"
316
+
317
+   Example 1.10. Set cxdx_dest_realmparameter
318
+...
319
+        modparam("ims_registrar_scscf", "cxdx_dest_realm", "my.domain,org")
320
+...
321
+
322
+3.11. cxdx_forced_peer (string)
323
+
324
+   FQDN of Diameter Peer (HSS) to use for communication (SAR). If you use
325
+   this, the routing defined in your diameter xml configuration file (CDP)
326
+   will be ignored and as a result you will lose the benefits of load
327
+   balancing and failover.
328
+
329
+   Default value NULL (none)
330
+
331
+   Example 1.11. Set cxdx_forced_peerparameter
332
+...
333
+        modparam("ims_registrar_scscf", "cxdx_forced_peer", "hss.ims.smilecoms.c
334
+om")
335
+...
336
+
337
+3.12. append_branches (integer)
338
+
339
+   The parameter controls how lookup function processes multiple contacts.
340
+   If there are multiple contacts for the given username in usrloc and
341
+   this parameter is set to 1, Request-URI will be overwritten with the
342
+   highest-q rated contact and the rest will be appended to sip_msg
343
+   structure and can be later used by tm for forking. If the parameter is
344
+   set to 0, only Request-URI will be overwritten with the highest-q rated
345
+   contact and the rest will be left unprocessed. This parameter can be
346
+   modified via Kamailio config framework.
347
+
348
+   Default value is 0 (disabled)
349
+
350
+   Example 1.12. Set cxdx_forced_peerparameter
351
+...
352
+        modparam("ims_registrar_scscf", "append_branches", 1)
353
+...
354
+
355
+3.13. method_filtering (integer)
356
+
357
+   Tells if the contact filtering based on supported methods should be
358
+   performed during lookup. It's enabled only if it has a non zero value.
359
+
360
+   Default value is 0 (disabled)
361
+
362
+   Example 1.13. Set cxdx_forced_peerparameter
363
+...
364
+        modparam("ims_registrar_scscf", "method_filtering", 1)
365
+...
366
+
367
+4. Functions
368
+
369
+   4.1. save(async_reply_route, domain)
370
+   4.2. lookup(domain)
371
+   4.3. unregister(domain)
372
+   4.4. assign_server_unreg(aysnc_reply_route, domain, direction)
373
+   4.5. impu_registered(domain)
374
+   4.6. term_impu_registered(domain)
375
+   4.7. reg_fetch_contacts(domain, uri, profile)
376
+   4.8. reg_free_contacts(profile)
377
+   4.9. can_subscribe_to_reg(domain)
378
+   4.10. subscribe_to_reg(domain)
379
+   4.11. can_publish_reg(domain)
380
+   4.12. publish_reg(domain)
381
+
382
+4.1. save(async_reply_route, domain)
383
+
384
+   The function processes a REGISTER message. It can add, remove or modify
385
+   usrloc records depending on Contact and Expires HFs in the REGISTER
386
+   message. On success and when called from the REQUEST_ROUTE, 200 OK will
387
+   be returned listing all contacts that are currently in usrloc. On an
388
+   error, error message will be sent with a short description in reason
389
+   phrase. In case of internal errors the function will return FALSE,
390
+   otherwise a force to exit the cfg is file is actioned by returning 0
391
+   (asynchronous processing)
392
+
393
+   Meaning of the parameters is as follows:
394
+     * async_reply_route- the route to execute after the save has
395
+       completed. This is required because the save function is executed
396
+       asynchronously (Diameter).
397
+     * domain- Logical domain within registrar.
398
+
399
+   This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE
400
+
401
+   Example 1.14. save usage
402
+...
403
+if (!impu_registered("location")) {
404
+   save("PRE_REG_SAR_REPLY","location");
405
+}
406
+...
407
+
408
+4.2. lookup(domain)
409
+
410
+   This function extract the IMPU from the Request-URI and tries to find
411
+   all registered contacts in usrloc. If there are no such contacts, -1 is
412
+   returned. If there are, Request-URI will be rewritten with the contact
413
+   that has the highest q value. The rest of the contacts will be appended
414
+   to the sip msg structure (if append_branches is set) and can be later
415
+   used by TM module for forking for example...
416
+
417
+   If the method filtering option is enabled, the lookup function will
418
+   only return contacts that support the method of the request being
419
+   processed (see allows header)
420
+
421
+   Meaning of the parameters is as follows:
422
+     * domain - Logical domain within registrar.
423
+
424
+   Return codes:
425
+     * -1 - Not found
426
+     * -2 - Found, but method not allowed (check Allows header for INVITE,
427
+       MESSAGE, etc).
428
+     * -3 - Error ocurred internally during processing
429
+
430
+   This function can be used from REQUEST_ROUTE, FAILURE_ROUTE
431
+
432
+   Example 1.15. lookup usage
433
+...
434
+lookup("location");
435
+switch ($retcode) {
436
+    case -1:
437
+    case -3:
438
+        sl_send_reply("404", "Not Found");
439
+        exit;
440
+    case -2:
441
+        sl_send_reply("405", "Not Found");
442
+        exit;
443
+};
444
+...
445
+
446
+4.3. unregister(domain)
447
+
448
+   This function will remove all bindings for the IMPU found in the
449
+   Request-URI.
450
+
451
+   Meaning of the parameters is as follows:
452
+     * Domain- Logical domain within registrar.
453
+
454
+   This function can be used in REQUEST_ROUTE, FAILURE_ROUTE
455
+
456
+   Example 1.16. unregister usage
457
+...
458
+unregister("location");
459
+...
460
+
461
+4.4. assign_server_unreg(aysnc_reply_route, domain, direction)
462
+
463
+   TBD
464
+
465
+   used in REQUEST_ROUTE
466
+
467
+4.5. impu_registered(domain)
468
+
469
+   This function checks if the IMPU in the To header is registered in
470
+   usrloc.
471
+
472
+   Meaning of the parameters is as follows:
473
+     * domain- Logical domain within registrar.
474
+
475
+   Return codes:
476
+     * 1 - True, IMPU exists in registered state in usrloc
477
+     * -1 - False, IMPU not registered
478
+
479
+   This function can be used in REQUEST_ROUTE, FAILURE_ROUTE
480
+
481
+   Example 1.17. impu_registered usage
482
+...
483
+impu_registered("location");
484
+switch ($retcode) {
485
+    case -1:
486
+        sl_send_reply("404", "Not Found");
487
+        exit;
488
+    case 1:
489
+        #true, continue with normal processing
490
+};
491
+...
492
+
493
+4.6. term_impu_registered(domain)
494
+
495
+   This function checks if the IMPU in the Request-URI is registered in
496
+   usrloc.
497
+
498
+   Meaning of the parameters is as follows:
499
+     * domain- Logical domain within registrar.
500
+
501
+   Return codes:
502
+     * 1 - True, IMPU exists in registered state in usrloc
503
+     * -1 - False, IMPU not registered
504
+
505
+   This function can be used in REQUEST_ROUTE, FAILURE_ROUTE
506
+
507
+   Example 1.18. term_impu_registered usage
508
+...
509
+term_impu_registered("location");
510
+switch ($retcode) {
511
+     case -1:
512
+          sl_send_reply("404", "Not Found");
513
+          exit;
514
+     case 1:
515
+          #true, continue with normal processing
516
+};
517
+...
518
+
519
+4.7. reg_fetch_contacts(domain, uri, profile)
520
+
521
+   The function fetches the contacts for 'uri' from table 'domain' to
522
+   pseudo-variable $imssulc(profile) [imssulc = ims scscf ulc].
523
+
524
+   Meaning of the parameters is as follows:
525
+     * domain - Name of table that should be used for the lookup of
526
+       contact addresses.
527
+     * uri - The SIP URI address of the user which to fetch the contact
528
+       addresses for. It can contain pseudo-variables that are evaluated
529
+       at runtime.
530
+     * profile - Name of $imssulc pseudo-variable profile that will store
531
+       the fetched contacts. It is a static string.
532
+
533
+   This function can be used in REQUEST_ROUTE, FAILURE_ROUTE
534
+
535
+   Example 1.19. reg_fetch_contacts usage
536
+...
537
+reg_fetch_contacts("location", "$ru", "callee");
538
+reg_fetch_contacts("location", "sip:user@kamailio.org", "caller");
539
+...
540
+
541
+4.8. reg_free_contacts(profile)
542
+
543
+   The function frees the contacts from pseudo-variable $ulc(profile).
544
+   Should be called to release the content of a profile. Anyhow, fetching
545
+   a new contact addresses set over a profile will release any existing
546
+   data in that profile.
547
+
548
+   Meaning of the parameters is as follows:
549
+     * profile - Name of $imssulc pseudo-variable profile that stores the
550
+       contacts. It is a static string.
551
+
552
+   This function can be used in REQUEST_ROUTE, FAILURE_ROUTE
553
+
554
+   Example 1.20. reg_free_contacts usage
555
+...
556
+reg_free_contacts("callee");
557
+...
558
+
559
+4.9. can_subscribe_to_reg(domain)
560
+
561
+   This function checks to see that a SUBSCRIBE request is authorised to
562
+   subscribe to the particular identity. Only 3 entities can subscribe:
563
+     * The user agent to it's own state
564
+     * The P-CSCF specified in the path header for that user
565
+     * Application Server (AS) not yet implemented
566
+
567
+   Meaning of the parameters is as follows:
568
+     * domain - Logical domain within registrar.
569
+
570
+   This function can be used in REQUEST_ROUTE
571
+
572
+   Example 1.21. can_subscribe_to_reg usage
573
+...
574
+if (can_subscribe_to_reg("location")){
575
+     $var(ret)= subscribe_to_reg("location");
576
+}
577
+...
578
+
579
+4.10. subscribe_to_reg(domain)
580
+
581
+   Save the subscription to the REG event for the UAC or the appropriate
582
+   P-CSCF (in the path to the UAC).
583
+
584
+   Meaning of the parameters is as follows:
585
+     * domain - Logical domain within registrar.
586
+
587
+   This function can be used in REQUEST_ROUTE
588
+
589
+   Example 1.22. subscribe_to_reg usage
590
+...
591
+if (can_subscribe_to_reg("location")){
592
+     $var(ret)= subscribe_to_reg("location");
593
+}
594
+...
595
+
596
+4.11. can_publish_reg(domain)
597
+
598
+   This function checks to see that a PUBLISH request is authorised to
599
+   publish for a particular identity. Only 3 entities can publish:
600
+     * The user agent to it's own state
601
+     * The P-CSCF specified in the path header for that user
602
+     * Application Server (AS) not yet implemented
603
+
604
+   Meaning of the parameters is as follows:
605
+     * domain - Logical domain within registrar.
606
+
607
+   This function can be used in REQUEST_ROUTE
608
+
609
+   Example 1.23. can_publish_reg usage
610
+...
611
+if (can_publish_reg("location")){
612
+    $var(ret)= publish_reg("location");
613
+}
614
+...
615
+
616
+4.12. publish_reg(domain)
617
+
618
+   Save the publish to the REG event for the UAC or the appropriate P-CSCF
619
+   (in the path to the UAC).
620
+
621
+   Meaning of the parameters is as follows:
622
+     * domain - Logical domain within registrar.
623
+
624
+   This function can be used in REQUEST_ROUTE
625
+
626
+   Example 1.24. publish_reg usage
627
+...
628
+if (can_publish_reg("location")){
629
+    $var(ret)= publish_reg("location");
630
+}
631
+...
632
+
633
+5. RPC Commands
634
+
635
+   5.1. ulpcscf.status
636
+
637
+   exported RPC commands.
638
+
639
+5.1. ulpcscf.status
640
+
641
+   Status of pcscf_usrloc, AORs, max slots, etc.
642
+
643
+6. Statistics
644
+
645
+   6.1. registered contacts
646
+   6.2. impus
647
+   6.3. expired contacts
648
+
649
+   Exported statistics are listed in the next sections.
650
+
651
+6.1. registered contacts
652
+
653
+   Number of AOR contacts in registered state - cannot be reset.
654
+
655
+6.2. impus
656
+
657
+   Number of IMPUs - cannot be reset.
658
+
659
+6.3. expired contacts
660
+
661
+   Number of expired contacts - can be reset.
662
+
663
+Chapter 2. Frequently Asked Questions
664
+
665
+   2.1. Where can I find more about Kamailio?
666
+   2.2. Where can I post a question about this module?
667
+   2.3. How can I report a bug?
668
+
669
+   2.1.
670
+
671
+   Where can I find more about Kamailio?
672
+
673
+   Take a look at http://www.kamailio.org/.
674
+
675
+   2.2.
676
+
677
+   Where can I post a question about this module?
678
+
679
+   First at all check if your question was already answered on one of our
680
+   mailing lists:
681
+     * User Mailing List -
682
+       http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
683
+     * Developer Mailing List -
684
+       http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
685
+
686
+   E-mails regarding any stable Kamailio release should be sent to
687
+   <sr-users@lists.sip-router.org> and e-mails regarding development
688
+   versions should be sent to <sr-dev@lists.sip-router.org>.
689
+
690
+   If you want to keep the mail private, send it to
691
+   <sr-users@lists.sip-router.org>.
692
+
693
+   2.3.
694
+
695
+   How can I report a bug?
696
+
697
+   Please follow the guidelines provided at:
698
+   http://sip-router.org/tracker.
... ...
@@ -206,7 +206,9 @@ modparam("ims_usrloc_pcscf", "db_mode", 1)
206 206
    can deny the request.
207 207
      * 0 - This uses the original hash over AOR method. By default we are
208 208
        backwards compatible...
209
-     * 1 - Use the newer hash over IP:PORT.
209
+     * 1 - Use the newer hash over the Host from Contact-Header.
210
+     * 2 - Use the newer hash over the source-IP from where the request
211
+       was received (useful for NAT-Scenarios)
210 212
 
211 213
    Default value is 0.
212 214