Quellcode durchsuchen

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

Kamailio Dev vor 7 Jahren
Ursprung
Commit
4f8a2becb5
1 geänderte Dateien mit 75 neuen und 42 gelöschten Zeilen
  1. 75 42
      src/modules/uac/README

+ 75 - 42
src/modules/uac/README

@@ -49,6 +49,7 @@ Ramona-Elena Modroiu
               3.16. reg_db_table (string)
               3.16. reg_db_table (string)
               3.17. reg_contact_addr (string)
               3.17. reg_contact_addr (string)
               3.18. reg_keep_callid (string)
               3.18. reg_keep_callid (string)
+              3.19. reg_active (int)
 
 
         4. Functions
         4. Functions
 
 
@@ -81,6 +82,7 @@ Ramona-Elena Modroiu
               8.4. uac.reg_disable
               8.4. uac.reg_disable
               8.5. uac.reg_reload
               8.5. uac.reg_reload
               8.6. uac.reg_refresh
               8.6. uac.reg_refresh
+              8.7. uac.reg_active
 
 
         9. Remote Registration
         9. Remote Registration
 
 
@@ -104,28 +106,30 @@ Ramona-Elena Modroiu
    1.16. Set reg_db_table parameter
    1.16. Set reg_db_table parameter
    1.17. Set reg_contact_addr parameter
    1.17. Set reg_contact_addr parameter
    1.18. Set reg_keep_callid parameter
    1.18. Set reg_keep_callid parameter
-   1.19. uac_replace_from usage
+   1.19. Set reg_active parameter
    1.20. uac_replace_from usage
    1.20. uac_replace_from usage
-   1.21. uac_restore_from usage
-   1.22. uac_replace_to usage
+   1.21. uac_replace_from usage
+   1.22. uac_restore_from usage
    1.23. uac_replace_to usage
    1.23. uac_replace_to usage
-   1.24. uac_restore_to usage
-   1.25. uac_auth usage
-   1.26. uac_req_send usage
-   1.27. uac_reg_lookup usage
-   1.28. uac_reg_status usage
-   1.29. uac_reg_request_to usage
-   1.30. uac_reg_enable usage
-   1.31. uac_reg_disable usage
-   1.32. uac_reg_refresh usage
-   1.33. event_route[uac:reply] usage
-   1.34. uac.reg_dump usage
-   1.35. uac.reg_info usage
-   1.36. uac.reg_enable usage
-   1.37. uac.reg_disable usage
-   1.38. uac.reg_reload usage
-   1.39. uac.reg_refresh usage
-   1.40. lookup remote registrations usage
+   1.24. uac_replace_to usage
+   1.25. uac_restore_to usage
+   1.26. uac_auth usage
+   1.27. uac_req_send usage
+   1.28. uac_reg_lookup usage
+   1.29. uac_reg_status usage
+   1.30. uac_reg_request_to usage
+   1.31. uac_reg_enable usage
+   1.32. uac_reg_disable usage
+   1.33. uac_reg_refresh usage
+   1.34. event_route[uac:reply] usage
+   1.35. uac.reg_dump usage
+   1.36. uac.reg_info usage
+   1.37. uac.reg_enable usage
+   1.38. uac.reg_disable usage
+   1.39. uac.reg_reload usage
+   1.40. uac.reg_refresh usage
+   1.41. uac.reg_active usage
+   1.42. lookup remote registrations usage
 
 
 Chapter 1. Admin Guide
 Chapter 1. Admin Guide
 
 
@@ -157,6 +161,7 @@ Chapter 1. Admin Guide
         3.16. reg_db_table (string)
         3.16. reg_db_table (string)
         3.17. reg_contact_addr (string)
         3.17. reg_contact_addr (string)
         3.18. reg_keep_callid (string)
         3.18. reg_keep_callid (string)
+        3.19. reg_active (int)
 
 
    4. Functions
    4. Functions
 
 
@@ -189,6 +194,7 @@ Chapter 1. Admin Guide
         8.4. uac.reg_disable
         8.4. uac.reg_disable
         8.5. uac.reg_reload
         8.5. uac.reg_reload
         8.6. uac.reg_refresh
         8.6. uac.reg_refresh
