Browse code

topos: docs updated for xavu replacing avp parameters

Daniel-Constantin Mierla authored on 01/04/2021 06:56:29
Showing 1 changed files
... ...
@@ -292,7 +292,7 @@ modparam("topos", "event_mode", 2)
292 292
 		<title><varname>contact_host</varname> (str)</title>
293 293
 		<para>
294 294
 			You may need to control the host part of the Contact header added
295
-			by topos. If the contact_host_avp parameter is set, this value is
295
+			by topos. If the xavu_filed_contact_host parameter is set, this value is
296 296
 			ignored.
297 297
 
298 298
 			For example when using TLS with TOPOS the remote UAS must be able to open
... ...
@@ -329,7 +329,7 @@ modparam("topos", "contact_host", "proxy.domain.com")
329 329
 		of the processed initial SIP request.
330 330
 		</para>
331 331
 		<para>If you use the mode (2), you need to configure the
332
-		<emphasis>a_contact_avp</emphasis> and <emphasis>b_contact_avp</emphasis>
332
+		<emphasis>xavu_field_a_contact</emphasis> and <emphasis>xavu_field_b_contact</emphasis>
333 333
 		parameter. Furthermore you need to assign values to them during
334 334
 		the processing of the initial SIP request.
335 335
 		</para>
... ...
@@ -375,12 +375,39 @@ modparam("topos", "cparam_name", "xyz")
375 375
 </programlisting>
376 376
 		</example>
377 377
 	</section>
378
-	<section id="topos.p.a_contact_avp">
379
-		<title><varname>a_contact_avp</varname> (str)</title>
378
+	<section id="topos.p.xavu_cfg">
379
+		<title><varname>xavu_cfg</varname> (str)</title>
380 380
 		<para>
381
-			Name of the AVP parameter to evaluate for the A-side
382
-			Contact Header user part. This parameter is only
383
-			necessary in contact_mode (2).
381
+			Name of root XAVU to hold config-specific values to be used by
382
+			module at runtime.
383
+		</para>
384
+		<para>
385
+			Note: this parameter must be set if any other parameter prefixed
386
+			with `xavu_field_` is used.
387
+		</para>
388
+		<para>
389
+		<emphasis>
390
+			Default value is <quote>NULL</quote> (disabled).
391
+		</emphasis>
392
+		</para>
393
+		<example>
394
+		<title>Set <varname>xavu_filed_a_contact</varname> parameter</title>
395
+		<programlisting format="linespecific">
396
+...
397
+modparam("topos", "xavu_cfg", "_tps_")
398
+modparam("topos", "xavu_filed_a_contact", "a_contact")
399
+...
400
+    $xavu(_tps_=>a_contact) = "...";
401
+...
402
+</programlisting>
403
+		</example>
404
+	</section>
405
+	<section id="topos.p.xavu_field_a_contact">
406
+		<title><varname>xavu_filed_a_contact</varname> (str)</title>
407
+		<para>
408
+			Name of the field inside root XAVU specifed by `xavu_cfg`
409
+			to evaluate for the A-side Contact Header user part. This parameter
410
+			is only necessary in contact_mode (2).
384 411
 		</para>
385 412
 		<para>
386 413
 		<emphasis>
... ...
@@ -388,20 +415,23 @@ modparam("topos", "cparam_name", "xyz")
388 415
 		</emphasis>
389 416
 		</para>
390 417
 		<example>
391
-		<title>Set <varname>a_contact_avp</varname> parameter</title>
418
+		<title>Set <varname>xavu_filed_a_contact</varname> parameter</title>
392 419
 		<programlisting format="linespecific">
393 420
 ...
394
-modparam("topos", "a_contact_avp", "$avp(tps-act)")
421
+modparam("topos", "xavu_cfg", "_tps_")
422
+modparam("topos", "xavu_filed_a_contact", "a_contact")
423
+...
424
+    $xavu(_tps_=>a_contact) = "...";
395 425
 ...
396 426
 </programlisting>
397 427
 		</example>
398 428
 	</section>
399
-	<section id="topos.p.b_contact_avp">
400
-		<title><varname>b_contact_avp</varname> (str)</title>
429
+	<section id="topos.p.xavu_field_b_contact">
430
+		<title><varname>xavu_filed_b_contact</varname> (str)</title>
401 431
 		<para>
402
-			Name of the AVP parameter to evaluate for the B-side
403
-			Contact Header user part. This parameter is only
404
-			necessary in contact_mode (2).
432
+			Name of the field inside root XAVU specifed by `xavu_cfg`
433
+			to evaluate for the B-side Contact Header user part. This parameter
434
+			is only necessary in contact_mode (2).
405 435
 		</para>
406 436
 		<para>
407 437
 		<emphasis>
... ...
@@ -409,10 +439,14 @@ modparam("topos", "a_contact_avp", "$avp(tps-act)")
409 439
 		</emphasis>
410 440
 		</para>
411 441
 		<example>
412
-		<title>Set <varname>b_contact_avp</varname> parameter</title>
442
+		<title>Set <varname>xavu_filed_b_contact</varname> parameter</title>
413 443
 		<programlisting format="linespecific">
414 444
 ...
415
-modparam("topos", "b_contact_avp", "$avp(tps-bct)")
445
+modparam("topos", "xavu_cfg", "_tps_")
446
+modparam("topos", "xavu_filed_b_contact", "b_contact")
447
+...
448
+    $xavu(_tps_=>b_contact) = "...";
449
+
416 450
 ...
417 451
 </programlisting>
418 452
 		</example>
... ...
@@ -437,13 +471,13 @@ modparam("topos", "rr_update", 1)
437 471
 </programlisting>
438 472
 		</example>
439 473
 	</section>
440
-	<section id="topos.p.contact_host_avp">
441
-		<title><varname>contact_host_avp</varname> (str)</title>
474
+	<section id="topos.p.xavu_filed_contact_host">
475
+		<title><varname>xavu_field_contact_host</varname> (str)</title>
442 476
 		<para>
443
-			You may need to control the host part of the Contact header added
444
-			by topos. This parameter allows to take the value from an AVP
445
-			during run-time. If this parameter is set, the contact_host
446
-			parameter is ignored.
477
+			Control from where to take the host part of the Contact header added
478
+			by topos. This parameter allows to take the value from an XAVU
479
+			during run-time, it specifies the field inside XAVU "xavu_cfg".
480
+			If this parameter is set, the contact_host parameter is ignored.
447 481
 
448 482
 			For example when using TLS with TOPOS the remote UAS must be able to open
449 483
 			a new TLS socket to the contact header.
... ...
@@ -456,10 +490,13 @@ modparam("topos", "rr_update", 1)
456 490
 		</emphasis>
457 491
 		</para>
458 492
 		<example>
459
-		<title>Set <varname>contact_host_avp</varname> parameter</title>
493
+		<title>Set <varname>xavu_field_contact_host</varname> parameter</title>
460 494
 		<programlisting format="linespecific">
461 495
 ...
462
-modparam("topos", "contact_host_avp", "$avp(contact_host)")
496
+modparam("topos", "xavu_cfg", "_tps_")
497
+modparam("topos", "xavu_contact_host", "contact_host")
498
+...
499
+    $xavu(_tps_=>contact_host) = "kamailio.org";
463 500
 ...
464 501
 </programlisting>
465 502
 		</example>