Browse code

modules: readme files regenerated - kazoo ... [skip ci]

Kamailio Dev authored on 21/05/2020 14:31:17
Showing 1 changed files
... ...
@@ -38,6 +38,7 @@ Luis Azedo
38 38
                     4.1.4. amqp_consumer_event_subkey(str)
39 39
                     4.1.5. amqp_max_channels(str)
40 40
                     4.1.6. amqp_connection(str)
41
+                    4.1.7. event_callback(str)
41 42
 
42 43
               4.2. execution control
43 44
 
... ...
@@ -97,28 +98,29 @@ Luis Azedo
97 97
    1.5. Set amqp_consumer_event_subkey parameter
98 98
    1.6. Set amqp_max_channels parameter
99 99
    1.7. Set amqp_connection parameter
100
-   1.8. Set amqp_consumer_loop_count parameter
101
-   1.9. Set amqp_internal_loop_count parameter
102
-   1.10. Set amqp_consumer_ack_loop_count parameter
103
-   1.11. Set consume_messages_on_reconnect parameter
104
-   1.12. Set single_consumer_on_reconnect parameter
105
-   1.13. Set amqp_consumer_ack_timeout parameter
106
-   1.14. Set amqp_interprocess_timeout parameter
107
-   1.15. Set amqp_waitframe_timeout parameter
108
-   1.16. Set amqp_query_timeout parameter
109
-   1.17. >Set amqp_query_timeout_avp parameter
110
-   1.18. Set db_url parameter
111
-   1.19. Set presentity_table parameter
112
-   1.20. Set pua_mode parameter
113
-   1.21. kazoo_publish usage
114
-   1.22. kazoo_query usage
115
-   1.23. kazoo_subscribe usage
100
+   1.8. Set event_callback parameter
101
+   1.9. Set amqp_consumer_loop_count parameter
102
+   1.10. Set amqp_internal_loop_count parameter
103
+   1.11. Set amqp_consumer_ack_loop_count parameter
104
+   1.12. Set consume_messages_on_reconnect parameter
105
+   1.13. Set single_consumer_on_reconnect parameter
106
+   1.14. Set amqp_consumer_ack_timeout parameter
107
+   1.15. Set amqp_interprocess_timeout parameter
108
+   1.16. Set amqp_waitframe_timeout parameter
109
+   1.17. Set amqp_query_timeout parameter
110
+   1.18. >Set amqp_query_timeout_avp parameter
111
+   1.19. Set db_url parameter
112
+   1.20. Set presentity_table parameter
113
+   1.21. Set pua_mode parameter
114
+   1.22. kazoo_publish usage
115
+   1.23. kazoo_query usage
116 116
    1.24. kazoo_subscribe usage
117
-   1.25. kazoo_pua_publish usage
118
-   1.26. kazoo_encode usage
119
-   1.27. kazoo_json usage
120
-   1.28. kz.json usage
121
-   1.29. kz.encode usage
117
+   1.25. kazoo_subscribe usage
118
+   1.26. kazoo_pua_publish usage
119
+   1.27. kazoo_encode usage
120
+   1.28. kazoo_json usage
121
+   1.29. kz.json usage
122
+   1.30. kz.encode usage
122 123
 
123 124
 Chapter 1. Admin Guide
124 125
 
... ...
@@ -145,6 +147,7 @@ Chapter 1. Admin Guide
145 145
               4.1.4. amqp_consumer_event_subkey(str)
146 146
               4.1.5. amqp_max_channels(str)
147 147
               4.1.6. amqp_connection(str)
148
+              4.1.7. event_callback(str)
148 149
 
149 150
         4.2. execution control
150 151
 
... ...
@@ -317,6 +320,7 @@ event_route[kazoo:consumer-event]
317 317
         4.1.4. amqp_consumer_event_subkey(str)
318 318
         4.1.5. amqp_max_channels(str)
319 319
         4.1.6. amqp_connection(str)
320
+        4.1.7. event_callback(str)
320 321
 
321 322
    4.2. execution control
322 323
 
... ...
@@ -410,6 +414,20 @@ modparam("kazoo", "amqp_connection", "amqp://guest:guest@localhost:5672")
410 410
 modparam("kazoo", "amqp_connection", "kazoo://guest:guest@otherhost:5672")
411 411
 ...
412 412
 
413
+4.1.7. event_callback(str)
414
+
415
+   The name of the function in the kemi configuration file (embedded
416
+   scripting language such as Lua, Python, ...) to be executed instead of
417
+   event_route[...] blocks.
418
+
419
+   The function receives a string parameter with the name of the event,
420
+   the values can be: 'kazoo:mod-init', 'kazoo:consumer-event'.
421
+
422
+   Example 1.8. Set event_callback parameter
423
+    ...
424
+    modparam("kazoo", "event_callback", "ksr_kazoo_event")
425
+    ...
426
+
413 427
 4.2. execution control
414 428
 
415 429
    execution control of main loop can be controlled by changing the