+        8.7. uac.reg_active
 
 
    9. Remote Registration
    9. Remote Registration
 
 
@@ -259,6 +265,7 @@ Chapter 1. Admin Guide
    3.16. reg_db_table (string)
    3.16. reg_db_table (string)
    3.17. reg_contact_addr (string)
    3.17. reg_contact_addr (string)
    3.18. reg_keep_callid (string)
    3.18. reg_keep_callid (string)
+   3.19. reg_active (int)
 
 
 3.1. rr_from_store_param (string)
 3.1. rr_from_store_param (string)
 
 
@@ -509,6 +516,19 @@ modparam("uac", "reg_contact_addr", "192.168.1.2:5080")
 modparam("uac", "reg_keep_callid", 1)
 modparam("uac", "reg_keep_callid", 1)
 ...
 ...
 
 
+3.19. reg_active (int)
+
+   If set to 0, no remote regisrations are done. In other words, it can
+   control at once if the module should do remote registratios or not. It
+   can be changed at runtime via rpc command 'uac.reg_active 0|1'.
+
+   The default value is 1 (active).
+
+   Example 1.19. Set reg_active parameter
+...
+modparam("uac", "reg_active", 0)
+...
+
 4. Functions
 4. Functions
 
 
    4.1. uac_replace_from(display,uri)
    4.1. uac_replace_from(display,uri)
@@ -556,7 +576,7 @@ modparam("uac", "reg_keep_callid", 1)
    dialog variables and registering callbacks in dialog module for in
    dialog variables and registering callbacks in dialog module for in
    dialog requests.
    dialog requests.
 
 
-   Example 1.19. uac_replace_from usage
+   Example 1.20. uac_replace_from usage
 ...
 ...
 # replace both display and uri
 # replace both display and uri
 uac_replace_from("$avp(s:display)","$avp(s:uri)");
 uac_replace_from("$avp(s:display)","$avp(s:uri)");
@@ -577,7 +597,7 @@ uac_replace_from("","");
 
 
    This function can be used from REQUEST_ROUTE and from BRANCH_ROUTE.
    This function can be used from REQUEST_ROUTE and from BRANCH_ROUTE.
 
 
-   Example 1.20. uac_replace_from usage
+   Example 1.21. uac_replace_from usage
 ...
 ...
 uac_replace_from("sip:[email protected]");
 uac_replace_from("sip:[email protected]");
 ...
 ...
@@ -590,7 +610,7 @@ uac_replace_from("sip:[email protected]");
 
 
    This function can be used from REQUEST_ROUTE.
    This function can be used from REQUEST_ROUTE.
 
 
-   Example 1.21. uac_restore_from usage
+   Example 1.22. uac_restore_from usage
 ...
 ...
 uac_restore_from();
 uac_restore_from();
 ...
 ...
@@ -607,7 +627,7 @@ uac_restore_from();
    automatically to display variable. That is no longer the case, if you
    automatically to display variable. That is no longer the case, if you
    expect that behavior, you will have to add the quotes by yourself.
    expect that behavior, you will have to add the quotes by yourself.
 
 
-   Example 1.22. uac_replace_to usage
+   Example 1.23. uac_replace_to usage
 ...
 ...
 # replace both display and uri
 # replace both display and uri
 uac_replace_to("$avp(display)","$avp(uri)");
 uac_replace_to("$avp(display)","$avp(uri)");
@@ -646,7 +666,7 @@ uac_replace_to("","");
    variables and registering callbacks in dialog module for in dialog
    variables and registering callbacks in dialog module for in dialog
    requests.
    requests.
 
 
-   Example 1.23. uac_replace_to usage
+   Example 1.24. uac_replace_to usage
 ...
 ...
 uac_replace_to("sip:[email protected]");
 uac_replace_to("sip:[email protected]");
 ...
 ...
@@ -659,7 +679,7 @@ uac_replace_to("sip:[email protected]");
 
 
    This function can be used from REQUEST_ROUTE.
    This function can be used from REQUEST_ROUTE.
 
 
-   Example 1.24. uac_restore_to usage
+   Example 1.25. uac_restore_to usage
 ...
 ...
 uac_restore_to();
 uac_restore_to();
 ...
 ...
