@@ -33,6 +33,7 @@ B2B_LOGIC
33
33
1.4.17. db_table (str)
34
34
1.4.18. b2bl_th_init_timeout (int)
35
35
1.4.19. b2bl_early_update (int)
36
+ 1.4.20. old_entity_term_delay (int)
36
37
37
38
1.5. Exported Functions
38
39
@@ -58,7 +59,9 @@ B2B_LOGIC
58
59
59
60
1.5.9. b2b_delete_entity()
60
61
1.5.10. b2b_end_dlg_leg()
61
- 1.5.11. b2b_bridge_request(b2bl_key,entity_no)
62
+ 1.5.11. b2b_bridge_request(b2bl_key,entity_no,
63
+ [adv_contact], [flags])
64
+
62
65
1.5.12. b2b_trigger_scenario(scenario, [params],
63
66
peer1, [extra_headers_peer1],
64
67
[extra_headers_contents_peer1], peer2
@@ -128,22 +131,23 @@ B2B_LOGIC
128
131
1.18. Set db_table parameter
129
132
1.19. Set b2bl_th_init_timeout parameter
130
133
1.20. Set b2bl_early_update parameter
131
- 1.21. b2b_init_request usage
132
- 1.22. b2b_server_new usage
133
- 1.23. b2b_client_new usage
134
- 1.24. b2b_bridge usage
134
+ 1.21. Set old_entity_term_delay parameter
135
+ 1.22. b2b_init_request usage
136
+ 1.23. b2b_server_new usage
137
+ 1.24. b2b_client_new usage
135
138
1.25. b2b_bridge usage
136
- 1.26. b2b_pass_request usage
137
- 1.27. b2b_handle_reply usage
138
- 1.28. b2b_send_reply usage
139
- 1.29. b2b_delete_entity usage
140
- 1.30. b2b_end_dlg_leg usage
141
- 1.31. b2b_bridge_request usage
142
- 1.32. b2b_trigger_scenario usage
143
- 1.33. $b2b_logic.key usage
144
- 1.34. $b2b_logic.entity usage
145
- 1.35. $b2b_logic.ctx usage
146
- 1.36. $b2b_logic.scenario usage
139
+ 1.26. b2b_bridge usage
140
+ 1.27. b2b_pass_request usage
141
+ 1.28. b2b_handle_reply usage
142
+ 1.29. b2b_send_reply usage
143
+ 1.30. b2b_delete_entity usage
144
+ 1.31. b2b_end_dlg_leg usage
145
+ 1.32. b2b_bridge_request usage
146
+ 1.33. b2b_trigger_scenario usage
147
+ 1.34. $b2b_logic.key usage
148
+ 1.35. $b2b_logic.entity usage
149
+ 1.36. $b2b_logic.ctx usage
150
+ 1.37. $b2b_logic.scenario usage
147
151
2.1. b2bl_api_t structure
148
152
149
153
Chapter 1. Admin Guide
@@ -490,6 +494,22 @@ modparam("b2b_logic", "b2bl_th_init_timeout", 60)
490
494
modparam("b2b_logic", "b2bl_early_update", 1)
491
495
...
492
496
497
+ 1.4.20. old_entity_term_delay (int)
498
+
499
+ When the b2b_bridge_request is being used with the late_bye
500
+ flag, this parameter can delay the moment when the BYE is being
501
+ sent to the terminating entity. Thus, instead of terminating it
502
+ when the new entity is established, the BYE is delayed with the
503
+ value of this param, expressed in seconds.
504
+
505
+ Default value is “0” - send BYE on the spot
506
+
507
+ Example 1.21. Set old_entity_term_delay parameter
508
+ ...
509
+ modparam("b2b_logic", "old_entity_term_delay", 2) # delay the BYE with 2
510
+ seconds
511
+ ...
512
+
493
513
1.5. Exported Functions
494
514
495
515
1.5.1. b2b_init_request(id, [flags], [req_route], [reply_route],
538
558
correctly routed, but the SIP pacakge may be invalid (as
539
559
Contact, Via, etc).
540
560
541
- Example 1.21 . b2b_init_request usage
561
+ Example 1.22 . b2b_init_request usage
542
562
...
543
563
if(is_method("INVITE") && !has_totag() && prepaid_user()) {
544
564
...
@@ -575,7 +595,7 @@ if(is_method("INVITE") && !has_totag() && prepaid_user()) {
575
595
576
596
This function can be used from REQUEST_ROUTE.
577
597
578
- Example 1.22 . b2b_server_new usage
598
+ Example 1.23 . b2b_server_new usage
579
599
...
580
600
if(is_method("INVITE") && !has_totag()) {
581
601
b2b_server_new("server1", $avp(b2b_hdrs), $avp(b2b_hdr_bodies));
@@ -612,7 +632,7 @@ if(is_method("INVITE") && !has_totag()) {
612
632
This function can be used from REQUEST_ROUTE and the b2b_logic
613
633
request routes.
614
634
615
- Example 1.23 . b2b_client_new usage
635
+ Example 1.24 . b2b_client_new usage
616
636
...
617
637
b2b_client_new("client1", "sip:
[email protected] ");
618
638
...
656
676
657
677
This function can be used from the b2b_logic request routes.
658
678
659
- Example 1.24 . b2b_bridge usage
679
+ Example 1.25 . b2b_bridge usage
660
680
...
661
681
route[b2b_logic_request] {
662
682
...
@@ -677,7 +697,7 @@ route[b2b_logic_request] {
677
697
678
698
This function can be used from the b2b_logic reply route.
679
699
680
- Example 1.25 . b2b_bridge usage
700
+ Example 1.26 . b2b_bridge usage
681
701
...
682
702
route[b2b_logic_reply] {
683
703
...
@@ -702,7 +722,7 @@ route[b2b_logic_reply] {
702
722
703
723
This function can be used from the b2b_logic request routes.
704
724
705
- Example 1.26 . b2b_pass_request usage
725
+ Example 1.27 . b2b_pass_request usage
706
726
...
707
727
route[b2b_logic_request] {
708
728
if ($rm != "BYE") {
@@ -723,7 +743,7 @@ route[b2b_logic_request] {
723
743
724
744
This function can be used from the b2b_logic reply routes.
725
745
726
- Example 1.27 . b2b_handle_reply usage
746
+ Example 1.28 . b2b_handle_reply usage
727
747
...
728
748
route[b2b_logic_reply] {
729
749
xlog("B2B REPLY: [$rs $rm] from entity: $b2b_logic.entity(id)\n");
@@ -744,7 +764,7 @@ route[b2b_logic_reply] {
744
764
745
765
This function can be used from the b2b_logic request routes.
746
766
747
- Example 1.28 . b2b_send_reply usage
767
+ Example 1.29 . b2b_send_reply usage
748
768
...
749
769
route[b2b_logic_request] {
750
770
if ($rm == "REFER") {
@@ -760,7 +780,7 @@ route[b2b_logic_request] {
760
780
761
781
This function can be used from the b2b_logic request routes.
762
782
763
- Example 1.29 . b2b_delete_entity usage
783
+ Example 1.30 . b2b_delete_entity usage
764
784
...
765
785
route[b2b_logic_request] {
766
786
if ($rm == "BYE") {
@@ -780,7 +800,7 @@ route[b2b_logic_request] {
780
800
This function can be used from the b2b_logic request or reply
781
801
routes.
782
802
783
- Example 1.30 . b2b_end_dlg_leg usage
803
+ Example 1.31 . b2b_end_dlg_leg usage
784
804
...
785
805
route[b2b_logic_request] {
786
806
if ($rm == "REFER") {
@@ -790,7 +810,8 @@ route[b2b_logic_request] {
790
810
}
791
811
...
792
812
793
- 1.5.11. b2b_bridge_request(b2bl_key,entity_no)
813
+ 1.5.11. b2b_bridge_request(b2bl_key,entity_no, [adv_contact],
814
+ [flags])
794
815
795
816
This function will bridge an initial INVITE with one of the
796
817
particapnts from an existing b2b session.
@@ -801,8 +822,15 @@ route[b2b_logic_request] {
801
822
callid;from-tag;to-tag.
802
823
* entity_no (int) - an integer that holds the entity of the
803
824
entity/participant to bridge.
825
+ * adv_contact (string, optional) - Contact header to
826
+ advertise in generated messages.
827
+ * flags (string, optional) - Flags that can modify the
828
+ behavior of the function. Available flags are:
829
+ + late_bye - instead of terminating the replaced entity
830
+ on the stop, leave it pending until the new enity
831
+ fully establishes.
804
832
805
- Example 1.31 . b2b_bridge_request usage
833
+ Example 1.32 . b2b_bridge_request usage
806
834
...
807
835
if ($rU == "pickup") {
808
836
# get the b2b logic key of the parked call for this user
@@ -867,7 +895,7 @@ if ($rU == "pickup") {
867
895
868
896
This function can be used from REQUEST_ROUTE.
869
897
870
- Example 1.32 . b2b_trigger_scenario usage
898
+ Example 1.33 . b2b_trigger_scenario usage
871
899
...
872
900
if(is_method("REFER") && !has_totag()) {
873
901
$avp(header) = "Replaces";
@@ -975,7 +1003,7 @@ nsips.org
975
1003
dedicated routes defined through the b2b_entities and b2b_logic
976
1004
modules.
977
1005
978
- Example 1.33 . $b2b_logic.key usage
1006
+ Example 1.34 . $b2b_logic.key usage
979
1007
...
980
1008
local_route {
981
1009
...
@@ -1019,7 +1047,7 @@ local_route {
1019
1047
dedicated routes defined through the b2b_entities and b2b_logic
1020
1048
modules.
1021
1049
1022
- Example 1.34 . $b2b_logic.entity usage
1050
+ Example 1.35 . $b2b_logic.entity usage
1023
1051
...
1024
1052
modparam("b2b_entities", "script_request_route", "b2b_request")
1025
1053
...
@@ -1048,7 +1076,7 @@ route[b2b_request] {
1048
1076
Setting the variable to NULL will delete the value at the given
1049
1077
key.
1050
1078
1051
- Example 1.35 . $b2b_logic.ctx usage
1079
+ Example 1.36 . $b2b_logic.ctx usage
1052
1080
...
1053
1081
modparam("b2b_entities", "script_reply_route", "b2b_reply")
1054
1082
...
@@ -1076,7 +1104,7 @@ route[b2b_reply] {
1076
1104
dedicated routes defined through the b2b_entities and b2b_logic
1077
1105
modules.
1078
1106
1079
- Example 1.36 . $b2b_logic.scenario usage
1107
+ Example 1.37 . $b2b_logic.scenario usage
1080
1108
...
1081
1109
route[b2b_logic_request] {
1082
1110
if ($b2b_logic.scenario == "prepaid") {
@@ -1240,7 +1268,7 @@ Chapter 3. Contributors
1240
1268
commits^(2) and lines added/removed^(3)
1241
1269
Name DevScore Commits Lines ++ Lines --
1242
1270
1. Vlad Patrascu (@rvlad-patrascu) 235 57 8167 6793
1243
- 2. Razvan Crainea (@razvancrainea) 26 15 776 227
1271
+ 2. Razvan Crainea (@razvancrainea) 32 17 1119 294
1244
1272
3. Nick Altmann (@nikbyte) 14 10 346 36
1245
1273
4. Bogdan-Andrei Iancu (@bogdan-iancu) 12 8 144 66
1246
1274
5. Carsten Bock 12 5 679 23
@@ -1272,7 +1300,7 @@ Chapter 3. Contributors
1272
1300
1273
1301
Table 3.2. Most recently active contributors^(1) to this module
1274
1302
Name Commit Activity
1275
- 1. Razvan Crainea (@razvancrainea) Jan 2021 - Dec 2023
1303
+ 1. Razvan Crainea (@razvancrainea) Jan 2021 - Jan 2024
1276
1304
2. Bogdan-Andrei Iancu (@bogdan-iancu) Apr 2021 - Dec 2023
1277
1305
3. Maksym Sobolyev (@sobomax) Jan 2021 - Nov 2023
1278
1306
4. Rick Barenthin Nov 2023 - Nov 2023
@@ -1293,8 +1321,8 @@ Chapter 4. Documentation
1293
1321
1294
1322
4.1. Contributors
1295
1323
1296
- Last edited by: Vlad Patrascu (@rvlad-patrascu ), Carsten Bock,
1297
- Nick Altmann (@nikbyte).
1324
+ Last edited by: Razvan Crainea (@razvancrainea ), Vlad Patrascu
1325
+ (@rvlad-patrascu), Carsten Bock, Nick Altmann (@nikbyte).
1298
1326
1299
1327
Documentation Copyrights:
1300
1328
0 commit comments