...
|
...
|
@@ -22,9 +22,9 @@ Bogdan-Andrei Iancu
|
22
|
22
|
voice-system.ro
|
23
|
23
|
<bogdan@voice-system.ro>
|
24
|
24
|
|
25
|
|
- Copyright � 2002, 2003 FhG FOKUS
|
|
25
|
+ Copyright © 2002, 2003 FhG FOKUS
|
26
|
26
|
|
27
|
|
- Copyright � 2004, 2006 voice-system.ro
|
|
27
|
+ Copyright © 2004, 2006 voice-system.ro
|
28
|
28
|
Revision History
|
29
|
29
|
Revision $Revision$ $Date$
|
30
|
30
|
__________________________________________________________________
|
...
|
...
|
@@ -219,8 +219,8 @@ Chapter 1. Admin Guide
|
219
|
219
|
|
220
|
220
|
To account a transaction and to choose which set of backends to be
|
221
|
221
|
used, the script writer just has to set some flags (see the module
|
222
|
|
- parameters section for flag definitions Section 5, "Exported
|
223
|
|
- Parameters"). If the accounting flag for a specific backend is set, the
|
|
222
|
+ parameters section for flag definitions Section 5, “Exported
|
|
223
|
+ Parameters”). If the accounting flag for a specific backend is set, the
|
224
|
224
|
acc module will then report on completed transaction. A typical usage
|
225
|
225
|
of the module takes no acc-specific script command -- the functionality
|
226
|
226
|
binds invisibly through transaction processing. Script writers just
|
...
|
...
|
@@ -231,7 +231,7 @@ Chapter 1. Admin Guide
|
231
|
231
|
The accounting module will log by default a fixed set of attributes for
|
232
|
232
|
the transaction - if you customize your accounting by adding more
|
233
|
233
|
information to be logged, please see the next chapter about extra
|
234
|
|
- accounting - Section 2, "Extra accounting".
|
|
234
|
+ accounting - Section 2, “Extra accounting”.
|
235
|
235
|
|
236
|
236
|
The fixed minimal accounting information is:
|
237
|
237
|
* Request Method name
|
...
|
...
|
@@ -336,6 +336,12 @@ if (uri=~"sip:+40") /* calls to Romania */ {
|
336
|
336
|
The full list of supported pseudo-variables in Kamailio is available
|
337
|
337
|
at: http://kamailio.org/dokuwiki/doku.php/pseudovariables:devel
|
338
|
338
|
|
|
339
|
+ Note: For all the ACK processed by tm, the registered callbacks (like
|
|
340
|
+ acc module) will be called with the corresponding INVITE transaction
|
|
341
|
+ contexts as long as this is still available. This means that the ACK
|
|
342
|
+ callbacks will see the AVPs setup for the INVITE transaction and not
|
|
343
|
+ the AVPs setup before t_relay().
|
|
344
|
+
|
339
|
345
|
Via log_name you define how/where the data will be logged. Its meaning
|
340
|
346
|
depends of the accounting support which is used:
|
341
|
347
|
* LOG accounting - log_name will be just printed along with the data
|
...
|
...
|
@@ -430,7 +436,7 @@ Note
|
430
|
436
|
listed modules must be loaded before this module):
|
431
|
437
|
* tm -- Transaction Manager
|
432
|
438
|
* a database module -- If SQL support is used.
|
433
|
|
- * rr -- Record Route, if "detect_direction" module parameter is
|
|
439
|
+ * rr -- Record Route, if “detect_direction” module parameter is
|
434
|
440
|
enabled.
|
435
|
441
|
|
436
|
442
|
4.2. External Libraries or Applications
|
...
|
...
|
@@ -537,7 +543,7 @@ modparam("acc", "detect_direction", 1)
|
537
|
543
|
5.6. multi_leg_info (string)
|
538
|
544
|
|
539
|
545
|
Defines the AVP set to be used in per-call-leg accounting. See
|
540
|
|
- Section 3, "Multi Call-Legs accounting" for a detailed description of
|
|
546
|
+ Section 3, “Multi Call-Legs accounting” for a detailed description of
|
541
|
547
|
the Multi Call-Legs accounting.
|
542
|
548
|
|
543
|
549
|
If empty, the multi-leg accounting support will be disabled.
|
...
|
...
|
@@ -598,7 +604,8 @@ modparam("acc", "log_facility", "LOG_DAEMON")
|
598
|
604
|
|
599
|
605
|
5.11. log_extra (string)
|
600
|
606
|
|
601
|
|
- Extra values to be logged.
|
|
607
|
+ Extra values to be logged. See section Section 2, “Extra accounting”
|
|
608
|
+ for more details.
|
602
|
609
|
|
603
|
610
|
Default value is NULL.
|
604
|
611
|
|
...
|
...
|
@@ -616,7 +623,7 @@ modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)")
|
616
|
623
|
If the parameter is set to empty string, the RADIUS accounting support
|
617
|
624
|
will be disabled (even if compiled).
|
618
|
625
|
|
619
|
|
- Default value is "NULL".
|
|
626
|
+ Default value is “NULL”.
|
620
|
627
|
|
621
|
628
|
Example 1.12. radius_config example
|
622
|
629
|
modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
|
...
|
...
|
@@ -652,7 +659,8 @@ modparam("acc", "service_type", 16)
|
652
|
659
|
|
653
|
660
|
5.16. radius_extra (string)
|
654
|
661
|
|
655
|
|
- Extra values to be logged via RADIUS - RADIUS specific.
|
|
662
|
+ Extra values to be logged via RADIUS - RADIUS specific. See section
|
|
663
|
+ Section 2, “Extra accounting” for more details.
|
656
|
664
|
|
657
|
665
|
Default value is NULL.
|
658
|
666
|
|
...
|
...
|
@@ -683,7 +691,7 @@ modparam("acc", "db_missed_flag", 3)
|
683
|
691
|
|
684
|
692
|
Table name of accounting successfull calls -- database specific.
|
685
|
693
|
|
686
|
|
- Default value is "acc"
|
|
694
|
+ Default value is “acc”
|
687
|
695
|
|
688
|
696
|
Example 1.19. db_table_acc example
|
689
|
697
|
modparam("acc", "db_table_acc", "myacc_table")
|
...
|
...
|
@@ -692,7 +700,7 @@ modparam("acc", "db_table_acc", "myacc_table")
|
692
|
700
|
|
693
|
701
|
Table name for accounting missed calls -- database specific.
|
694
|
702
|
|
695
|
|
- Default value is "missed_calls"
|
|
703
|
+ Default value is “missed_calls”
|
696
|
704
|
|
697
|
705
|
Example 1.20. db_table_missed_calls example
|
698
|
706
|
modparam("acc", "db_table_missed_calls", "myMC_table")
|
...
|
...
|
@@ -702,7 +710,7 @@ modparam("acc", "db_table_missed_calls", "myMC_table")
|
702
|
710
|
SQL address -- database specific. If is set to NULL or emty string, the
|
703
|
711
|
SQL support is disabled.
|
704
|
712
|
|
705
|
|
- Default value is "NULL" (SQL disabled).
|
|
713
|
+ Default value is “NULL” (SQL disabled).
|
706
|
714
|
|
707
|
715
|
Example 1.21. db_url example
|
708
|
716
|
modparam("acc", "db_url", "mysql://user:password@localhost/openser")
|
...
|
...
|
@@ -712,7 +720,7 @@ modparam("acc", "db_url", "mysql://user:password@localhost/openser")
|
712
|
720
|
Column name in accounting table to store the request's method name as
|
713
|
721
|
string.
|
714
|
722
|
|
715
|
|
- Default value is "method".
|
|
723
|
+ Default value is “method”.
|
716
|
724
|
|
717
|
725
|
Example 1.22. acc_method_column example
|
718
|
726
|
modparam("acc", "acc_method_column", "method")
|
...
|
...
|
@@ -721,7 +729,7 @@ modparam("acc", "acc_method_column", "method")
|
721
|
729
|
|
722
|
730
|
Column name in accounting table to store the From header TAG parameter.
|
723
|
731
|
|
724
|
|
- Default value is "from_tag".
|
|
732
|
+ Default value is “from_tag”.
|
725
|
733
|
|
726
|
734
|
Example 1.23. acc_from_tag_column example
|
727
|
735
|
modparam("acc", "acc_from_tag_column", "from_tag")
|
...
|
...
|
@@ -730,7 +738,7 @@ modparam("acc", "acc_from_tag_column", "from_tag")
|
730
|
738
|
|
731
|
739
|
Column name in accounting table to store the To header TAG parameter.
|
732
|
740
|
|
733
|
|
- Default value is "to_tag".
|
|
741
|
+ Default value is “to_tag”.
|
734
|
742
|
|
735
|
743
|
Example 1.24. acc_to_tag_column example
|
736
|
744
|
modparam("acc", "acc_to_tag_column", "to_tag")
|
...
|
...
|
@@ -739,7 +747,7 @@ modparam("acc", "acc_to_tag_column", "to_tag")
|
739
|
747
|
|
740
|
748
|
Column name in accounting table to store the request's Callid value.
|
741
|
749
|
|
742
|
|
- Default value is "callid".
|
|
750
|
+ Default value is “callid”.
|
743
|
751
|
|
744
|
752
|
Example 1.25. acc_callid_column example
|
745
|
753
|
modparam("acc", "acc_callid_column", "callid")
|
...
|
...
|
@@ -749,7 +757,7 @@ modparam("acc", "acc_callid_column", "callid")
|
749
|
757
|
Column name in accounting table to store the final reply's numric code
|
750
|
758
|
value in string format.
|
751
|
759
|
|
752
|
|
- Default value is "sip_code".
|
|
760
|
+ Default value is “sip_code”.
|
753
|
761
|
|
754
|
762
|
Example 1.26. acc_sip_code_column example
|
755
|
763
|
modparam("acc", "acc_sip_code_column", "sip_code")
|
...
|
...
|
@@ -759,7 +767,7 @@ modparam("acc", "acc_sip_code_column", "sip_code")
|
759
|
767
|
Column name in accounting table to store the final reply's reason
|
760
|
768
|
phrase value.
|
761
|
769
|
|
762
|
|
- Default value is "sip_reason".
|
|
770
|
+ Default value is “sip_reason”.
|
763
|
771
|
|
764
|
772
|
Example 1.27. acc_sip_reason_column example
|
765
|
773
|
modparam("acc", "acc_sip_reason_column", "sip_reason")
|
...
|
...
|
@@ -769,14 +777,15 @@ modparam("acc", "acc_sip_reason_column", "sip_reason")
|
769
|
777
|
Column name in accounting table to store the time stamp of the
|
770
|
778
|
transaction completion in date-time format.
|
771
|
779
|
|
772
|
|
- Default value is "time".
|
|
780
|
+ Default value is “time”.
|
773
|
781
|
|
774
|
782
|
Example 1.28. acc_time_column example
|
775
|
783
|
modparam("acc", "acc_time_column", "time")
|
776
|
784
|
|
777
|
785
|
5.29. db_extra (string)
|
778
|
786
|
|
779
|
|
- Extra values to be logged into database - DB specific.
|
|
787
|
+ Extra values to be logged into database - DB specific. See section
|
|
788
|
+ Section 2, “Extra accounting” for more details.
|
780
|
789
|
|
781
|
790
|
Default value is NULL.
|
782
|
791
|
|
...
|
...
|
@@ -808,7 +817,7 @@ modparam("acc", "diameter_missed_flag", 3)
|
808
|
817
|
Hostname of the machine where the DIAMETER Client is running --
|
809
|
818
|
DIAMETER specific.
|
810
|
819
|
|
811
|
|
- Default value is "localhost".
|
|
820
|
+ Default value is “localhost”.
|
812
|
821
|
|
813
|
822
|
Example 1.32. diameter_client_host example
|
814
|
823
|
modparam("acc", "diameter_client_host", "3a_server.net")
|
...
|
...
|
@@ -825,7 +834,8 @@ modparam("acc", "diameter_client_port", 3000)
|
825
|
834
|
|
826
|
835
|
5.34. diameter_extra (string)
|
827
|
836
|
|
828
|
|
- Extra values to be logged via DIAMETER - DIAMETER specific.
|
|
837
|
+ Extra values to be logged via DIAMETER - DIAMETER specific. See section
|
|
838
|
+ Section 2, “Extra accounting” for more details.
|
829
|
839
|
|
830
|
840
|
Default value is NULL.
|
831
|
841
|
|
...
|
...
|
@@ -839,7 +849,7 @@ modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
|
839
|
849
|
6.3. acc_rad_request(comment)
|
840
|
850
|
6.4. acc_diam_request(comment)
|
841
|
851
|
|
842
|
|
-6.1. acc_log_request(comment)
|
|
852
|
+6.1. acc_log_request(comment)
|
843
|
853
|
|
844
|
854
|
acc_request reports on a request, for example, it can be used to report
|
845
|
855
|
on missed calls to off-line users who are replied 404 - Not Found. To
|
...
|
...
|
@@ -856,10 +866,10 @@ modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
|
856
|
866
|
acc_log_request("Some comment");
|
857
|
867
|
...
|
858
|
868
|
|
859
|
|
-6.2. acc_db_request(comment, table)
|
|
869
|
+6.2. acc_db_request(comment, table)
|
860
|
870
|
|
861
|
871
|
Like acc_log_request, acc_db_request reports on a request. The report
|
862
|
|
- is sent to database at "db_url", in the table referred to in the second
|
|
872
|
+ is sent to database at “db_url”, in the table referred to in the second
|
863
|
873
|
action parameter.
|
864
|
874
|
|
865
|
875
|
Meaning of the parameters is as follows:
|
...
|
...
|
@@ -873,10 +883,10 @@ acc_log_request("Some comment");
|
873
|
883
|
acc_log_request("Some comment", "Some table");
|
874
|
884
|
...
|
875
|
885
|
|
876
|
|
-6.3. acc_rad_request(comment)
|
|
886
|
+6.3. acc_rad_request(comment)
|
877
|
887
|
|
878
|
888
|
Like acc_log_request, acc_rad_request reports on a request. It reports
|
879
|
|
- to radius server as configured in "radius_config".
|
|
889
|
+ to radius server as configured in “radius_config”.
|
880
|
890
|
|
881
|
891
|
Meaning of the parameters is as follows:
|
882
|
892
|
* comment - Comment to be appended.
|
...
|
...
|
@@ -888,7 +898,7 @@ acc_log_request("Some comment", "Some table");
|
888
|
898
|
acc_rad_request("Some comment");
|
889
|
899
|
...
|
890
|
900
|
|
891
|
|
-6.4. acc_diam_request(comment)
|
|
901
|
+6.4. acc_diam_request(comment)
|
892
|
902
|
|
893
|
903
|
Like acc_log_request, acc_diam_request reports on a request. It reports
|
894
|
904
|
to the configured Diameter server.
|
...
|
...
|
@@ -914,50 +924,55 @@ Chapter 2. Frequently Asked Questions
|
914
|
924
|
|
915
|
925
|
2.1.
|
916
|
926
|
|
917
|
|
- What happend with old log_fmt parameter
|
|
927
|
+ What happend with old log_fmt parameter
|
|
928
|
+
|
|
929
|
+ The parameter became obsolete with the restructure of the data logged
|
|
930
|
+ by ACC module (refer to the Overview chapter). For similar behaviour
|
|
931
|
+ you can use the extra accouting (see the coresponding chapter).
|
918
|
932
|
|
919
|
|
- The parameter became obsolete with the restructure of the data logged
|
920
|
|
- by ACC module (refer to the Overview chapter). For similar behaviour
|
921
|
|
- you can use the extra accouting (see the coresponding chapter).
|
922
|
933
|
2.2.
|
923
|
934
|
|
924
|
|
- What happend with old multi_leg_enabled parameter
|
|
935
|
+ What happend with old multi_leg_enabled parameter
|
|
936
|
+
|
|
937
|
+ The parameter becaome obsolete by the addition of the new
|
|
938
|
+ multi_leg_info parameter. The multi-leg accouting is automatically
|
|
939
|
+ enabled when multi_leg_info is defined.
|
925
|
940
|
|
926
|
|
- The parameter becaome obsolete by the addition of the new
|
927
|
|
- multi_leg_info parameter. The multi-leg accouting is automatically
|
928
|
|
- enabled when multi_leg_info is defined.
|
929
|
941
|
2.3.
|
930
|
942
|
|
931
|
|
- What happend with old src_leg_avp_id and dst_leg_avp_id parameters
|
|
943
|
+ What happend with old src_leg_avp_id and dst_leg_avp_id parameters
|
|
944
|
+
|
|
945
|
+ The parameter was replaced by the more generic new parameter
|
|
946
|
+ multi_leg_info. This allows logging (per-leg) of more information than
|
|
947
|
+ just dst and src.
|
932
|
948
|
|
933
|
|
- The parameter was replaced by the more generic new parameter
|
934
|
|
- multi_leg_info. This allows logging (per-leg) of more information than
|
935
|
|
- just dst and src.
|
936
|
949
|
2.4.
|
937
|
950
|
|
938
|
|
- Where can I find more about Kamailio?
|
|
951
|
+ Where can I find more about Kamailio?
|
|
952
|
+
|
|
953
|
+ Take a look at http://www.kamailio.org/.
|
939
|
954
|
|
940
|
|
- Take a look at http://www.kamailio.org/.
|
941
|
955
|
2.5.
|
942
|
956
|
|
943
|
|
- Where can I post a question about this module?
|
|
957
|
+ Where can I post a question about this module?
|
|
958
|
+
|
|
959
|
+ First at all check if your question was already answered on one of our
|
|
960
|
+ mailing lists:
|
|
961
|
+ * User Mailing List -
|
|
962
|
+ http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
|
|
963
|
+ * Developer Mailing List -
|
|
964
|
+ http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
|
944
|
965
|
|
945
|
|
- First at all check if your question was already answered on one of our
|
946
|
|
- mailing lists:
|
947
|
|
- * User Mailing List -
|
948
|
|
- http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
|
949
|
|
- * Developer Mailing List -
|
950
|
|
- http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
|
|
966
|
+ E-mails regarding any stable Kamailio release should be sent to
|
|
967
|
+ <users@lists.kamailio.org> and e-mails regarding development versions
|
|
968
|
+ should be sent to <devel@lists.kamailio.org>.
|
951
|
969
|
|
952
|
|
- E-mails regarding any stable Kamailio release should be sent to
|
953
|
|
- <users@lists.kamailio.org> and e-mails regarding development versions
|
954
|
|
- should be sent to <devel@lists.kamailio.org>.
|
|
970
|
+ If you want to keep the mail private, send it to
|
|
971
|
+ <team@lists.kamailio.org>.
|
955
|
972
|
|
956
|
|
- If you want to keep the mail private, send it to
|
957
|
|
- <team@lists.kamailio.org>.
|
958
|
973
|
2.6.
|
959
|
974
|
|
960
|
|
- How can I report a bug?
|
|
975
|
+ How can I report a bug?
|
961
|
976
|
|
962
|
|
- Please follow the guidelines provided at:
|
963
|
|
- http://sourceforge.net/tracker/?group_id=139143.
|
|
977
|
+ Please follow the guidelines provided at:
|
|
978
|
+ http://sourceforge.net/tracker/?group_id=139143.
|