Browse code

dialog: update documentation

Riccardo Villa authored on 07/01/2022 10:34:21 • Daniel-Constantin Mierla committed on 11/01/2022 11:45:40
Showing 1 changed files
... ...
@@ -2500,12 +2500,16 @@ dlg_reset_property("timeout-noreset");
2500 2500
 				<emphasis>mkey</emphasis> - matching key. It can be: 'ruri' -
2501 2501
 				match against R-URI of the dialog; 'furi' - match against From
2502 2502
 				header URI of the dialog; 'turi' - match against the To header
2503
-				URI of the dialog; 'callid' - match against Call-Id value.
2503
+				URI of the dialog; 'callid' - match against Call-Id value;
2504
+				'start_ts' - match against start timestamp.
2504 2505
 			</para></listitem>
2505 2506
 			<listitem><para>
2506 2507
 				<emphasis>mop</emphasis> - matching operator. It can be: 'eq' -
2507 2508
 				match using string comparison; 're' - match using regular
2508
-				expression; 'sw' - match using starts-with (prefix) comparison.
2509
+				expression; 'sw' - match using starts-with (prefix) comparison;
2510
+				'gt' - match using integer greater comparison; 'lt' - match
2511
+				using integer lesser comparison. Integer comparison can be used
2512
+				only with 'start_ts' key.
2509 2513
 			</para></listitem>
2510 2514
 			<listitem><para>
2511 2515
 				<emphasis>mval</emphasis> - matching value.
... ...
@@ -2517,6 +2521,8 @@ dlg_reset_property("timeout-noreset");
2517 2521
 &kamcmd; dlg.list_match furi eq sip:alice@test.com 2
2518 2522
 ...
2519 2523
 &kamcmd; dlg.list_match furi sw sip:alice@
2524
+...
2525
+&kamcmd; dlg.list_match start_ts gt s:1641550904
2520 2526
 ...
2521 2527
 		</programlisting>
2522 2528
 		</section>
Browse code

dialog: docs - typo and clarification about local socket bind address

Daniel-Constantin Mierla authored on 13/12/2021 08:22:39
Showing 1 changed files
... ...
@@ -2805,7 +2805,8 @@ dlg_reset_property("timeout-noreset");
2805 2805
 		<itemizedlist>
2806 2806
 			<listitem><para>
2807 2807
 				<emphasis>local_only</emphasis> (optional) - if not 0 then filter out
2808
-				non local dialogues. No bind_addr info in memory.
2808
+				non local dialogs (the receiving socket is not found locally,
2809
+				from C code point of view, the bind_addr info is not set).
2809 2810
 			</para></listitem>
2810 2811
 		</itemizedlist>
2811 2812
 		<para>Returned fields</para>
Browse code

dialog: add local_only paramter to RPC dlg.stats_active

allows to filter out non local dialogs from stats

fix #2920

Victor Seva authored on 05/11/2021 23:22:51
Showing 1 changed files
... ...
@@ -2801,7 +2801,13 @@ dlg_reset_property("timeout-noreset");
2801 2801
 			(not relying on core stats framework).
2802 2802
 		</para>
2803 2803
 		<para>Name: <emphasis>dlg.stats_active</emphasis></para>
2804
-		<para>Parameters: none.</para>
2804
+		<para>Parameters:</para>
2805
+		<itemizedlist>
2806
+			<listitem><para>
2807
+				<emphasis>local_only</emphasis> (optional) - if not 0 then filter out
2808
+				non local dialogues. No bind_addr info in memory.
2809
+			</para></listitem>
2810
+		</itemizedlist>
2805 2811
 		<para>Returned fields</para>
2806 2812
 		<itemizedlist>
2807 2813
 			<listitem><para>
Browse code

Revert "dialog: add parameter to configure synchronisation of all dialog states to DB"

This reverts commit 37d83a5838a50350563f19387fad455d6a433a02 for now.

It needs more rectoring and some extensions in the DB access layer for this module.

Henning Westerholt authored on 14/06/2020 15:09:25
Showing 1 changed files
... ...
@@ -82,8 +82,7 @@
82 82
 			<para><emphasis>5</emphasis> : Deleted dialog</para>
83 83
 		</listitem>
84 84
 	</itemizedlist>
85
-	<para>The early and deleted dialog states are updated in database storage,
86
-	unless deactivated with the <emphasis>update_all_states</emphasis> parameter.
85
+	<para>The early and deleted dialog states are not updated in database storage.
87 86
 	</para>
88 87
 	</section>
89 88
 
... ...
@@ -1641,39 +1640,6 @@ modparam("dialog", "keep_proxy_rr", 1)
1641 1640
 </programlisting>
1642 1641
 		</example>
1643 1642
 	</section>
1644
-
1645
-	<section id="dialog.p.update_all_states">
1646
-		<title><varname>update_all_states</varname> (string)</title>
1647
-		<para>
1648
-			When enabled the dialog modules will also synchronize the
1649
-			early and deleted dialog states to the database. This is
1650
-			useful in failover situations, but of course will generate
1651
-			more load to the database from this module.
1652
-		</para>
1653
-		<para>
1654
-			Valid values are:
1655
-		</para>
1656
-		<itemizedlist>
1657
-			<listitem><para>
1658
-				<emphasis>0</emphasis> - Don't synchronize early and deleted dialogs
1659
-			</para></listitem>
1660
-			<listitem><para>
1661
-				<emphasis>1</emphasis> - Synchronize early and deleted dialogs
1662
-			</para></listitem>
1663
-		</itemizedlist>
1664
-		<emphasis>
1665
-			Default value is <quote>1</quote>.
1666
-		</emphasis>
1667
-		<example>
1668
-		<title>Set <varname>update_all_states</varname> parameter</title>
1669
-		<programlisting format="linespecific">
1670
-...
1671
-modparam("dialog", "update_all_states", 1)
1672
-...
1673
-</programlisting>
1674
-		</example>
1675
-	</section>
1676
-
1677 1643
 	</section>
