Browse code

acc: updated docs for acc_extra_size and cdr_extra_size

Daniel-Constantin Mierla authored on 05/11/2021 10:37:22
Showing 1 changed files
... ...
@@ -1447,10 +1447,12 @@ modparam("acc", "cdr_on_failed", 0)
1447 1447
 	<section id="acc.p.acc_extra_size">
1448 1448
 		<title><varname>acc_extra_size</varname> (int)</title>
1449 1449
 		<para>
1450
-		This parameter is meant to replace MAX_ACC_EXTRA fixed size with desired size.
1450
+			Set the maximum number of extra attributes that can be stored in the
1451
+			accounting record (event accounting record). It is related to log_extra
1452
+			and db_extra module parameters.
1451 1453
 		</para>
1452 1454
 		<para>
1453
-		Default value is 64 (MAX_ACC_EXTRA).
1455
+		Default value is 64.
1454 1456
 		</para>
1455 1457
 		<example>
1456 1458
 		<title>acc_extra_size</title>
... ...
@@ -1465,10 +1467,12 @@ modparam("acc", "acc_extra_size", 100)
1465 1467
 	<section id="acc.p.cdr_extra_size">
1466 1468
 		<title><varname>cdr_extra_size</varname> (int)</title>
1467 1469
 		<para>
1468
-		This parameter is meant to replace MAX_CDR_EXTRA fixed size with desired size.
1470
+		Set the maximum number of extra attributes that can be stored in the
1471
+		call data record (cdr by dialog module). It is related to cdr_extra
1472
+		module parameter.
1469 1473
 		</para>
1470 1474
 		<para>
1471
-		Default value is 64 (MAX_CDR_EXTRA).
1475
+		Default value is 64.
1472 1476
 		</para>
1473 1477
 		<example>
1474 1478
 		<title>cdr_extra_size</title>
Browse code

Merge pull request #2891 from smititelu/increase_defines

acc: increase extra and cdr variables

Daniel-Constantin Mierla authored on 03/11/2021 11:59:34 • GitHub committed on 03/11/2021 11:59:34
Showing 0 changed files
Browse code

acc: docs - more details about cdr_enable parameter

Daniel-Constantin Mierla authored on 01/11/2021 13:04:45
Showing 1 changed files
... ...
@@ -1044,11 +1044,17 @@ modparam("acc", "db_insert_mode", 1)
1044 1044
 	<section id="acc.p.cdr_enable">
1045 1045
 		<title><varname>cdr_enable</varname> (integer)</title>
1046 1046
 		<para>
1047
-		Should CDR-based logging be enabled?
1047
+		Enable CDR reporting - one record per call reported to "acc_cdrs" table,
1048
+		relying on dialog module.
1048 1049
 		</para>
1049 1050
 		<para>
1050
-		0 - off (default).
1051
-		1 - on.
1051
+		The value can be:
1052
+		<itemizedlist>
1053
+		<listitem>
1054
+			<para>0 - off (default).</para>
1055
+			<para>1 - on.</para>
1056
+		</listitem>
1057
+		</itemizedlist>
1052 1058
 		</para>
1053 1059
 		<example>
1054 1060
 		<title>cdr_enable example</title>
Browse code

acc: increase acc and cdr extra values

Stefan Mititelu authored on 21/10/2021 08:33:59
Showing 1 changed files
... ...
@@ -1437,6 +1437,43 @@ modparam("acc", "cdr_on_failed", 0)
1437 1437
 </programlisting>
1438 1438
 		</example>
1439 1439
 	</section>
1440
+
1441
+	<section id="acc.p.acc_extra_size">
1442
+		<title><varname>acc_extra_size</varname> (int)</title>
1443
+		<para>
1444
+		This parameter is meant to replace MAX_ACC_EXTRA fixed size with desired size.
1445
+		</para>
1446
+		<para>
1447
+		Default value is 64 (MAX_ACC_EXTRA).
1448
+		</para>
1449
+		<example>
1450
+		<title>acc_extra_size</title>
1451
+		<programlisting format="linespecific">
1452
+...
1453
+modparam("acc", "acc_extra_size", 100)
1454
+...
1455
+</programlisting>
1456
+		</example>
1457
+	</section>
1458
+
1459
+	<section id="acc.p.cdr_extra_size">
1460
+		<title><varname>cdr_extra_size</varname> (int)</title>
1461
+		<para>
1462
+		This parameter is meant to replace MAX_CDR_EXTRA fixed size with desired size.
1463
+		</para>
1464
+		<para>
1465
+		Default value is 64 (MAX_CDR_EXTRA).
1466
+		</para>
1467
+		<example>
1468
+		<title>cdr_extra_size</title>
1469
+		<programlisting format="linespecific">
1470
+...
1471
+modparam("acc", "cdr_extra_size", 100)
1472
+...
1473
+</programlisting>
1474
+		</example>
1475
+	</section>
1476
+
1440 1477
 	</section>
1441 1478
 
1442 1479
 	<section>
Browse code

acc: docs - removed acc_diam_request() section

- it is now exported by acc_diameter

Daniel-Constantin Mierla authored on 06/07/2021 07:59:57
Showing 1 changed files
... ...
@@ -23,10 +23,9 @@
23 23
 	</para>
24 24
 	<para>
25 25
 		There is some very early support of the <acronym>Diameter</acronym>
26
-		protocol in the <quote>acc_diameter</quote> module which will be deleted
27
-		in coming releases. This support is not up to date with the current
28
-		Diameter protocols. If you need Diameter support, please use the
29
-		<acronym>ims_charging</acronym> module.
26
+		protocol in the <quote>acc_diameter</quote> module, but is not up to date
27
+		with the current Diameter protocols. If you need Diameter support,
28
+		please use the <acronym>ims_charging</acronym> module.
30 29
 	</para>
31 30
 	<para>
32 31
 		To account a transaction and to choose which set of backends to be