... ...
@@ -436,7 +454,7 @@ while(true) // main  loop
436 436
 
437 437
    Default value is 10.
438 438
 
439
-   Example 1.8. Set amqp_consumer_loop_count parameter
439
+   Example 1.9. Set amqp_consumer_loop_count parameter
440 440
 ...
441 441
 modparam("kazoo", "amqp_consumer_loop_count", 3)
442 442
 ...
... ...
@@ -447,7 +465,7 @@ modparam("kazoo", "amqp_consumer_loop_count", 3)
447 447
 
448 448
    Default value is 5.
449 449
 
450
-   Example 1.9. Set amqp_internal_loop_count parameter
450
+   Example 1.10. Set amqp_internal_loop_count parameter
451 451
 ...
452 452
 modparam("kazoo", "amqp_internal_loop_count", 1)
453 453
 ...
... ...
@@ -458,7 +476,7 @@ modparam("kazoo", "amqp_internal_loop_count", 1)
458 458
 
459 459
    Default value is 20.
460 460
 
461
-   Example 1.10. Set amqp_consumer_ack_loop_count parameter
461
+   Example 1.11. Set amqp_consumer_ack_loop_count parameter
462 462
 ...
463 463
 modparam("kazoo", "amqp_consumer_ack_loop_count", 5)
464 464
 ...
... ...
@@ -470,7 +488,7 @@ modparam("kazoo", "amqp_consumer_ack_loop_count", 5)
470 470
 
471 471
    Default value is 1.
472 472
 
473
-   Example 1.11. Set consume_messages_on_reconnect parameter
473
+   Example 1.12. Set consume_messages_on_reconnect parameter
474 474
 ...
475 475
 modparam("kazoo", "consume_messages_on_reconnect", 0)
476 476
 ...
... ...
@@ -483,7 +501,7 @@ modparam("kazoo", "consume_messages_on_reconnect", 0)
483 483
 
484 484
    Default value is 1.
485 485
 
486
-   Example 1.12. Set single_consumer_on_reconnect parameter
486
+   Example 1.13. Set single_consumer_on_reconnect parameter
487 487
 ...
488 488
 modparam("kazoo", "single_consumer_on_reconnect", 0)
489 489
 ...
... ...
@@ -499,7 +517,7 @@ modparam("kazoo", "single_consumer_on_reconnect", 0)
499 499
 
500 500
    Default value is 100000 micro.
501 501
 
502
-   Example 1.13. Set amqp_consumer_ack_timeout parameter
502
+   Example 1.14. Set amqp_consumer_ack_timeout parameter
503 503
 ...
504 504
 modparam("kazoo", "amqp_consumer_ack_timeout_sec", 1)
505 505
 modparam("kazoo", "amqp_consumer_ack_timeout_micro", 200000)
... ...
@@ -512,7 +530,7 @@ modparam("kazoo", "amqp_consumer_ack_timeout_micro", 200000)
512 512
 
513 513
    Default value is 100000 micro.
514 514
 
515
-   Example 1.14. Set amqp_interprocess_timeout parameter
515
+   Example 1.15. Set amqp_interprocess_timeout parameter
516 516
 ...
517 517
 modparam("kazoo", "amqp_interprocess_timeout_sec", 1)
518 518
 modparam("kazoo", "amqp_interprocess_timeout_micro", 200000)
... ...
@@ -524,7 +542,7 @@ modparam("kazoo", "amqp_interprocess_timeout_micro", 200000)
524 524
 
525 525
    Default value is 100000 micro.
526 526
 
527
-   Example 1.15. Set amqp_waitframe_timeout parameter
527
+   Example 1.16. Set amqp_waitframe_timeout parameter
528 528
 ...
529 529
 modparam("kazoo", "amqp_waitframe_timeout_sec", 1)
530 530
 modparam("kazoo", "amqp_waitframe_timeout_micro", 200000)
... ...
@@ -537,7 +555,7 @@ modparam("kazoo", "amqp_waitframe_timeout_micro", 200000)
537 537
 
538 538
    Default value is 2 sec.
539 539
 
540
-   Example 1.16. Set amqp_query_timeout parameter
540
+   Example 1.17. Set amqp_query_timeout parameter
541 541
 ...
542 542
 modparam("kazoo", "amqp_query_timeout_sec", 1)
543 543
 modparam("kazoo", "amqp_query_timeout_micro", 200000)
... ...
@@ -550,7 +568,7 @@ modparam("kazoo", "amqp_query_timeout_micro", 200000)
550 550
 
551 551
    Default value is NULL (no value).
552 552
 
553
-   Example 1.17. >Set amqp_query_timeout_avp parameter
553
+   Example 1.18. >Set amqp_query_timeout_avp parameter
554 554
 ...
555 555
 modparam("kazoo", "amqp_query_timeout_avp", "$var(kz_timeout)")
556 556
 
... ...
@@ -573,7 +591,7 @@ route[SOME_ROUTE]
573 573
 
574 574
    Default value is “NULL”.
575 575
 
