Browse code

topos: small doc improvements related to header_mode parameter

Henning Westerholt authored on 21/08/2022 13:31:05
Showing 1 changed files
... ...
@@ -551,11 +551,11 @@ modparam("topos", "methods_nocontact", "CANCEL,PRACK")
551 551
 		<para>
552 552
 			List of headers to disable multiple comma separated values inserted in compact form.
553 553
 			Altough compact form is RFC compliant this paramter gives possibilty to disable
554
-			compact form header values for UA that dont support/handle it.
554
+			compact form header values for UA that don't support or can't handle it.
555 555
 
556 556
 			The following options are available:
557 557
 
558
-			(1) - disable multiple comma separated values for Via  header
558
+			(1) - disable multiple comma separated values for Via header
559 559
 			(2) - disable multiple comma separated values for Record-Route header
560 560
 			(4) - disable multiple comma separated values for Route header
561 561
 
Browse code

topos: disable multiple comma separated values in One Single Via, Record-Route or Route header if needed (#3220)

* topos: enable multiple Via values in separate via header
* topos: disable multiple comma separated values in One Single Via, Record-Route or Route header
* topos: disable multiple comma separated values in One Single Via, Record-Route or Route header
* topos: disable multiple comma separated values in One Single Via, Record-Route or Route header
* change parameter name for disabling compact form values

Mvondo Eric authored on 21/08/2022 13:19:51 • GitHub committed on 21/08/2022 13:19:51
Showing 1 changed files
... ...
@@ -543,6 +543,34 @@ modparam("topos", "context", "srvone")
543 543
 ...
544 544
 modparam("topos", "methods_nocontact", "CANCEL,PRACK")
545 545
 ...
546
+</programlisting>
547
+		</example>
548
+	</section>
549
+	<section id="topos.p.header_mode">
550
+		<title><varname>header_mode</varname> (int)</title>
551
+		<para>
552
+			List of headers to disable multiple comma separated values inserted in compact form.
553
+			Altough compact form is RFC compliant this paramter gives possibilty to disable
554
+			compact form header values for UA that dont support/handle it.
555
+
556
+			The following options are available:
557
+
558
+			(1) - disable multiple comma separated values for Via  header
559
+			(2) - disable multiple comma separated values for Record-Route header
560
+			(4) - disable multiple comma separated values for Route header
561
+
562
+		</para>
563
+		<para>
564
+		<emphasis>
565
+			Default value is <quote>0</quote>.
566
+		</emphasis>
567
+		</para>
568
+		<example>
569
+		<title>Set <varname>header_mode</varname> parameter</title>
570
+		<programlisting format="linespecific">
571
+...
572
+modparam("topos", "header_mode", 1)
573
+...
546 574
 </programlisting>
547 575
 		</example>
548 576
 	</section>
Browse code

topos: docs for methods_noinitial parameter

Daniel-Constantin Mierla authored on 05/07/2022 18:41:14
Showing 1 changed files
... ...
@@ -543,6 +543,26 @@ modparam("topos", "context", "srvone")
543 543
 ...
544 544
 modparam("topos", "methods_nocontact", "CANCEL,PRACK")
545 545
 ...
546
+</programlisting>
547
+		</example>
548
+	</section>
549
+	<section id="topos.p.methods_noinitial">
550
+		<title><varname>methods_noinitial</varname> (str)</title>
551
+		<para>
552
+			List of SIP methods to skip doing topos if it is an intial request
553
+			(no To-tag).
554
+		</para>
555
+		<para>
556
+		<emphasis>
557
+			Default value is <quote></quote> (no method).
558
+		</emphasis>
559
+		</para>
560
+		<example>
561
+		<title>Set <varname>methods_noinitial</varname> parameter</title>
562
+		<programlisting format="linespecific">
563
+...
564
+modparam("topos", "methods_noinitial", "OPTIONS,NOTIFY")
565
+...
546 566
 </programlisting>
547 567
 		</example>
548 568
 	</section>
Browse code

topos: docs - small updates to module description

Daniel-Constantin Mierla authored on 04/07/2022 13:34:47
Showing 1 changed files
... ...
@@ -27,10 +27,12 @@
27 27
 	</para>
28 28
 	<para>
29 29
 		It also works for SIP MESSAGE or other requests that do not create
30
-		a dialog -- record_route() must be used for them as well, the
31
-		headers are not going to be in the messages sent to the network, they
30
+		a dialog (e.g., OPTIONS) -- record_route() must be used for them as well,
31
+		the headers are not going to be in the messages sent to the network, they
32 32
 		are needed to know local addresses used to communicate with each side.
33
-                This module is designed to work for presence (SUBSCRIBE-based) dialogs too.
33
+        This module is designed to work for presence (SUBSCRIBE-based) dialogs too.
34
+	</para>
35
+	<para>
34 36
 		The REGISTER and PUBLISH requests are skipped from processing
35 37
 		by this module, expected to be terminated on a local SIP server.
36 38
 	</para>
Browse code

topos: docs for methods_nocontact parameter

Daniel-Constantin Mierla authored on 21/06/2022 06:56:51
Showing 1 changed files
... ...
@@ -522,6 +522,25 @@ modparam("topos", "rr_update", 1)
522 522
 ...
523 523
 modparam("topos", "context", "srvone")
524 524
 ...
525
+</programlisting>
526
+		</example>
527
+	</section>
528
+	<section id="topos.p.methods_nocontact">
529
+		<title><varname>methods_nocontact</varname> (str)</title>
530
+		<para>
531
+			List of SIP methods to skip adding Contact header for.
532
+		</para>
533
+		<para>
534
+		<emphasis>
535
+			Default value is <quote>BYE,CANCEL,PRACK</quote>.
536
+		</emphasis>
537
+		</para>
538
+		<example>
539
+		<title>Set <varname>methods_nocontact</varname> parameter</title>
540
+		<programlisting format="linespecific">
541
+...
542
+modparam("topos", "methods_nocontact", "CANCEL,PRACK")
543
+...
525 544
 </programlisting>
526 545
 		</example>
527 546
 	</section>
Browse code

topos: spelling fix in README for contact parameter

Henning Westerholt authored on 04/10/2021 15:38:23
Showing 1 changed files
... ...
@@ -294,7 +294,7 @@ modparam("topos", "event_mode", 2)
294 294
 		<title><varname>contact_host</varname> (str)</title>
295 295
 		<para>
296 296
 			You may need to control the host part of the Contact header added
297
-			by topos. If the xavu_filed_contact_host parameter is set, this value is
297
+			by topos. If the xavu_field_contact_host parameter is set, this value is
298 298
 			ignored.
299 299
 
300 300
 			For example when using TLS with TOPOS the remote UAS must be able to open
... ...
@@ -397,7 +397,7 @@ modparam("topos", "cparam_name", "xyz")
397 397
 		<programlisting format="linespecific">
398 398
 ...
399 399
 modparam("topos", "xavu_cfg", "_tps_")
400
-modparam("topos", "xavu_filed_a_contact", "a_contact")
400
+modparam("topos", "xavu_field_a_contact", "a_contact")
401 401
 ...
402 402
     $xavu(_tps_=>a_contact) = "...";
403 403
 ...
... ...
@@ -405,7 +405,7 @@ modparam("topos", "xavu_filed_a_contact", "a_contact")
405 405
 		</example>
406 406
 	</section>
407 407
 	<section id="topos.p.xavu_field_a_contact">
408
-		<title><varname>xavu_filed_a_contact</varname> (str)</title>
408
+		<title><varname>xavu_field_a_contact</varname> (str)</title>
409 409
 		<para>
410 410
 			Name of the field inside root XAVU specifed by `xavu_cfg`
411 411
 			to evaluate for the A-side Contact Header user part. This parameter
... ...
@@ -417,11 +417,11 @@ modparam("topos", "xavu_filed_a_contact", "a_contact")
417 417
 		</emphasis>
418 418
 		</para>
419 419
 		<example>
420
-		<title>Set <varname>xavu_filed_a_contact</varname> parameter</title>
420
+		<title>Set <varname>xavu_field_a_contact</varname> parameter</title>
421 421
 		<programlisting format="linespecific">
422 422
 ...
423 423
 modparam("topos", "xavu_cfg", "_tps_")
424
-modparam("topos", "xavu_filed_a_contact", "a_contact")
424
+modparam("topos", "xavu_field_a_contact", "a_contact")
425 425
 ...
426 426
     $xavu(_tps_=>a_contact) = "...";
427 427
 ...
... ...
@@ -429,7 +429,7 @@ modparam("topos", "xavu_filed_a_contact", "a_contact")
429 429
 		</example>
430 430
 	</section>
431 431
 	<section id="topos.p.xavu_field_b_contact">
432
-		<title><varname>xavu_filed_b_contact</varname> (str)</title>
432
+		<title><varname>xavu_field_b_contact</varname> (str)</title>
433 433
 		<para>
434 434
 			Name of the field inside root XAVU specifed by `xavu_cfg`
435 435
 			to evaluate for the B-side Contact Header user part. This parameter
... ...
@@ -441,11 +441,11 @@ modparam("topos", "xavu_filed_a_contact", "a_contact")
441 441
 		</emphasis>
442 442
 		</para>
443 443
 		<example>
444
-		<title>Set <varname>xavu_filed_b_contact</varname> parameter</title>
444
+		<title>Set <varname>xavu_field_b_contact</varname> parameter</title>
445 445
 		<programlisting format="linespecific">
446 446
 ...
447 447
 modparam("topos", "xavu_cfg", "_tps_")
448
-modparam("topos", "xavu_filed_b_contact", "b_contact")
448
+modparam("topos", "xavu_field_b_contact", "b_contact")
449 449
 ...
450 450
     $xavu(_tps_=>b_contact) = "...";
451 451
 
Browse code

topos: documentation fixed for contact_host xavu parameter

Henning Westerholt authored on 15/06/2021 09:59:00
Showing 1 changed files
... ...
@@ -453,7 +453,7 @@ modparam("topos", "xavu_filed_b_contact", "b_contact")
453 453
 </programlisting>
454 454
 		</example>
455 455
 	</section>
456
-	<section id="topos.p.xavu_filed_contact_host">
456
+	<section id="topos.p.xavu_field_contact_host">
457 457
 		<title><varname>xavu_field_contact_host</varname> (str)</title>
458 458
 		<para>
459 459
 			Control from where to take the host part of the Contact header added
... ...
@@ -476,7 +476,7 @@ modparam("topos", "xavu_filed_b_contact", "b_contact")
476 476
 		<programlisting format="linespecific">
477 477
 ...
478 478
 modparam("topos", "xavu_cfg", "_tps_")
479
-modparam("topos", "xavu_contact_host", "contact_host")
479
+modparam("topos", "xavu_field_contact_host", "contact_host")
480 480
 ...
481 481
     $xavu(_tps_=>contact_host) = "kamailio.org";
482 482
 ...
Browse code

topos: docs - fixed title for xavu_cfg example [skip ci]

- groupped xavu parameters

Daniel-Constantin Mierla authored on 02/04/2021 08:11:01
Showing 1 changed files
... ...
@@ -393,7 +393,7 @@ modparam("topos", "cparam_name", "xyz")
393 393
 		</emphasis>
394 394
 		</para>
395 395
 		<example>
396
-		<title>Set <varname>xavu_filed_a_contact</varname> parameter</title>
396
+		<title>Set <varname>xavu_cfg</varname> parameter</title>
397 397
 		<programlisting format="linespecific">
398 398
 ...
399 399
 modparam("topos", "xavu_cfg", "_tps_")
... ...
@@ -449,26 +449,6 @@ modparam("topos", "xavu_filed_b_contact", "b_contact")
449 449
 ...
450 450
     $xavu(_tps_=>b_contact) = "...";
451 451
 
452
-...
453
-</programlisting>
454
-		</example>
455
-	</section>
456
-	<section id="topos.p.rr_update">
457
-		<title><varname>rr_update</varname> (int)</title>
458
-		<para>
459
-			If set to 1, topos module will track and update record
460
-			route changes on re-invite.
461
-		</para>
462
-		<para>
463
-		<emphasis>
464
-			Default value is 0 (do not update record route changes within dialog).
465
-		</emphasis>
466
-		</para>
467
-		<example>
468
-		<title>Set <varname>rr_update</varname> parameter</title>
469
-		<programlisting format="linespecific">
470
-...
471
-modparam("topos", "rr_update", 1)
472 452
 ...
473 453
 </programlisting>
474 454
 		</example>
... ...
@@ -500,6 +480,26 @@ modparam("topos", "xavu_contact_host", "contact_host")
500 480
 ...
501 481
     $xavu(_tps_=>contact_host) = "kamailio.org";
502 482
 ...
483
+</programlisting>
484
+		</example>
485
+	</section>
486
+	<section id="topos.p.rr_update">
487
+		<title><varname>rr_update</varname> (int)</title>
488
+		<para>
489
+			If set to 1, topos module will track and update record
490
+			route changes on re-invite.
491
+		</para>
492
+		<para>
493
+		<emphasis>
494
+			Default value is 0 (do not update record route changes within dialog).
495
+		</emphasis>
496
+		</para>
497
+		<example>
498
+		<title>Set <varname>rr_update</varname> parameter</title>
499
+		<programlisting format="linespecific">
500
+...
501
+modparam("topos", "rr_update", 1)
502
+...
503 503
 </programlisting>
504 504
 		</example>
505 505
 	</section>
Browse code

topos: docs for inbound event routes and context

Daniel-Constantin Mierla authored on 01/04/2021 07:12:16
Showing 1 changed files
... ...
@@ -199,7 +199,7 @@ modparam("topos", "branch_expire", 300)
199 199
 			after the initial call setup on re-INVITEs or other in-dialog
200 200
 			messages. So set a large enough value (according your longest call
201 201
 			duration) to prevent problems in re-writing messages.
202
-			This key is only relevant for INVITE dialog. 
202
+			This key is only relevant for INVITE dialog.
203 203
                         SUBSCRIBE dialog records lifetime are based on value set in expires
204 204
                         header. Moreover each re-SUBSCRIBEs update the dialog timestamp.
205 205
 		</para>
... ...
@@ -272,7 +272,9 @@ end
272 272
 		<para>
273 273
 			Control what event_route blocks to be executed. It is a bitmask of:
274 274
 			1 - execute event_route[topos:msg-outgoing]; 2 - execute
275
-			event_route[topos:msg-sending].
275
+			event_route[topos:msg-sending]; 4 execute
276
+			event_route[topos:msg-incoming]; 8 execute
277
+			event_route[topos:msg-receiving];.
276 278
 		</para>
277 279
 		<para>
278 280
 		<emphasis>
... ...
@@ -501,7 +503,58 @@ modparam("topos", "xavu_contact_host", "contact_host")
501 503
 </programlisting>
502 504
 		</example>
503 505
 	</section>
506
+	<section id="topos.p.context">
507
+		<title><varname>context</varname> (str)</title>
508
+		<para>
509
+			Set the global context for topos instance.
510
+		</para>
511
+		<para>
512
+			The value has to be maximum 12 characters.
513
+		</para>
514
+		<para>
515
+		<emphasis>
516
+			Default value is <quote>NULL</quote> (disabled).
517
+		</emphasis>
518
+		</para>
519
+		<example>
520
+		<title>Set <varname>context</varname> parameter</title>
521
+		<programlisting format="linespecific">
522
+...
523
+modparam("topos", "context", "srvone")
524
+...
525
+</programlisting>
526
+		</example>
527
+	</section>
528
+	</section>
529
+
530
+	<section>
531
+	<title>Functions</title>
532
+	<section id="topos.f.tps_set_context">
533
+		<title>
534
+		<function moreinfo="none">tps_set_context(ctx)</function>
535
+		</title>
536
+		<para>
537
+			Update the context at runtime. If the value is emtpy string, then
538
+			the runtime context is reset.
539
+		</para>
540
+		<para>
541
+		This function can be used from ANY_ROUTE.
542
+		</para>
543
+		<example>
544
+		<title><function>tps_set_context</function> usage</title>
545
+		<programlisting format="linespecific">
546
+...
547
+request_route {
548
+    ...
549
+    tps_set_context("srvone");
550
+    ...
551
+}
552
+...
553
+</programlisting>
554
+		</example>
504 555
 	</section>
556
+	</section>
557
+
505 558
 	<section>
506 559
 	<title>Event Routes</title>
507 560
 	<section id="topos.e.msg_outgoing">
... ...
@@ -552,6 +605,57 @@ event_route[topos:msg-sending] {
552 605
   }
553 606
 }