1678 1644
 
1679 1645
 	<section>
Browse code

dialog: add parameter to configure synchronisation of all dialog states to DB

- add parameter to configure synchronisation of all dialog states to DB
- new parameter update_all_states added to module interface
- activated by default to provide correct failover behaviour for users
- really large installation should test it and consider the load trade-off

Henning Westerholt authored on 12/06/2020 08:21:20
Showing 1 changed files
... ...
@@ -82,7 +82,8 @@
82 82
 			<para><emphasis>5</emphasis> : Deleted dialog</para>
83 83
 		</listitem>
84 84
 	</itemizedlist>
85
-	<para>The early and deleted dialog states are not updated in database storage.
85
+	<para>The early and deleted dialog states are updated in database storage,
86
+	unless deactivated with the <emphasis>update_all_states</emphasis> parameter.
86 87
 	</para>
87 88
 	</section>
88 89
 
... ...
@@ -1640,6 +1641,39 @@ modparam("dialog", "keep_proxy_rr", 1)
1640 1641
 </programlisting>
1641 1642
 		</example>
1642 1643
 	</section>
1644
+
1645
+	<section id="dialog.p.update_all_states">
1646
+		<title><varname>update_all_states</varname> (string)</title>
1647
+		<para>
1648
+			When enabled the dialog modules will also synchronize the
1649
+			early and deleted dialog states to the database. This is
1650
+			useful in failover situations, but of course will generate
1651
+			more load to the database from this module.
1652
+		</para>
1653
+		<para>
1654
+			Valid values are:
1655
+		</para>
1656
+		<itemizedlist>
1657
+			<listitem><para>
1658
+				<emphasis>0</emphasis> - Don't synchronize early and deleted dialogs
1659
+			</para></listitem>
1660
+			<listitem><para>
1661
+				<emphasis>1</emphasis> - Synchronize early and deleted dialogs
1662
+			</para></listitem>
1663
+		</itemizedlist>
1664
+		<emphasis>
1665
+			Default value is <quote>1</quote>.
1666
+		</emphasis>
1667
+		<example>
1668
+		<title>Set <varname>update_all_states</varname> parameter</title>
1669
+		<programlisting format="linespecific">
1670
+...
1671
+modparam("dialog", "update_all_states", 1)
1672
+...
1673
+</programlisting>
1674
+		</example>
1675
+	</section>
1676
+
1643 1677
 	</section>
1644 1678
 
1645 1679
 	<section>
Browse code

dialog: docs for attrs parameter of dlg.briefing rpc command

Daniel-Constantin Mierla authored on 09/04/2020 07:42:58
Showing 1 changed files
... ...
@@ -2865,19 +2865,58 @@ dlg_reset_property("timeout-noreset");
2865 2865
 		<section id="dlg.r.briefing">
2866 2866
 		<title>dlg.briefing</title>
2867 2867
 		<para>
2868
-		Lists fewer attributes for dialog records in memory.
2868
+		Lists fewer attributes for dialog records in memory. The dialog hash
2869
+		entry and id are added always, the rest of them are a matter of 'attrs'
2870
+		parameter.
2869 2871
 		</para>
2870 2872
 		<para>Name: <emphasis>dlg.briefing</emphasis></para>
2871 2873
 		<para>Parameters:</para>
2872 2874
 		<itemizedlist>
2873 2875
 			<listitem><para>
2874
-				<emphasis>none</emphasis> - no parameter
2875
-			</para></listitem>
2876
+			<emphasis>attrs</emphasis> - (optional) a list of characters (flags)
2877
+			representing the fields to be added to the response. If is missing,
2878
+			its default value is 'ftcFT' (note the characters are case sensitive).
2879
+			</para>
2880
+			<para>
2881
+				The characters can be:
2882
+				<itemizedlist>
2883
+				<listitem><para>
2884
+					<emphasis>f</emphasis> - From URI
2885
+				</para></listitem>
2886
+				<listitem><para>
2887
+					<emphasis>t</emphasis> - To URI
2888
+				</para></listitem>
2889
+				<listitem><para>
2890
+					<emphasis>c</emphasis> - Call-ID
2891
+				</para></listitem>
2892
+				<listitem><para>
2893
+					<emphasis>F</emphasis> - From tag
2894
+				</para></listitem>
2895
+				<listitem><para>
2896
+					<emphasis>T</emphasis> - To tag
2897
+				</para></listitem>
2898
+				<listitem><para>
2899
+					<emphasis>I</emphasis> - Init time
2900
+				</para></listitem>
2901
+				<listitem><para>
2902
+					<emphasis>S</emphasis> - Start time
2903
+				</para></listitem>
2904
+				<listitem><para>
2905
+					<emphasis>E</emphasis> - End time
2906
+				</para></listitem>
2907
+				<listitem><para>
2908
+					<emphasis>s</emphasis> - State
2909
+				</para></listitem>
2910
+				</itemizedlist>
2911
+			</para>
2912
+			</listitem>
2876 2913
 		</itemizedlist>
2877 2914
 		<para>RPC Command Example:</para>
2878 2915
 		<programlisting  format="linespecific">
2879 2916
 ...
2880 2917
 kamctl rpc dlg.briefing
2918
+...
2919
+kamctl rpc dlg.briefing "ft"
2881 2920
 ...
2882 2921
 		</programlisting>
2883 2922
 		</section>
Browse code

dialog: adding dlg.dump

alternative command to output dialogs data to file, far much faster than
dlg.list

dialog: use core/srjson

Julien Chavanton authored on 31/03/2020 22:18:38
Showing 1 changed files
... ...
@@ -2537,6 +2537,24 @@ dlg_reset_property("timeout-noreset");
2537 2537
 		</programlisting>