@@ -672,7 +692,7 @@ uac_restore_to();
 
 
    This function can be used from FAILURE_ROUTE.
    This function can be used from FAILURE_ROUTE.
 
 
-   Example 1.25. uac_auth usage
+   Example 1.26. uac_auth usage
 ...
 ...
 modparam("uac","auth_username_avp","$avp(auser)")
 modparam("uac","auth_username_avp","$avp(auser)")
 modparam("uac","auth_password_avp","$avp(apass)")
 modparam("uac","auth_password_avp","$avp(apass)")
@@ -709,7 +729,7 @@ failure_route[TRUNKAUTH] {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    BRANCH_ROUTE, ONREPLY_ROUTE, LOCAL_ROUTE.
    BRANCH_ROUTE, ONREPLY_ROUTE, LOCAL_ROUTE.
 
 
-   Example 1.26. uac_req_send usage
+   Example 1.27. uac_req_send usage
 ...
 ...
 $uac_req(method)="OPTIONS";
 $uac_req(method)="OPTIONS";
 $uac_req(ruri)="sip:kamailio.org";
 $uac_req(ruri)="sip:kamailio.org";
@@ -726,7 +746,7 @@ uac_req_send();
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.27. uac_reg_lookup usage
+   Example 1.28. uac_reg_lookup usage
 ...
 ...
 
 
 if(uac_reg_lookup("$rU", "$ru"))
 if(uac_reg_lookup("$rU", "$ru"))
@@ -750,7 +770,7 @@ if(uac_reg_lookup("$rU", "$ru"))
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.28. uac_reg_status usage
+   Example 1.29. uac_reg_status usage
 ...
 ...
 $var(status) = uac_reg_status("$rU");
 $var(status) = uac_reg_status("$rU");
 ...
 ...
@@ -769,7 +789,7 @@ $var(status) = uac_reg_status("$rU");
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    BRANCH_ROUTE.
    BRANCH_ROUTE.
 
 
-   Example 1.29. uac_reg_request_to usage
+   Example 1.30. uac_reg_request_to usage
 ...
 ...
 
 
 if(uac_reg_request_to("$fU", 0))
 if(uac_reg_request_to("$fU", 0))
@@ -797,7 +817,7 @@ failure_route[REMOTE_AUTH] {
 
 
    The SIP processing is done on the next timer routine.
    The SIP processing is done on the next timer routine.
 
 
-   Example 1.30. uac_reg_enable usage
+   Example 1.31. uac_reg_enable usage
 ...
 ...
    uac_reg_enable("l_uuid", "account123");
    uac_reg_enable("l_uuid", "account123");
 ...
 ...
@@ -811,7 +831,7 @@ failure_route[REMOTE_AUTH] {
 
 
    The SIP processing is done on the next timer routine.
    The SIP processing is done on the next timer routine.
 
 
-   Example 1.31. uac_reg_disable usage
+   Example 1.32. uac_reg_disable usage
 ...
 ...
    uac_reg_disable("l_uuid", "account123");
    uac_reg_disable("l_uuid", "account123");
 ...
 ...
@@ -822,7 +842,7 @@ failure_route[REMOTE_AUTH] {
    record was already loaded, new values are taken from database,
    record was already loaded, new values are taken from database,
    otherwise a new record is created.
    otherwise a new record is created.
 
 
-   Example 1.32. uac_reg_refresh usage
+   Example 1.33. uac_reg_refresh usage
 ...
 ...
    uac_reg_refresh("account123");
    uac_reg_refresh("account123");
 ...
 ...
@@ -846,7 +866,7 @@ failure_route[REMOTE_AUTH] {
    then the event_route is executed twice, first for 401/407 and second
    then the event_route is executed twice, first for 401/407 and second
    for final reply of the transaction.
    for final reply of the transaction.
 
 
-   Example 1.33. event_route[uac:reply] usage
+   Example 1.34. event_route[uac:reply] usage
 ...
 ...
 $uac_req(method)="OPTIONS";
 $uac_req(method)="OPTIONS";
 $uac_req(ruri)="sip:kamailio.org";
 $uac_req(ruri)="sip:kamailio.org";
@@ -877,12 +897,13 @@ event_route[uac:reply] {
    8.4. uac.reg_disable
    8.4. uac.reg_disable
    8.5. uac.reg_reload
    8.5. uac.reg_reload
    8.6. uac.reg_refresh
    8.6. uac.reg_refresh
+   8.7. uac.reg_active
 
 
 8.1.  uac.reg_dump
 8.1.  uac.reg_dump
 
 
    Dump the content of remote registration table from memory.
    Dump the content of remote registration table from memory.
 
 
-   Example 1.34. uac.reg_dump usage
+   Example 1.35. uac.reg_dump usage
 ...
 ...
    kamcmd uac.reg_dump
    kamcmd uac.reg_dump
 ...
 ...
@@ -903,7 +924,7 @@ event_route[uac:reply] {
      * 16 (2^4) - registration initialized (after loading from database,
      * 16 (2^4) - registration initialized (after loading from database,
        the registration process was initialized)
        the registration process was initialized)
 
 
-   Example 1.35. uac.reg_info usage
+   Example 1.36. uac.reg_info usage
 ...
 ...
    kamcmd uac.reg_info l_uuid account123
    kamcmd uac.reg_info l_uuid account123
 ...
 ...
@@ -916,7 +937,7 @@ event_route[uac:reply] {
    matched against the value of the attribute in the remote registration
    matched against the value of the attribute in the remote registration
    record.
    record.
 
 
-   Example 1.36. uac.reg_enable usage
+   Example 1.37. uac.reg_enable usage
 ...
 ...
    kamcmd uac.reg_enable l_uuid account123
    kamcmd uac.reg_enable l_uuid account123
 ...
 ...
@@ -929,7 +950,7 @@ event_route[uac:reply] {
    matched against the value of the attribute in the remote registration
    matched against the value of the attribute in the remote registration
    record.
    record.
 
 
-   Example 1.37. uac.reg_disable usage
+   Example 1.38. uac.reg_disable usage
 ...
 ...
    kamcmd uac.reg_disable l_uuid account123
    kamcmd uac.reg_disable l_uuid account123
 ...
 ...
@@ -938,7 +959,7 @@ event_route[uac:reply] {
 
 
    Reload the records from database for remote registrations.
    Reload the records from database for remote registrations.
 
 
-   Example 1.38. uac.reg_reload usage
+   Example 1.39. uac.reg_reload usage
 ...
 ...
    kamcmd uac.reg_reload
    kamcmd uac.reg_reload
 ...
 ...
@@ -949,11 +970,23 @@ event_route[uac:reply] {
    the record exists in memory, it will be replaced with the new values
    the record exists in memory, it will be replaced with the new values
    loaded from database.
    loaded from database.
 
 
-   Example 1.39. uac.reg_refresh usage
+   Example 1.40. uac.reg_refresh usage
 ...
 ...
    kamcmd uac.reg_refresh account123
    kamcmd uac.reg_refresh account123
 ...
 ...
 
 
+8.7.  uac.reg_active
+
+   Control if the module should do remote registrations or not. Setting to
+   1 enables remote registrations for all records and 0 disables doing
+   them.
+
+   Example 1.41. uac.reg_active usage
+...
+   kamctl rpc uac.reg_active 0
+   kamctl rpc uac.reg_active 1
+...
+
 9. Remote Registration
 9. Remote Registration
 
 
    The module can register contact addresses to remote REGISTRAR servers.
    The module can register contact addresses to remote REGISTRAR servers.
@@ -993,7 +1026,7 @@ event_route[uac:reply] {
    if the call is coming from a remote SIP provider and can change the
    if the call is coming from a remote SIP provider and can change the
    R-URI to local username@domain. Afterwards you can run location lookup.
    R-URI to local username@domain. Afterwards you can run location lookup.
 
 
-   Example 1.40. lookup remote registrations usage
+   Example 1.42. lookup remote registrations usage
 ...
 ...
     if(uac_reg_lookup("$rU", "$ru")) {
     if(uac_reg_lookup("$rU", "$ru")) {
         xlog("request from a remote SIP provider [$ou => $ru]\n");
         xlog("request from a remote SIP provider [$ou => $ru]\n");