554 607
 ...
608
+</programlisting>
609
+		</example>
610
+	</section>
611
+	<section id="topos.e.msg_incoming">
612
+		<title>event_route[topos:msg-incoming]</title>
613
+		<para>
614
+		It is executed before doing topology stripping processing for an incoming
615
+		SIP message. If 'drop' is executed inside the event route, then the
616
+		module skips doing the topology hiding.
617
+		</para>
618
+		<para>
619
+		Inside the event route the variables $si, $sp and
620
+		$proto point to the source address. The SIP message is not the one
621
+		to be sent out, but an internally generated one at startup, to avoid
622
+		reparsing the outgoing SIP message for the cases when topology hiding
623
+		is not wanted.
624
+		</para>
625
+		<example>
626
+		<title>Usage of event_route[topos:msg-incoming]</title>
627
+		<programlisting format="linespecific">
628
+...
629
+event_route[topos:msg-incoming] {
630
+  if($si=="10.1.1.10") {
631
+    drop;
632
+  }
633
+}
634
+...
635
+</programlisting>
636
+		</example>
637
+	</section>
638
+	<section id="topos.e.msg_receiving">
639
+		<title>event_route[topos:msg-receiving]</title>
640
+		<para>
641
+		It is executed before doing topology stripping processing for a SIP
642
+		message that was received, being executed after event_route[topos:msg-incoing].
643
+		</para>
644
+		<para>
645
+		Inside the event route the variables $si, $sp and
646
+		$proto point to the source address. The SIP message is the one
647
+		to be sent out.
648
+		</para>
649
+		<example>
650
+		<title>Usage of event_route[topos:msg-receoving]</title>
651
+		<programlisting format="linespecific">
652
+...
653
+event_route[topos:msg-receiving] {
654
+  if(is_request() and $fU=="alice") {
655
+    drop;
656
+  }
657
+}
658
+...
555 659
 </programlisting>