... ...
@@ -1555,37 +1554,6 @@ acc_request("100 Received", "acc");
1555 1554
 acc_request("100 Received", "acc_$time(year)_$time(mon)");
1556 1555
 acc_db_request("$var(code) $avp(reason)", "acc");
1557 1556
 ...
1558
-</programlisting>
1559
-		</example>
1560
-	</section>
1561
-	<section id="acc.f.acc_diam_request">
1562
-		<title>
1563
-			<function moreinfo="none">acc_diam_request(comment)</function>
1564
-		</title>
1565
-		<para>
1566
-		Like <function moreinfo="none">acc_log_request</function>,
1567
-		<function moreinfo="none">acc_diam_request</function> reports on
1568
-		a request. It reports to the configured Diameter server.
1569
-		</para>
1570
-		<para>
1571
-		Meaning of the parameters is as follows:</para>
1572
-		<itemizedlist>
1573
-		<listitem>
1574
-			<para><emphasis>comment</emphasis> - Comment to be appended.
1575
-			The string can contain any number of pseudo-variables.
1576
-			</para>
1577
-		</listitem>
1578
-		</itemizedlist>
1579
-		<para>
1580
-		This function can be used from ANY_ROUTE.
1581
-		</para>
1582
-		<example>
1583
-		<title>acc_diam_request usage</title>
1584
-		<programlisting format="linespecific">
1585
-...
1586
-acc_diam_request("Some comment");
1587
-acc_diam_request("$var(code) Error: $avp(reason)");
1588
-...
1589 1557
 </programlisting>
1590 1558
 		</example>
1591 1559
 	</section>
Browse code

acc: docs - database column constraint alteration for acc_extra_nullable and cdr_extra_nullable [skip ci]

Anthony Messina authored on 14/11/2020 17:17:29
Showing 1 changed files
... ...
@@ -634,6 +634,10 @@ modparam("acc", "acc_prepare_always", 1)
634 634
 			set to 0, the value is saved as empty string (the existing behavior).
635 635
 		</para>
636 636
 		<para>
637
+		Database columns may need to be altered to DROP NOT NULL constraints
638
+		and DROP DEFAULT values in order to accept NULL values.
639
+		</para>
640
+		<para>
637 641
 		Default value is 0.
638 642
 		</para>
639 643
 		<example>
... ...
@@ -1157,6 +1161,10 @@ modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
1157 1161
 		If set to 1, custom CDR fields not defined in config operation (or set to $null) will be saved as NULL.
1158 1162
 		</para>
1159 1163
 		<para>
1164
+		Database columns may need to be altered to DROP NOT NULL constraints
1165
+		and DROP DEFAULT values in order to accept NULL values.
1166
+		</para>
1167
+		<para>
1160 1168
 		Default value is 0.
1161 1169
 		</para>
1162 1170
 		<example>
Browse code

acc: docs for acc_extra_nullable parameter

Daniel-Constantin Mierla authored on 03/11/2020 14:00:54
Showing 1 changed files
... ...
@@ -623,6 +623,25 @@ modparam("acc", "acc_prepare_flag", 5)
623 623
 ...
624 624
 modparam("acc", "acc_prepare_always", 1)
625 625
 ...
626
+</programlisting>
627
+		</example>
628
+	</section>
629
+	<section id="acc.p.acc_extra_nullable">
630
+		<title><varname>acc_extra_nullable</varname> (integer)</title>
631
+		<para>
632
+			If set to 1, the database acc extra fields are set to NULL if the
633
+			corresponding script variable is not defined or has $null value. If
634
+			set to 0, the value is saved as empty string (the existing behavior).
635
+		</para>
636
+		<para>
637
+		Default value is 0.
638
+		</para>
639
+		<example>
640
+		<title>acc_extra_nullable example</title>
641
+		<programlisting format="linespecific">
642
+...
643
+modparam("acc", "acc_extra_nullable", 1)
644
+...
626 645
 </programlisting>
627 646
 		</example>
628 647
 	</section>
Browse code

acc: new skip_cdr modparam to prevent cdr generation

This commit adds a new modparam called cdr_skip to acc module that allows
excluding certain calls from CDRs in Kamailio route logic.

Dialogs ended with chosen dlg_var set (no matter the value) won't generate
a CDR (both database and log) even though cdr_enable modparam is set.

Carlos Cruz authored on 08/06/2020 09:02:10 • Henning Westerholt committed on 11/06/2020 08:42:12
Showing 1 changed files
... ...
@@ -1034,6 +1034,23 @@ modparam("acc", "db_insert_mode", 1)
1034 1034
 ...
1035 1035
 modparam("acc", "cdr_enable", 1)
1036 1036
 ...
1037
+</programlisting>
1038
+		</example>
1039
+	</section>
1040
+	<section id="acc.p.cdr_skip">
1041
+		<title><varname>cdr_skip</varname> (string)</title>
1042
+		<para>
1043
+		Skip cdr generation for dialogs with this dlg_var set.
1044
+		</para>
1045
+		<para>
1046
+		Default value is NULL.
1047
+		</para>
1048
+		<example>
1049
+		<title>cdr_skip example</title>
1050
+		<programlisting format="linespecific">
1051
+...
1052
+modparam("acc", "cdr_skip", "nocdr")
1053
+...
1037 1054
 </programlisting>
1038 1055
 		</example>
1039 1056
 	</section>
Browse code

acc: update doc reference to wiki [skip ci]

