@@ -90,7 +90,8 @@ nathelper Module
90
90
1.21. fix_nated_sdp usage
91
91
1.22. add_rcv_paramer usage
92
92
1.23. fix_nated_register usage
93
- 1.24. nh_enable_ping usage
93
+ 1.24. nat_uac_test usage
94
+ 1.25. nh_enable_ping usage
94
95
95
96
Chapter 1. Admin Guide
96
97
@@ -557,12 +558,13 @@ fix_nated_register();
557
558
558
559
1.5.5. nat_uac_test(flags)
559
560
560
- Tries to guess if client's request originated behind a nat. The
561
- parameter determines what heuristics is used .
561
+ Determines whether the received SIP message originated behind a
562
+ NAT, using one or more pre-defined checks .
562
563
563
- Meaning of the flags (string) parameter is as follows:
564
+ The flags (string) parameter denotes a comma-separated list of
565
+ checks to be performed, as follows:
564
566
* private-contact - (old 1 flag) Contact header field is
565
- searched for occurrence of RFC1918 / RFC6598 addresses.
567
+ searched for occurrence of RFC1918 / RFC6598 addresses
566
568
* diff-ip-src-via - (old 2 flag) the "received" test is used:
567
569
address in Via is compared against source IP address of
568
570
signaling
@@ -577,14 +579,20 @@ fix_nated_register();
577
579
* diff-port-src-contact - (old 64 flag) Port in Contact is
578
580
compared against source port of signaling
579
581
* carrier-grade-nat - (old 128 flag) also include RFC 6333
580
- addresses in the checks for ct, via and sdp flags.
582
+ addresses in the checks for Contact, Via and SDP
581
583
582
- A CSV of the above flags can be provided, the test returns true
583
- if any of the tests identified a NAT.
584
+ Returns true if any of the tests passed.
584
585
585
586
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
586
587
FAILURE_ROUTE, BRANCH_ROUTE.
587
588
589
+ Example 1.24. nat_uac_test usage
590
+ ...
591
+ # check for private Contact or SDP media IP addresses
592
+ if (nat_uac_test("private-contact,private-sdp"))
593
+ xlog("SIP message is NAT'ed (Call-ID: $ci)\n");
594
+ ...
595
+
588
596
1.6. Exported MI Functions
589
597
590
598
1.6.1. nh_enable_ping
@@ -597,7 +605,7 @@ fix_nated_register();
597
605
parameter value greater than 0 or disables natping if
598
606
parameter value is 0.
599
607
600
- Example 1.24 . nh_enable_ping usage
608
+ Example 1.25 . nh_enable_ping usage
601
609
...
602
610
$ opensips-cli -x mi nh_enable_ping
603
611
Status:: 1
@@ -651,7 +659,7 @@ Chapter 3. Contributors
651
659
Name DevScore Commits Lines ++ Lines --
652
660
1. Bogdan-Andrei Iancu (@bogdan-iancu) 153 121 2044 866
653
661
2. Maksym Sobolyev (@sobomax) 153 45 3556 4790
654
- 3. Liviu Chircu (@liviuchircu) 46 37 420 298
662
+ 3. Liviu Chircu (@liviuchircu) 48 38 438 307
655
663
4. Ionut Ionita (@ionutrazvanionita) 40 15 1598 627
656
664
5. Razvan Crainea (@razvancrainea) 33 27 158 240
657
665
6. Daniel-Constantin Mierla (@miconda) 22 17 142 124
@@ -691,8 +699,8 @@ Chapter 3. Contributors
691
699
692
700
Table 3.2. Most recently active contributors^(1) to this module
693
701
Name Commit Activity
694
- 1. Maksym Sobolyev (@sobomax ) May 2003 - Nov 2023
695
- 2. Liviu Chircu (@liviuchircu ) Jan 2013 - Oct 2023
702
+ 1. Liviu Chircu (@liviuchircu ) Jan 2013 - Jan 2024
703
+ 2. Maksym Sobolyev (@sobomax ) May 2003 - Nov 2023
696
704
3. Vlad Paiu (@vladpaiu) Aug 2010 - Jul 2023
697
705
4. Vlad Patrascu (@rvlad-patrascu) May 2017 - Apr 2023
698
706
5. Nick Altmann (@nikbyte) May 2022 - May 2022
@@ -720,9 +728,9 @@ Chapter 4. Documentation
720
728
721
729
4.1. Contributors
722
730
723
- Last edited by: Vlad Patrascu (@rvlad-patrascu ), Nick Altmann
724
- (@nikbyte ), Jasper Hafkenscheid (@hafkensite ), Liviu Chircu
725
- (@liviuchircu ), Razvan Crainea (@razvancrainea), Bogdan-Andrei
731
+ Last edited by: Liviu Chircu (@liviuchircu ), Vlad Patrascu
732
+ (@rvlad-patrascu ), Nick Altmann (@nikbyte ), Jasper Hafkenscheid
733
+ (@hafkensite ), Razvan Crainea (@razvancrainea), Bogdan-Andrei
726
734
Iancu (@bogdan-iancu), Peter Lemenkov (@lemenkov), Ovidiu Sas
727
735
(@ovidiusas), Ionut Ionita (@ionutrazvanionita), Walter Doekes
728
736
(@wdoekes), Christophe Sollet (@csollet), Vlad Paiu
0 commit comments