556 660
 		</example>
557 661
 	</section>
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>
Browse code

topos: add functionality to set a variable host part for the Contact header

- add functionality to set a variable host part for the Contact header
- could be refactored to use a xavp instead of avp, together with the other
parameters in this area ([a,b]_contact_avp)

Henning Westerholt authored on 31/03/2021 13:28:30
Showing 1 changed files
... ...
@@ -292,7 +292,8 @@ 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.
295
+			by topos. If the contact_host_avp parameter is set, this value is
296
+			ignored.
296 297
 
297 298
 			For example when using TLS with TOPOS the remote UAS must be able to open
298 299
 			a new TLS socket to the contact header.
... ...
@@ -433,6 +434,33 @@ modparam("topos", "b_contact_avp", "$avp(tps-bct)")
433 434
 ...
434 435
 modparam("topos", "rr_update", 1)
435 436
 ...
437
+</programlisting>
438
+		</example>
439
+	</section>
440
+	<section id="topos.p.contact_host_avp">
441
+		<title><varname>contact_host_avp</varname> (str)</title>
442
+		<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.
447
+
448
+			For example when using TLS with TOPOS the remote UAS must be able to open
449
+			a new TLS socket to the contact header.
450
+			In this case, the contact header must contain a domain name with a trusted CA
451
+			signed certitificate.
452
+		</para>
453
+		<para>
454
+		<emphasis>
455
+			Default value is empty, not set.
456
+		</emphasis>
457
+		</para>
458
+		<example>
459
+		<title>Set <varname>contact_host_avp</varname> parameter</title>
460
+		<programlisting format="linespecific">
461
+...
462
+modparam("topos", "contact_host_avp", "$avp(contact_host)")
463
+...
436 464
 </programlisting>