Victor Seva authored on 24/09/2019 14:24:44
Showing 1 changed files
... ...
@@ -352,10 +352,8 @@ if (uri=~"sip:+40") /* calls to Romania */ {
352 352
 					</itemizedlist>
353 353
 					See also <xref linkend="acc.p.cdr_extra"/>.
354 354
 					<para>
355
-					The full list of supported pseudo-variables in Sip-Router is
356
-					available at:
357
-					<ulink url="http://sip-router.org/wiki/cookbooks/pseudo-variables/devel">
358
-					http://sip-router.org/wiki/cookbooks/pseudo-variables/devel</ulink>
355
+					The list with all pseudo-variables in &kamailio; can
356
+					be found at: &kamwikilink;.
359 357
 					</para>
360 358
 			</section>
361 359
 		</section>
Browse code

acc: extend documentation related to flag usage

Henning Westerholt authored on 12/09/2019 19:53:21
Showing 1 changed files
... ...
@@ -489,7 +489,9 @@ modparam("acc", "early_media", 1)
489 489
 		<title><varname>failed_transaction_flag</varname> (integer)</title>
490 490
 		<para>
491 491
 		Per transaction flag which says if the transaction should be
492
-		accounted also in case of failure (status>=300).
492
+		accounted also in case of failure (SIP status code >= 300).
493
+		This flag triggers accouting when the whole transaction fails
494
+		(on the server side).
493 495
 		</para>
494 496
 		<para>
495 497
 		Default value is not-set (no flag).
... ...
@@ -679,12 +681,12 @@ modparam("acc", "log_flag", 2)
679 681
 		<para>
680 682
 		Request flag which needs to be set to account missed calls via syslog.
681 683
 		This can be used to e.g. account failures during the call setup phase
682
-		from the callee side, for example if you do forking to several
684
+		from the callee (client) side, for example if you do forking to several
683 685
 		destinations.
684 686
 		</para>
685 687
 		<para>
686
-		Keep in mind that this flag is reset after processing. Therefore it is
687
-		necessary to set it again e.g. in a failure_route if you do serial
688
+		Keep in mind that this flag is reset after branch completion. Therefore
689
+		it is necessary to set it again e.g. in a failure_route if you do serial
688 690
 		forking and want to log all attempts.
689 691
 		</para>
690 692
 		<para>
... ...
@@ -775,8 +777,15 @@ modparam("acc", "db_flag", 2)
775 777
 	<section id="acc.p.db_missed_flag">
776 778
 		<title><varname>db_missed_flag</varname> (integer)</title>
777 779
 		<para>
778
-		Request flag which needs to be set to account missed
779
-		calls -- database specific.
780
+		Request flag which needs to be set to account missed calls via database.
781
+		This can be used to e.g. account failures during the call setup phase
782
+		from the callee (client) side, for example if you do forking to several
783
+		destinations.
784
+		</para>
785
+		<para>
786
+		Keep in mind that this flag is reset after branch completion. Therefore
787
+		it is necessary to set it again e.g. in a failure_route if you do serial
788
+		forking and want to log all attempts.
780 789
 		</para>
781 790
 		<para>
782 791
 		Default value is not-set (no flag).
Browse code

acc: remove diameter specific doc content, code was moved in 2017 to acc_diameter

Henning Westerholt authored on 11/08/2019 08:56:56
Showing 1 changed files
... ...
@@ -104,18 +104,8 @@
104 104
 		</itemizedlist>
105 105
 	</para>
106 106
 	<para>
107
-		The SQL backend support is compiled in the module. For
108
-		DIAMETER you need to enable it by recompiling the module with properly
109
-		set defines: uncomment the DDIAM_ACC lines in
110
-		modules/acc/Makefile.
107
+		The SQL backend support is compiled in the module.
111 108
         </para>
112
-	<para>
113
-		NOTE: diameter support was developed for DISC (DIameter Server Client
114
-		project at http://developer.berlios.de/projects/disc/). This project
115
-		seems to be no longer maintained and DIAMETER specifications were updated
116
-		in the meantime. Thus, the DIAMETER part in the module is obsolete and
117
-		needs rework to be usable with opendiameter or other DIAMETER servers.
118
-	</para>
119 109
 	<section>
120 110
 		<title>General Example</title>
121 111
 		<programlisting format="linespecific">
... ...
@@ -1019,97 +1009,6 @@ modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
1019 1009
 ...
1020 1010
 modparam("acc", "db_insert_mode", 1)
1021 1011
 ...
1022
-</programlisting>
1023
-		</example>
1024
-	</section>
1025
-	<!-- DIAMETER specific ACC parameters -->
1026
-	<section id="acc.p.diameter_flag">
1027
-		<title><varname>diameter_flag</varname> (integer)</title>
1028
-		<para>
1029
-		Request flag which needs to be set to account a
1030
-		transaction -- DIAMETER specific.
1031
-		</para>
1032
-		<para>
1033
-		Default value is not-set (no flag).
1034
-		</para>
1035
-		<example>
1036
-		<title>diameter_flag example</title>
1037
-		<programlisting format="linespecific">
1038
-...
1039
-modparam("acc", "diameter_flag", 2)
1040
-...
1041
-</programlisting>
1042
-		</example>
1043
-	</section>
1044
-	<section id="acc.p.diameter_missed_flag">
1045
-		<title><varname>diameter_missed_flag</varname> (integer)</title>
1046
-		<para>
1047
-		Request flag which needs to be set to account missed
1048
-		calls -- DIAMETER specific.
1049
-		</para>
1050
-		<para>
1051
-		Default value is not-set (no flag).
1052
-		</para>
1053
-		<example>
1054
-		<title>diameter_missed_flag example</title>
1055
-		<programlisting format="linespecific">
1056
-...
1057
-modparam("acc", "diameter_missed_flag", 3)
1058
-...
1059
-</programlisting>
1060
-		</example>
1061
-	</section>
1062
-	<section id="acc.p.diameter_client_host">
1063
-		<title><varname>diameter_client_host</varname> (string)</title>
1064
-		<para>
1065
-		Hostname of the machine where the DIAMETER Client is
1066
-		running -- DIAMETER specific.
1067
-		</para>
1068
-		<para>
1069
-		Default value is <quote>localhost</quote>.
1070
-		</para>
1071
-		<example>
1072
-		<title>diameter_client_host example</title>
1073
-		<programlisting format="linespecific">
1074
-...
1075
-modparam("acc", "diameter_client_host", "3a_server.net")
1076
-...
1077
-</programlisting>
1078
-		</example>
1079
-	</section>
1080
-	<section id="acc.p.diameter_client_port">
1081
-		<title><varname>diameter_client_port</varname> (int)</title>
1082
-		<para>
1083
-		Port number where the Diameter Client is
1084
-		listening -- DIAMETER specific.
1085
-		</para>
1086
-		<para>
1087
-		Default value is 3000.
1088
-		</para>
1089
-		<example>
1090
-		<title>diameter_client_host example</title>
1091
-		<programlisting format="linespecific">
1092
-...
1093
-modparam("acc", "diameter_client_port", 3000)
1094
-...
1095
-</programlisting>
1096
-		</example>
1097
-	</section>
1098
-	<section id="acc.p.diameter_extra">
1099
-		<title><varname>diameter_extra</varname> (string)</title>
1100
-		<para>
1101
-		Extra values to be logged via DIAMETER - DIAMETER specific.
1102
-		See section <xref linkend="acc.i.extra-accounting"/> for more details.
1103
-		</para>
1104
-		<para>
1105
-		Default value is NULL.
1106
-		</para>
1107
-		<example>
1108
-		<title>diameter_extra example</title>
1109
-		<programlisting format="linespecific">
1110
-...
1111
-modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
1112
-...
1113 1012
 </programlisting>
1114 1013
 		</example>
1115 1014
 	</section>
Browse code

acc: doc improvement regarding radius and diameter modules

Henning Westerholt authored on 11/08/2019 08:51:37
Showing 1 changed files
... ...
@@ -18,15 +18,15 @@
18 18
 	<title>Overview</title>
19 19
 	<para>
20 20
 		ACC module is used to account transactions information to different
21
-		backends like syslog and <abbrev>SQL</abbrev>. With the separate module,
22
-		<acronym>radius</acronym> support is enabled.
21
+		backends like syslog and <abbrev>SQL</abbrev>. With the separate module
22
+		<quote>acc_radius</quote> support for <acronym>radius</acronym> is enabled.
23 23
 	</para>
24 24
 	<para>
25
-		There is some very early support of
26
-		the <acronym>Diameter</acronym> protocol in the code which is no longer included
27
-		by default and will be deleted in coming releases.
28
-		This support is not up to date with the current Diameter protocols and
29
-		is disabled. If you need Diameter support, please use the <acronym>ims_charging</acronym> module.
25
+		There is some very early support of the <acronym>Diameter</acronym>
26
+		protocol in the <quote>acc_diameter</quote> module which will be deleted
27
+		in coming releases. This support is not up to date with the current
28
+		Diameter protocols. If you need Diameter support, please use the
29
+		<acronym>ims_charging</acronym> module.
30 30
 	</para>
31 31
 	<para>
32 32
 		To account a transaction and to choose which set of backends to be
Browse code

acc: extend description in docs for log_missed_calls flag

Henning Westerholt authored on 03/07/2019 20:09:40
Showing 1 changed files
... ...
@@ -688,6 +688,14 @@ modparam("acc", "log_flag", 2)
688 688
 		<title><varname>log_missed_flag</varname> (integer)</title>
689 689
 		<para>
690 690
 		Request flag which needs to be set to account missed calls via syslog.
691
+		This can be used to e.g. account failures during the call setup phase
692
+		from the callee side, for example if you do forking to several
693
+		destinations.
694
+		</para>
695
+		<para>
696
+		Keep in mind that this flag is reset after processing. Therefore it is
697
+		necessary to set it again e.g. in a failure_route if you do serial
698
+		forking and want to log all attempts.
691 699
 		</para>
692 700
 		<para>
693 701
 		Default value is not-set (no flag).
Browse code

acc: Fix typos in module documentation

Florian Floimair authored on 26/02/2018 19:00:08 • Daniel-Constantin Mierla committed on 28/02/2018 17:00:48
Showing 1 changed files
... ...
@@ -234,7 +234,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
234 234
 			There is only one SIP call but with 2 legs ( A to B and B to C).
235 235
 			Accounting the legs of a call is required for proper billing of
236 236
 			the calls (if C is a PSTN number and the call is billed, user B
237
-			must pay for the call - as last party modifing the call
237
+			must pay for the call - as last party modifying the call
238 238
 			destination-, and not A - as initiator of the call. Call
239 239
 			forwarding on server is only one example which shows the
240 240
 			necessity of the having an accounting engine with multiple legs
... ...
@@ -246,7 +246,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
246 246
 			<para>
247 247
 			First how it works: The idea is to have a set of AVPs and for each
248 248
 			call leg to store a set of values in the AVPs. The meaning of
249
-			the AVP content is stricly decided by the script writer - it can
249
+			the AVP content is strictly decided by the script writer - it can
250 250
 			be the origin and source of the leg, its status or any other
251 251
 			related information. If you have a set of 4 AVPS (AVP1, AVP2, AVP3,
252 252
 			AVP4), then for the "A call B and B forwards to C" example,
... ...
@@ -285,7 +285,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
285 285
 				only the fields corresponding to the call-leg info.
286 286
 				</para>
287 287
 				<note><para>You will need to add in your DB (all acc related
288
-				tables) the colums for call-leg info (a column for each AVP
288
+				tables) the columns for call-leg info (a column for each AVP
289 289
 				of the set).
290 290
 				</para></note>
291 291
 				</listitem>
... ...
@@ -395,7 +395,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
395 395
 				corresponding caller and callee in a dialog based pseudo-variable (dlg_var)
396 396
 				(e.g. chain=B;cfa;C|C;cfnr;D). Additionally it is necessary to store the
397 397
 				caller and callee for each leg. All this helps to identify the involved
398
-				phone parners and forwarding chain. When you route such calls multiple times
398
+				phone partners and forwarding chain. When you route such calls multiple times
399 399
 				to the same Proxy, you could store the caller and callee within an transaction
400 400
 				based avp and write it into the dialog based dlg_var pv during a 200 INVITE.
401 401
 				</para>
... ...
@@ -576,7 +576,7 @@ modparam("acc", "report_cancels", 1)
576 576
 	<section id="acc.p.detect_direction">
577 577
 		<title><varname>detect_direction</varname> (integer)</title>
578 578
 		<para>
579
-		Controlles the direction detection for sequential requests. If
579
+		Controls the direction detection for sequential requests. If
580 580
 		enabled (non zero value), for sequential requests with upstream
581 581
 		direction (from callee to caller), the FROM and TO will be swapped
582 582
 		(the direction will be preserved as in the original request).
... ...
@@ -722,7 +722,7 @@ modparam("acc", "log_level", 2)   # Set log_level to 2 (L_INFO)
722 722
 		<title><varname>log_facility</varname> (string)</title>
723 723
 		<para>
724 724
 		Log facility to which accounting messages are issued to syslog.
725
-		This allows to easily seperate the accounting specific logging
725
+		This allows to easily separate the accounting specific logging
726 726
 		from the other log messages.
727 727
 		</para>
728 728
 		<para>
... ...
@@ -795,7 +795,7 @@ modparam("acc", "db_missed_flag", 3)
795 795
 	<section  id="acc.p.db_table_acc">
796 796
 		<title><varname>db_table_acc</varname> (string)</title>
797 797
 		<para>
798
-		Table name of accounting successfull calls -- database specific. It
798
+		Table name of accounting successful calls -- database specific. It
799 799
 		can contain config variables that will be evaluated at runtime.
800 800
 		</para>
801 801
 		<para>
... ...
@@ -832,7 +832,7 @@ modparam("acc", "db_table_missed_calls", "myMC_table")
832 832
 	<section id="acc.p.db_url">
833 833
 		<title><varname>db_url</varname> (string)</title>
834 834
 		<para>
835
-		SQL address -- database specific. If is set to NULL or emty string,
835
+		SQL address -- database specific. If is set to NULL or empty string,
836 836
 		the SQL support is disabled.
837 837
 		</para>
838 838
 		<para>
... ...
@@ -919,7 +919,7 @@ modparam("acc", "acc_callid_column", "callid")
919 919
 	<section id="acc.p.acc_sip_code_column">
920 920
 		<title><varname>acc_sip_code_column</varname> (string)</title>
921 921
 		<para>
922
-		Column name in accounting table to store the final reply's numric code
922
+		Column name in accounting table to store the final reply's numeric code
923 923
 		value in string format.
924 924
 		</para>
925 925
 		<para>
... ...
@@ -1444,7 +1444,7 @@ modparam("acc", "reason_from_hf", 1)
1444 1444
 		<para>
1445 1445
 		If set to 1, request structure from transaction is cloned temporarily
1446 1446
 		in the callback to get acc attributes. It is required if you account
1447
-		values from SIP headers to avoid concurent access to the shared memory
1447
+		values from SIP headers to avoid concurrent access to the shared memory
1448 1448
 		transaction structure, specially when accounting 1xx events. If set to
1449 1449
 		0, it uses directly the shared memory structure, be sure you store all
1450 1450
 		needed attributes in AVPs/XAVPs inside request route.
Browse code

acc: docs - removed wrong closing tag for para

Daniel-Constantin Mierla authored on 02/01/2018 17:22:57
Showing 1 changed files
... ...
@@ -1209,7 +1209,6 @@ modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
1209 1209
 		<para>
1210 1210
 		Default value is 0.
1211 1211
 		</para>
1212
-		</para>
1213 1212
 		<example>
1214 1213
 		<title>cdr_extra_nullable example</title>
1215 1214
 		<programlisting format="linespecific">
Browse code

acc: Allow nullable cdr extra fields

- allow custom cdr fields defined with cdr_extra modparam to be saved
as null. Before this change, cdr_extra variables not defined in config
operation (or set to $null) were saved as empty string (''). This commit makes
possible to save them as NULL value.

- new modparam to make this behaviour configurable: cdr_extra_nullable.
Set it to 1 to enable this new behaviour (default value: 0)

Carlos Cruz authored on 22/12/2017 16:29:12
Showing 1 changed files
... ...
@@ -1194,6 +1194,28 @@ modparam("acc", "cdr_facility", "LOG_DAEMON")
1194 1194
 ...
1195 1195
 modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
1196 1196
 ...
1197
+</programlisting>
1198
+		</example>
1199
+	</section>
1200
+	<section id="acc.p.cdr_extra_nullable">
1201
+		<title><varname>cdr_extra_nullable</varname> (integer)</title>
1202
+		<para>
1203
+		Should custom CDR fields be saved as NULL?
1204
+		</para>
1205
+		<para>
1206
+		If set to 0, custom CDR fields not defined in config operation (or set to $null) will be saved as empty string.
1207
+		If set to 1, custom CDR fields not defined in config operation (or set to $null) will be saved as NULL.
1208
+		</para>
1209
+		<para>
1210
+		Default value is 0.
1211
+		</para>
1212
+		</para>
1213
+		<example>
1214
+		<title>cdr_extra_nullable example</title>
1215
+		<programlisting format="linespecific">
1216
+...
1217
+modparam("acc", "cdr_extra_nullable", 1)
1218
+...
1197 1219
 </programlisting>
1198 1220
 		</example>
1199 1221
 	</section>
Browse code

doc: time_mode param used for cdrs too

Carlos Cruz authored on 14/12/2017 16:52:26
Showing 1 changed files
... ...
@@ -1306,12 +1306,12 @@ modparam("acc", "cdrs_table", "acc_cdrs")
1306 1306
 		</listitem>
1307 1307
 		<listitem>
1308 1308
 			<para><emphasis>3</emphasis> - save formatted time according
1309
-				to time_format parameter, using the output of localtime().
1309
+				to time_format parameter, using the output of localtime(). Used for cdr entries too.
1310 1310
 			</para>
1311 1311
 		</listitem>
1312 1312
 		<listitem>
1313 1313
 			<para><emphasis>4</emphasis> - save formatted time according
1314
-				to time_format parameter, using the output of gmtime().
1314
+				to time_format parameter, using the output of gmtime(). Used for cdr entries too.
1315 1315
 			</para>
1316 1316
 		</listitem>
1317 1317
 		</itemizedlist>
Browse code

acc: documentation typo

Mikko Lehto authored on 27/10/2017 07:02:42
Showing 1 changed files
... ...
@@ -1541,7 +1541,7 @@ acc_db_request("$var(code) Error: $avp(reason)", "SomeTable");
1541 1541
 			<function moreinfo="none">acc_request(comment, table)</function>
1542 1542
 		</title>
1543 1543
 		<para>
1544
-		Warapper around <function moreinfo="none">acc_log_request</function>
1544
+		Wrapper around <function moreinfo="none">acc_log_request</function>
1545 1545
 		and <function moreinfo="none">acc_db_request</function> functions,
1546 1546
 		writing the accounting record to LOG and DATABASE backends. If
1547 1547
 		<quote>db_url</quote> parameter is not set, the acc record is written
Browse code

acc: documented acc_request() function

Daniel-Constantin Mierla authored on 09/08/2017 07:12:50
Showing 1 changed files
... ...
@@ -11,9 +11,9 @@
11 11
 <!-- Acc Module User's Guide -->
12 12
 
13 13
 <chapter>
14
-	
14
+
15 15
 	<title>&adminguide;</title>
16
-	
16
+
17 17
 	<section>
18 18
 	<title>Overview</title>
19 19
 	<para>
... ...
@@ -22,32 +22,32 @@
22 22
 		<acronym>radius</acronym> support is enabled.
23 23
 	</para>
24 24
 	<para>
25
-		There is some very early support of 
25
+		There is some very early support of
26 26
 		the <acronym>Diameter</acronym> protocol in the code which is no longer included
27 27
 		by default and will be deleted in coming releases.
28 28
 		This support is not up to date with the current Diameter protocols and
29 29
 		is disabled. If you need Diameter support, please use the <acronym>ims_charging</acronym> module.
30 30
 	</para>
31 31
 	<para>
32
-		To account a transaction and to choose which set of backends to be 
32
+		To account a transaction and to choose which set of backends to be
33 33
 		used, the script writer just has to set some flags (see the module
34 34
 		parameters section for flag definitions <xref linkend="acc.i.params"/>).
35
-		If the accounting flag for a specific backend is set, the acc module 
36
-		will then report on completed transaction. A typical usage of the 
37
-		module takes no acc-specific script command -- the functionality 
38
-		binds invisibly through transaction processing. Script writers just 
39
-		need to mark the transaction for accounting with proper setflag. 
40
-		Even so, the module allows the script writter to force accounting in 
35
+		If the accounting flag for a specific backend is set, the acc module
36
+		will then report on completed transaction. A typical usage of the
37
+		module takes no acc-specific script command -- the functionality
38
+		binds invisibly through transaction processing. Script writers just
39
+		need to mark the transaction for accounting with proper setflag.
40
+		Even so, the module allows the script writter to force accounting in
41 41
 		special cases via some script functions.
42 42
 	</para>
43 43
 	<para>
44
-		The accounting module will log by default a fixed set of attributes 
44
+		The accounting module will log by default a fixed set of attributes
45 45
 		for the transaction - if you customize your accounting by adding more
46 46
 		information to be logged, please see the next chapter about extra
47 47
 		accounting - <xref linkend="acc.i.extra-accounting"/>.
48 48
 	</para>
49 49
 	<para>
50
-		The fixed minimal accounting information is: 
50
+		The fixed minimal accounting information is:
51 51
 		<itemizedlist>
52 52
 		<listitem>
53 53
 			<para>Request Method name</para>
... ...
@@ -71,7 +71,7 @@
71 71
 			<para>Time stamp when transaction was completed</para>
72 72
 		</listitem>
73 73
 		</itemizedlist>
74
-		If a value is not present in request, the empty string is accounted 
74
+		If a value is not present in request, the empty string is accounted
75 75
 		instead.
76 76
 	</para>
77 77
 	<para>
... ...
@@ -92,10 +92,10 @@
92 92
 		</listitem>
93 93
 		<listitem>
94 94
 			<para>
95
-			If a UA fails in middle of conversation, a proxy will never 
96
-			find out about it. In general, a better practice is to account from an 
97
-			end-device (such as PSTN gateway), which best knows about call 
98
-			status (including media status and PSTN status in case of the 
95
+			If a UA fails in middle of conversation, a proxy will never
96
+			find out about it. In general, a better practice is to account from an
97
+			end-device (such as PSTN gateway), which best knows about call
98
+			status (including media status and PSTN status in case of the
99 99
 			gateway). However, CDR-base logging has the option to log existing
100 100
 			information from expired dialogs (the dlg_vars in cdr_extra)
101 101
 			Please see cdr_expired_dlg_enable parameter - <xref linkend="acc.p.cdr_expired_dlg_enable"/>.
... ...
@@ -104,16 +104,16 @@
104 104
 		</itemizedlist>
105 105
 	</para>
106 106
 	<para>
107
-		The SQL backend support is compiled in the module. For 
107
+		The SQL backend support is compiled in the module. For
108 108
 		DIAMETER you need to enable it by recompiling the module with properly
109 109
 		set defines: uncomment the DDIAM_ACC lines in
110
-		modules/acc/Makefile. 
110
+		modules/acc/Makefile.
111 111
         </para>
112 112
 	<para>
113
-		NOTE: diameter support was developed for DISC (DIameter Server Client 
114
-		project at http://developer.berlios.de/projects/disc/). This project 
113
+		NOTE: diameter support was developed for DISC (DIameter Server Client
114
+		project at http://developer.berlios.de/projects/disc/). This project
115 115
 		seems to be no longer maintained and DIAMETER specifications were updated
116
-		in the meantime. Thus, the DIAMETER part in the module is obsolete and 
116
+		in the meantime. Thus, the DIAMETER part in the module is obsolete and
117 117
 		needs rework to be usable with opendiameter or other DIAMETER servers.
118 118
 	</para>
119 119
 	<section>
... ...
@@ -147,18 +147,18 @@ if (uri=~"sip:+40") /* calls to Romania */ {
147 147
 		<section>
148 148
 			<title>Overview</title>
149 149
 			<para>
150
-			Along the static default information, ACC modules 
151
-			allows dynamical selection of extra information to be logged. 
152
-			This allows you to log any pseudo-variable (AVPs, parts of 
150
+			Along the static default information, ACC modules
151
+			allows dynamical selection of extra information to be logged.
152
+			This allows you to log any pseudo-variable (AVPs, parts of
153 153
 			the request, etc).
154 154
 			</para>
155 155
 		</section>
156 156
 		<section id="acc-def-syn">
157 157
 			<title>Definitions and syntax</title>
158 158
 			<para>
159
-			Selection of extra information is done via 
159
+			Selection of extra information is done via
160 160
 			<emphasis>xxx_extra</emphasis> parameters by specifying the names
161
-			of additional information you want to log. This information is 
161
+			of additional information you want to log. This information is
162 162
 			defined via pseudo-variables and may include headers, AVPs values
163 163
 			or other message or system values. The syntax of the parameter is:
164 164
 			</para>
... ...
@@ -172,7 +172,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
172 172
 			</itemizedlist>
173 173
 			<para>
174 174
 			The full list of supported pseudo-variables in &kamailio; is
175
-			available at: 
175
+			available at:
176 176
 			<ulink url="http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables">
177 177
 			http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables</ulink>
178 178
 			</para>
... ...
@@ -184,29 +184,29 @@ if (uri=~"sip:+40") /* calls to Romania */ {
184 184
 			transaction and not the AVPs setup before t_relay().
185 185
 			</para>
186 186
 			<para>
187
-			Via <emphasis>log_name</emphasis> you define how/where the 
188
-			<emphasis>data</emphasis> will be logged. Its meaning depends 
187
+			Via <emphasis>log_name</emphasis> you define how/where the
188
+			<emphasis>data</emphasis> will be logged. Its meaning depends
189 189
 			of the accounting support which is used:
190 190
 			<itemizedlist>
191 191
 				<listitem><para><emphasis>LOG accounting</emphasis> - log_name
192 192
 				will be just printed along with the data in <emphasis>
193 193
 				log_name=data</emphasis> format;
194 194
 				</para></listitem>
195
-				<listitem><para><emphasis>DB accounting</emphasis> - log_name 
196
-				will be the name of the DB column where the data will be 
197
-				stored.<emphasis>IMPORTANT</emphasis>: add in db 
198
-				<emphasis>acc</emphasis> table the columns corresponding to 
195
+				<listitem><para><emphasis>DB accounting</emphasis> - log_name
196
+				will be the name of the DB column where the data will be
197
+				stored.<emphasis>IMPORTANT</emphasis>: add in db
198
+				<emphasis>acc</emphasis> table the columns corresponding to
199 199
 				each extra data;
200 200
 				</para></listitem>
201
-				<listitem><para><emphasis>RADIUS accounting</emphasis> - 
202
-				log_name will be the AVP name used for packing the data into 
203
-				RADIUS message. The log_name will be translated to AVP number 
204
-				via the dictionary. <emphasis>IMPORTANT</emphasis>: add in 
201
+				<listitem><para><emphasis>RADIUS accounting</emphasis> -
202
+				log_name will be the AVP name used for packing the data into
203
+				RADIUS message. The log_name will be translated to AVP number
204
+				via the dictionary. <emphasis>IMPORTANT</emphasis>: add in
205 205
 				RADIUS dictionary the <emphasis>log_name</emphasis> attribute.
206 206
 				</para></listitem>
207
-				<listitem><para><emphasis>DIAMETER accounting</emphasis> - 
208
-				log_name will be the AVP code used for packing the data 
209
-				into DIAMETER message. The AVP code is given directly as 
207
+				<listitem><para><emphasis>DIAMETER accounting</emphasis> -
208
+				log_name will be the AVP code used for packing the data
209
+				into DIAMETER message. The AVP code is given directly as
210 210
 				integer, since DIAMETER has no dictionary support yet.
211 211
 				<emphasis>IMPORTANT</emphasis>:	<emphasis>log_name</emphasis>
212 212
 				must be a number.
... ...
@@ -217,7 +217,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
217 217
 		<section>
218 218
 			<title>How it works</title>
219 219
 			<para>
220
-			Some pseudo variables may return more than one value (like 
220
+			Some pseudo variables may return more than one value (like
221 221
 			headers or AVPs). In this case, the returned values are
222 222
 			embedded in a single string in a comma-separated format.
223 223
 			</para>
... ...
@@ -229,15 +229,15 @@ if (uri=~"sip:+40") /* calls to Romania */ {
229 229
 		<section>
230 230
 			<title>Overview</title>
231 231
 			<para>
232
-			A SIP call can have multiple legs due forwarding actions. For 
233
-			example user A calls user B which forwards the call to user C. 
234
-			There is only one SIP call but with 2 legs ( A to B and B to C). 
235
-			Accounting the legs of a call is required for proper billing of 
236
-			the calls (if C is a PSTN number and the call is billed, user B 
237
-			must pay for the call - as last party modifing the call 
238
-			destination-, and not A - as initiator of the call. Call 
239
-			forwarding on server is only one example which shows the 
240
-			necessity of the having an accounting engine with multiple legs 
232
+			A SIP call can have multiple legs due forwarding actions. For
233
+			example user A calls user B which forwards the call to user C.
234
+			There is only one SIP call but with 2 legs ( A to B and B to C).
235
+			Accounting the legs of a call is required for proper billing of
236
+			the calls (if C is a PSTN number and the call is billed, user B
237
+			must pay for the call - as last party modifing the call
238
+			destination-, and not A - as initiator of the call. Call
239
+			forwarding on server is only one example which shows the
240
+			necessity of the having an accounting engine with multiple legs
241 241
 			support.
242 242
 			</para>
243 243
 		</section>
... ...
@@ -247,28 +247,28 @@ if (uri=~"sip:+40") /* calls to Romania */ {
247 247
 			First how it works: The idea is to have a set of AVPs and for each
248 248
 			call leg to store a set of values in the AVPs. The meaning of
249 249
 			the AVP content is stricly decided by the script writer - it can
250
-			be the origin and source of the leg, its status or any other 
250
+			be the origin and source of the leg, its status or any other
251 251
 			related information. If you have a set of 4 AVPS (AVP1, AVP2, AVP3,
252
-			AVP4), then for the "A call B and B forwards to C" example, 
252
+			AVP4), then for the "A call B and B forwards to C" example,
253 253
 			you need to set a different set of values for the AVPs
254 254
 			for each leg ([A,B] and [B,C]) .
255
-			The script writer must take care and properly insert all 
255
+			The script writer must take care and properly insert all
256 256
 			these AVP from the script (in proper order and with the correct type).
257 257
 			</para>
258 258
 			<para>
259
-			When the accounting information for the call will be written/sent, 
259
+			When the accounting information for the call will be written/sent,
260 260
 			all the call-leg pairs will be added (based on the found AVP sets).
261 261
 			</para>
262 262
 			<para>
263 263
 			By default, the multiple call-leg support is disabled - it can be
264
-			enabled just be setting the per-leg set of AVPs via the 
264
+			enabled just be setting the per-leg set of AVPs via the
265 265
 			<varname>multi_leg_info</varname> module parameter.
266 266
 			</para>
267 267
 		</section>
268 268
 		<section>
269 269
 			<title>Logged data</title>
270 270
 			<para>
271
-			For each call, all the values of the AVP set (which defines a 
271
+			For each call, all the values of the AVP set (which defines a
272 272
 			call-leg) will be logged. How the information will be actually
273 273
 			logged, depends of the data backend:
274 274
 			</para>
... ...
@@ -279,9 +279,9 @@ if (uri=~"sip:+40") /* calls to Romania */ {
279 279
 				</para>
280 280
 				</listitem>
281 281
 				<listitem>
282
-				<para><emphasis>database</emphasis> -- each pair will be 
282
+				<para><emphasis>database</emphasis> -- each pair will be
283 283
 				separately logged (due DB data structure constraints); several
284
-				records will be written, the difference between them being 
284
+				records will be written, the difference between them being
285 285
 				only the fields corresponding to the call-leg info.
286 286
 				</para>
287 287
 				<note><para>You will need to add in your DB (all acc related
... ...
@@ -293,7 +293,7 @@ if (uri=~"sip:+40") /* calls to Romania */ {
293 293
 				<para><emphasis>Radius</emphasis> -- all sets will be added
294 294
 				to the same Radius accounting message as RADIUS AVPs - for each
295 295
 				call-leg a set of RADIUS AVPs will be added (corresponding
296
-				to the per-leg AVP set). Note that Radius support is in a 
296
+				to the per-leg AVP set). Note that Radius support is in a
297 297
 				separate module - acc_radius.
298 298
 				</para>
299 299
 				<note><para>You will need to add in your dictionary the
... ...
@@ -376,8 +376,8 @@ if (uri=~"sip:+40") /* calls to Romania */ {
376 376
 				<para>
377 377
 				As mentioned in <xref linkend="acc.i.multi-call-legs"/>, a leg represents a parallel
378 378
 				or forwarded call. In contrast to the normal accounting the cdr logging uses dialogs
379
-				instead of transaction to log data. This may reduce the amount of information 
380
-				but it also make it possible to combine all important data in one cdr at 
379
+				instead of transaction to log data. This may reduce the amount of information
380
+				but it also make it possible to combine all important data in one cdr at
381 381
 				once. A second mechanism to process multiple data-sets into one cdr is not further
382 382
 				necessary.
383 383
 				</para>
... ...
@@ -438,18 +438,18 @@ $dlg_var(callee) = $avp(callee); #callee='C'
438 438
 		<section>
439 439
 			<title>&kamailio; Modules</title>
440 440
 			<para>
441
-			The module depends on the following modules (in the other words 
441
+			The module depends on the following modules (in the other words
442 442
 			the listed modules must be loaded before this module):
443 443
 			<itemizedlist>
444 444
 				<listitem>
445 445
 				<para><emphasis>tm</emphasis> -- Transaction Manager</para>
446 446
 				</listitem>
447 447
 				<listitem>
448
-				<para><emphasis>a database module</emphasis> -- If SQL 
448
+				<para><emphasis>a database module</emphasis> -- If SQL
449 449
 				support is used.</para>
450 450
 				</listitem>
451 451
 				<listitem>
452
-				<para><emphasis>rr</emphasis> -- Record Route, if 
452
+				<para><emphasis>rr</emphasis> -- Record Route, if
453 453
 				<quote>detect_direction</quote> module parameter is enabled.
454 454
 				</para>
455 455
 				</listitem>
... ...
@@ -464,7 +464,7 @@ $dlg_var(callee) = $avp(callee); #callee='C'
464