2538 2538
 		</section>
2539 2539
 
2540
+		<section id="dlg.r.dump_file">
2541
+		<title>dlg.dump_file</title>
2542
+		<para>Dump all dialogs in a json file. (much faster than dlg.list)</para>
2543
+		<para>Name: <emphasis>dlg.dump_file</emphasis></para>
2544
+		<para>Parameters:</para>
2545
+		<itemizedlist>
2546
+			<listitem><para>
2547
+				<emphasis>file name</emphasis> output file name
2548
+			</para></listitem>
2549
+		</itemizedlist>
2550
+		<para>RPC Command Format:</para>
2551
+		<programlisting  format="linespecific">
2552
+...
2553
+&kamcmd; dlg.dump_file "/tmp/dlg.json"
2554
+...
2555
+		</programlisting>
2556
+		</section>
2557
+
2540 2558
 		<section id="dlg.r.dlg_list">
2541 2559
 		<title>dlg.dlg_list</title>
2542 2560
 		<para>
Browse code

dialog: add new dlg_reset_property function

- new dlg_reset_property() function is added to disable the previously enabled dialog module behaviour.
e.g. stop sending keep-alive OPTIONS messages.

KORAY VATANSEVER authored on 09/12/2019 05:41:56
Showing 1 changed files
... ...
@@ -2373,6 +2373,48 @@ if(has_totag()) {
2373 2373
     }
2374 2374
 }
2375 2375
 ...
2376
+</programlisting>
2377
+		</example>
2378
+	</section>
2379
+
2380
+	<section id="dialog.f.dlg_reset_property">
2381
+		<title>
2382
+		<function moreinfo="none">dlg_reset_property(attr)</function>
2383
+		</title>
2384
+		<para>
2385
+			Reset a dialog property - an attribute that enable/disable
2386
+			various behaviours (e.g., sending keep alive requests).
2387
+		</para>
2388
+		<para>Meaning of the parameters is as follows:</para>
2389
+		<itemizedlist>
2390
+		<listitem>
2391
+			<para><emphasis>attr</emphasis> - name of property. It can be:
2392
+				<itemizedlist>
2393
+					<listitem>
2394
+						'ka-src' - send keep alive OPTION requests to caller
2395
+					</listitem>
2396
+					<listitem>
2397
+						'ka-dst' - send keep alive OPTION requests to callee
2398
+					</listitem>
2399
+					<listitem>
2400
+						'timeout-noreset' - don't reset timeout on in-dialog messages reception
2401
+					</listitem>
2402
+				</itemizedlist>
2403
+			</para>
2404
+		</listitem>
2405
+		</itemizedlist>
2406
+		<para>
2407
+			This function can be used from ANY_ROUTE.
2408
+		</para>
2409
+		<example>
2410
+		<title><function>dlg_reset_property</function> usage</title>
2411
+		<programlisting format="linespecific">
2412
+...
2413
+dlg_reset_property("ka-src");
2414
+dlg_reset_property("ka-dst");
2415
+dlg_reset_property("timeout-noreset");
2416
+...
2417
+
2376 2418
 </programlisting>
2377 2419
 		</example>
2378 2420
 	</section>
Browse code

dialog: docs for rpc command dlg.briefing