437 465
 		</example>
438 466
 	</section>
Browse code

topos: when contact mode is set to 1, contact uri created is malformed if received contact has no user part topos: SUBSCRIBE dialog topos: documentation for SUBSCRIBE dialog topos: add description for dialog_expire key

frederic authored on 08/02/2021 14:54:02
Showing 1 changed files
... ...
@@ -30,8 +30,8 @@
30 30
 		a dialog -- record_route() must be used for them as well, the
31 31
 		headers are not going to be in the messages sent to the network, they
32 32
 		are needed to know local addresses used to communicate with each side.
33
-		At this moment it is not designed to work for presence (SUBSCRIBE-based)
34
-		dialogs. The REGISTER and PUBLISH requests are skipped from processing
33
+                This module is designed to work for presence (SUBSCRIBE-based) dialogs too.
34
+		The REGISTER and PUBLISH requests are skipped from processing
35 35
 		by this module, expected to be terminated on a local SIP server.
36 36
 	</para>
37 37
 	</section>
... ...
@@ -199,6 +199,9 @@ modparam("topos", "branch_expire", 300)
199 199
 			after the initial call setup on re-INVITEs or other in-dialog
200 200
 			messages. So set a large enough value (according your longest call
201 201
 			duration) to prevent problems in re-writing messages.