576
-   Example 1.18. Set db_url parameter
576
+   Example 1.19. Set db_url parameter
577 577
 ...
578 578
 modparam("kazoo", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
579 579
 ...
... ...
@@ -584,7 +602,7 @@ modparam("kazoo", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
584 584
 
585 585
    Default value is “presentity”.
586 586
 
587
-   Example 1.19. Set presentity_table parameter
587
+   Example 1.20. Set presentity_table parameter
588 588
 ...
589 589
 modparam("kazoo", "presentity_table", "my_presentity_table")
590 590
 ...
... ...
@@ -596,7 +614,7 @@ modparam("kazoo", "presentity_table", "my_presentity_table")
596 596
 
597 597
    Default value is “1”.
598 598
 
599
-   Example 1.20. Set pua_mode parameter
599
+   Example 1.21. Set pua_mode parameter
600 600
 ...
601 601
 modparam("kazoo", "pua_mode", 0)
602 602
 ...
... ...
@@ -632,7 +650,7 @@ modparam("kazoo", "pua_mode", 0)
632 632
 
633 633
    This function can be used from ANY ROUTE.
634 634
 
635
-   Example 1.21. kazoo_publish usage
635
+   Example 1.22. kazoo_publish usage
636 636
 ...
637 637
 $var(amqp_payload_request) = "{'Event-Category' : 'directory', 'Event-Name' : 'r
638 638
 eg_success', 'Contact' : '" + $var(fs_contact) + "', 'Call-ID' : '" + $ci + "',
... ...
@@ -652,7 +670,7 @@ kazoo_publish("callmgr", $var(amqp_routing_key), $var(amqp_payload_request));
652 652
 
653 653
    This function can be used from ANY ROUTE.
654 654
 
655
-   Example 1.22. kazoo_query usage
655
+   Example 1.23. kazoo_query usage
656 656
 ...
657 657
 $var(amqp_payload_request) = "{'Event-Category' : 'call_event' , 'Event-Name' :
658 658
 'query_user_channels_req', 'Realm' : '" + $fd + "', 'Username' : '" + $fU + "',
... ...
@@ -676,7 +694,7 @@ var(amqp_result)")) {
676 676
 
677 677
    This function must be called from event_route[kazoo:mod-init].
678 678
 
679
-   Example 1.23. kazoo_subscribe usage
679
+   Example 1.24. kazoo_subscribe usage
680 680
 ...
681 681
 event_route[kazoo:mod-init]
682 682
 {
... ...
@@ -708,7 +726,7 @@ event_route[kazoo:consumer-event]
708 708
 
709 709
    This function must be called from event_route[kazoo:mod-init].
710 710
 
711
-   Example 1.24. kazoo_subscribe usage
711
+   Example 1.25. kazoo_subscribe usage
712 712
 ...
713 713
 event_route[kazoo:mod-init]
714 714
 {
... ...
@@ -733,7 +751,7 @@ event_route[kazoo:consumer-event]
733 733
 
734 734
    This function can be used from ANY ROUTE.
735 735
 
736
-   Example 1.25. kazoo_pua_publish usage
736
+   Example 1.26. kazoo_pua_publish usage
737 737
 ...
738 738
 event_route[kazoo:consumer-event-presence-update]
739 739
 {
... ...
@@ -754,7 +772,7 @@ son,From})");
754 754
 
755 755
    This function can be used from ANY ROUTE.
756 756
 
757
-   Example 1.26. kazoo_encode usage
757
+   Example 1.27. kazoo_encode usage
758 758
 ...
759 759
 kazoo_encode("$ci", "$var(callid_encoded)");
760 760
 $var(amqp_routing_key) = "call.status_req.$var(callid_encoded)";
... ...
@@ -767,7 +785,7 @@ $var(amqp_routing_key) = "call.status_req.$var(callid_encoded)";
767 767
 
768 768
    This function can be used from ANY ROUTE.
769 769
 
770
-   Example 1.27. kazoo_json usage
770
+   Example 1.28. kazoo_json usage
771 771
 ...
772 772
 kazoo_json("$var(amqp_result)", "Channels[0].switch_url", "$du");
773 773
 if($du != $null) {
... ...
@@ -785,7 +803,7 @@ if($du != $null) {
785 785
 
786 786
    The prefix for kazoo transformations is kz.
787 787
      * json
788
-       Example 1.28. kz.json usage
788
+       Example 1.29. kz.json usage
789 789
 ...
790 790
 #kazoo_json("$var(amqp_result)", "Channels[0].switch_url", "$du");
791 791
 $du = $kzR{kz.json,Channels[0].switch_url};
... ...
@@ -795,7 +813,7 @@ if($du != $null) {
795 795
 }
796 796
 ...
797 797
      * encode
798
-       Example 1.29. kz.encode usage
798
+       Example 1.30. kz.encode usage
799 799
 ...
800 800
 #kazoo_encode("$ci", "$var(callid_encoded)");
801 801
 #$var(amqp_routing_key) = "call.status_req.$var(callid_encoded)";