Daniel-Constantin Mierla authored on 01/11/2019 09:28:44
Showing 1 changed files
... ...
@@ -2802,6 +2802,26 @@ if(has_totag()) {
2802 2802
 ...
2803 2803
 			</programlisting>
2804 2804
 		</section>
2805
+		<section id="dlg.r.briefing">
2806
+		<title>dlg.briefing</title>
2807
+		<para>
2808
+		Lists fewer attributes for dialog records in memory.
2809
+		</para>
2810
+		<para>Name: <emphasis>dlg.briefing</emphasis></para>
2811
+		<para>Parameters:</para>
2812
+		<itemizedlist>
2813
+			<listitem><para>
2814
+				<emphasis>none</emphasis> - no parameter
2815
+			</para></listitem>
2816
+		</itemizedlist>
2817
+		<para>RPC Command Example:</para>
2818
+		<programlisting  format="linespecific">
2819
+...
2820
+kamctl rpc dlg.briefing
2821
+...
2822
+		</programlisting>
2823
+		</section>
2824
+
2805 2825
 	</section>
2806 2826
 
2807 2827
 	<section>
Browse code

dialog: rpc kill_active_dlg replaced with dlg.set_state

- enable the option to set different state values, although right now
targets the turning confirmed in terminated

Daniel-Constantin Mierla authored on 30/10/2019 12:41:42
Showing 1 changed files
... ...
@@ -2600,9 +2600,9 @@ if(has_totag()) {
2600 2600
 		</programlisting>
2601 2601
 		</section>
2602 2602
 		<section>
2603
-			<title>dlg.kill_active_dlg</title>
2603
+			<title>dlg.set_state</title>
2604 2604
 			<para>
2605
-			Kills a given active dialog matching the dialog on Call-ID, From-Tag and To-Tag.
2605
+			Set state for the dialog matching the dialog on Call-ID, From-Tag and To-Tag.
2606 2606
 			</para>
2607 2607
 		<para>Name: <emphasis>dlg.kill_active_dlg</emphasis></para>
2608 2608
 		<para>Parameters:</para>
... ...
@@ -2616,11 +2616,16 @@ if(has_totag()) {
2616 2616
 			<listitem><para>
2617 2617
 				<emphasis>to_tag</emphasis> - To-tag of active dialog to kill
2618 2618
 			</para></listitem>
2619
+			<listitem><para>
2620
+				<emphasis>state</emphasis> - The value for new state
2621
+			</para></listitem>
2619 2622
 		</itemizedlist>
2620 2623
 		<para>
2621
-		This command only handles active dialogs (state 4), error is returned otherwise.
2622
-		Please be careful with it, it callously wipes out the given dialog: dialog ending
2623
-		functions will not be called, such as accounting end-of-call events, dialog-end
2624
+		At this moment, the command targets the need to change from active dialogs
2625
+		(state 4) to terminated state (5), although it allows setting other state
2626
+		value. Be careful using with it, it can cause side effects and the
2627
+		terminated dialog is wiped out silently. Dialog ending functions are not
2628
+		executed, such as accounting end-of-call events, dialog-end
2624 2629
 		events, module-generated BYE requests, etc. After executing the	command, dialog
2625 2630
 		remains in memory until execution of the recurring function in charge of removing
2626 2631
 		old dialogs (a "dialog in delete state is too old" will then be logged).
... ...
@@ -2628,7 +2633,7 @@ if(has_totag()) {
2628 2633
 		<para>RPC Command Format:</para>
2629 2634
 		<programlisting  format="linespecific">
2630 2635
 ...
2631
-&kamcmd; dlg.kill_active_dlg callid12345 fromtag123 totag123
2636
+&kamcmd; dlg.set_state callid12345 fromtag123 totag123 5
2632 2637
 ...
2633 2638
 		</programlisting>
2634 2639
 		</section>
Browse code

dialog: adding RPC dlg.kill_active_dlg command

- only handles active dialogs in state 4
- wipes out a given dialog callously
- no subcalls to dialog-ending functions
- dialog is then removed by the recurring cleaning function execution
- as discussed in sr-users in topic "[Dialog] Removing entries from dialog memory"

Julien Klingenmeyer authored on 25/10/2019 09:16:20 • Daniel-Constantin Mierla committed on 30/10/2019 10:42:55
Showing 1 changed files
... ...
@@ -2596,6 +2596,39 @@ if(has_totag()) {
2596 2596
 		<programlisting  format="linespecific">
2597 2597
 ...
2598 2598
 &kamcmd; dlg.end_dlg 342 56
2599
+...
2600
+		</programlisting>
2601
+		</section>
2602
+		<section>
2603
+			<title>dlg.kill_active_dlg</title>
2604
+			<para>
2605
+			Kills a given active dialog matching the dialog on Call-ID, From-Tag and To-Tag.
2606
+			</para>
2607
+		<para>Name: <emphasis>dlg.kill_active_dlg</emphasis></para>
2608
+		<para>Parameters:</para>
2609
+		<itemizedlist>
2610
+			<listitem><para>
2611
+				<emphasis>callid</emphasis> - Call-ID of active dialog to kill
2612
+			</para></listitem>
2613
+			<listitem><para>
2614
+				<emphasis>from_tag</emphasis> - From-Tag of active dialog to kill
2615
+			</para></listitem>
2616
+			<listitem><para>
2617
+				<emphasis>to_tag</emphasis> - To-tag of active dialog to kill
2618
+			</para></listitem>
2619
+		</itemizedlist>
2620
+		<para>
2621
+		This command only handles active dialogs (state 4), error is returned otherwise.
2622
+		Please be careful with it, it callously wipes out the given dialog: dialog ending
2623
+		functions will not be called, such as accounting end-of-call events, dialog-end
2624
+		events, module-generated BYE requests, etc. After executing the	command, dialog
2625
+		remains in memory until execution of the recurring function in charge of removing
2626
+		old dialogs (a "dialog in delete state is too old" will then be logged).
2627
+		</para>
2628
+		<para>RPC Command Format:</para>
2629
+		<programlisting  format="linespecific">
2630
+...
2631
+&kamcmd; dlg.kill_active_dlg callid12345 fromtag123 totag123
2599 2632
 ...
2600 2633
 		</programlisting>
2601 2634
 		</section>
Browse code

dialog: two spelling fixes in docs, small rephrasing

Henning Westerholt authored on 27/09/2019 16:15:25
Showing 1 changed files
... ...
@@ -1582,8 +1582,8 @@ modparam("dialog", "h_id_start", 5)
1582 1582
 			dialog. Setting h_id_start and h_id_step to non-default values
1583 1583
 			should be done when using dlg_db_load_callid(...) or
1584 1584
 			dlg_db_load_extra() to load dialog records generated by another
1585
-			&kamailio; instance, making also sure that those &kamailio; 
1586
-			nstances are not going to generate overalapping dialog hash id
1585
+			&kamailio; instance. Pay attention to ensure that those &kamailio;
1586
+			instances are not going to generate overlapping dialog hash id
1587 1587
 			values by using different h_id_start and the same h_id_step
1588 1588
 			(h_id_step has to be greater than the maximum value of h_id_start).
1589 1589
 		</para>
Browse code

Typo in RPC Command dlg.dlg_list example

Typo in RPC Command dlg.dlg_list example, it should be kamcmd dlg.dlg_list abcdrssfrs122444@192.168.1.1, instead of kamcmd dlg.list abcdrssfrs122444@192.168.1.1

Jurijs I authored on 25/09/2019 12:34:06 • Henning Westerholt committed on 25/09/2019 13:04:22
Showing 1 changed files
... ...
@@ -2515,9 +2515,9 @@ if(has_totag()) {
2515 2515
 		<para>RPC Command Format:</para>
2516 2516
 		<programlisting  format="linespecific">
2517 2517
 ...
2518
-&kamcmd; dlg.list abcdrssfrs122444@192.168.1.1 AAdfeEFF33
2518
+&kamcmd; dlg.dlg_list abcdrssfrs122444@192.168.1.1 AAdfeEFF33
2519 2519
 ...
2520
-&kamcmd; dlg.list abcdrssfrs122444@192.168.1.1
2520
+&kamcmd; dlg.dlg_list abcdrssfrs122444@192.168.1.1
2521 2521
 ...
2522 2522
 		</programlisting>
2523 2523
 		</section>
Browse code

dialog: fix another issue (wrong section) in docs

Henning Westerholt authored on 16/07/2019 10:02:19
Showing 1 changed files
... ...
@@ -1602,8 +1602,6 @@ modparam("dialog", "h_id_step", 10)
1602 1602
 		</example>
1603 1603
 	</section>
1604 1604
 
1605
-	</section>
1606
-
1607 1605
 	<section id="dialog.p.keep_proxy_rr">
1608 1606
 		<title><varname>keep_proxy_rr</varname> (string)</title>
1609 1607
 		<para>
... ...
@@ -1638,9 +1636,11 @@ modparam("dialog", "h_id_step", 10)
1638 1636
 		<programlisting format="linespecific">
1639 1637
 ...
1640 1638
 modparam("dialog", "keep_proxy_rr", 1)
1639
+...
1641 1640
 </programlisting>
1642 1641
 		</example>
1643 1642
 	</section>
1643
+	</section>
1644 1644
 
1645 1645
 	<section>
1646 1646
 	<title>Functions</title>
Browse code

dialog: fix syntax error in doc after commit 0b3562ace82e0

Henning Westerholt authored on 16/07/2019 09:56:29
Showing 1 changed files
... ...
@@ -1633,6 +1633,7 @@ modparam("dialog", "h_id_step", 10)
1633 1633
 		<emphasis>
1634 1634
 			Default value is <quote>0</quote>.
1635 1635
 		</emphasis>
1636
+		<example>
1636 1637
 		<title>Set <varname>dlg_keep_proxy_rr</varname> parameter</title>
1637 1638
 		<programlisting format="linespecific">
1638 1639
 ...
Browse code

dialog: Add setting to loop BYE through proxy

The setting "keep_proxy_rr" will add the Record-Route headers added by the
proxy to the route_set stored in the dialog. When in use, sending locally
generated in-dialog requests will loop back to the proxy with a proper
Record-Route header, including any parameters.

Alex Hermann authored on 10/07/2014 10:56:49 • Henning Westerholt committed on 15/07/2019 19:15:57
Showing 1 changed files
... ...
@@ -1604,6 +1604,42 @@ modparam("dialog", "h_id_step", 10)
1604 1604
 
1605 1605
 	</section>
1606 1606
 
1607
+	<section id="dialog.p.keep_proxy_rr">
1608
+		<title><varname>keep_proxy_rr</varname> (string)</title>
1609
+		<para>
1610
+			Whether to keep the record-route header added by the proxy.
1611
+			When enabled, it will keep this proxy&apos;s record-route
1612
+			header from the reply. The result is that generated requests
1613
+			like the BYE from the dlg_end_dlg mi function will pass
1614
+			through the proxy (looped).
1615
+		</para>
1616
+		<para>
1617
+			Valid values are:
1618
+		</para>
1619
+		<itemizedlist>
1620
+			<listitem><para>
1621
+				<emphasis>0</emphasis> - Don&apos;t keep any proxy Record-Route headers
1622
+			</para></listitem>
1623
+			<listitem><para>
1624
+				<emphasis>1</emphasis> - Keep Record-route headers for the callee leg
1625
+			</para></listitem>
1626
+			<listitem><para>
1627
+				<emphasis>2</emphasis> - Keep Record-route headers for the caller leg
1628
+			</para></listitem>
1629
+			<listitem><para>
1630
+				<emphasis>3</emphasis> - Keep Record-route headers for both legs
1631
+			</para></listitem>
1632
+		</itemizedlist>
1633
+		<emphasis>
1634
+			Default value is <quote>0</quote>.
1635
+		</emphasis>
1636
+		<title>Set <varname>dlg_keep_proxy_rr</varname> parameter</title>
1637
+		<programlisting format="linespecific">
1638
+...
1639
+modparam("dialog", "keep_proxy_rr", 1)
1640
+</programlisting>
1641
+		</example>
1642
+	</section>
1607 1643
 
1608 1644
 	<section>
1609 1645
 	<title>Functions</title>
Browse code

dialog: docs - small addition to early_timeout param

Daniel-Constantin Mierla authored on 21/01/2019 09:11:20
Showing 1 changed files
... ...
@@ -323,8 +323,8 @@ modparam("dialog", "default_timeout", 21600)
323 323
 	<section id="dialog.p.early_timeout">
324 324
 		<title><varname>early_timeout</varname> (integer)</title>
325 325
 		<para>
326
-		The timeout (in seconds) after which the dialogs in early state (no
327
-		final response received) are destroyed.
326
+		The timeout (in seconds) after which the dialogs in unconfirmed or early
327
+		state (no final response received) are destroyed.
328 328
 		</para>
329 329
 		<para>
330 330
 		<emphasis>
Browse code

dialog: docs - more info about using the flag and dlg_manage()

Daniel-Constantin Mierla authored on 09/01/2019 08:50:12
Showing 1 changed files
... ...
@@ -45,9 +45,10 @@
45 45
 	<section>
46 46
 	<title>How it works</title>
47 47
 	<para>
48
-	To create the dialog associated with an initial request, the flag
49
-	<quote>dlg_flag</quote> (<xref linkend="dialog.p.flag"/>) must be set before
50
-	creating the corresponding transaction.
48
+	To create the dialog associated with an initial INVITE request, execute
49
+	the function <quote>dlg_manage()</quote> or set the flag specified by
50
+	parameter <quote>dlg_flag</quote> (<xref linkend="dialog.p.flag"/>)
51
+	before creating the corresponding transaction.
51 52
 	</para>
52 53
 	<para>
53 54
 	The dialog is automatically destroyed when a <quote>BYE</quote> is
... ...
@@ -256,6 +257,12 @@ modparam("dialog", "rr_param", "xyz")
256 257
 		current request (this make sense only for initial requests).
257 258
 		</para>
258 259
 		<para>
260
+		Note: it is not needed to set this parameter and its corresponding flag
261
+		for initial request in case the <quote>dlg_manage()</quote> function
262
+		is used. In other words, using <quote>dlg_manage()</quote> alone is
263
+		enough.
264
+		</para>
265
+		<para>
259 266
 		<emphasis>
260 267
 			Default value is <quote>none</quote>.
261 268
 		</emphasis>
Browse code

dialog: docs for rpc commmands dlg.list_match and dlg.list_match_ctx

Daniel-Constantin Mierla authored on 05/12/2018 16:45:29
Showing 1 changed files
... ...
@@ -2401,6 +2401,56 @@ if(has_totag()) {
2401 2401
 		</programlisting>
2402 2402
 		</section>
2403 2403
 
2404
+		<section id="dlg.r.list_match">
2405
+		<title>dlg.list_match</title>
2406
+		<para>
2407
+		Lists the details of matching dialogs. The paramters specify the matching
2408
+		key, operator, value and optionally a limit of matched dialogs.
2409
+		</para>
2410
+		<para>Name: <emphasis>dlg.list_match</emphasis></para>
2411
+		<para>Parameters:</para>
2412
+		<itemizedlist>
2413
+			<listitem><para>
2414
+				<emphasis>mkey</emphasis> - matching key. It can be: 'ruri' -
2415
+				match against R-URI of the dialog; 'furi' - match against From
2416
+				header URI of the dialog; 'turi' - match against the To header
2417
+				URI of the dialog; 'callid' - match against Call-Id value.
2418
+			</para></listitem>
2419
+			<listitem><para>
2420
+				<emphasis>mop</emphasis> - matching operator. It can be: 'eq' -
2421
+				match using string comparison; 're' - match using regular
2422
+				expression; 'sw' - match using starts-with (prefix) comparison.
2423
+			</para></listitem>
2424
+			<listitem><para>
2425
+				<emphasis>mval</emphasis> - matching value.
2426
+			</para></listitem>
2427
+		</itemizedlist>
2428
+		<para>RPC Command Format:</para>
2429
+		<programlisting  format="linespecific">
2430
+...
2431
+&kamcmd; dlg.list_match furi eq sip:alice@test.com 2
2432
+...
2433
+&kamcmd; dlg.list_match furi sw sip:alice@
2434
+...
2435
+		</programlisting>
2436
+		</section>
2437
+
2438
+		<section id="dlg.r.list_match_ctx">
2439
+		<title>dlg.list_match_ctx</title>
2440
+		<para>
2441
+		Similar to <quote>dlg.list_match</quote>, but including in the
2442
+		attributes associated with the dialog context from modules sitting on
2443
+		top of the dialog module.
2444
+		</para>
2445
+		<para>Name: <emphasis>dlg.list_match_ctx</emphasis></para>
2446
+		<para>RPC Command Format:</para>
2447
+		<programlisting  format="linespecific">
2448
+...
2449
+&kamcmd; dlg.list_match_ctx furi sw sip:alice@
2450
+...
2451
+		</programlisting>
2452
+		</section>
2453
+
2404 2454
 		<section id="dlg.r.dlg_list">
2405 2455
 		<title>dlg.dlg_list</title>
2406 2456
 		<para>
... ...
@@ -2430,7 +2480,7 @@ if(has_totag()) {
2430 2480
 		<section id="dlg.r.dlg_list_ctx">
2431 2481
 		<title>dlg.dlg_list_ctx</title>
2432 2482
 		<para>
2433
-		The same as the <quote>dlg.list_ctx</quote> but including in the dialog
2483
+		The same as the <quote>dlg.list_list</quote> but including in the dialog
2434 2484
 		description the associated context from modules sitting on top of
2435 2485
 		the dialog module.
2436 2486
 		</para>
Browse code

dialog: added rpc command dlg.is_alive

- adjusted from GH #1740

Surendra Tiwari authored on 05/12/2018 09:58:18 • Daniel-Constantin Mierla committed on 05/12/2018 09:58:18
Showing 1 changed files
... ...
@@ -2640,6 +2640,36 @@ if(has_totag()) {
2640 2640
 ...
2641 2641
 		</programlisting>
2642 2642
 		</section>
2643
+		<section id="dlg.r.is_alive">
2644
+			<title>dlg.is_alive</title>
2645
+			<para>
2646
+				Check whether a dialog matching the parameter is in confirmed
2647
+				state (answered and alive).
2648
+			</para>
2649
+			<para>Name: <emphasis>dlg.is_alive</emphasis></para>
2650
+			<para>Parameters:</para>
2651
+			<itemizedlist>
2652
+				<listitem><para>
2653
+					<emphasis>callid</emphasis> - callid of dialog
2654
+				</para></listitem>
2655
+				<listitem><para>
2656
+					<emphasis>from_tag</emphasis> - from tag of the dialog
2657
+				</para></listitem>
2658
+				<listitem><para>
2659
+					<emphasis>to_tag</emphasis> - to tag of the dialog
2660
+				</para></listitem>
2661
+			</itemizedlist>
2662
+			<para>
2663
+				This command will return error if dialog is not found or not
2664
+				confirmed state (answered).
2665
+			</para>
2666
+			<para>RPC Command Format:</para>
2667
+			<programlisting format="linespecific">
2668
+...
2669
+&kamcmd; dlg.is_alive callid123 fromtag123 totag123
2670
+...
2671
+			</programlisting>
2672
+		</section>
2643 2673
 	</section>
2644 2674
 
2645 2675
 	<section>
Browse code

dialog: removed invalid closing section tag from previous commit

Daniel-Constantin Mierla authored on 13/07/2018 10:47:53
Showing 1 changed files
... ...
@@ -2601,7 +2601,6 @@ if(has_totag()) {
2601 2601
 ...
2602 2602
 		</programlisting>
2603 2603
 		</section>
2604
-	</section>
2605 2604
 
2606 2605
 		<section id="dlg.r.stats_active">
2607 2606
 		<title>dlg.stats_active</title>
Browse code

dialog: docs for rpc command dlg.stats_active

Daniel-Constantin Mierla authored on 13/07/2018 10:25:05
Showing 1 changed files
... ...
@@ -2603,6 +2603,45 @@ if(has_totag()) {
2603 2603
 		</section>
2604 2604
 	</section>
2605 2605
 
2606
+		<section id="dlg.r.stats_active">
2607
+		<title>dlg.stats_active</title>
2608
+		<para>
2609
+			Get stats about active dialogs by scanning internal list of dialogs
2610
+			(not relying on core stats framework).
2611
+		</para>
2612
+		<para>Name: <emphasis>dlg.stats_active</emphasis></para>
2613
+		<para>Parameters: none.</para>
2614
+		<para>Returned fields</para>
2615
+		<itemizedlist>
2616
+			<listitem><para>
2617
+				<emphasis>starting</emphasis> - initial INVITE has been processed,
2618
+				no ringing or 1xx has been received.
2619
+			</para></listitem>
2620
+			<listitem><para>
2621
+				<emphasis>connecting</emphasis> - initial INVITE was forwarded
2622
+				and rining or 1xx has been received.
2623
+			</para></listitem>
2624
+			<listitem><para>
2625
+				<emphasis>answering</emphasis> - initial INVITE received 200ok,
2626
+				but ACK was not handled yet.
2627
+			</para></listitem>
2628
+			<listitem><para>
2629
+				<emphasis>ongoing</emphasis> - ongoing active dialog, after the
2630
+				ACK was processed.
2631
+			</para></listitem>
2632
+			<listitem><para>
2633
+				<emphasis>all</emphasis> - all active dialogs, respectively the
2634
+				sum of the above values.
2635
+			</para></listitem>
2636
+		</itemizedlist>
2637
+		<para>RPC Command Format:</para>
2638
+		<programlisting  format="linespecific">
2639
+...
2640
+&kamcmd; dlg.stats_active
2641
+...
2642
+		</programlisting>
2643
+		</section>
2644
+	</section>
2606 2645
 
2607 2646
 	<section>
2608 2647
 	<title>Exported Variables</title>
Browse code

dialog: docs - notes about special values for optional parameters

Daniel-Constantin Mierla authored on 13/07/2018 08:46:48
Showing 1 changed files
... ...
@@ -2581,11 +2581,17 @@ if(has_totag()) {
2581 2581
 				<emphasis>to</emphasis> - SIP address to refer 'from' to
2582 2582
 			</para></listitem>
2583 2583
 			<listitem><para>
2584
-				<emphasis>op</emphasis> (optional) - outbound proxy SIP address
2584
+				<emphasis>op</emphasis> (optional) - outbound proxy SIP address.
2585
+				If its value is set to '.' (dot), then it is ignored (like it
2586
+				would not have been provided).
2585 2587
 			</para></listitem>
2586 2588
 			<listitem><para>
2587 2589
 				<emphasis>body</emphasis> (optional) - SDP body for initial
2588
-				INVITE
2590
+				INVITE. If its value is set to '.' (dot), then it is ignored
2591
+				(like it would not have been provided). If body is not set via
2592
+				RPC command parameter, then an internal generated SDP with G711a
2593
+				and G711u is used. If its value is set to '' (empty string) or
2594
+				'_' (underline), then the INVITE is sent without an SDP body.
2589 2595
 			</para></listitem>
2590 2596
 		</itemizedlist>
2591 2597
 		<para>RPC Command Format:</para>
Browse code

dialog: docs - fixed example for rpc dlg.terminate_dlg

Daniel-Constantin Mierla authored on 14/06/2018 13:29:16
Showing 1 changed files
... ...
@@ -2462,7 +2462,7 @@ if(has_totag()) {
2462 2462
 				<emphasis>from_tag</emphasis> -  from tag of the dialog to terminated
2463 2463
 			</para></listitem>
2464 2464
 			<listitem><para>
2465
-				<emphasis>totag</emphasis> -  to tag of the dialog to terminated
2465
+				<emphasis>to_tag</emphasis> -  to tag of the dialog to terminated
2466 2466
 			</para></listitem>
2467 2467
 		</itemizedlist>
2468 2468
 		<para>
... ...
@@ -2470,7 +2470,7 @@ if(has_totag()) {
2470 2470
 		</para>
2471 2471
 		<para>RPC Command Format:</para>
2472 2472
 		<programlisting  format="linespecific">
2473
-		kamcmd dlg.dlg_terminate_dlg callid12345 fromtag123 totag123
2473
+		kamcmd dlg.terminate_dlg callid12345 fromtag123 totag123
2474 2474
 		</programlisting>
2475 2475
 		</section>
2476 2476
 		<section>
Browse code

dialog: added missing documentation for end_timeout parameter

Daniel-Constantin Mierla authored on 08/04/2018 07:45:06
Showing 1 changed files
... ...
@@ -356,6 +356,27 @@ modparam("dialog", "noack_timeout", 90)
356 356
 		</example>
357 357
 	</section>
358 358
 
359
+	<section id="dialog.p.end_timeout">
360
+		<title><varname>end_timeout</varname> (integer)</title>
361
+		<para>
362
+		The timeout (in seconds) after which the dialogs in terminated state
363
+		are destroyed.
364
+		</para>
365
+		<para>
366
+		<emphasis>
367
+			Default value is <quote>300 (5 minutes)</quote>.
368
+		</emphasis>
369
+		</para>
370
+		<example>
371
+		<title>Set <varname>end_timeout</varname> parameter</title>
372
+		<programlisting format="linespecific">
373
+...
374
+modparam("dialog", "end_timeout", 180)
375
+...
376
+</programlisting>
377
+		</example>
378
+	</section>
379
+
359 380
 	<section id="dialog.p.dlg_extra_hdrs">
360 381
 		<title><varname>dlg_extra_hdrs</varname> (string)</title>
361 382
 		<para>
Browse code

dialog: documented dlg_db_load_extra() function

- related to #1274

Daniel-Constantin Mierla authored on 06/04/2018 07:21:56
Showing 1 changed files
... ...
@@ -1552,12 +1552,12 @@ modparam("dialog", "h_id_start", 5)
1552 1552
 			with the rule: h_id_start + N * h_id_step. The first value of N is
1553 1553
 			randomly selected at startup, then incremented by 1 for each new
1554 1554
 			dialog. Setting h_id_start and h_id_step to non-default values
1555
-			should be done when using dlg_db_load_callid(...) to load dialog
1556
-			records generated by another &kamailio; instance, making also sure
1557
-			that those &kamailio; instances are not going to generate
1558
-			overalapping dialog hash id values by using different h_id_start
1559
-			and the same h_id_step (h_id_step has to be greater than the
1560
-			maximum value of h_id_start).
1555
+			should be done when using dlg_db_load_callid(...) or
1556
+			dlg_db_load_extra() to load dialog records generated by another
1557
+			&kamailio; instance, making also sure that those &kamailio; 
1558
+			nstances are not going to generate overalapping dialog hash id
1559
+			values by using different h_id_start and the same h_id_step
1560
+			(h_id_step has to be greater than the maximum value of h_id_start).
1561 1561
 		</para>
1562 1562
 		<para>
1563 1563
 		<emphasis>
... ...
@@ -2281,6 +2281,33 @@ if(has_totag()) {
2281 2281
     }
2282 2282
 }
2283 2283
 ...
2284
+</programlisting>
2285
+		</example>
2286
+	</section>
2287
+	<section id="dialog.f.dlg_db_load_extra">
2288
+		<title>
2289
+		<function moreinfo="none">dlg_db_load_extra()</function>
2290
+		</title>
2291
+		<para>
2292
+		Load all dialog records from database that are not in memory of the
2293
+		current &kamailio; instance.
2294
+		</para>
2295
+		<para>
2296
+		This function can be used from ANY_ROUTE.
2297
+		</para>
2298
+		<example>
2299
+		<title><function>dlg_db_load_extra()</function> usage</title>
2300
+		<programlisting format="linespecific">
2301
+...
2302
+if(has_totag()) {
2303
+    if(!is_known_dlg()) {
2304
+        dlg_db_load_extra();
2305
+	    if(!is_known_dlg()) {
2306
+            xlog("no dialog found with callid: $ci\n");
2307
+        }
2308
+    }
2309
+}
2310
+...
2284 2311
 </programlisting>
2285 2312
 		</example>
2286 2313
 	</section>
Browse code

dialog: docs - documentation for h_id_start and h_id_step parameters

- related to GH #1274

Daniel-Constantin Mierla authored on 04/04/2018 16:36:03
Showing 1 changed files
... ...
@@ -1520,6 +1520,60 @@ end
1520 1520
 		</example>
1521 1521
 	</section>
1522 1522
 
1523
+	<section id="dialog.p.h_id_start">
1524
+		<title><varname>h_id_start</varname> (int)</title>
1525
+		<para>
1526
+			Set the offset to be used for generating dialog internal hash id.
1527
+			If set to -1, the h_id_start is set to the value of the server_id
1528
+			global parameter.
1529
+		</para>
1530
+		<para>
1531
+		<emphasis>
1532
+			Default value is <quote>0</quote>.
1533
+		</emphasis>
1534
+		</para>
1535
+		<example>
1536
+		<title>Set <varname>h_id_start</varname> parameter</title>
1537
+		<programlisting format="linespecific">
1538
+...
1539
+modparam("dialog", "h_id_start", 5)
1540
+...
1541
+</programlisting>
1542
+		</example>
1543
+	</section>
1544
+
1545
+	<section id="dialog.p.h_id_step">
1546
+		<title><varname>h_id_step</varname> (int)</title>
1547
+		<para>
1548
+			Set the step to increment the dialog internal hash id.
1549
+		</para>
1550
+		<para>
1551
+			If the value is greater than 1, the internal hash id is generated
1552
+			with the rule: h_id_start + N * h_id_step. The first value of N is
1553
+			randomly selected at startup, then incremented by 1 for each new
1554
+			dialog. Setting h_id_start and h_id_step to non-default values
1555
+			should be done when using dlg_db_load_callid(...) to load dialog
1556
+			records generated by another &kamailio; instance, making also sure
1557
+			that those &kamailio; instances are not going to generate
1558
+			overalapping dialog hash id values by using different h_id_start
1559
+			and the same h_id_step (h_id_step has to be greater than the
1560
+			maximum value of h_id_start).
1561
+		</para>
1562
+		<para>
1563
+		<emphasis>
1564
+			Default value is <quote>1</quote>.
1565
+		</emphasis>
1566
+		</para>
1567
+		<example>
1568
+		<title>Set <varname>h_id_step</varname> parameter</title>
1569
+		<programlisting format="linespecific">
1570
+...
1571
+modparam("dialog", "h_id_step", 10)
1572
+...
1573
+</programlisting>
1574
+		</example>
1575
+	</section>
1576
+
1523 1577
 	</section>
1524 1578
 
1525 1579
 
Browse code

dialog: documentation for dlg_db_load_callid()

Daniel-Constantin Mierla authored on 04/04/2018 06:44:42
Showing 1 changed files
... ...
@@ -2200,6 +2200,33 @@ if(has_totag() and is_present_hf("Route") and uri==myself ) {
2200 2200
 	}