202
+			This key is only relevant for INVITE dialog. 
203
+                        SUBSCRIBE dialog records lifetime are based on value set in expires
204
+                        header. Moreover each re-SUBSCRIBEs update the dialog timestamp.
202 205
 		</para>
203 206
 		<para>
204 207
 		<emphasis>
Browse code

topos: docs for rr_update parameter

balajee authored on 07/01/2021 08:37:28 • Daniel-Constantin Mierla committed on 07/01/2021 09:24:13
Showing 1 changed files
... ...
@@ -410,6 +410,26 @@ modparam("topos", "a_contact_avp", "$avp(tps-act)")
410 410
 ...
411 411
 modparam("topos", "b_contact_avp", "$avp(tps-bct)")
412 412
 ...
413
+</programlisting>
414
+		</example>
415
+	</section>
416
+	<section id="topos.p.rr_update">
417
+		<title><varname>rr_update</varname> (int)</title>
418
+		<para>
419
+			If set to 1, topos module will track and update record
420
+			route changes on re-invite.
421
+		</para>
422
+		<para>
423
+		<emphasis>
424
+			Default value is 0 (do not update record route changes within dialog).
425
+		</emphasis>
426
+		</para>
427
+		<example>
428
+		<title>Set <varname>rr_update</varname> parameter</title>
429
+		<programlisting format="linespecific">
430
+...
431
+modparam("topos", "rr_update", 1)
432
+...
413 433
 </programlisting>
414 434
 		</example>
415 435
 	</section>
Browse code

topos: docs - fix references to event route names

Daniel-Constantin Mierla authored on 29/09/2020 08:39:06
Showing 1 changed files
... ...
@@ -268,8 +268,8 @@ end
268 268
 		<title><varname>event_mode</varname> (int)</title>
269 269
 		<para>
270 270
 			Control what event_route blocks to be executed. It is a bitmask of:
271
-			1 - execute event_route[topos:outgoing]; 2 - execute
272
-			event_route[topos:sending].
271
+			1 - execute event_route[topos:msg-outgoing]; 2 - execute
272
+			event_route[topos:msg-sending].
273 273
 		</para>
274 274
 		<para>
275 275
 		<emphasis>
Browse code

topos: docs - more details about what SIP traffic is handled

Daniel-Constantin Mierla authored on 15/09/2020 05:33:00
Showing 1 changed files
... ...
@@ -16,20 +16,23 @@
16 16
 	<section>
17 17
 	<title>Overview</title>
18 18
 	<para>
19
-		This module offers topology hiding by stripping the SIP routing
20
-		headers that show topology details.
19
+		This module offers topology hiding for INVITE-based dialogs, by stripping
20
+		the SIP routing headers that show topology details .
21 21
 		The script interpreter gets the SIP messages with full content,
22 22
 		so all existing functionality is preserved.
23 23
 	</para>
24 24
 	<para>
25 25
 		The module is transparent for the configuration writer. It only needs to be
26
-		loaded (tune the parameters if needed).
26
+		loaded (tune the module parameters if needed).
27 27
 	</para>
28 28
 	<para>
29 29
 		It also works for SIP MESSAGE or other requests that do not create
30
-		a call dialog -- record_route() must be used for them as well, the
30
+		a dialog -- record_route() must be used for them as well, the
31 31
 		headers are not going to be in the messages sent to the network, they
32 32
 		are needed to know local addresses used to communicate with each side.
33
+		At this moment it is not designed to work for presence (SUBSCRIBE-based)
34
+		dialogs. The REGISTER and PUBLISH requests are skipped from processing
35
+		by this module, expected to be terminated on a local SIP server.
33 36
 	</para>
34 37
 	</section>
35 38
 	<section>
Browse code

topos: add two new modes for topology hiding to preserve Contact user

- add two new modes for topology hiding to preserve Contact user
- add new variables contact_mode, cparam_name, a_contact_avp and b_contact_avp
- if contact_mode is 1, the internal key will be stored in a URI parameter
instead of the Contact user, and the Contact users will be taken from the msg
- contact_mode 2 is the same as 1, but the Contact users will be taken from AVPs
- default is contact_mode 0 - the existing (old) behaviour

Henning Westerholt authored on 23/07/2020 13:48:58
Showing 1 changed files
... ...
@@ -304,6 +304,109 @@ modparam("topos", "event_mode", 2)
304 304
 ...
305 305
 modparam("topos", "contact_host", "proxy.domain.com")
306 306
 ...
307
+</programlisting>
308
+		</example>
309
+	</section>
310
+	<section id="topos.p.contact_mode">
311
+		<title><varname>contact_mode</varname> (int)</title>
312
+		<para>
313
+		Control the mode where the key to lookup the message data from
314
+		the database or redis server is stored. The default is to use
315
+		the Contact user (0), alternatively a Contact URI parameter
316
+		can be used (1) with values from the SIP message, or from AVP
317
+		variables (2). This can be useful for interoperating which
318
+		gateways that need a certain user part in the Contact URI.
319
+		</para>
320
+		<para>In mode (1) the a-side contact user is taken from the
321
+		request URI and the b-side contact user from the Contact header
322
+		of the processed initial SIP request.
323
+		</para>
324
+		<para>If you use the mode (2), you need to configure the
325
+		<emphasis>a_contact_avp</emphasis> and <emphasis>b_contact_avp</emphasis>
326
+		parameter. Furthermore you need to assign values to them during
327
+		the processing of the initial SIP request.
328
+		</para>
329
+		<para>
330
+		The name of the Contact URI parameter can be customized with
331
+		the <emphasis>cparam_name</emphasis> parameter.
332
+		</para>
333
+		<para>
334
+		<emphasis>
335
+			Default value is 0 - use the Contact user
336
+		</emphasis>
337
+		</para>
338
+		<example>
339
+		<title>Set <varname>contact_mode</varname> parameter</title>
340
+		<programlisting format="linespecific">
341
+...
342
+modparam("topos", "contact_mode", 1)
343
+...
344
+</programlisting>
345
+		</example>
346
+	</section>
347
+	<section id="topos.p.cparam_name">
348
+		<title><varname>cparam_name</varname> (int)</title>
349
+		<para>
350
+		Name of the Contact URI parameter to store the database or
351
+		redis server key for message lookup.
352
+		</para>
353
+		<para>
354
+		This parameter is only used when the <emphasis>contact_mode</emphasis>
355
+		parameter is set to <emphasis>1</emphasis> or <emphasis>2</emphasis>.
356
+		</para>
357
+		<para>
358
+		<emphasis>
359
+			Default value is <quote>tps</quote>.
360
+		</emphasis>
361
+		</para>
362
+		<example>
363
+		<title>Set <varname>cparam_name</varname> parameter</title>
364
+		<programlisting format="linespecific">
365
+...
366
+modparam("topos", "cparam_name", "xyz")
367
+...
368
+</programlisting>
369
+		</example>
370
+	</section>
371
+	<section id="topos.p.a_contact_avp">
372
+		<title><varname>a_contact_avp</varname> (str)</title>
373
+		<para>
374
+			Name of the AVP parameter to evaluate for the A-side
375
+			Contact Header user part. This parameter is only
376
+			necessary in contact_mode (2).
377
+		</para>
378
+		<para>
379
+		<emphasis>
380
+			Default value is <quote>NULL</quote> (disabled).
381
+		</emphasis>
382
+		</para>
383
+		<example>
384
+		<title>Set <varname>a_contact_avp</varname> parameter</title>
385
+		<programlisting format="linespecific">
386
+...
387
+modparam("topos", "a_contact_avp", "$avp(tps-act)")
388
+...
389
+</programlisting>
390
+		</example>
391
+	</section>
392
+	<section id="topos.p.b_contact_avp">
393
+		<title><varname>b_contact_avp</varname> (str)</title>
394
+		<para>
395
+			Name of the AVP parameter to evaluate for the B-side
396
+			Contact Header user part. This parameter is only
397
+			necessary in contact_mode (2).
398
+		</para>
399
+		<para>
400
+		<emphasis>
401
+			Default value is <quote>NULL</quote> (disabled).
402
+		</emphasis>
403
+		</para>
404
+		<example>
405
+		<title>Set <varname>b_contact_avp</varname> parameter</title>
406
+		<programlisting format="linespecific">
407
+...
408
+modparam("topos", "b_contact_avp", "$avp(tps-bct)")
409
+...
307 410
 </programlisting>
308 411
 		</example>
309 412
 	</section>
Browse code

topos: fix documentation for msg-sending event_route (GH #2115)

Henning Westerholt authored on 31/10/2019 11:30:46
Showing 1 changed files
... ...
@@ -341,7 +341,7 @@ event_route[topos:msg-outgoing] {
341 341
 		<title>event_route[topos:msg-sending]</title>
342 342
 		<para>
343 343
 		It is executed before doing topology stripping processing for a SIP
344
-		message to be sent out, being executed after event_route[topos:sending].
344
+		message to be sent out, being executed after event_route[topos:msg-outgoing].
345 345
 		</para>
346 346
 		<para>
347 347
 		Inside the event route the variables $sndto(ip), $sndto(port) and
Browse code

topos: docs for dialog_expire param limitation for in-dialog requests (GH #2024)

Henning Westerholt authored on 12/08/2019 18:52:50
Showing 1 changed files
... ...
@@ -192,6 +192,10 @@ modparam("topos", "branch_expire", 300)
192 192
 		<title><varname>dialog_expire</varname> (int)</title>
193 193
 		<para>
194 194
 			Interval in seconds after which the dialog records are deleted.
195
+			Keep in mind that the module does not update the dialog timestamp
196
+			after the initial call setup on re-INVITEs or other in-dialog
197
+			messages. So set a large enough value (according your longest call
198
+			duration) to prevent problems in re-writing messages.
195 199
 		</para>
196 200
 		<para>
197 201
 		<emphasis>
Browse code

topos: docs - replaced c&p topoh with topos

Daniel-Constantin Mierla authored on 24/10/2018 12:49:10
Showing 1 changed files
... ...
@@ -150,7 +150,7 @@ modparam("topos", "mask_callid", 1)
150 150
 	<section id="topos.p.sanity_checks">
151 151
 		<title><varname>sanity_checks</varname> (int)</title>
152 152
 		<para>
153
-			If set to 1, topoh module will bind to sanity module in order
153
+			If set to 1, topos module will bind to sanity module in order
154 154
 			to perform sanity checks over received SIP request. Default
155 155
 			sanity checks are done. It is useful to check if received request
156 156
 			is well formatted before proceeding to encoding/decoding.
... ...
@@ -164,7 +164,7 @@ modparam("topos", "mask_callid", 1)
164 164
 		<title>Set <varname>sanity_checks</varname> parameter</title>
165 165
 		<programlisting format="linespecific">
166 166
 ...
167
-modparam("topoh", "sanity_checks", 1)
167
+modparam("topos", "sanity_checks", 1)
168 168
 ...
169 169
 </programlisting>
170 170
 		</example>
Browse code

Merge pull request #1596 from jchavanton/topos_contact_host

topos: adding param contact_hostname

Daniel-Constantin Mierla authored on 14/08/2018 07:58:48 • GitHub committed on 14/08/2018 07:58:48
Showing 0 changed files
Browse code

topos: docs - ids for sections with event routes

Daniel-Constantin Mierla authored on 29/07/2018 21:32:45
Showing 1 changed files
... ...
@@ -281,7 +281,7 @@ modparam("topos", "event_mode", 2)
281 281
 	</section>
282 282
 	<section>
283 283
 	<title>Event Routes</title>
284
-	<section>
284
+	<section id="topos.e.msg_outgoing">
285 285
 		<title>event_route[topos:msg-outgoing]</title>
286 286
 		<para>
287 287
 		It is executed before doing topology stripping processing for an outgoing
... ...
@@ -308,7 +308,7 @@ event_route[topos:msg-outgoing] {
308 308
 </programlisting>
309 309
 		</example>
310 310
 	</section>
311
-	<section>
311
+	<section id="topos.e.msg_sending">
312 312
 		<title>event_route[topos:msg-sending]</title>
313 313
 		<para>
314 314
 		It is executed before doing topology stripping processing for a SIP
Browse code

topos: adding param contact_host

Julien Chavanton authored on 17/07/2018 16:29:40
Showing 1 changed files
... ...
@@ -275,6 +275,31 @@ end
275 275
 ...
276 276
 modparam("topos", "event_mode", 2)
277 277
 ...
278
+</programlisting>
279
+		</example>
280
+	</section>
281
+	<section id="topos.p.contact_host">
282
+		<title><varname>contact_host</varname> (str)</title>
283
+		<para>
284
+			You may need to control the host part of the Contact header added
285
+			by topos.
286
+
287
+			For example when using TLS with TOPOS the remote UAS must be able to open
288
+			a new TLS socket to the contact header.
289
+			In this case, the contact header must contain a domain name with a trusted CA
290
+			signed certitificate.
291
+		</para>
292
+		<para>
293
+		<emphasis>
294
+			Default value is taken from the Record-Route URI.
295
+		</emphasis>
296
+		</para>
297
+		<example>
298
+		<title>Set <varname>contact_host</varname> parameter</title>
299
+		<programlisting format="linespecific">
300
+...
301
+modparam("topos", "contact_host", "proxy.domain.com")
302
+...
278 303
 </programlisting>
279 304
 		</example>
280 305
 	</section>
Browse code

topos: documentation for event_mode param and event_route[topos:msg-sending]

Daniel-Constantin Mierla authored on 03/07/2018 06:55:28
Showing 1 changed files
... ...
@@ -254,6 +254,27 @@ function ksr_topos_event(evname)
254 254
 	return 1;
255 255
 end
256 256
 ...
257
+</programlisting>