From 97568d7132e9d20dda7866c0a8cbe0277e620f04 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 5 Jul 2016 12:17:45 +0200 Subject: [PATCH] modules: rebuild of readme files --- modules/acc/README | 7 - modules/acc_radius/README | 8 +- modules/alias_db/README | 2 +- modules/app_mono/README | 2 - modules/auth/README | 209 ++++++++----- modules/auth_ephemeral/README | 22 +- modules/auth_identity/README | 189 ++++++----- modules/auth_radius/README | 18 +- modules/blst/README | 103 +++--- modules/carrierroute/README | 68 ++-- modules/cdp/README | 2 - modules/cdp_avp/README | 2 - modules/cfg_db/README | 69 ++-- modules/cfg_rpc/README | 100 +++--- modules/cnxcc/README | 40 ++- modules/corex/README | 2 - modules/counters/README | 65 ++-- modules/ctl/README | 71 ++--- modules/db2_ldap/README | 91 +++--- modules/db2_ops/README | 303 +++++++++--------- modules/db_berkeley/README | 2 +- modules/db_cassandra/README | 2 +- modules/db_flatstore/README | 86 +++-- modules/db_oracle/README | 2 +- modules/db_perlvdb/README | 2 +- modules/db_postgres/README | 2 +- modules/db_text/README | 4 +- modules/db_unixodbc/README | 20 +- modules/dialog/README | 4 - modules/dialog_ng/README | 319 ++++++++++--------- modules/dialplan/README | 2 - modules/dispatcher/README | 13 +- modules/dmq/README | 32 +- modules/dnssec/README | 3 +- modules/domain/README | 2 +- modules/domainpolicy/README | 4 +- modules/drouting/README | 2 - modules/geoip/README | 10 +- modules/h350/README | 2 +- modules/htable/README | 54 ++-- modules/imc/README | 8 +- modules/ims_auth/README | 267 +++++++++++++--- modules/ims_isc/README | 33 +- modules/ims_qos/README | 88 ++++-- modules/iptrtpproxy/README | 409 ++++++++++++------------ modules/kazoo/README | 166 +++++----- modules/kex/README | 235 +++++++++----- modules/lcr/README | 45 ++- modules/malloc_test/README | 62 ++-- modules/mangler/README | 112 ++++--- modules/matrix/README | 6 +- modules/mediaproxy/README | 16 +- modules/memcached/README | 20 +- modules/mi_xmlrpc/README | 2 - modules/mohqueue/README | 14 +- modules/mqueue/README | 2 - modules/msilo/README | 2 - modules/msrp/README | 2 - modules/mtree/README | 2 - modules/nat_traversal/README | 18 +- modules/nathelper/README | 72 ++--- modules/ndb_redis/README | 8 +- modules/osp/README | 4 +- modules/outbound/README | 12 +- modules/p_usrloc/README | 74 ++--- modules/path/README | 66 ++-- modules/pdb/README | 14 +- modules/pdt/README | 2 +- modules/peering/README | 8 +- modules/permissions/README | 4 - modules/pipelimit/README | 2 - modules/prefix_route/README | 23 +- modules/presence/README | 2 - modules/presence_conference/README | 6 +- modules/presence_dialoginfo/README | 28 +- modules/presence_mwi/README | 6 +- modules/presence_profile/README | 2 - modules/presence_reginfo/README | 2 +- modules/print/README | 13 +- modules/print_lib/README | 17 +- modules/pua/README | 2 +- modules/pua_bla/README | 12 +- modules/pua_dialoginfo/README | 2 - modules/pua_mi/README | 2 - modules/pua_usrloc/README | 2 +- modules/purple/README | 10 +- modules/ratelimit/README | 26 +- modules/registrar/README | 2 - modules/rls/README | 50 +-- modules/rr/README | 2 - modules/rtpengine/README | 36 +-- modules/rtpproxy/README | 484 ++++++++++++++--------------- modules/sca/README | 4 +- modules/sdpops/README | 2 +- modules/seas/README | 28 +- modules/sipcapture/README | 8 +- modules/sipt/README | 12 +- modules/siptrace/README | 12 +- modules/siputils/README | 4 - modules/sms/README | 149 +++++---- modules/snmpstats/README | 2 - modules/textops/README | 123 ++++---- modules/timer/README | 53 ++-- modules/tls/README | 2 +- modules/tmrec/README | 4 - modules/tmx/README | 2 - modules/uid_auth_db/README | 134 ++++---- modules/uid_avp_db/README | 158 +++++----- modules/uid_domain/README | 397 ++++++++++++----------- modules/uid_gflags/README | 57 ++-- modules/uid_uri_db/README | 27 +- modules/uri_db/README | 2 - modules/userblacklist/README | 34 +- modules/usrloc/README | 64 ++-- modules/utils/README | 8 +- modules/websocket/README | 16 +- modules/xcap_client/README | 20 +- modules/xcap_server/README | 28 +- modules/xhttp/README | 2 - modules/xhttp_pi/README | 6 +- modules/xhttp_rpc/README | 6 +- modules/xmlops/README | 19 +- modules/xprint/README | 171 +++++----- 123 files changed, 3127 insertions(+), 2871 deletions(-) diff --git a/modules/acc/README b/modules/acc/README index 455c271bd20..d74ccaa895e 100644 --- a/modules/acc/README +++ b/modules/acc/README @@ -22,8 +22,6 @@ Bogdan-Andrei Iancu Voice Sistem SRL -Edited by - Sven Knoblich 1&1 Internet AG @@ -564,11 +562,6 @@ Note information given will not be stored in the CDR as they cannot be accessed by the end of the call when the CDR is logged. - Note that CDR generation does not involve any kind of database storage - (yet). In order to persist the CDRs into a database you will have to - set up an exterior process (i.e., a script living outside of Kamailio) - and implement the storage task yourself. - Sometimes, dialogs expire because the UA has a problem and a final message is never transmitted. You can toggle on/off the generation of CDR-based logging in such cases with only the dlg_vars showing by using diff --git a/modules/acc_radius/README b/modules/acc_radius/README index 31cb5abc828..4512790ea93 100644 --- a/modules/acc_radius/README +++ b/modules/acc_radius/README @@ -16,7 +16,7 @@ Daniel-Constantin Mierla asipto.com - Copyright © 2002, 2003 FhG FOKUS + Copyright 2002, 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -119,7 +119,7 @@ Chapter 1. Admin Guide If the parameter is set to empty string, the RADIUS accounting support will be disabled (even if compiled). - Default value is “NULL”. + Default value is "NULL". Example 1.1. radius_config example ... @@ -176,11 +176,11 @@ modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)") 4.1. acc_rad_request(comment) -4.1. acc_rad_request(comment) +4.1. acc_rad_request(comment) Like acc_log_request of acc module, acc_rad_request reports on a SIP request event. It reports to radius server as configured in - “radius_config”. + "radius_config". Meaning of the parameters is as follows: * comment - Comment to be appended. diff --git a/modules/alias_db/README b/modules/alias_db/README index 43fb9042055..8a802cdf04e 100644 --- a/modules/alias_db/README +++ b/modules/alias_db/README @@ -126,7 +126,7 @@ Chapter 1. Admin Guide Database URL. - Default value is "mysql://openserro:openserro@localhost/openser". + Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". Example 1.1. Set db_url parameter ... diff --git a/modules/app_mono/README b/modules/app_mono/README index a2ca72c5f5b..37a2986fd8c 100644 --- a/modules/app_mono/README +++ b/modules/app_mono/README @@ -10,8 +10,6 @@ Daniel-Constantin Mierla -Edited by - Alex Balashov diff --git a/modules/auth/README b/modules/auth/README index ef541259eb4..71b990a5658 100644 --- a/modules/auth/README +++ b/modules/auth/README @@ -15,46 +15,46 @@ Daniel-Constantin Mierla asipto.com - Copyright © 2002, 2003 FhG FOKUS + Copyright 2002, 2003 FhG FOKUS __________________________________________________________________ Table of Contents 1. Admin Guide - 1.1. Overview - 1.2. Dependencies - 1.3. Parameters - - 1.3.1. auth_checks_register (flags) - 1.3.2. auth_checks_no_dlg (flags) - 1.3.3. auth_checks_in_dlg (flags) - 1.3.4. qop (string) - 1.3.5. nonce_count (boolean) - 1.3.6. one_time_nonce (boolean) - 1.3.7. nid_pool_no (integer) - 1.3.8. nc_array_size (integer) - 1.3.9. nc_array_order (integer) - 1.3.10. otn_in_flight_no (integer) - 1.3.11. otn_in_flight_order (integer) - 1.3.12. secret (string) - 1.3.13. nonce_expire (integer) - 1.3.14. nonce_auth_max_drift (integer) - 1.3.15. force_stateless_reply (boolean) - 1.3.16. realm_prefix (string) - 1.3.17. use_domain (boolean) - - 1.4. Functions - - 1.4.1. consume_credentials() - 1.4.2. has_credentials(realm) - 1.4.3. www_challenge(realm, flags) - 1.4.4. proxy_challenge(realm, flags) - 1.4.5. auth_challenge(realm, flags) - 1.4.6. pv_www_authenticate(realm, passwd, flags [, method]) - 1.4.7. pv_proxy_authenticate(realm, passwd, flags) - 1.4.8. pv_auth_check(realm, passwd, flags, checks) - 1.4.9. auth_get_www_authenticate(realm, flags, pvdest) + 1. Overview + 2. Dependencies + 3. Parameters + + 3.1. auth_checks_register (flags) + 3.2. auth_checks_no_dlg (flags) + 3.3. auth_checks_in_dlg (flags) + 3.4. qop (string) + 3.5. nonce_count (boolean) + 3.6. one_time_nonce (boolean) + 3.7. nid_pool_no (integer) + 3.8. nc_array_size (integer) + 3.9. nc_array_order (integer) + 3.10. otn_in_flight_no (integer) + 3.11. otn_in_flight_order (integer) + 3.12. secret (string) + 3.13. nonce_expire (integer) + 3.14. nonce_auth_max_drift (integer) + 3.15. force_stateless_reply (boolean) + 3.16. realm_prefix (string) + 3.17. use_domain (boolean) + + 4. Functions + + 4.1. consume_credentials() + 4.2. has_credentials(realm) + 4.3. www_challenge(realm, flags) + 4.4. proxy_challenge(realm, flags) + 4.5. auth_challenge(realm, flags) + 4.6. pv_www_authenticate(realm, passwd, flags [, method]) + 4.7. pv_proxy_authenticate(realm, passwd, flags) + 4.8. pv_auth_check(realm, passwd, flags, checks) + 4.9. auth_get_www_authenticate(realm, flags, pvdest) List of Examples @@ -85,7 +85,43 @@ Daniel-Constantin Mierla Chapter 1. Admin Guide -1.1. Overview + Table of Contents + + 1. Overview + 2. Dependencies + 3. Parameters + + 3.1. auth_checks_register (flags) + 3.2. auth_checks_no_dlg (flags) + 3.3. auth_checks_in_dlg (flags) + 3.4. qop (string) + 3.5. nonce_count (boolean) + 3.6. one_time_nonce (boolean) + 3.7. nid_pool_no (integer) + 3.8. nc_array_size (integer) + 3.9. nc_array_order (integer) + 3.10. otn_in_flight_no (integer) + 3.11. otn_in_flight_order (integer) + 3.12. secret (string) + 3.13. nonce_expire (integer) + 3.14. nonce_auth_max_drift (integer) + 3.15. force_stateless_reply (boolean) + 3.16. realm_prefix (string) + 3.17. use_domain (boolean) + + 4. Functions + + 4.1. consume_credentials() + 4.2. has_credentials(realm) + 4.3. www_challenge(realm, flags) + 4.4. proxy_challenge(realm, flags) + 4.5. auth_challenge(realm, flags) + 4.6. pv_www_authenticate(realm, passwd, flags [, method]) + 4.7. pv_proxy_authenticate(realm, passwd, flags) + 4.8. pv_auth_check(realm, passwd, flags, checks) + 4.9. auth_get_www_authenticate(realm, flags, pvdest) + +1. Overview This is a generic module that itself doesn't provide all functions necessary for authentication but provides functions that are needed by @@ -99,21 +135,39 @@ Chapter 1. Admin Guide functionality. This also allows us to avoid unnecessary dependencies in the binary packages. -1.2. Dependencies +2. Dependencies The module does not depend on any other module. -1.3. Parameters - -1.3.1. auth_checks_register (flags) +3. Parameters + + 3.1. auth_checks_register (flags) + 3.2. auth_checks_no_dlg (flags) + 3.3. auth_checks_in_dlg (flags) + 3.4. qop (string) + 3.5. nonce_count (boolean) + 3.6. one_time_nonce (boolean) + 3.7. nid_pool_no (integer) + 3.8. nc_array_size (integer) + 3.9. nc_array_order (integer) + 3.10. otn_in_flight_no (integer) + 3.11. otn_in_flight_order (integer) + 3.12. secret (string) + 3.13. nonce_expire (integer) + 3.14. nonce_auth_max_drift (integer) + 3.15. force_stateless_reply (boolean) + 3.16. realm_prefix (string) + 3.17. use_domain (boolean) + +3.1. auth_checks_register (flags) See description of parameter auth_checks_in_dlg. -1.3.2. auth_checks_no_dlg (flags) +3.2. auth_checks_no_dlg (flags) See description of parameter auth_checks_in_dlg. -1.3.3. auth_checks_in_dlg (flags) +3.3. auth_checks_in_dlg (flags) These three module parameters control which optional integrity checks will be performed on the SIP message carrying digest response during @@ -198,7 +252,7 @@ modparam("auth", "auth_checks_in_dlg", 15) ... -1.3.4. qop (string) +3.4. qop (string) If set, enable qop for challenges: each challenge will include a qop parameter. This is the recommended way, but some older non rfc3261 @@ -220,7 +274,7 @@ modparam("auth", "auth_checks_in_dlg", 15) modparam("auth", "qop", "auth") # set qop=auth ... -1.3.5. nonce_count (boolean) +3.5. nonce_count (boolean) If enabled the received nc value is remembered and checked against the older value (for a successful authentication the received nc must be @@ -316,7 +370,7 @@ route{ } ... -1.3.6. one_time_nonce (boolean) +3.6. one_time_nonce (boolean) If set to 1 nonce reuse is disabled: each nonce is allowed only once, in the first reponse to a challenge. All the messages will be @@ -360,7 +414,7 @@ modparam("auth", "one_time_nonce", 1) # Note: stateful mode should be used, see the nonce_count example ... -1.3.7. nid_pool_no (integer) +3.7. nid_pool_no (integer) Controls the number of partitions for the nonce_count and one_time_nonce arrays (it's common to both of them to reduce the nonce @@ -396,7 +450,7 @@ modparam("auth", "one_time_nonce", 1) modparam("auth", "nid_pool_no", 4) ... -1.3.8. nc_array_size (integer) +3.8. nc_array_size (integer) Maximum number of in-flight nonces for nonce_count. It represents the maximum nonces for which state will be kept. When this number is @@ -420,7 +474,7 @@ modparam("auth", "nid_pool_no", 4) modparam("auth", "nc_array_size", 4194304) # 4Mb ... -1.3.9. nc_array_order (integer) +3.9. nc_array_order (integer) Equivalent to nc_array_size, but instead of directly specifying the size, its value is the power at which 2 should be raised @@ -437,7 +491,7 @@ modparam("auth", "nc_array_size", 4194304) # 4Mb modparam("auth", "nc_array_order", 22) # 4Mb ... -1.3.10. otn_in_flight_no (integer) +3.10. otn_in_flight_no (integer) Maximum number of in-flight nonces for one_time_nonce. It represents the maximum number of nonces remembered for the one-time-nonce check. @@ -463,7 +517,7 @@ modparam("auth", "nc_array_order", 22) # 4Mb modparam("auth", "otn_in_flight_no", 8388608) # 8 Mb (1Mb memory) ... -1.3.11. otn_in_flight_order (integer) +3.11. otn_in_flight_order (integer) Equivalent to otn_in_flight_no, but instead of directly specifying the size, its value is the power at which 2 should be raised @@ -481,7 +535,7 @@ modparam("auth", "otn_in_flight_no", 8388608) # 8 Mb (1Mb memory) modparam("auth", "otn_in_flight_order", 23) # 8 Mb (1Mb memory) ... -1.3.12. secret (string) +3.12. secret (string) Secret phrase used to calculate the nonce value used to challenge the client for authentication. @@ -501,7 +555,7 @@ modparam("auth", "otn_in_flight_order", 23) # 8 Mb (1Mb memory) modparam("auth", "secret", "johndoessecretphrase") ... -1.3.13. nonce_expire (integer) +3.13. nonce_expire (integer) Nonces have limited lifetime. After a given period of time nonces will be considered invalid. This is to protect replay attacks. Credentials @@ -518,7 +572,7 @@ modparam("auth", "secret", "johndoessecretphrase") modparam("auth", "nonce_expire", 600) # Set nonce_expire to 600s ... -1.3.14. nonce_auth_max_drift (integer) +3.14. nonce_auth_max_drift (integer) Maximum difference in seconds between a nonce creation time and the current time, if the nonce creation time appears to be in the future. @@ -540,7 +594,7 @@ modparam("auth", "nonce_expire", 600) # Set nonce_expire to 600s modparam("auth", "nonce_auth_max_drift", 1) # set max drift to 1 s ... -1.3.15. force_stateless_reply (boolean) +3.15. force_stateless_reply (boolean) If set to 1, www_challenge() and proxy_challenge() functions send reply statelessly no matter if transaction exists or not. If set to 0 @@ -552,13 +606,13 @@ modparam("auth", "nonce_auth_max_drift", 1) # set max drift to 1 s modparam("auth", "force_stateless_reply", 1) ... -1.3.16. realm_prefix (string) +3.16. realm_prefix (string) Prefix to be automatically strip from realm. As an alternative to SRV records (not all SIP clients support SRV lookup), a subdomain of the master domain can be defined for SIP purposes (like sip.mydomain.net pointing to same IP address as the SRV record for mydomain.net). By - ignoring the realm_prefix “sip.”, at authentication, sip.mydomain.net + ignoring the realm_prefix "sip.", at authentication, sip.mydomain.net will be equivalent to mydomain.net . Default value is empty string. @@ -566,7 +620,7 @@ modparam("auth", "force_stateless_reply", 1) Example 1.14. realm_prefix parameter example modparam("auth", "realm_prefix", "sip.") -1.3.17. use_domain (boolean) +3.17. use_domain (boolean) If set to 1, pv_auth_check() uses domain parts of the URIs to check user identity. @@ -576,9 +630,19 @@ modparam("auth", "realm_prefix", "sip.") modparam("auth", "use_domain", 1) ... -1.4. Functions +4. Functions -1.4.1. consume_credentials() + 4.1. consume_credentials() + 4.2. has_credentials(realm) + 4.3. www_challenge(realm, flags) + 4.4. proxy_challenge(realm, flags) + 4.5. auth_challenge(realm, flags) + 4.6. pv_www_authenticate(realm, passwd, flags [, method]) + 4.7. pv_proxy_authenticate(realm, passwd, flags) + 4.8. pv_auth_check(realm, passwd, flags, checks) + 4.9. auth_get_www_authenticate(realm, flags, pvdest) + +4.1. consume_credentials() This function removes previously authorized credential headers from the message being processed by the server. That means that the downstream @@ -595,7 +659,7 @@ if (www_authenticate("realm", "subscriber")) { }; ... -1.4.2. has_credentials(realm) +4.2. has_credentials(realm) This function returns true of the request has Autorization or Proxy-Authorization header with provided realm. The parameter can be @@ -608,7 +672,7 @@ if (has_credentials("myrealm")) { } ... -1.4.3. www_challenge(realm, flags) +4.3. www_challenge(realm, flags) The function challenges a user agent. It will generate a WWW-Authorize header field containing a digest challenge, it will put the header @@ -622,7 +686,7 @@ if (has_credentials("myrealm")) { * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string “”. In case of REGISTER requests, the + It must not be empty string "". In case of REGISTER requests, the To header field domain (e.g., variable $td) can be used (because this header field represents the user being registered), for all other messages From header field domain can be used (e.g., variable @@ -645,7 +709,7 @@ if (!www_authenticate("$td", "subscriber")) { } ... -1.4.4. proxy_challenge(realm, flags) +4.4. proxy_challenge(realm, flags) The function challenges a user agent. It will generate a Proxy-Authorize header field containing a digest challenge, it will put @@ -667,7 +731,7 @@ if (!proxy_authenticate("$fd", "subscriber")) { }; ... -1.4.5. auth_challenge(realm, flags) +4.5. auth_challenge(realm, flags) The function challenges a user agent for authentication. It combines the functions www_challenge() and proxy_challenge(), by calling @@ -686,7 +750,7 @@ if (!auth_check("$fd", "subscriber", "1")) { }; ... -1.4.6. pv_www_authenticate(realm, passwd, flags [, method]) +4.6. pv_www_authenticate(realm, passwd, flags [, method]) The function verifies credentials according to RFC2617. If the credentials are verified successfully then the function will succeed @@ -699,20 +763,17 @@ if (!auth_check("$fd", "subscriber", "1")) { * -1 (generic error) - some generic error occurred and no reply was sent out * -2 (invalid password) - wrong password - * -3 (invalid user) - authentication user does not exist * -4 (nonce expired) - the nonce has expired * -5 (no credentials) - request does not contain an Authorization header with the correct realm * -6 (nonce reused) - the nonce has already been used to authenticate a previous request - * -8 (auth user mismatch) - the auth user is different then the - From/To user Meaning of the parameters is as follows: * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string “”. In case of REGISTER requests To + It must not be empty string "". In case of REGISTER requests To header field domain (e.g., varibale $td) can be used (because this header field represents a user being registered), for all other messages From header field domain can be used (e.g., varibale $fd). @@ -741,7 +802,7 @@ if (!pv_www_authenticate("$td", "123abc", "0")) { }; ... -1.4.7. pv_proxy_authenticate(realm, passwd, flags) +4.7. pv_proxy_authenticate(realm, passwd, flags) The function verifies credentials according to RFC2617. If the credentials are verified successfully then the function will succeed @@ -764,7 +825,7 @@ if (!pv_proxy_authenticate("$fd", "$avp(password)", "0")) { }; ... -1.4.8. pv_auth_check(realm, passwd, flags, checks) +4.8. pv_auth_check(realm, passwd, flags, checks) The function combines the functionalities of pv_www_authenticate and pv_proxy_authenticate, first being exectuted if the SIP request is a @@ -779,6 +840,12 @@ if (!pv_proxy_authenticate("$fd", "$avp(password)", "0")) { it is for a REGISTER request or not. The parameter may be a pseudo variable. + The set of possible return codes is the same than + pv_{www,proxy}_authenticate, with one more possible value: + + -8 (auth user mismatch) - the auth user is different than the From/To + user + This function can be used from REQUEST_ROUTE. Example 1.23. pv_auth_check usage @@ -789,7 +856,7 @@ if (!pv_auth_check("$fd", "$avp(password)", "0", "1")) { }; ... -1.4.9. auth_get_www_authenticate(realm, flags, pvdest) +4.9. auth_get_www_authenticate(realm, flags, pvdest) Build WWW-Authentication header and set the resulting value in 'pvdest' pseudo-variable parameter. diff --git a/modules/auth_ephemeral/README b/modules/auth_ephemeral/README index 139d1123ab5..8cc1c96b69a 100644 --- a/modules/auth_ephemeral/README +++ b/modules/auth_ephemeral/README @@ -5,7 +5,7 @@ Peter Dunkley Crocodile RCS Ltd - Copyright © 2013 Crocodile RCS Ltd + Copyright 2013 Crocodile RCS Ltd __________________________________________________________________ Table of Contents @@ -221,7 +221,7 @@ modparam("auth_ephemeral", "username_format", 0) 4.6. autheph_check_to([username]) 4.7. autheph_check_timestamp(username) -4.1. autheph_proxy(realm) +4.1. autheph_proxy(realm) This function performs proxy authentication. @@ -235,7 +235,7 @@ Note present to the user so that he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be an empty string “”. Apart from a static string, a + It must not be an empty string "". Apart from a static string, a typical value is the From-URI domain (i.e., $fd). The string may contain pseudo variables. @@ -249,7 +249,7 @@ if (!autheph_proxy("$fd")) { } ... -4.2. autheph_www(realm[, method]) +4.2. autheph_www(realm[, method]) This function performs WWW digest authentication. @@ -263,7 +263,7 @@ Note present to the user so that he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be an empty string “”. Apart from a static string, a + It must not be an empty string "". Apart from a static string, a typical value is the From-URI domain (i.e., $fd). The string may contain pseudo variables. * method - the method to be used for authentication. This parameter @@ -280,7 +280,7 @@ if (!autheph_www("$fd")) { } ... -4.3. autheph_check(realm) +4.3. autheph_check(realm) This function combines the functionalities of autheph_www and autheph_proxy, the first being exectuted if the SIP request is a @@ -296,7 +296,7 @@ Note present to the user so that he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be an empty string “”. Apart from a static string, a + It must not be an empty string "". Apart from a static string, a typical value is the From-URI domain (i.e., $fd). The string may contain pseudo variables. @@ -310,7 +310,7 @@ if (!autheph_check("$fd")) { } ... -4.4. autheph_authenticate(username, password) +4.4. autheph_authenticate(username, password) This function performs non-digest ephemeral authentication. This may be used when digest authentication cannot. For example, during WebSocket @@ -337,7 +337,7 @@ if (!autheph_authenticate("$var(username)", "$var(password)")) { } ... -4.5. autheph_check_from([username]) +4.5. autheph_check_from([username]) This function checks that the username (or username and domain) in the From: URI matches the credentials. @@ -371,7 +371,7 @@ if (!autheph_check_from()) { } ... -4.6. autheph_check_to([username]) +4.6. autheph_check_to([username]) This function checks that the username (or username and domain) in the To: URI matches the credentials. @@ -405,7 +405,7 @@ if (!autheph_check_to()) { } ... -4.7. autheph_check_timestamp(username) +4.7. autheph_check_timestamp(username) This function checks that the timestamp in the username parameter has not expired. The autheph_(check|proxy|www) functions all do this diff --git a/modules/auth_identity/README b/modules/auth_identity/README index 042df572b1f..1b7b8074488 100644 --- a/modules/auth_identity/README +++ b/modules/auth_identity/README @@ -1,4 +1,3 @@ - SIP Authenticated Identity Module Gergely Kovacs @@ -6,7 +5,7 @@ Gergely Kovacs Iptel.org Copyright 2007 Iptel.org - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -30,31 +29,31 @@ Gergely Kovacs 6. Functions - 6.1. auth_date_proc() + 6.1. auth_date_proc() 6.1.1. Dependencies - 6.2. auth_add_identity() + 6.2. auth_add_identity() 6.2.1. Dependencies - 6.3. vrfy_check_date() + 6.3. vrfy_check_date() 6.3.1. Dependencies - 6.4. vrfy_get_certificate() + 6.4. vrfy_get_certificate() 6.4.1. Dependencies - 6.5. vrfy_check_certificate() + 6.5. vrfy_check_certificate() 6.5.1. Dependencies - 6.6. vrfy_check_msgvalidity() + 6.6. vrfy_check_msgvalidity() 6.6.1. Dependencies - 6.7. vrfy_check_callid() + 6.7. vrfy_check_callid() 6.7.1. Dependencies @@ -64,14 +63,14 @@ Gergely Kovacs List of Examples 1.1. Set privatekey_path parameter - 1.2. Set certificate_path parameter - 1.3. Set certificate_url parameter - 1.4. Set msg_timeout parameter - 1.5. Set auth_validity_time parameter - 1.6. Set auth_validity_time parameter - 1.7. Set certificate_cache_limit parameter - 1.8. Set cainfo_path parameter - 1.9. Set accept_pem_certs parameter + 1.2. Set certificate_path parameter + 1.3. Set certificate_url parameter + 1.4. Set msg_timeout parameter + 1.5. Set auth_validity_time parameter + 1.6. Set auth_validity_time parameter + 1.7. Set certificate_cache_limit parameter + 1.8. Set cainfo_path parameter + 1.9. Set accept_pem_certs parameter Chapter 1. Admin Guide @@ -95,31 +94,31 @@ Chapter 1. Admin Guide 6. Functions - 6.1. auth_date_proc() + 6.1. auth_date_proc() 6.1.1. Dependencies - 6.2. auth_add_identity() + 6.2. auth_add_identity() 6.2.1. Dependencies - 6.3. vrfy_check_date() + 6.3. vrfy_check_date() 6.3.1. Dependencies - 6.4. vrfy_get_certificate() + 6.4. vrfy_get_certificate() 6.4.1. Dependencies - 6.5. vrfy_check_certificate() + 6.5. vrfy_check_certificate() 6.5.1. Dependencies - 6.6. vrfy_check_msgvalidity() + 6.6. vrfy_check_msgvalidity() 6.6.1. Dependencies - 6.7. vrfy_check_callid() + 6.7. vrfy_check_callid() 6.7.1. Dependencies @@ -129,17 +128,17 @@ Chapter 1. Admin Guide 1. Overview Auth Identity module provides functionalities for securely identifying - originators of SIP messages. It implements the SIP Identity standard - where a SIP proxy signs messages that is sent to other domains. This + originators of SIP messages. It implements the SIP Identity standard + where a SIP proxy signs messages that is sent to other domains. This module has two basic services: - * authorizer - authorizes a message and adds Identity and + * authorizer - authorizes a message and adds Identity and Identity-Info headers * verifier - verifies an authorized message Known limitations in this version: * authorizer and verifier support all SIP requests except for CANCEL and REGISTER - * verifier does not support the subjectAltName extension of + * verifier does not support the subjectAltName extension of certificates 2. Dependencies @@ -152,16 +151,16 @@ Chapter 1. Admin Guide * OpenSSL (version 0.9.8 or higher) for cryptographic functions * libcurl for HTTP, HTTPS functions - If you'd like to use TLS module too then use the corresponding LIB - line in auth_identity's Makefile + If you'd like to use TLS module too then use the corresponding LIB line + in auth_identity's Makefile 4. Installation And Running the Authorizer service needs to make the public key, which conveyed in - a certificate, available over HTTPS or HTTP for verifiers. The domain - the authorizer is responsible for and the domain part of the URL of - the certificate must be the same. This service needs access to the - private key too. + a certificate, available over HTTPS or HTTP for verifiers. The domain + the authorizer is responsible for and the domain part of the URL of the + certificate must be the same. This service needs access to the private + key too. 5. Parameters @@ -198,7 +197,7 @@ modparam("auth_identity","privatekey_path","/etc/ssl/private/key.pem") This parameter is required by authentication service. - Example 1.2. Set certificate_path parameter + Example 1.2. Set certificate_path parameter ... modparam("auth_identity","certificate_path","/var/www/ssl/mycert.pem") ... @@ -207,13 +206,13 @@ modparam("auth_identity","certificate_path","/var/www/ssl/mycert.pem") Note: this parameter is for authorizer service. - The url where certificate is available for other verifier services. - (value of Identity-info header) The certificate should be in DER + The url where certificate is available for other verifier services. + (value of Identity-info header) The certificate should be in DER format. This parameter is required by authentication service. - Example 1.3. Set certificate_url parameter + Example 1.3. Set certificate_url parameter ... modparam("auth_identity","certificate_url","https://foo.bar/mycert.der") ... @@ -222,13 +221,13 @@ modparam("auth_identity","certificate_url","https://foo.bar/mycert.der") Note: this parameter is for authorizer service. - If the Date header of message which is needed to be authenticated - contains a time different by more than this seconds from the current + If the Date header of message which is needed to be authenticated + contains a time different by more than this seconds from the current time noted by the authentication service then it rejects the message. This parameter is optional. The default value is "600". - Example 1.4. Set msg_timeout parameter + Example 1.4. Set msg_timeout parameter ... modparam("auth_identity","msg_timeout",600) ... @@ -237,13 +236,13 @@ modparam("auth_identity","msg_timeout",600) Note: this parameter is for verifier service. - The validity time of an authenticated message. The message will be + The validity time of an authenticated message. The message will be refused if it contains a time different by more than this seconds from the current time noted by the verification service. This parameter is optional. The default value is "3600". - Example 1.5. Set auth_validity_time parameter + Example 1.5. Set auth_validity_time parameter ... modparam("auth_identity","auth_validity_time",3600) ... @@ -252,15 +251,15 @@ modparam("auth_identity","auth_validity_time",3600) Note: this parameter is for verifier service. - The number of Call-IDs stored in order to recognize call replay - attacks. A Call-ID is stored auth_validity_time long and uses + The number of Call-IDs stored in order to recognize call replay + attacks. A Call-ID is stored auth_validity_time long and uses approximately 100 bytes memory. - This parameter is optional. The default value is "32768". (you should - increase the size of shared memory with -m command line switch if you + This parameter is optional. The default value is "32768". (you should + increase the size of shared memory with -m command line switch if you liked to store more callid than 10000) - Example 1.6. Set auth_validity_time parameter + Example 1.6. Set auth_validity_time parameter ... modparam("auth_identity","callid_cache_limit",32768) ... @@ -270,12 +269,12 @@ modparam("auth_identity","callid_cache_limit",32768) Note: this parameter is for verifier service. The number of certificates stored in order to avoid needless download. - A certificate is stored until its expiration date and uses + A certificate is stored until its expiration date and uses approximately 600 bytes memory. This parameter is optional. The default value is "4096". - Example 1.7. Set certificate_cache_limit parameter + Example 1.7. Set certificate_cache_limit parameter ... modparam("auth_identity","certificate_cache_limit",4096) ... @@ -284,13 +283,13 @@ modparam("auth_identity","certificate_cache_limit",4096) Note: this parameter is for verifier service. - A file of trusted certificates. The file should contain multiple - certificates in PEM format concatenated together. It could be useful + A file of trusted certificates. The file should contain multiple + certificates in PEM format concatenated together. It could be useful for verifying a certificate signed by a private CA. This parameter is optional. It has not got default value. - Example 1.8. Set cainfo_path parameter + Example 1.8. Set cainfo_path parameter ... modparam("auth_identity","cainfo_path","/etc/ssl/certs/ca-certificates.crt") ... @@ -303,132 +302,132 @@ modparam("auth_identity","cainfo_path","/etc/ssl/certs/ca-certificates.crt") This parameter is optional. The default value is "0". - Example 1.9. Set accept_pem_certs parameter + Example 1.9. Set accept_pem_certs parameter ... modparam("auth_identity","accept_pem_certs",1) ... 6. Functions - 6.1. auth_date_proc() + 6.1. auth_date_proc() 6.1.1. Dependencies - 6.2. auth_add_identity() + 6.2. auth_add_identity() 6.2.1. Dependencies - 6.3. vrfy_check_date() + 6.3. vrfy_check_date() 6.3.1. Dependencies - 6.4. vrfy_get_certificate() + 6.4. vrfy_get_certificate() 6.4.1. Dependencies - 6.5. vrfy_check_certificate() + 6.5. vrfy_check_certificate() 6.5.1. Dependencies - 6.6. vrfy_check_msgvalidity() + 6.6. vrfy_check_msgvalidity() 6.6.1. Dependencies - 6.7. vrfy_check_callid() + 6.7. vrfy_check_callid() 6.7.1. Dependencies -6.1. auth_date_proc() +6.1. auth_date_proc() Note: this function is for authorizer service. - If a message, the auth service should authorize, contains Date header - then this function checks whether it falls in message timeout (set by - msg_timeout parameter). If there is not any Date header then the - module adds one. This function also checks whether the certificate of - the authentication service (set by certificate_path parameter) has - been expired. + If a message, the auth service should authorize, contains Date header + then this function checks whether it falls in message timeout (set by + msg_timeout parameter). If there is not any Date header then the module + adds one. This function also checks whether the certificate of the + authentication service (set by certificate_path parameter) has been + expired. 6.1.1. Dependencies No dependencies -6.2. auth_add_identity() +6.2. auth_add_identity() Note: this function is for authorizer service. - Assembles digest-string from the message, calculates its SHA1 hash, + Assembles digest-string from the message, calculates its SHA1 hash, encrypts it with the private key (set by privatekey_path parameter) of - the authorizer service, base64 encodes it and adds to the outgoing - message as the value of Identity header. This function also adds - Identity-Info header which contains an URI (set by certificate_url + the authorizer service, base64 encodes it and adds to the outgoing + message as the value of Identity header. This function also adds + Identity-Info header which contains an URI (set by certificate_url parameter) from which the certificate of auth service can be acquired. - Note: this function needs the final outgoing message for - authorization, so no module may modify any digest string related - headers (From, To, Call-ID, CSeq, Date, Contact) and body after - auth_add_identity()'s been called + Note: this function needs the final outgoing message for authorization, + so no module may modify any digest string related headers (From, To, + Call-ID, CSeq, Date, Contact) and body after auth_add_identity()'s been + called 6.2.1. Dependencies auth_date_proc() must be called before -6.3. vrfy_check_date() +6.3. vrfy_check_date() Note: this function is for verifier service. - Checks Date header of the incoming message whether falls in validity + Checks Date header of the incoming message whether falls in validity time (set by auth_validity_time parameter) 6.3.1. Dependencies No dependencies -6.4. vrfy_get_certificate() +6.4. vrfy_get_certificate() Note: this function is for verifier service. - Tries to get certificate defined by the value of Identity-info header - from certificate table (which size is set by certificate_cache_limit - parameter). If the required certificate is not found there then this + Tries to get certificate defined by the value of Identity-info header + from certificate table (which size is set by certificate_cache_limit + parameter). If the required certificate is not found there then this function downloads it. 6.4.1. Dependencies No dependencies -6.5. vrfy_check_certificate() +6.5. vrfy_check_certificate() Note: this function is for verifier service. - Checks whether the downloaded certificate is valid (is not expired, - its subject and the domain part of the URL are the same) and adds it - to certificate table. + Checks whether the downloaded certificate is valid (is not expired, its + subject and the domain part of the URL are the same) and adds it to + certificate table. 6.5.1. Dependencies vrfy_get_certificate() must be called before -6.6. vrfy_check_msgvalidity() +6.6. vrfy_check_msgvalidity() Note: this function is for verifier service. - Assembles digest-string from the message, create SHA1 hash and - compares it with the decrypted value of Identity header. + Assembles digest-string from the message, create SHA1 hash and compares + it with the decrypted value of Identity header. 6.6.1. Dependencies - vrfy_get_certificate() must be called before and + vrfy_get_certificate() must be called before and vrfy_check_certificate() should be called before -6.7. vrfy_check_callid() +6.7. vrfy_check_callid() Note: this function is for verifier service. - Checks whether the current call's been already processed in validity - time (set by auth_validity_time) to recognize call replay attacks. If + Checks whether the current call's been already processed in validity + time (set by auth_validity_time) to recognize call replay attacks. If this call (identified by Call-id, Cseq, and tag of From header triple) - has not been replayed then adds it to callid table (which size is set + has not been replayed then adds it to callid table (which size is set by callid_cache_limit parameter). 6.7.1. Dependencies diff --git a/modules/auth_radius/README b/modules/auth_radius/README index 1875408c762..1bb9fb963a9 100644 --- a/modules/auth_radius/README +++ b/modules/auth_radius/README @@ -22,11 +22,11 @@ Jan Janak - Copyright © 2002, 2003 FhG FOKUS + Copyright 2002, 2003 FhG FOKUS - Copyright © 2005 Voice Sistem SRL + Copyright 2005 Voice Sistem SRL - Copyright © 2008-2010 Juha Heinanen + Copyright 2008-2010 Juha Heinanen __________________________________________________________________ Table of Contents @@ -54,7 +54,7 @@ Jan Janak List of Examples - 1.1. “SIP-AVP” RADIUS AVP exmaples + 1.1. "SIP-AVP" RADIUS AVP exmaples 1.2. radius_config parameter usage 1.3. service_type parameter usage 1.4. auth_extra parameter usage @@ -107,7 +107,7 @@ Chapter 1. Admin Guide queries. The additional credentials are embedded in the RADIUS reply as AVPs - “SIP-AVP”. The syntax of the value is: + "SIP-AVP". The syntax of the value is: * value = SIP_AVP_NAME SIP_AVP_VALUE * SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER * SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE @@ -117,7 +117,7 @@ Chapter 1. Admin Guide The RPID value may be fetch via this mechanism. - Example 1.1. “SIP-AVP” RADIUS AVP exmaples + Example 1.1. "SIP-AVP" RADIUS AVP exmaples .... "email:joe@yahoo.com" - STRING NAME AVP (email) with STRING VALUE (joe@yahoo.com) @@ -159,7 +159,7 @@ Chapter 1. Admin Guide This is the location of the configuration file of radius client libraries. - Default value is “/usr/local/etc/radiusclient-ng/radiusclient.conf”. + Default value is "/usr/local/etc/radiusclient-ng/radiusclient.conf". Example 1.2. radius_config parameter usage modparam("auth_radius", "radius_config", "/etc/radiusclient.conf") @@ -170,7 +170,7 @@ modparam("auth_radius", "radius_config", "/etc/radiusclient.conf") default should be fine for most people. See your radius client include files for numbers to be put in this parameter if you need to change it. - Default value is “15”. + Default value is "15". Example 1.3. service_type parameter usage modparam("auth_radius", "service_type", 15) @@ -199,7 +199,7 @@ modparam("auth_radius", "auth_extra", "Acct-Session-Id=$ci") authentication. At the time of this writing, certain versions of Linksys WRT54GL are known to do that. - Default value is “-1”. + Default value is "-1". Example 1.5. use_ruri_flag parameter usage modparam("auth_radius", "use_ruri_flag", 22) diff --git a/modules/blst/README b/modules/blst/README index dc25cd65ec2..1bc91a56330 100644 --- a/modules/blst/README +++ b/modules/blst/README @@ -1,4 +1,3 @@ - Blst Module - Blacklist Management Andrei Pelinescu-Onciul @@ -6,7 +5,7 @@ Andrei Pelinescu-Onciul iptelorg GmbH Copyright 2007 iptelorg GmbH - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -15,14 +14,14 @@ Andrei Pelinescu-Onciul 1. Overview 2. Functions - 2.1. blst_add([timeout]) - 2.2. blst_add_retry_after(min, max) - 2.3. blst_del() - 2.4. blst_is_blacklisted() - 2.5. blst_set_ignore([flags]) - 2.6. blst_rpl_set_ignore([flags]) - 2.7. blst_clear_ignore([flags]) - 2.8. blst_rpl_clear_ignore([flags]) + 2.1. blst_add([timeout]) + 2.2. blst_add_retry_after(min, max) + 2.3. blst_del() + 2.4. blst_is_blacklisted() + 2.5. blst_set_ignore([flags]) + 2.6. blst_rpl_set_ignore([flags]) + 2.7. blst_clear_ignore([flags]) + 2.8. blst_rpl_clear_ignore([flags]) List of Examples @@ -40,14 +39,14 @@ Chapter 1. Admin Guide 1. Overview 2. Functions - 2.1. blst_add([timeout]) - 2.2. blst_add_retry_after(min, max) - 2.3. blst_del() - 2.4. blst_is_blacklisted() - 2.5. blst_set_ignore([flags]) - 2.6. blst_rpl_set_ignore([flags]) - 2.7. blst_clear_ignore([flags]) - 2.8. blst_rpl_clear_ignore([flags]) + 2.1. blst_add([timeout]) + 2.2. blst_add_retry_after(min, max) + 2.3. blst_del() + 2.4. blst_is_blacklisted() + 2.5. blst_set_ignore([flags]) + 2.6. blst_rpl_set_ignore([flags]) + 2.7. blst_clear_ignore([flags]) + 2.8. blst_rpl_clear_ignore([flags]) 1. Overview @@ -55,19 +54,19 @@ Chapter 1. Admin Guide 2. Functions - 2.1. blst_add([timeout]) - 2.2. blst_add_retry_after(min, max) - 2.3. blst_del() - 2.4. blst_is_blacklisted() - 2.5. blst_set_ignore([flags]) - 2.6. blst_rpl_set_ignore([flags]) - 2.7. blst_clear_ignore([flags]) - 2.8. blst_rpl_clear_ignore([flags]) + 2.1. blst_add([timeout]) + 2.2. blst_add_retry_after(min, max) + 2.3. blst_del() + 2.4. blst_is_blacklisted() + 2.5. blst_set_ignore([flags]) + 2.6. blst_rpl_set_ignore([flags]) + 2.7. blst_clear_ignore([flags]) + 2.8. blst_rpl_clear_ignore([flags]) -2.1. blst_add([timeout]) +2.1. blst_add([timeout]) - Adds the source of the current message to the blacklist for timeout - seconds. If timeout is missing or 0 it uses the default blacklist + Adds the source of the current message to the blacklist for timeout + seconds. If timeout is missing or 0 it uses the default blacklist timeout (dst_blacklist_expire). Example 1.1. blst_add usage @@ -78,13 +77,13 @@ else blst_add(); # use default blacklist timeout ... -2.2. blst_add_retry_after(min, max) +2.2. blst_add_retry_after(min, max) - Adds the source of the current message to the blacklist for the time - interval specified in the Retry-After header. If the Retry-After - header is missing, it will fail (returns false). If the Retry-After - value is less than min, then min seconds will be used instead. If the - Retry-After value is greater than max, then max seconds will be used + Adds the source of the current message to the blacklist for the time + interval specified in the Retry-After header. If the Retry-After header + is missing, it will fail (returns false). If the Retry-After value is + less than min, then min seconds will be used instead. If the + Retry-After value is greater than max, then max seconds will be used instead. Example 1.2. blst_add_retry_after usage @@ -96,10 +95,10 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds } ... -2.3. blst_del() +2.3. blst_del() - Removes the source of the current message from the blacklist. If the - address is not present in the blacklist at the time of the call it + Removes the source of the current message from the blacklist. If the + address is not present in the blacklist at the time of the call it returns false. Example 1.3. blst_del usage @@ -107,7 +106,7 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds blst_del(); ... -2.4. blst_is_blacklisted() +2.4. blst_is_blacklisted() Returns true if the source of the current message is blacklisted. @@ -119,26 +118,26 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds } ... -2.5. blst_set_ignore([flags]) +2.5. blst_set_ignore([flags]) - Set errors that will not be taken into account when deciding whether - to blacklist a destination for the current message or a local reply to - the current message. + Set errors that will not be taken into account when deciding whether to + blacklist a destination for the current message or a local reply to the + current message. - blst_set_ignore(..) works for forwarding the current message and - blst_rpl_set_ignore(...) works for local replies to the current + blst_set_ignore(..) works for forwarding the current message and + blst_rpl_set_ignore(...) works for local replies to the current message. - The variants of these functions with no parameters will ignore + The variants of these functions with no parameters will ignore everything (equivalent to passing 0xff). - The flags are stored internally as a bitmask, and are applied by + The flags are stored internally as a bitmask, and are applied by bitwise ANDing them together. The following flags are available: * 0x02 - generic send error (send denied/ failed). * 0x04 - connect failed (TCP, TLS or SCTP). * 0x08 - ICMP error (not currently used). * 0x10 - SIP transaction timeout. - * 0x20 - 503 reply (statefull mode only). For more details see + * 0x20 - 503 reply (statefull mode only). For more details see tmblst_503. Note @@ -150,13 +149,13 @@ Note Example 1.5. blst_set_ignore usage blst_set_ignore(6); # ignore send and connect errors -2.6. blst_rpl_set_ignore([flags]) +2.6. blst_rpl_set_ignore([flags]) See function blst_set_ignore([flags]). -2.7. blst_clear_ignore([flags]) +2.7. blst_clear_ignore([flags]) - Clears blacklist ignore flags previously set by the corresponding + Clears blacklist ignore flags previously set by the corresponding blst_set_ignore(...) or blst_rpl_set_ignore(...) functions. See also blst_set_ignore. @@ -164,6 +163,6 @@ Note Example 1.6. blst_clear_ignore usage blst_clear_ignore(4); # ignore connect errors -2.8. blst_rpl_clear_ignore([flags]) +2.8. blst_rpl_clear_ignore([flags]) See function blst_clear_ignore([flags]). diff --git a/modules/carrierroute/README b/modules/carrierroute/README index bee91c72cbe..3960794fb95 100644 --- a/modules/carrierroute/README +++ b/modules/carrierroute/README @@ -11,7 +11,7 @@ Lucian Balaceanu 1&1 Internet AG - Copyright © 2007 1&1 Internet AG + Copyright 2007 1&1 Internet AG __________________________________________________________________ Table of Contents @@ -268,7 +268,7 @@ Chapter 1. Admin Guide use the lcr and dispatcher module. Starting with version 3.1 , if you want to use this module in failure - routes, it is not needed to call“append_branch()” after rewriting the + routes, it is not needed to call"append_branch()" after rewriting the request URI in order to relay the message to the new target. Its also supportes the usage of database derived failure routing descisions with the carrierfailureroute table. @@ -285,7 +285,7 @@ Chapter 1. Admin Guide needs the capability to issue raw queries. Its not possible to use the dbtext or db_berkeley module at the moment. * The tm module, when you want to use the $T_reply_code - pseudo-variable in the “cr_next_domain” function. + pseudo-variable in the "cr_next_domain" function. 3. Parameters @@ -305,7 +305,7 @@ Chapter 1. Admin Guide The name of the table containing the subscribers - Default value is “subscriber”. + Default value is "subscriber". Example 1.1. Set subscriber_table parameter ... @@ -317,7 +317,7 @@ modparam("carrierroute", "subscriber_table", "subscriber") The name of the column in the subscriber table containing the usernames. - Default value is “username”. + Default value is "username". Example 1.2. Set subscriber_user_col parameter ... @@ -329,7 +329,7 @@ modparam("carrierroute", "subscriber_user_col", "username") The name of the column in the subscriber table containing the domain of the subscriber. - Default value is “domain”. + Default value is "domain". Example 1.3. Set subscriber_domain_col parameter ... @@ -341,7 +341,7 @@ modparam("carrierroute", "subscriber_domain_col", "domain") The name of the column in the subscriber table containing the carrier id of the subscriber. - Default value is “cr_preferred_carrier”. + Default value is "cr_preferred_carrier". Example 1.4. Set subscriber_carrier_col parameter ... @@ -353,7 +353,7 @@ modparam("carrierroute", "subscriber_carrier_col", "cr_preferred_carrier") Specifies whether the module loads its config data from a file or from a database. Possible values are file or db. - Default value is “file”. + Default value is "file". Example 1.5. Set config_source parameter ... @@ -364,7 +364,7 @@ modparam("carrierroute", "config_source", "file") Specifies the path to the config file. - Default value is “/etc/kamailio/carrierroute.conf”. + Default value is "/etc/kamailio/carrierroute.conf". Example 1.6. Set config_file parameter ... @@ -376,7 +376,7 @@ modparam("carrierroute", "config_file", "/etc/kamailio/carrierroute.conf") The name of the carrier tree used per default (if the current subscriber has no preferred tree) - Default value is “default”. + Default value is "default". Example 1.7. Set default_tree parameter ... @@ -389,7 +389,7 @@ modparam("carrierroute", "default_tree", "default") use the domain part for user matching or not. This parameter is tunable via the ser cfg framework. - Default value is “0”. + Default value is "0". Example 1.8. Set use_domain parameter ... @@ -403,7 +403,7 @@ modparam("carrierroute", "use_domain", 0) 1, the default tree is used. Otherwise, cr_user_rewrite_uri returns an error. This parameter is tunable via the ser cfg framework. - Default value is “1”. + Default value is "1". Example 1.9. Set fallback_default parameter ... @@ -418,7 +418,7 @@ modparam("carrierroute", "fallback_default", 1) The database driver must support the fetch_result() capability. This parameter is tunable via the ser cfg framework. - Default value is “2000”. + Default value is "2000". Example 1.10. Set fetch_rows parameter ... @@ -434,7 +434,7 @@ modparam("carrierroute", "fetch_rows", 3000) matching. Please be aware that memory requirements for storing the routing tree in shared memory will also increase by a factor of 12.8. - Default value is “10”. + Default value is "10". Example 1.11. Set match_mode parameter ... @@ -471,13 +471,13 @@ cr_user_rewrite_uri(uri, domain) cr_tree_rewrite_uri(tree, domain) -> cr_route(tree, domain, "$rU", "$rU", "call_id") -4.1. cr_user_carrier(user, domain, dstavp) +4.1. cr_user_carrier(user, domain, dstavp) This function loads the carrier and stores it in an AVP. It cannot be used in the config file mode, as it needs a mapping of the given user to a certain carrier. The is derived from a database entry belonging to the user parameter. This mapping must be available in the table that is - specified in the “subscriber_table” variable. This data is not cached + specified in the "subscriber_table" variable. This data is not cached in memory, that means for every execution of this function a database query will be done. @@ -488,7 +488,7 @@ cr_tree_rewrite_uri(tree, domain) string any pseudo-variable could be used as input. * dstavp - Name of the AVP where to store the carrier id. -4.2. cr_route(carrier, domain, prefix_matching, rewrite_user, hash_source, +4.2. cr_route(carrier, domain, prefix_matching, rewrite_user, hash_source, descavp) This function searches for the longest match for the user given in @@ -512,7 +512,7 @@ descavp) If flags and masks values are specified in the routing rule, they will be compared by this function to the message flags. Specify a flag and - mask value of “0” to match to all possible message flags (this is the + mask value of "0" to match to all possible message flags (this is the default value). If flags and mask are not zero, and no match to the message flags is possible, no routing will be done. The calculation of the hash and the load-balancing is done after the flags matching. @@ -535,7 +535,7 @@ descavp) * decsavp - Name of the AVP where to store the description. This parameter is optional. -4.3. cr_nofallback_route(carrier, domain, prefix_matching, rewrite_user, +4.3. cr_nofallback_route(carrier, domain, prefix_matching, rewrite_user, hash_source, descavp) This function searches for the longest match for the user given in @@ -576,7 +576,7 @@ hash_source, descavp) * descavp - Name of the AVP where to store the description. This parameter is optional. -4.4. cr_next_domain(carrier, domain, prefix_matching, host, reply_code, +4.4. cr_next_domain(carrier, domain, prefix_matching, host, reply_code, dstavp) This function searches for the longest match for the user given in @@ -821,7 +821,7 @@ failure_route[1] { Don't use a hash index value of zero. If you ommit the hash completly, the module gives them a autogenerated value, starting from one. - Use the “NULL” prefix to specify an empty prefix in the config file. + Use the "NULL" prefix to specify an empty prefix in the config file. Please note that the prefix is matched against the request URI (or to URI), if they did not contain a valid (numerical) URI, no match is possible. So for loadbalancing purposes e.g. for your registrars, you @@ -912,21 +912,21 @@ domain register { +----+---------+--------+-------------+-------+------+---------------+ ... - This table contains three routes to two gateways for the “49” prefix, + This table contains three routes to two gateways for the "49" prefix, and a default route for other prefixes over carrier 2 and carrier 1. The gateways for the default carrier will be used for functions that don't support the user specific carrier lookup. The routing rules for - carrier 1 and carrier 2 for the “49” prefix contains a additional rule + carrier 1 and carrier 2 for the "49" prefix contains a additional rule with the domain 2, that can be used for example as fallback if the gateways in domain 1 are not reachable. Two more fallback rules (domain 3 and 4) for carrier 1 are also supplied to support the functionality of the carrierfailureroute table example that is provided in the next section. - This table provides also a “carrier 1” routing rule for the “49” + This table provides also a "carrier 1" routing rule for the "49" prefix, that is only choosen if some message flags are set. If this - flags are not set, the other two rules are used. The “strip”, “mask” - and “comment” colums are omitted for brevity. + flags are not set, the other two rules are used. The "strip", "mask" + and "comment" colums are omitted for brevity. Example 1.21. Example database content - simple carrierfailureroute table @@ -939,10 +939,10 @@ domain register { +----+---------+--------+---------------+------------+-------------+ ... - This table contains two failure routes for the “gw.carrier1-1” and “-2” + This table contains two failure routes for the "gw.carrier1-1" and "-2" gateways. For any (failure) reply code the respective next domain is choosen. After that no more failure routes are available, an error will - be returned from the “cr_next_domain” function. Not all table colums + be returned from the "cr_next_domain" function. Not all table colums are show here for brevity. For each failure route domain and carrier that is added to the @@ -1005,7 +1005,7 @@ domain register { 7.3. User specific routing - For a functional routing the “cr_preferred_carrier” column must be + For a functional routing the "cr_preferred_carrier" column must be added to the subscriber table (or to the table and column that you specified as modul parameter) to choose the actual carrier for the users. @@ -1057,7 +1057,7 @@ Chapter 2. Module parameter for database access. URL to the database containing the data. - Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. + Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". Example 2.1. Set db_url parameter ... @@ -1068,7 +1068,7 @@ modparam("carrierroute", "db_url", "dbdriver://username:password@dbhost/dbname") Name of the carrierroute table for the carrierroute module. - Default value is “carrierroute”. + Default value is "carrierroute". Example 2.2. Set carrierroute_table parameter ... @@ -1211,7 +1211,7 @@ modparam("carrierroute", "carrierroute_description_col", "description") Name of the carrierfailureroute table for the carrierroute module. - Default value is “carrierfailureroute”. + Default value is "carrierfailureroute". Example 2.15. Set carrierfailureroute_table parameter ... @@ -1322,7 +1322,7 @@ modparam("carrierroute", "carrierfailureroute_description_col", "description") Name of the carrier_name table for the carrierroute module. - Default value is “carrier_name”. + Default value is "carrier_name". Example 2.26. Set carrier_name_table parameter ... @@ -1351,7 +1351,7 @@ modparam("carrierroute", "carrier_name_carrier_col", "carrier") Name of the domain_name table for the carrierroute module. - Default value is “domain_name”. + Default value is "domain_name". Example 2.29. Set domain_name_table parameter ... diff --git a/modules/cdp/README b/modules/cdp/README index 882b00412f3..230d1b62e02 100644 --- a/modules/cdp/README +++ b/modules/cdp/README @@ -8,8 +8,6 @@ Edited by Jason Penton -Edited by - Richard Good Copyright 2006 FhG Fokus diff --git a/modules/cdp_avp/README b/modules/cdp_avp/README index 3e30e87ab55..3b90f2832d8 100644 --- a/modules/cdp_avp/README +++ b/modules/cdp_avp/README @@ -8,8 +8,6 @@ Edited by Jason Penton -Edited by - Richard Good Copyright 2006 FhG Fokus diff --git a/modules/cfg_db/README b/modules/cfg_db/README index e1e49d854c1..6075d59d53a 100644 --- a/modules/cfg_db/README +++ b/modules/cfg_db/README @@ -1,4 +1,3 @@ - The configuration database module - cfg_db Tomas Mandys @@ -6,7 +5,7 @@ Tomas Mandys Iptel.org Copyright 2008 Tomas Mandys - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -43,31 +42,31 @@ Chapter 1. Admin Guide 1. Overview - The module implements a database driver for the configuration - parameters API. When configuration parameters are being declared - (typically when starting) API then driver is notified and has chance - to set value (of any parameter) based on value taken from database. - It's primarily targeted for interfacing with 3rd party software which - is aware of the Kamailio configuration. - - A parameter is uniquely identified by a group_name plus a name, which - is used by the driver to check if a value can be found. Because - configuration parameters may be spread in many tables, a translation - table is used to indicate where to start searching. Multiple look-up + The module implements a database driver for the configuration + parameters API. When configuration parameters are being declared + (typically when starting) API then driver is notified and has chance to + set value (of any parameter) based on value taken from database. It's + primarily targeted for interfacing with 3rd party software which is + aware of the Kamailio configuration. + + A parameter is uniquely identified by a group_name plus a name, which + is used by the driver to check if a value can be found. Because + configuration parameters may be spread in many tables, a translation + table is used to indicate where to start searching. Multiple look-up tables may be defined for single parameter, tables are searched in the first round by exact match until parameter is found, all tables listed - with wildcard (asterisk) in group name are searched in the second + with wildcard (asterisk) in group name are searched in the second round. If a parameter is not found then its value is left unchanged. - Configuration parameters are normally declared in C code and this + Configuration parameters are normally declared in C code and this module additionally supports also declaring custom parameters in extra - table. Such parameters may be used typically in script only. All - parameters listed in the table are declared in the first step, values - are initialized in the second step using the same procedure as C-code + table. Such parameters may be used typically in script only. All + parameters listed in the table are declared in the first step, values + are initialized in the second step using the same procedure as C-code parameters. - The module does not reflect changes made in parameters when SER is - running. It just declares variables and assigns values when SER is + The module does not reflect changes made in parameters when SER is + running. It just declares variables and assigns values when SER is starting. That's all. 2. Dependencies @@ -96,33 +95,33 @@ modparam("cfg_db", "db_url", "mysql://SER:123@127.0.0.1:12345/SER"); 3.2. transl_tbl (string) := "cfg_transl" - Name of table used for pointing group_name+name into configuration - table. If empty/null field values are found then default values will - be used. The default values are declared in record having group_name - called . The C-code "absolutely" default values ("cfg_var", - "group_name", "name", "value"). The other keyword is asterisk * which - matches all parameters and will be used if parameter is not - explicitely mentioned. + Name of table used for pointing group_name+name into configuration + table. If empty/null field values are found then default values will be + used. The default values are declared in record having group_name + called . The C-code "absolutely" default values ("cfg_var", + "group_name", "name", "value"). The other keyword is asterisk * which + matches all parameters and will be used if parameter is not explicitely + mentioned. 3.3. custom_tbl (string) := "cfg_custom" - Name of table used for extra param declaration (group_name, name, - type, min/max value, description). + Name of table used for extra param declaration (group_name, name, type, + min/max value, description). 4. Examples Example 1.2. Content of tables cfg_transl table: - group_name|name|cfg_table|cfg_table_group_name_field|cfg_table_name_fie -ld|cfg_table_value_field + group_name|name|cfg_table|cfg_table_group_name_field|cfg_table_name_fiel +d|cfg_table_value_field core|use_dst_blacklist|cfg_dns||| core|dst_blacklist_mem|cfg_dns||| core|dst_blacklist_expire||| - my|route_addr|cfg_my|my_group_name|my_name|my_value ; overrides values + my|route_addr|cfg_my|my_group_name|my_name|my_value ; overrides values my|use_rtp_proxy|cfg_my|my_group_name|my_name|my_value - *|*|||| ; matches all param ids, points to tables defined in row + *|*|||| ; matches all param ids, points to tables defined in row ||cfg_var|group_name|name|value ; default cfg_table* values cfg_custom table: diff --git a/modules/cfg_rpc/README b/modules/cfg_rpc/README index 6827a60132a..4e0c0a1cd39 100644 --- a/modules/cfg_rpc/README +++ b/modules/cfg_rpc/README @@ -1,4 +1,3 @@ - cfg_rpc Module Miklos Tirpak @@ -6,7 +5,7 @@ Miklos Tirpak Copyright 2007 iptelorg GmbH - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -78,17 +77,17 @@ Chapter 1. Admin Guide 1. Overview - The module implements RPC commands to set and get configuration - variables on-the-fly, that are declared by SIP Router core and by the + The module implements RPC commands to set and get configuration + variables on-the-fly, that are declared by SIP Router core and by the modules. - For example, it can be used to fine-tune values for global parameters - such as debug, tcp/sctp/dns attributes, a.s.o. without the need of + For example, it can be used to fine-tune values for global parameters + such as debug, tcp/sctp/dns attributes, a.s.o. without the need of restart. - RPC connector modules, such as "ctl" or "xmlrpc", although not a - dependecy, should be loaded in order to execute the RPC commands - exported by this module. When ctl module is loaded, the tool 'kamcmd' + RPC connector modules, such as "ctl" or "xmlrpc", although not a + dependecy, should be loaded in order to execute the RPC commands + exported by this module. When ctl module is loaded, the tool 'kamcmd' can be used to execute the RPC commands implemented in this module. 2. Dependencies @@ -103,7 +102,7 @@ Chapter 1. Admin Guide 2.2. External Libraries or Applications - The following libraries or applications must be installed before + The following libraries or applications must be installed before running SIP Router with this module loaded: * None. @@ -128,12 +127,11 @@ Chapter 1. Admin Guide 3.17. cfg.add_group_inst 3.18. cfg.del_group_inst - The module implements the RPC commands documented in the next - sections. + The module implements the RPC commands documented in the next sections. 3.1. cfg.list - cfg.list - List the configuration variables. The function has one + cfg.list - List the configuration variables. The function has one optional parameter: group name. Example 1.1. Use cfg.get RPC command @@ -143,8 +141,8 @@ Chapter 1. Admin Guide 3.2. cfg.get - cfg.get - Get the value of a configuration variable. The function - accepts two parameters: group name, variable name. The group name can + cfg.get - Get the value of a configuration variable. The function + accepts two parameters: group name, variable name. The group name can optionally contain the group instance id, for example foo[5]. Example 1.2. Use cfg.get RPC command @@ -154,10 +152,10 @@ Chapter 1. Admin Guide 3.3. cfg.seti - cfg.seti - Set the value of a configuration variable and commit the + cfg.seti - Set the value of a configuration variable and commit the change immediately. The function accepts three parameters: group name, - variable name, integer value. The group name can optionally contain - the group instance id, for example foo[5]. + variable name, integer value. The group name can optionally contain the + group instance id, for example foo[5]. Example 1.3. Use cfg.seti RPC command ... @@ -170,7 +168,7 @@ Chapter 1. Admin Guide 3.5. cfg.sets - cfg.sets - Set the value of a configuration variable and commit the + cfg.sets - Set the value of a configuration variable and commit the change immediately. The function accepts three parameters: group name, variable name, string value. The group name can optionally contain the group instance id, for example foo[5]. @@ -181,51 +179,51 @@ Chapter 1. Admin Guide 3.7. cfg.set - cfg.set - Set the value of a configuration variable and commit the - change immediately. This is a wrapper command for cfg.set_now_int and - cfg.set_now_string depending on the type of the value provided. The - function accepts three parameters: group name, variable name, - int/string value. The group name can optionally contain the group + cfg.set - Set the value of a configuration variable and commit the + change immediately. This is a wrapper command for cfg.set_now_int and + cfg.set_now_string depending on the type of the value provided. The + function accepts three parameters: group name, variable name, + int/string value. The group name can optionally contain the group instance id, for example foo[5]. 3.8. cfg.del - cfg.del - Delete the value of a configuration variable from a group - instance and commit the change immediately. The value is reset to the + cfg.del - Delete the value of a configuration variable from a group + instance and commit the change immediately. The value is reset to the default value and it follows the changes of that. The function accepts two parameters: group name, variable name. The group name must contain the group instance id, for example foo[5]. 3.9. cfg.set_delayed_int - cfg.set_delayed_int - Prepare the change of a configuration variable, - but does not commit the new value yet. The function accepts three - parameters: group name, variable name, integer value. The group name + cfg.set_delayed_int - Prepare the change of a configuration variable, + but does not commit the new value yet. The function accepts three + parameters: group name, variable name, integer value. The group name can optionally contain the group instance id, for example foo[5]. 3.10. cfg.set_delayed_string - cfg.set_delayed_string - Prepare the change of a configuration - variable, but does not commit the new value yet. The function accepts - three parameters: group name, variable name, string value. The group + cfg.set_delayed_string - Prepare the change of a configuration + variable, but does not commit the new value yet. The function accepts + three parameters: group name, variable name, string value. The group name can optionally contain the group instance id, for example foo[5]. 3.11. cfg.set_delayed - cfg.set_delayed - Prepare the change of a configuration variable, but - does not commit the new value yet. This is a wrapper command for - cfg.set_delayed_int and cfg.set_delayed_string depending on the type - of the value provided. The function accepts three parameters: group - name, variable name, int/string value. The group name can optionally - contain the group instance id, for example foo[5]. + cfg.set_delayed - Prepare the change of a configuration variable, but + does not commit the new value yet. This is a wrapper command for + cfg.set_delayed_int and cfg.set_delayed_string depending on the type of + the value provided. The function accepts three parameters: group name, + variable name, int/string value. The group name can optionally contain + the group instance id, for example foo[5]. 3.12. cfg.del_delayed cfg.del_delayed - Prepare the deletion of the value of a configuration - variable from a group instance, but does not commit the change yet. - The value is reset to the default value and it follows the changes of - that. The function accepts two parameters: group name, variable name. - The group name must contain the group instance id, for example foo[5]. + variable from a group instance, but does not commit the change yet. The + value is reset to the default value and it follows the changes of that. + The function accepts two parameters: group name, variable name. The + group name must contain the group instance id, for example foo[5]. 3.13. cfg.commit @@ -234,27 +232,27 @@ Chapter 1. Admin Guide 3.14. cfg.rollback - cfg.rollback - Drop the prepared configuration changes. The function + cfg.rollback - Drop the prepared configuration changes. The function does not have any parameters. 3.15. cfg.help - cfg.help - Print the description of a configuration variable. The + cfg.help - Print the description of a configuration variable. The function accepts two parameters: group name, variable name. 3.16. cfg.diff - cfg.diff - List the pending configuration changes that have not been + cfg.diff - List the pending configuration changes that have not been committed yet. The function does not have any parameters. 3.17. cfg.add_group_inst - cfg.add_group_inst - Add a new instance to an existing configuration - group. The function accepts one parameter: group name[instance id], - for example foo[5]. + cfg.add_group_inst - Add a new instance to an existing configuration + group. The function accepts one parameter: group name[instance id], for + example foo[5]. 3.18. cfg.del_group_inst - cfg.del_group_inst - Delete an instance of an existing configuration - group. The function accepts one parameter: group name[instance id], - for example foo[5]. + cfg.del_group_inst - Delete an instance of an existing configuration + group. The function accepts one parameter: group name[instance id], for + example foo[5]. diff --git a/modules/cnxcc/README b/modules/cnxcc/README index da1e5f6d4cd..570470424fd 100644 --- a/modules/cnxcc/README +++ b/modules/cnxcc/README @@ -4,7 +4,7 @@ Carlos Ruiz Diaz ConexionGroup S.A. - Copyright © 2013 Carlos Ruiz Diaz, carlos.ruizdiaz@gmail.com + Copyright 2013 Carlos Ruiz Diaz, carlos.ruizdiaz@gmail.com __________________________________________________________________ Table of Contents @@ -157,7 +157,7 @@ modparam("cnxcc", "credit_check_period", 1) 4.4. cnxcc_set_max_channel() 4.5. cnxcc_terminate_all() -4.1. cnxcc_set_max_credit() +4.1. cnxcc_set_max_credit() Specifies the initial pulse, final pulse, max credit and cost per second of a call. The discount is calculated in pulses (30/6, 1/1, etc) @@ -176,11 +176,11 @@ $var(cps) = "2.00"; # cost per second $var(initial_p) = "030"; # intial pulse $var(final_p) = "006"; # final pulse -cnxcc_set_max_credit("$var(customer)", "$var(credit)", "$var(cps)", "$var(initia -l_p)", "$var(final_p)"); +cnxcc_set_max_credit("$var(customer)", "$var(credit)", "$var(cps)", + "$var(initial_p)", "$var(final_p)"); ... -4.2. cnxcc_set_max_time() +4.2. cnxcc_set_max_time() Specifies the amount of time the call should last at most. @@ -196,7 +196,7 @@ $var(max_time) = 120; cnxcc_set_max_time("$var(customer)", "$var(max_time)"); ... -4.3. cnxcc_update_max_time() +4.3. cnxcc_update_max_time() Updates max-time of an established and monitored call. This can be used to grant minimum values and to update them every short periods on time @@ -220,7 +220,7 @@ cnxcc_set_max_time("$var(customer)", "$var(max_time)"); ... -4.4. cnxcc_set_max_channel() +4.4. cnxcc_set_max_channel() Specifies a limit for the number of simultaneous calls @@ -239,24 +239,24 @@ $var(max_chan) = 2; $var(retcode) = cnxcc_set_max_channels("$var(customer)", "$var(max_chan)"); if ($var(retcode) == -1) { - xlog("Error setting up credit control"); - return; + xlog("Error setting up credit control"); + return; } if ($var(retcode) < -1) { - xlog("Too many channels for customer"); - sl_send_reply(403, "Forbidden"); + xlog("Too many channels for customer"); + sl_send_reply(403, "Forbidden"); - if (!cnxcc_terminate_all("$var(customer)")) { - xlog("Error terminating customer's calls"); - } + if (!cnxcc_terminate_all("$var(customer)")) { + xlog("Error terminating customer's calls"); + } exit; } ... -4.5. cnxcc_terminate_all() +4.5. cnxcc_terminate_all() Terminates all calls of the specified customer/profile @@ -269,7 +269,7 @@ if ($var(retcode) < -1) { $var(customer) = "john-doe-123-basic"; if (!cnxcc_terminate_all("$var(customer)")) { - xlog("Error terminating customer's calls"); + xlog("Error terminating customer's calls"); } ... @@ -317,10 +317,9 @@ if (!cnxcc_terminate_all("$var(customer)")) { ... event_route[cnxcc:call-shutdown] { - xlog("L_INFO", "[$ci]: call killed"); + xlog("L_INFO", "[$ci]: call killed"); - # perform some kind of notification, database update, email sending, etc -. + # perform some kind of notification, database update, email sending, etc. } ... @@ -349,7 +348,7 @@ route[CNXCC] "$var(cost_per_sec)", "$var(i_pulse)", "$var(f_pulse)")) { - xlog("Error setting up credit control"); + xlog("Error setting up credit control"); } } @@ -357,6 +356,5 @@ event_route[cnxcc:call-shutdown] { xlog("L_INFO", "[$ci]: call killed"); - } ... diff --git a/modules/corex/README b/modules/corex/README index 20397c645bd..2e924211af2 100644 --- a/modules/corex/README +++ b/modules/corex/README @@ -10,8 +10,6 @@ Daniel-Constantin Mierla -Edited by - Muhammad Shahzad Shafi diff --git a/modules/counters/README b/modules/counters/README index e4af8579b64..9e4c005c339 100644 --- a/modules/counters/README +++ b/modules/counters/README @@ -1,4 +1,3 @@ - Counters Module Andrei Pelinescu-Onciul @@ -6,7 +5,7 @@ Andrei Pelinescu-Onciul iptelorg GmbH Copyright 2010 iptelorg GmbH - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -20,9 +19,9 @@ Andrei Pelinescu-Onciul 3. Functions - 3.1. cnt_inc([group.]name) - 3.2. cnt_add([group.]name, number) - 3.3. cnt_reset([group.]name) + 3.1. cnt_inc([group.]name) + 3.2. cnt_add([group.]name, number) + 3.3. cnt_reset([group.]name) 4. counters RPC Functions @@ -35,8 +34,8 @@ Andrei Pelinescu-Onciul List of Examples - 1.1. Create a new script_counter - 1.2. Set script_cnt_grp_name in the config file + 1.1. Create a new script_counter + 1.2. Set script_cnt_grp_name in the config file 1.3. cnt_inc usage 1.4. cnt_add usage 1.5. cnt_reset usage @@ -59,9 +58,9 @@ Chapter 1. Admin Guide 3. Functions - 3.1. cnt_inc([group.]name) - 3.2. cnt_add([group.]name, number) - 3.3. cnt_reset([group.]name) + 3.1. cnt_inc([group.]name) + 3.2. cnt_add([group.]name, number) + 3.3. cnt_reset([group.]name) 4. counters RPC Functions @@ -74,7 +73,7 @@ Chapter 1. Admin Guide 1. Overview - This module exports counters/statistics manipulating script functions + This module exports counters/statistics manipulating script functions and RPCs. 2. Parameters @@ -85,15 +84,15 @@ Chapter 1. Admin Guide 2.1. script_counter Define a new counter that can be used from the script. The declaration - might include a group in front of the counter name, separated with - '.'. It might also include a counter description string (help - message), separated from the name with a ' ' or ':'. If the group is - missing, the group defined in the script_cnt_grp_name module parameter - will be used (the default is "script"). If the description is missing, - the default is "custom script counter". The format of the declaration - is: [group.]name[( |:)description]. - - Example 1.1. Create a new script_counter + might include a group in front of the counter name, separated with '.'. + It might also include a counter description string (help message), + separated from the name with a ' ' or ':'. If the group is missing, the + group defined in the script_cnt_grp_name module parameter will be used + (the default is "script"). If the description is missing, the default + is "custom script counter". The format of the declaration is: + [group.]name[( |:)description]. + + Example 1.1. Create a new script_counter modparam("counters", "script_counter", "foo") # script.foo modparam("counters", "script_counter", "test.bar") # test.bar modparam("counters", "script_counter", "baz example counter") # script.baz @@ -101,23 +100,23 @@ modparam("counters", "script_counter", "test.x:another example") # test.x 2.2. script_cnt_grp_name - Group name that will be used for the counters defined via the + Group name that will be used for the counters defined via the script_counter module parameter which do not have a specified group. Default: "script". - Example 1.2. Set script_cnt_grp_name in the config file + Example 1.2. Set script_cnt_grp_name in the config file modparam("counters", "script_cnt_grp_name", "my_counters") 3. Functions - 3.1. cnt_inc([group.]name) - 3.2. cnt_add([group.]name, number) - 3.3. cnt_reset([group.]name) + 3.1. cnt_inc([group.]name) + 3.2. cnt_add([group.]name, number) + 3.3. cnt_reset([group.]name) -3.1. cnt_inc([group.]name) +3.1. cnt_inc([group.]name) - Increments the counter group.name. The counter must be defined using + Increments the counter group.name. The counter must be defined using the script_counter module parameter. If the group name is missing, the group specified by the script_cnt_grp_name modparam will be used. @@ -133,9 +132,9 @@ route { ... } -3.2. cnt_add([group.]name, number) +3.2. cnt_add([group.]name, number) - Adds number the counter group.name. The counter must be defined using + Adds number the counter group.name. The counter must be defined using the script_counter module parameter. If the group name is missing, the group specified by the script_cnt_grp_name modparam will be used. @@ -148,10 +147,10 @@ route { ... } -3.3. cnt_reset([group.]name) +3.3. cnt_reset([group.]name) - Resets the counter group.name. The counter must be defined using the - script_counter module parameter. If the group name is missing, the + Resets the counter group.name. The counter must be defined using the + script_counter module parameter. If the group name is missing, the group specified by the script_cnt_grp_name modparam will be used. Example 1.5. cnt_reset usage @@ -196,7 +195,7 @@ route { 4.4. cnt.var_list group - Lists all the names of all the counters belonging to the specified + Lists all the names of all the counters belonging to the specified group. Example 1.9. cnt.var_list group usage diff --git a/modules/ctl/README b/modules/ctl/README index ae19ce42c31..4f7af0bfecf 100644 --- a/modules/ctl/README +++ b/modules/ctl/README @@ -1,4 +1,3 @@ - The Ctl Module Andrei Pelinescu-Onciul @@ -6,7 +5,7 @@ Andrei Pelinescu-Onciul iptelorg GmbH Copyright 2009 iptelorg GmbH - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -39,9 +38,9 @@ Andrei Pelinescu-Onciul 1.4. Set user parameter 1.5. Set group parameter 1.6. Set fifo parameter - 1.7. Set the autoconversion parameter - 1.8. Set the binrpc_max_body_size parameter - 1.9. Set the binrpc_struct_max_body_size parameter + 1.7. Set the autoconversion parameter + 1.8. Set the binrpc_max_body_size parameter + 1.9. Set the binrpc_struct_max_body_size parameter 1.10. print usage 1.11. ctl.connections usage 1.12. ctl.who usage @@ -71,20 +70,19 @@ Chapter 1. Admin Guide 1. Overview - This module implements the binrpc transport interface for Kamailio + This module implements the binrpc transport interface for Kamailio RPCs. It supports various transports over which it speaks binrpc: Unix datagram sockets, Unix stream sockets, UDP and TCP. It also supports a - backward compatible FIFO interface (using the old Kamailio FIFO + backward compatible FIFO interface (using the old Kamailio FIFO protocol). By default (if no parameters are changed in the config file) it uses a - Unix stream socket under /tmp: /tmp/ser_ctl. This socket is also the + Unix stream socket under /tmp: /tmp/ser_ctl. This socket is also the default for kamcmd. In general it's used in conjunction with kamcmd. kamcmd is a Unix tool - for invoking Kamailio RPC functions. It can be used both in - interactive mode (supports tab-completion and history) or command line - mode. + for invoking Kamailio RPC functions. It can be used both in interactive + mode (supports tab-completion and history) or command line mode. Example 1.1. kamcmd example usage $ kamcmd ps @@ -104,11 +102,11 @@ $ kamcmd ps 2. BINRPC - binrpc is a ser proprietary binary protocol for invoking rpcs. It was - designed such that it would minimize the packet sizes and it would be + binrpc is a ser proprietary binary protocol for invoking rpcs. It was + designed such that it would minimize the packet sizes and it would be very fast to parse (as opposed to XML-rpc). - The binrpc encoding format is fully documented inside + The binrpc encoding format is fully documented inside modules/ctl/binrpc.h. 3. Parameters @@ -124,19 +122,19 @@ $ kamcmd ps 3.1. binrpc (string) - Specifies the transport used for the binrpc protocol. The following - transport protocol are supported: Unix datagram sockets, Unix stream + Specifies the transport used for the binrpc protocol. The following + transport protocol are supported: Unix datagram sockets, Unix stream sockets, UDP and TCP. The format is: [ protocol:] address_port|path . * For Unix sockets: [unixd|unixs|unix]:path where "unixd" means Unix - datagram sockets and "unix" "unixs" mean Unix stream sockets. - Examples: "unixd:/tmp/unix_dgram", "unixs:/tmp/unix_stream", + datagram sockets and "unix" "unixs" mean Unix stream sockets. + Examples: "unixd:/tmp/unix_dgram", "unixs:/tmp/unix_stream", "unix:/tmp/unix_stream". - * For UDP or TCP sockets: [udp|tcp]:address:port. If the address is + * For UDP or TCP sockets: [udp|tcp]:address:port. If the address is "*" or missing, it will bind to all the local addresses (0.0.0.0). - Examples: "udp:localhost:2046", "tcp:localhost:2046", "tcp:3012", + Examples: "udp:localhost:2046", "tcp:localhost:2046", "tcp:3012", "udp:*:3012". If the protocol part is missing and the address/path part looks like a @@ -145,7 +143,7 @@ $ kamcmd ps * "/tmp/unix_test" - equivalent to "unixs:/tmp/unix_test". * "localhost:3000" - equivalent to "udp:localhost:3000". - Multiple transports / listen addresses can be specified, just by + Multiple transports / listen addresses can be specified, just by setting the parameter multiple times. Default:"unix:/tmp/ser_ctl" (Unix stream socket). The default value is @@ -197,13 +195,12 @@ modparam("ctl", "group", 100) 3.5. fifo (integer) fifo used for the obsolete fifo protocol. The fifo protocol can be run - over a real fifo, over UDP or over TCP. Format: - [protocol:]path|address. If no protocol is specified the default is - "fifo". Examples: "fifo:/tmp/ser_fifo", "/tmp/ser_fifo2", - "udp:*:2050", "tcp:localhost:2050". For more details on the UDP and - TCP formats see binrpc. Multiple fifos or fifo transports can be used - in the same time (just by setting the fifo parameter multiple times in - the config). + over a real fifo, over UDP or over TCP. Format: + [protocol:]path|address. If no protocol is specified the default is + "fifo". Examples: "fifo:/tmp/ser_fifo", "/tmp/ser_fifo2", "udp:*:2050", + "tcp:localhost:2050". For more details on the UDP and TCP formats see + binrpc. Multiple fifos or fifo transports can be used in the same time + (just by setting the fifo parameter multiple times in the config). Default: not set (no fifo will be used). @@ -216,8 +213,8 @@ modparam("ctl", "fifo", "tcp:*:2050") # fifo over tcp 3.6. autoconversion (integer) - Enable or disable automatic type conversion globally, for all the - methods parameters. If on, a type mismatch in a method parameter will + Enable or disable automatic type conversion globally, for all the + methods parameters. If on, a type mismatch in a method parameter will not cause a fault if it is possible to automatically convert it to the expected type. @@ -225,30 +222,30 @@ modparam("ctl", "fifo", "tcp:*:2050") # fifo over tcp It is recommended to leave this parameter to its default off value and fix instead the client application (which should use the proper types) - or to modify the target rpc to accept any type (see the rpc scan '.' + or to modify the target rpc to accept any type (see the rpc scan '.' modifier). - Example 1.7. Set the autoconversion parameter + Example 1.7. Set the autoconversion parameter modparam("ctl", "autoconversion", 1) 3.7. binrpc_max_body_size (integer) - Set the size of binrpc buffer for RPC reply. Value represents + Set the size of binrpc buffer for RPC reply. Value represents kilobytes. Default: 4 (meaning 4KB); - Example 1.8. Set the binrpc_max_body_size parameter + Example 1.8. Set the binrpc_max_body_size parameter modparam("ctl", "binrpc_max_body_size", 10) 3.8. binrpc_struct_max_body_size (integer) - Set the size of binrpc structure buffer for RPC reply. Value - represents kilobytes. + Set the size of binrpc structure buffer for RPC reply. Value represents + kilobytes. Default: 1 (meaning 1KB); - Example 1.9. Set the binrpc_struct_max_body_size parameter + Example 1.9. Set the binrpc_struct_max_body_size parameter modparam("ctl", "binrpc_struct_max_body_size", 3) 4. SIP-router RPC Functions diff --git a/modules/db2_ldap/README b/modules/db2_ldap/README index 9de7e0ea0b2..7a80e9f9724 100644 --- a/modules/db2_ldap/README +++ b/modules/db2_ldap/README @@ -1,4 +1,3 @@ - db2_ldap module Jan Janak @@ -6,7 +5,7 @@ Jan Janak Iptel.org Copyright 2008 Iptel.org GmBH - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -43,56 +42,56 @@ Chapter 1. Admin Guide 1. Overview - The LDAP module is database driver, i.e. it implements DBv2 API - functions. The goal is map database query defined by table, matching - fields and result fields to LDAP search in sub-tree defined by root, - object class, attributes and pass it to the OpenLDAP which - communicates with the LDAP server. + The LDAP module is database driver, i.e. it implements DBv2 API + functions. The goal is map database query defined by table, matching + fields and result fields to LDAP search in sub-tree defined by root, + object class, attributes and pass it to the OpenLDAP which communicates + with the LDAP server. - This procedure is sometimes tricky because the LDAP does not support - all database features or supports them in different manner. Here we + This procedure is sometimes tricky because the LDAP does not support + all database features or supports them in different manner. Here we must express especially filtering and multi-values. The multi-value is - de facto array of single values. If the LDAP module get a multi-value - field then generates record for every single value, respectively for + de facto array of single values. If the LDAP module get a multi-value + field then generates record for every single value, respectively for every combination in case the more fields contain multi-value. - The LDAP supports natively "AND", "OR", "NOT" logical operators and - "equal", "non-equal", "less-or-equal" and "greater-or-equal" - comparison operators. Therefore "less" and "greater" operators are - mapped as "less/greater-or-equal-AND-not-equal". It's important - realize it when the attribute which will be used for filtering may - contain multi-value. The LDAP server evaluates comparison operator on - multi-value so that the result for record is true if the condition is - satisfied for any single value. The single values not satisfying - condition are not truncated. It implies two cases for positive - comparison, e.g. "equal", the result contains values not satisfying - the condition, the case may be handled by additional filter in the - LDAP module, the negative comparison, e.g. "non-equal", does not - return record at all. Because the LDAP module cannot know if the LDAP - attribute may logically contain multi-value so there is introduced DB - API option client_side_filtering which forces filtering such fields in - the LDAP module, i.e. the LDAP server returns larger result set - because the filtering condition is not passed there. - - The syntax of client_side_filtering value is comma delimited of field - names which won't be used for server-side filter if such a field - appears in a match condition. Instead records will be filtered out in + The LDAP supports natively "AND", "OR", "NOT" logical operators and + "equal", "non-equal", "less-or-equal" and "greater-or-equal" comparison + operators. Therefore "less" and "greater" operators are mapped as + "less/greater-or-equal-AND-not-equal". It's important realize it when + the attribute which will be used for filtering may contain multi-value. + The LDAP server evaluates comparison operator on multi-value so that + the result for record is true if the condition is satisfied for any + single value. The single values not satisfying condition are not + truncated. It implies two cases for positive comparison, e.g. "equal", + the result contains values not satisfying the condition, the case may + be handled by additional filter in the LDAP module, the negative + comparison, e.g. "non-equal", does not return record at all. Because + the LDAP module cannot know if the LDAP attribute may logically contain + multi-value so there is introduced DB API option client_side_filtering + which forces filtering such fields in the LDAP module, i.e. the LDAP + server returns larger result set because the filtering condition is not + passed there. + + The syntax of client_side_filtering value is comma delimited of field + names which won't be used for server-side filter if such a field + appears in a match condition. Instead records will be filtered out in module. It implies such fields MUST exist in result field list. - The necessary condition of successful filtering of particular - attribute at the LDAP server is correct attribute definition. The - "equal"/"non-equal" operator requires equality matching rule, the + The necessary condition of successful filtering of particular attribute + at the LDAP server is correct attribute definition. The + "equal"/"non-equal" operator requires equality matching rule, the "greater"/"less" operator requires ordering matching rule. If required matching rule is missing the LDAP server silently returns empty result - set. In case of double filtering both at the LDAP servar and the LDAP - module, e.g. multi-value and equal comparison, check the LDAP server - matching rule satisfies your needs or use client_side_filtering + set. In case of double filtering both at the LDAP servar and the LDAP + module, e.g. multi-value and equal comparison, check the LDAP server + matching rule satisfies your needs or use client_side_filtering feature. - The LDAP server may be identified either complete specification of - host, user, password in URI or is specification reference to - connection section of config file. Note in the second case there is - only one slash. + The LDAP server may be identified either complete specification of + host, user, password in URI or is specification reference to connection + section of config file. Note in the second case there is only one + slash. Example 1.1. URI example ... @@ -122,10 +121,10 @@ Chapter 1. Admin Guide Default value is ldap.cfg. - The filename (relatively to ser config file) of mapping database to + The filename (relatively to ser config file) of mapping database to LDAP definition. It is the main configuration file for the LDAP module - in SER. The configuration file maps database table names used in SER - to LDAP directory sub-trees to be searched. In addition to that the + in SER. The configuration file maps database table names used in SER to + LDAP directory sub-trees to be searched. In addition to that the configuration file also allows to configure the LDAP search filter and maps database field names to LDAP attribute names and vice versa. @@ -244,7 +243,7 @@ field_map = flags : (BitString) serFlags Default value is 3. - Number of reconnect attempts when connection to the LDAP server is + Number of reconnect attempts when connection to the LDAP server is lost. Example 1.4. Example reconnect_attempt diff --git a/modules/db2_ops/README b/modules/db2_ops/README index f6fa213780d..2c305e0b52a 100644 --- a/modules/db2_ops/README +++ b/modules/db2_ops/README @@ -1,4 +1,3 @@ - db2_ops module Tomas Mandys @@ -6,7 +5,7 @@ Tomas Mandys Iptel.org Copyright 2007 Tomas Mandys - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -23,21 +22,21 @@ Tomas Mandys 5. Functions - 5.1. db_query(query | query_id [,handle] ) - 5.2. db_close(handle) - 5.3. db_first(handle) - 5.4. db_next(handle) - 5.5. db_seek(handle, row_no) - 5.6. db_foreach(handle, route) - 5.7. db_proper() - 5.8. @db.query.query_id - 5.9. @db.query.query_id.count - 5.10. @db.query.query_id.is_empty - 5.11. @db.query.query_id.field[m] - 5.12. @db.query.query_id.row[n] - 5.13. @db.query.query_id.row[n].field[m] - 5.14. @db.fetch.handle - 5.15. @db.fetch.handle.row_no + 5.1. db_query(query | query_id [,handle] ) + 5.2. db_close(handle) + 5.3. db_first(handle) + 5.4. db_next(handle) + 5.5. db_seek(handle, row_no) + 5.6. db_foreach(handle, route) + 5.7. db_proper() + 5.8. @db.query.query_id + 5.9. @db.query.query_id.count + 5.10. @db.query.query_id.is_empty + 5.11. @db.query.query_id.field[m] + 5.12. @db.query.query_id.row[n] + 5.13. @db.query.query_id.row[n].field[m] + 5.14. @db.fetch.handle + 5.15. @db.fetch.handle.row_no 6. Examples @@ -78,21 +77,21 @@ Chapter 1. Admin Guide 5. Functions - 5.1. db_query(query | query_id [,handle] ) - 5.2. db_close(handle) - 5.3. db_first(handle) - 5.4. db_next(handle) - 5.5. db_seek(handle, row_no) - 5.6. db_foreach(handle, route) - 5.7. db_proper() - 5.8. @db.query.query_id - 5.9. @db.query.query_id.count - 5.10. @db.query.query_id.is_empty - 5.11. @db.query.query_id.field[m] - 5.12. @db.query.query_id.row[n] - 5.13. @db.query.query_id.row[n].field[m] - 5.14. @db.fetch.handle - 5.15. @db.fetch.handle.row_no + 5.1. db_query(query | query_id [,handle] ) + 5.2. db_close(handle) + 5.3. db_first(handle) + 5.4. db_next(handle) + 5.5. db_seek(handle, row_no) + 5.6. db_foreach(handle, route) + 5.7. db_proper() + 5.8. @db.query.query_id + 5.9. @db.query.query_id.count + 5.10. @db.query.query_id.is_empty + 5.11. @db.query.query_id.field[m] + 5.12. @db.query.query_id.row[n] + 5.13. @db.query.query_id.row[n].field[m] + 5.14. @db.fetch.handle + 5.15. @db.fetch.handle.row_no 6. Examples @@ -114,26 +113,26 @@ Chapter 1. Admin Guide where = fields ops = op [ "," op ... ] order = field - type = "s" | "i" | "d" | "f" | "t" ; enables to force particular type w -hen writing to db driver (string/int/double/float/datetime), valueable especial -ly for datetime + type = "s" | "i" | "d" | "f" | "t" ; enables to force particular type wh +en writing to db driver (string/int/double/float/datetime), valueable especially + for datetime value = [type ":"] xltext values = value [ "," value ...] extra_op = name "=" [type ":"] text extra_ops = extra_op [ "," extra_op] - select = [database "/"] "select/" table "/" fields "/" where "/" ops "/ -" order "/" values [ "/" extra_ops ] - insert = [database "/"] "insert/" table "/" fields "/" values [ "/" ext -ra_ops ] - update = [database "/"] "update/" table "/" fields "/" where "/" ops "/ -" values [ "/" extra_ops ] - replace = [database "/"] "replace/" table "/" fields "/" values [ "/" e -xtra_ops ] - delete = [database "/"] "delete/" table "/" where "/" ops "/" values [ -"/" extra_ops ] + select = [database "/"] "select/" table "/" fields "/" where "/" ops "/" + order "/" values [ "/" extra_ops ] + insert = [database "/"] "insert/" table "/" fields "/" values [ "/" extr +a_ops ] + update = [database "/"] "update/" table "/" fields "/" where "/" ops "/" + values [ "/" extra_ops ] + replace = [database "/"] "replace/" table "/" fields "/" values [ "/" ex +tra_ops ] + delete = [database "/"] "delete/" table "/" where "/" ops "/" values [ " +/" extra_ops ] raw_query = [database "/"] "select ...." | "insert ..." [[ / "values" [ - "/" extra_ops ]] # not delimited by "/" +"/" extra_ops ]] # not delimited by "/" query = (select | insert | update | replace | delete | raw_query) query_id = alphanum handle = alphanum (plain text possible but alphanum recommended) @@ -161,7 +160,7 @@ xtra_ops ] 4.2. declare_query (string) Declare query_id for @db.query_id (see select syntax) or for reference - from db_query(query_id). Queries are pre-compiled therefore volatile + from db_query(query_id). Queries are pre-compiled therefore volatile stuff must be passed via parameters (AVP or so). The format is: @@ -169,8 +168,8 @@ xtra_ops ] Example 1.2. Example declare_query ... - modparam("db_ops", "declare_query", "sel1=select/location/received/uid/ -//%$f.uid"); + modparam("db_ops", "declare_query", "sel1=select/location/received/uid// +/%$f.uid"); ... 4.3. declare_handle (string) @@ -187,27 +186,27 @@ xtra_ops ] 5. Functions - 5.1. db_query(query | query_id [,handle] ) - 5.2. db_close(handle) - 5.3. db_first(handle) - 5.4. db_next(handle) - 5.5. db_seek(handle, row_no) - 5.6. db_foreach(handle, route) - 5.7. db_proper() - 5.8. @db.query.query_id - 5.9. @db.query.query_id.count - 5.10. @db.query.query_id.is_empty - 5.11. @db.query.query_id.field[m] - 5.12. @db.query.query_id.row[n] - 5.13. @db.query.query_id.row[n].field[m] - 5.14. @db.fetch.handle - 5.15. @db.fetch.handle.row_no - -5.1. db_query(query | query_id [,handle] ) - - Executes query and in case of SELECT returns result via handle, seeks + 5.1. db_query(query | query_id [,handle] ) + 5.2. db_close(handle) + 5.3. db_first(handle) + 5.4. db_next(handle) + 5.5. db_seek(handle, row_no) + 5.6. db_foreach(handle, route) + 5.7. db_proper() + 5.8. @db.query.query_id + 5.9. @db.query.query_id.count + 5.10. @db.query.query_id.is_empty + 5.11. @db.query.query_id.field[m] + 5.12. @db.query.query_id.row[n] + 5.13. @db.query.query_id.row[n].field[m] + 5.14. @db.fetch.handle + 5.15. @db.fetch.handle.row_no + +5.1. db_query(query | query_id [,handle] ) + + Executes query and in case of SELECT returns result via handle, seeks the first record and returns TRUE if table is not empty. The result is - accesible using @db.fetch select. See also declare_handle. Query_id + accesible using @db.fetch select. See also declare_handle. Query_id references to query declared using declare_query, handle references to query declared using declare_handle. @@ -222,9 +221,9 @@ xtra_ops ] } -5.2. db_close(handle) +5.2. db_close(handle) - Close table that has been opened using db_query. Note all close after + Close table that has been opened using db_query. Note all close after script processing automatically. Example 1.5. db_close usage @@ -232,9 +231,9 @@ xtra_ops ] db_close(my_handle); ... -5.3. db_first(handle) +5.3. db_first(handle) - Returns TRUE if table is not empty. Note that rewind might not be + Returns TRUE if table is not empty. Note that rewind might not be supported by particular db driver. Example 1.6. db_first usage @@ -244,7 +243,7 @@ xtra_ops ] } ... -5.4. db_next(handle) +5.4. db_next(handle) Moves to the next record and returns TRUE if not EOF. @@ -255,9 +254,9 @@ xtra_ops ] } ... -5.5. db_seek(handle, row_no) +5.5. db_seek(handle, row_no) - Seeks at the row no (origin is zero) and Returns TRUE in case of + Seeks at the row no (origin is zero) and Returns TRUE in case of success. Backward seek might not be supported by db driver. Example 1.8. db_seek usage @@ -267,7 +266,7 @@ xtra_ops ] } ... -5.6. db_foreach(handle, route) +5.6. db_foreach(handle, route) Call specific route for each row, loop is interrupted if route returns code <= 0. Return code of the last route call is returned as result of @@ -284,9 +283,9 @@ xtra_ops ] } ... -5.7. db_proper() +5.7. db_proper() - Hack which enables using db_ops queries in failure route. Call it at + Hack which enables using db_ops queries in failure route. Call it at the beginning of failure_route block. Example 1.10. db_proper usage @@ -296,7 +295,7 @@ xtra_ops ] .... } -5.8. @db.query.query_id +5.8. @db.query.query_id Returns value of the first row and the first field. @@ -305,7 +304,7 @@ xtra_ops ] .... } -5.9. @db.query.query_id.count +5.9. @db.query.query_id.count Returns number of rows in select query. @@ -314,7 +313,7 @@ xtra_ops ] .... } -5.10. @db.query.query_id.is_empty +5.10. @db.query.query_id.is_empty Returns 1 if select query is empty. @@ -323,9 +322,9 @@ xtra_ops ] # query is empty } -5.11. @db.query.query_id.field[m] +5.11. @db.query.query_id.field[m] - Returns value of the first row and the m-th field. @*.field supports + Returns value of the first row and the m-th field. @*.field supports select_any_uri and select_any_nameaddr. Example 1.14. db.query.query_id.field[m] usage @@ -333,9 +332,9 @@ xtra_ops ] ... } -5.12. @db.query.query_id.row[n] +5.12. @db.query.query_id.row[n] - Returns value of the n-th row and the first field, negative values + Returns value of the n-th row and the first field, negative values count from the end (-1 == last row). Example 1.15. db.query.query_id.row[n] usage @@ -343,9 +342,9 @@ xtra_ops ] ... } -5.13. @db.query.query_id.row[n].field[m] +5.13. @db.query.query_id.row[n].field[m] - Returns value of the n-th row and the m-th field. @*.field supports + Returns value of the n-th row and the m-th field. @*.field supports select_any_uri and select_any_nameaddr. Example 1.16. db.query.query_id.row[n].field[m] usage @@ -353,13 +352,12 @@ xtra_ops ] ... } -5.14. @db.fetch.handle +5.14. @db.fetch.handle - Similar functionality as @db.query selects with exception that + Similar functionality as @db.query selects with exception that operation is performed at query has been opened by db_query. - @db.fetch.handle.count invalidates current record, do - db_seek/db_first! + @db.fetch.handle.count invalidates current record, do db_seek/db_first! Note all opened queries are closed in POST_SCRIPT callback not to leak memory. @@ -373,7 +371,7 @@ xtra_ops ] } db_close(my_handle); -5.15. @db.fetch.handle.row_no +5.15. @db.fetch.handle.row_no Returns current row number (origin is zero). @@ -391,8 +389,8 @@ xtra_ops ] if (@db.fetch.my_handle.count == "10") { ... } - if (@db.fetch.my_handle.row_no == "1") { # always false because -.count has invalidated current record! + if (@db.fetch.my_handle.row_no == "1") { # always false because . +count has invalidated current record! } db_close(my_handle); @@ -400,51 +398,50 @@ xtra_ops ] 6. Examples Example 1.19. db_ops common example -modparam("db_ops", "declare_query", "sel1=select/location/received/uid///%$f.ui -d"); -modparam("db_ops", "declare_query", "sel2=select/subscriber/email_address,greet -ing/uid,allow_find///%$uidparam,1"); -modparam("db_ops", "declare_query", "sel3=select/silo/body/uid//inc_time/%$f.ui -d"); -modparam("db_ops", "declare_query", "del1=delete from location where expires - Copyright © 2012 1&1 Internet AG + Copyright 2012 1&1 Internet AG __________________________________________________________________ Table of Contents diff --git a/modules/db_flatstore/README b/modules/db_flatstore/README index 33df4637899..894f7cf943d 100644 --- a/modules/db_flatstore/README +++ b/modules/db_flatstore/README @@ -1,4 +1,3 @@ - Db_flatstore Module Jan Janak @@ -7,7 +6,7 @@ Jan Janak Copyright 2004, 2005 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -37,56 +36,55 @@ Chapter 1. Admin Guide 1.1. Rotating Log Files - Db_flatstore is one of the SIP Router database modules. It does not + Db_flatstore is one of the SIP Router database modules. It does not export any functions executable from the configuration scripts, but it - exports a subset of functions from the database API and thus other - modules can use it as a database driver, instead of, for example, the + exports a subset of functions from the database API and thus other + modules can use it as a database driver, instead of, for example, the Mysql module. - The module does not implement all functions of the database API, it - supports only one function, insert. This means that the module is - limited but very fast. It is especially suitable for storing - accounting information on sites with extremely high traffic. If MySQL - is too slow or if you get a huge amount of accounting data then you - can consider using this module. Please note that the acc module is the - only module that was tested with the flastore module. - - The format of the files produced by this module is plain text. Each - line consists of several fields, fields are separated by the "|" - character (vertical bar). New information is always appended at the - end of the file. Searching, deleting and updating of existing data is - not supported by the module. - - The acc module can be configured to use db_flatstore module as - database backend using the db_url_parameter: + The module does not implement all functions of the database API, it + supports only one function, insert. This means that the module is + limited but very fast. It is especially suitable for storing accounting + information on sites with extremely high traffic. If MySQL is too slow + or if you get a huge amount of accounting data then you can consider + using this module. Please note that the acc module is the only module + that was tested with the flastore module. + + The format of the files produced by this module is plain text. Each + line consists of several fields, fields are separated by the "|" + character (vertical bar). New information is always appended at the end + of the file. Searching, deleting and updating of existing data is not + supported by the module. + + The acc module can be configured to use db_flatstore module as database + backend using the db_url_parameter: modparam("acc", "db_url", "flatstore:/var/log/acc") - This configuration option tells the acc module that it should use the - db_flatstore module and the db_flatstore module should create all - files in the /var/log/acc directory. The directory must exist and SIP - Router processes must have permissions to create files in that - directory. + This configuration option tells the acc module that it should use the + db_flatstore module and the db_flatstore module should create all files + in the /var/log/acc directory. The directory must exist and SIP Router + processes must have permissions to create files in that directory. Name of files in that directory will follow the following pattern: _.log - For example, entries writen by the SIP Router process 8 into the acc + For example, entries writen by the SIP Router process 8 into the acc table would be written in file acc_8.log. For each table there will be - several files, one file for every SIP Router process that wrote some - data into that table. The main reason why there are several files for - each table is that it is much faster to have one file per process, - because it does not require any locking and thus SIP Router processes - will not block each other. To get the complete data for a table you - can simply concatenate the contents of files with the same table name - but different process id. + several files, one file for every SIP Router process that wrote some + data into that table. The main reason why there are several files for + each table is that it is much faster to have one file per process, + because it does not require any locking and thus SIP Router processes + will not block each other. To get the complete data for a table you can + simply concatenate the contents of files with the same table name but + different process id. 1.1. Rotating Log Files The module implements a SIP Router management interface command called - flatstore.rotate. When SIP Router receives the command it will close - and reopen all files used by the db_flatstore module. The rotation - itself has to be done by another application (such as logrotate). - Follow these steps to rotate files generated by the db_flatstore + flatstore.rotate. When SIP Router receives the command it will close + and reopen all files used by the db_flatstore module. The rotation + itself has to be done by another application (such as logrotate). + Follow these steps to rotate files generated by the db_flatstore module: * Rename the files that you want to rotate: cd /var/log/acc @@ -94,16 +92,16 @@ mv acc_1.log acc_1.log.20050605 mv acc_2.log acc_2.log.20050605 mv acc_4.log acc_3.log.20050605 ... - Note that at this point SIP Router will still be writing all data + Note that at this point SIP Router will still be writing all data into the renamed files. - * Send SIP Router the management command to close and reopen the + * Send SIP Router the management command to close and reopen the renamed files: kamcmd flatstore.rotate This will force SIP Router to close the renamed files and open new - ones with original names, such as acc_1.log. New files will be - open at the point when SIP Router has some data to write. It is - normal that the files will be not created immediately if there is - no traffic on the SIP server. + ones with original names, such as acc_1.log. New files will be open + at the point when SIP Router has some data to write. It is normal + that the files will be not created immediately if there is no + traffic on the SIP server. * Move the renamed files somewhere else and process them. 2. Parameters diff --git a/modules/db_oracle/README b/modules/db_oracle/README index 01ab1e5608c..d64f6c84d70 100644 --- a/modules/db_oracle/README +++ b/modules/db_oracle/README @@ -18,7 +18,7 @@ Iouri Kharon - Copyright © 2007,2008 TRUNK MOBILE, INC. + Copyright 2007,2008 TRUNK MOBILE, INC. __________________________________________________________________ Table of Contents diff --git a/modules/db_perlvdb/README b/modules/db_perlvdb/README index 653e9d8dac8..4a7bc71ac13 100644 --- a/modules/db_perlvdb/README +++ b/modules/db_perlvdb/README @@ -8,7 +8,7 @@ Edited by Bastian Friedrich - Copyright © 2007 Collax GmbH + Copyright 2007 Collax GmbH __________________________________________________________________ Table of Contents diff --git a/modules/db_postgres/README b/modules/db_postgres/README index 76f10cee5ce..8c5b8a68462 100644 --- a/modules/db_postgres/README +++ b/modules/db_postgres/README @@ -8,7 +8,7 @@ Edited by Greg Fausak - Copyright © 2003 Greg Fausak + Copyright 2003 Greg Fausak __________________________________________________________________ Table of Contents diff --git a/modules/db_text/README b/modules/db_text/README index 530170f9d0e..8df86e93aa3 100644 --- a/modules/db_text/README +++ b/modules/db_text/README @@ -10,8 +10,6 @@ Ovidiu Sas -Edited by - Daniel-Constantin Mierla @@ -220,7 +218,7 @@ modparam("db_text", "db_mode", 1) 4.1. db_text.dump -4.1. db_text.dump +4.1. db_text.dump Write back to hard drive all modified tables. diff --git a/modules/db_unixodbc/README b/modules/db_unixodbc/README index 1f782723712..5d91d5ae7cf 100644 --- a/modules/db_unixodbc/README +++ b/modules/db_unixodbc/README @@ -8,7 +8,7 @@ Edited by Marco Lorrai - Copyright © 2005, 2006 Marco Lorrai + Copyright 2005, 2006 Marco Lorrai __________________________________________________________________ Table of Contents @@ -37,9 +37,9 @@ Marco Lorrai List of Examples - 1.1. Set the “ping_interval” parameter - 1.2. Set the “auto_reconnect” parameter - 1.3. Set the “use_escape_common” parameter + 1.1. Set the "ping_interval" parameter + 1.2. Set the "auto_reconnect" parameter + 1.3. Set the "use_escape_common" parameter Chapter 1. Admin Guide @@ -101,9 +101,9 @@ Chapter 1. Admin Guide Sets the ping time interval. - Default value is “300” seconds. + Default value is "300" seconds. - Example 1.1. Set the “ping_interval” parameter + Example 1.1. Set the "ping_interval" parameter ... modparam("db_unixodbc", "ping_interval", 600) ... @@ -112,9 +112,9 @@ modparam("db_unixodbc", "ping_interval", 600) Turns on or off the auto_reconnect mode. - Default value is “1”, this means it is enabled. + Default value is "1", this means it is enabled. - Example 1.2. Set the “auto_reconnect” parameter + Example 1.2. Set the "auto_reconnect" parameter ... modparam("db_unixodbc", "auto_reconnect", 0) ... @@ -130,9 +130,9 @@ modparam("db_unixodbc", "auto_reconnect", 0) a value, escape other characters ...). It prevents against SQL injection. - Default value is “0” (0 = disabled; 1 = enabled). + Default value is "0" (0 = disabled; 1 = enabled). - Example 1.3. Set the “use_escape_common” parameter + Example 1.3. Set the "use_escape_common" parameter ... modparam("db_unixodbc", "use_escape_common", 1) ... diff --git a/modules/dialog/README b/modules/dialog/README index 4e720c37d60..efb949a1422 100644 --- a/modules/dialog/README +++ b/modules/dialog/README @@ -12,12 +12,8 @@ Edited by Bogdan-Andrei Iancu -Edited by - Carsten Bock -Edited by - Alex Balashov diff --git a/modules/dialog_ng/README b/modules/dialog_ng/README index 3fb5f6b798d..6892fe7049e 100644 --- a/modules/dialog_ng/README +++ b/modules/dialog_ng/README @@ -6,7 +6,7 @@ Bogdan-Andrei Iancu Carsten Bock - ng-voice.com + ng-voice GmbH Jason Penton @@ -20,21 +20,15 @@ Edited by Bogdan-Andrei Iancu -Edited by - Carsten Bock -Edited by - Jason Penton -Edited by - Richard Good - Copyright © 2006 Voice Sistem SRL + Copyright 2006 Voice Sistem SRL - Copyright © 2011 Carsten Bock, http://www.ng-voice.com + Copyright 2011-2013 Carsten Bock, http://www.ng-voice.com __________________________________________________________________ Table of Contents @@ -131,9 +125,12 @@ Richard Good 1.1. register_dlgcb (dialog, type, cb, param, free_param_cb) 1.2. terminate_dlg (str callid, str ftag, str ttag, hdrs) - 1.3. set_dlg_var (dlg, key, val) - 1.4. get_dlg_var (dlg, key) - 1.5. get_current_dialog () + 1.3. lookup_terminate_dlg (unsigned int h_entry, unsigned + int h_id, hdrs) + + 1.4. set_dlg_var (dlg, key, val) + 1.5. get_dlg_var (dlg, key) + 1.6. get_current_dialog () 3. Frequently Asked Questions @@ -157,6 +154,7 @@ Richard Good 1.16. dlg_setflag usage 1.17. dlg_resetflag usage 1.18. dlg_terminate usage + 1.19. dlg_get usage Chapter 1. Admin Guide @@ -247,14 +245,14 @@ Chapter 1. Admin Guide 1. Overview - The dialog_ng module provides dialog awareness to the Kamailio proxy. Its - functionality is to keep track of the current dialogs, to offer + The dialog_ng module provides dialog awareness to the Kamailio proxy. + Its functionality is to keep track of the current dialogs, to offer information about them (like how many dialogs are active) or to manage them. The module exports several functions that could be used directly - from scripts. The dialog_ng module extends the original dialog module by - providing support for forked calling and early dialog termination. It - is the intention that the dialog_ng module will eventually replace the - dialog module. + from scripts. The dialog_ng module extends the original dialog module + by providing support for forked calling and early dialog termination. + It is the intention that the dialog_ng module will eventually replace + the dialog module. The module, via an internal API, also provide the foundation to build on top of it more complex dialog-based functionalities via other @@ -263,14 +261,14 @@ Chapter 1. Admin Guide 2. How it works To create the dialog associated to an initial request, the flag - “dlg_flag” ( Section 5.4, “ dlg_flag (integer) ”) must be set before + "dlg_flag" ( Section 5.4, " dlg_flag (integer) ") must be set before creating the corresponding transaction. - The dialog is automatically destroyed when a “BYE” is received. In case - of no “BYE”, the dialog lifetime is controlled via the default timeout - (see “default_timeout” - Section 5.6, “ default_timeout (integer) ”) - and custom timeout (see “timeout_avp” - Section 5.5, “ timeout_avp - (string) ”). The dialog timeout is reset each time a sequential request + The dialog is automatically destroyed when a "BYE" is received. In case + of no "BYE", the dialog lifetime is controlled via the default timeout + (see "default_timeout" - Section 5.6, " default_timeout (integer) ") + and custom timeout (see "timeout_avp" - Section 5.5, " timeout_avp + (string) "). The dialog timeout is reset each time a sequential request passes. 3. Dialog profiling @@ -335,12 +333,12 @@ Chapter 1. Admin Guide 5.17. bridge_controller (string) 5.18. initial_cbs_inscript (string) -5.1. enable_stats (integer) +5.1. enable_stats (integer) This function is currently not supported by the dialog_ng module. To be incorporated in the future. -5.2. hash_size (integer) +5.2. hash_size (integer) The size of the hash table internally used to keep the dialogs. A larger table is much faster but consumes more memory. The hash size @@ -351,78 +349,78 @@ Chapter 1. Admin Guide not take place. If you really want to modify the hash_size you must delete all table's rows before restarting the server. - Default value is “4096”. + Default value is "4096". Example 1.1. Set hash_size parameter ... modparam("dialog_ng", "hash_size", 1024) ... -5.3. rr_param (string) +5.3. rr_param (string) Name of the Record-Route parameter to be added with the dialog cookie. It is used for the fast dialog matching of sequential requests. - Default value is “did”. + Default value is "did". Example 1.2. Set rr_param parameter ... modparam("dialog_ng", "rr_param", "xyz") ... -5.4. dlg_flag (integer) +5.4. dlg_flag (integer) Flag to be used for marking if a dialog should be constructed for the current request (this make sense only for initial requests). - Default value is “none”. + Default value is "none". Example 1.3. Set dlg_flag parameter ... modparam("dialog_ng", "dlg_flag", 4) ... -5.5. timeout_avp (string) +5.5. timeout_avp (string) The specification of an AVP that contain a custom timeout (in seconds) for the dialog. It may be used only in a request (initial or sequential) context - Default value is “none”. + Default value is "none". Example 1.4. Set timeout_avp parameter ... modparam("dialog_ng", "timeout_avp", "$avp(i:10)") ... -5.6. default_timeout (integer) +5.6. default_timeout (integer) The default dialog timeout (in seconds) if no custom one is set. - Default value is “43200 (12 hours)”. + Default value is "43200 (12 hours)". Example 1.5. Set default_timeout parameter ... modparam("dialog_ng", "default_timeout", 21600) ... -5.7. dlg_extra_hdrs (string) +5.7. dlg_extra_hdrs (string) A string containing the extra headers (full format, with EOH) to be added in the requests generated by the module (like BYEs). - Default value is “NULL”. + Default value is "NULL". Example 1.6. Set dlf_extra_hdrs parameter ... modparam("dialog_ng", "dlg_extra_hdrs", "Hint: credit expired\r\n") ... -5.8. dlg_match_mode (integer) +5.8. dlg_match_mode (integer) Deprecated - in the new dialog module we always match using DID ONLY -5.9. detect_spirals (integer) +5.9. detect_spirals (integer) Whether spirals (i.e., messages routed through the proxy multiple times) should be detected or not. @@ -439,60 +437,60 @@ modparam("dialog_ng", "dlg_extra_hdrs", "Hint: credit expired\r\n") modparam("dialog_ng", "detect_spirals", 1) ... -5.10. db_url (string) +5.10. db_url (string) Db storage not yet supported by dialog_ng - this to be done in future. -5.11. db_mode (integer) +5.11. db_mode (integer) Db storage not yet supported by dialog_ng - this to be done in future. -5.12. db_update_period (integer) +5.12. db_update_period (integer) Db storage not yet supported by dialog_ng - this to be done in future. -5.13. db_fetch_rows (integer) +5.13. db_fetch_rows (integer) Db storage not yet supported by dialog_ng - this to be done in future. -5.14. table_name (string) +5.14. table_name (string) Db storage not yet supported by dialog_ng - this to be done in future. -5.15. profiles_with_value (string) +5.15. profiles_with_value (string) List of names for profiles with values. - Default value is “empty”. + Default value is "empty". Example 1.8. Set profiles_with_value parameter ... modparam("dialog", "profiles_with_value", "caller ; my_profile") ... -5.16. profiles_no_value (string) +5.16. profiles_no_value (string) List of names for profiles without values. - Default value is “empty”. + Default value is "empty". Example 1.9. Set profiles_no_value parameter ... modparam("dialog", "profiles_no_value", "inbound ; outbound") ... -5.17. bridge_controller (string) +5.17. bridge_controller (string) SIP address to be used in From header when initiating a call bridge. - Default value is “sip:controller@kamailio.org”. + Default value is "sip:controller@kamailio.org". Example 1.10. Set bridge_controller parameter ... modparam("dialog", "bridge_controller", "sip:ctd@kamailio.org") ... -5.18. initial_cbs_inscript (string) +5.18. initial_cbs_inscript (string) This has been deprecated since dlg_manage has been removed. @@ -512,7 +510,7 @@ modparam("dialog", "bridge_controller", "sip:ctd@kamailio.org") 6.12. dlg_get(callid, ftag, ttag) 6.13. is_known_dlg() -6.1. set_dlg_profile(profile,[value]) +6.1. set_dlg_profile(profile,[value]) Inserts the current dialog into a profile. Note that if the profile does not supports values, this will be silently discarded. Also, there @@ -528,13 +526,13 @@ modparam("dialog", "bridge_controller", "sip:ctd@kamailio.org") This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE and FAILURE_ROUTE. - Example 1.11. set_dlg_profile usage + Example 1.11. set_dlg_profile usage ... set_dlg_profile("inbound_call"); set_dlg_profile("caller","$fu"); ... -6.2. unset_dlg_profile(profile,[value]) +6.2. unset_dlg_profile(profile,[value]) Removes the current dialog from a profile. @@ -547,13 +545,13 @@ set_dlg_profile("caller","$fu"); This function can be used from BRANCH_ROUTE, REPLY_ROUTE and FAILURE_ROUTE. - Example 1.12. unset_dlg_profile usage + Example 1.12. unset_dlg_profile usage ... unset_dlg_profile("inbound_call"); unset_dlg_profile("caller","$fu"); ... -6.3. is_in_profile(profile,[value]) +6.3. is_in_profile(profile,[value]) Checks if the current dialog belongs to a profile. If the profile supports values, the check can be reinforced to take into account a @@ -570,7 +568,7 @@ unset_dlg_profile("caller","$fu"); This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE and FAILURE_ROUTE. - Example 1.13. is_in_profile usage + Example 1.13. is_in_profile usage ... if (is_in_profile("inbound_call")) { log("this request belongs to a inbound call\n"); @@ -581,7 +579,7 @@ if (is_in_profile("caller","XX")) { } ... -6.4. get_profile_size(profile,[value],size) +6.4. get_profile_size(profile,[value],size) Returns the number of dialogs belonging to a profile. If the profile supports values, the check can be reinforced to take into account a @@ -599,7 +597,7 @@ if (is_in_profile("caller","XX")) { This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE and FAILURE_ROUTE. - Example 1.14. get_profile_size usage + Example 1.14. get_profile_size usage ... if(get_profile_size("inbound_call","$avp(size)")) xlog("currently there are $avp(size) inbound calls\n"); @@ -608,7 +606,7 @@ if(get_profile_size("caller","$fu","$avp(size)")) xlog("currently, the user $fu has $avp(size) active outgoing calls\n"); ... -6.5. dlg_isflagset(flag) +6.5. dlg_isflagset(flag) Check if the dialog flag is set or not. @@ -618,7 +616,7 @@ if(get_profile_size("caller","$fu","$avp(size)")) This function can be used from BRANCH_ROUTE, REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE. - Example 1.15. dlg_isflagset usage + Example 1.15. dlg_isflagset usage ... if(dlg_isflagset("1")) { @@ -626,7 +624,7 @@ if(dlg_isflagset("1")) } ... -6.6. dlg_setflag(flag) +6.6. dlg_setflag(flag) Set the dialog flag. @@ -636,12 +634,12 @@ if(dlg_isflagset("1")) This function can be used from BRANCH_ROUTE, REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE. - Example 1.16. dlg_setflag usage + Example 1.16. dlg_setflag usage ... dlg_setflag("1"); ... -6.7. dlg_resetflag(flag) +6.7. dlg_resetflag(flag) Reset the dialog flag. @@ -651,12 +649,12 @@ dlg_setflag("1"); This function can be used from BRANCH_ROUTE, REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE. - Example 1.17. dlg_resetflag usage + Example 1.17. dlg_resetflag usage ... redlg_setflag("1"); ... -6.8. dlg_terminate +6.8. dlg_terminate Terminates a dialog. In dialog_ng module this function now includes support for early as well as confirmed dialogs. @@ -669,33 +667,49 @@ redlg_setflag("1"); This function can be used from BRANCH_ROUTE, REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE. - Example 1.18. dlg_terminate usage + Example 1.18. dlg_terminate usage ... dlg_terminate("all", "Insufficient QoS"); ... -6.9. dlg_refer(side, address) +6.9. dlg_refer(side, address) This function is currently not supported by the dialog_ng module. To be incorporated in the future. -6.10. dlg_manage() +6.10. dlg_manage() This has been deprecated in dialog_ng. Instead set dialog flag for initial INVITE and Route-parameter-callback execution for within-dialog requests. -6.11. dlg_bridge(from, to, op) +6.11. dlg_bridge(from, to, op) This function is currently not supported by the dialog_ng module. To be incorporated in the future. -6.12. dlg_get(callid, ftag, ttag) +6.12. dlg_get(callid, ftag, ttag) - This function is currently not supported by the dialog_ng module. To be - incorporated in the future. + Search and set current dialog based on Call-ID, From-Tag and To-Tag + parameters. -6.13. is_known_dlg() + Meaning of the parameters is as follows: + * callid - SIP call-id. + * ftag - SIP From tag. + * ttag - SIP To tag. + + This function can be used from BRANCH_ROUTE, REQUEST_ROUTE, + ONREPLY_ROUTE and FAILURE_ROUTE. + + Example 1.19. dlg_get usage +... +if(dlg_get("abcdef", "123", "456")) +{ + dlg_bye("all"); +} +... + +6.13. is_known_dlg() This function is currently not supported by the dialog_ng module. To be incorporated in the future. @@ -708,27 +722,27 @@ dlg_terminate("all", "Insufficient QoS"); 7.4. expired_dialogs 7.5. failed_dialogs -7.1. active_dialogs +7.1. active_dialogs This function is currently not supported by the dialog_ng module. To be incorporated in the future. -7.2. early_dialogs +7.2. early_dialogs This function is currently not supported by the dialog_ng module. To be incorporated in the future. -7.3. processed_dialogs +7.3. processed_dialogs This function is currently not supported by the dialog_ng module. To be incorporated in the future. -7.4. expired_dialogs +7.4. expired_dialogs This function is currently not supported by the dialog_ng module. To be incorporated in the future. -7.5. failed_dialogs +7.5. failed_dialogs This function is currently not supported by the dialog_ng module. To be incorporated in the future. @@ -743,7 +757,7 @@ dlg_terminate("all", "Insufficient QoS"); 8.6. profile_list_dlgs 8.7. dlg_bridge -8.1. dlg_list +8.1. dlg_list Lists the description of a dialog or of all dialogs (calls). If only one dialogs is to be listed, the dialog identifiers are to be passed as @@ -767,21 +781,21 @@ dlg_terminate("all", "Insufficient QoS"); abcdrssfrs122444@192.168.1.1 AAdfeEFF33 -8.2. dlg_list_ctx +8.2. dlg_list_ctx This function is currently not supported by the dialog_ng module. To be incorporated in the future. -8.3. dlg_end_dlg +8.3. dlg_end_dlg This function is currently not supported by the dialog_ng module. To be incorporated in the future. -8.4. dlg_terminate_dlg +8.4. dlg_terminate_dlg Terminates a singe dialog, identified by the call_id, ftag, ttag. In - dialog_ng module this dialog can be terminated in the early or confirmed - states. + dialog_ng module this dialog can be terminated in the early or + confirmed states. Name: dlg_terminate_dlg @@ -797,17 +811,17 @@ dlg_terminate("all", "Insufficient QoS"); abcdrssfrs122444@192.168.1.1 AAdfeEFF33 ftag-1234 t-tag1234 -8.5. profile_get_size +8.5. profile_get_size This function is currently not supported by the dialog_ng module. To be incorporated in the future. -8.6. profile_list_dlgs +8.6. profile_list_dlgs This function is currently not supported by the dialog_ng module. To be incorporated in the future. -8.7. dlg_bridge +8.7. dlg_bridge This function is currently not supported by the dialog_ng module. To be incorporated in the future. @@ -823,42 +837,42 @@ dlg_terminate("all", "Insufficient QoS"); 9.7. dlg.profile_list 9.8. dlg.bridge_dlg -9.1. dlg.list +9.1. dlg.list This function is currently not supported by the dialog_ng module. To be incorporated in the future. -9.2. dlg.list_ctx +9.2. dlg.list_ctx This function is currently not supported by the dialog_ng module. To be incorporated in the future. -9.3. dlg.dlg_list +9.3. dlg.dlg_list This function is currently not supported by the dialog_ng module. To be incorporated in the future. -9.4. dlg.dlg_list_ctx +9.4. dlg.dlg_list_ctx This function is currently not supported by the dialog_ng module. To be incorporated in the future. -9.5. dlg.end_dlg +9.5. dlg.end_dlg This function is currently not supported by the dialog_ng module. To be incorporated in the future. -9.6. dlg.profile_get_size +9.6. dlg.profile_get_size This function is currently not supported by the dialog_ng module. To be incorporated in the future. -9.7. dlg.profile_list +9.7. dlg.profile_list This function is currently not supported by the dialog_ng module. To be incorporated in the future. -9.8. dlg.bridge_dlg +9.8. dlg.bridge_dlg This function is currently not supported by the dialog_ng module. To be incorporated in the future. @@ -872,32 +886,32 @@ dlg_terminate("all", "Insufficient QoS"); 10.5. $dlg_ctx(...) 10.6. $dlg_var(key) -10.1. $DLG_count +10.1. $DLG_count This function is currently not supported by the dialog_ng module. To be incorporated in the future. -10.2. $DLG_status +10.2. $DLG_status This function is currently not supported by the dialog_ng module. To be incorporated in the future. -10.3. $DLG_lifetime +10.3. $DLG_lifetime This function is currently not supported by the dialog_ng module. To be incorporated in the future. -10.4. $dlg(...) +10.4. $dlg(...) This function is currently not supported by the dialog_ng module. To be incorporated in the future. -10.5. $dlg_ctx(...) +10.5. $dlg_ctx(...) This function is currently not supported by the dialog_ng module. To be incorporated in the future. -10.6. $dlg_var(key) +10.6. $dlg_var(key) This function is currently not supported by the dialog_ng module. To be incorporated in the future. @@ -910,19 +924,25 @@ Chapter 2. Developer Guide 1.1. register_dlgcb (dialog, type, cb, param, free_param_cb) 1.2. terminate_dlg (str callid, str ftag, str ttag, hdrs) - 1.3. set_dlg_var (dlg, key, val) - 1.4. get_dlg_var (dlg, key) - 1.5. get_current_dialog () + 1.3. lookup_terminate_dlg (unsigned int h_entry, unsigned int + h_id, hdrs) + + 1.4. set_dlg_var (dlg, key, val) + 1.5. get_dlg_var (dlg, key) + 1.6. get_current_dialog () 1. Available Functions 1.1. register_dlgcb (dialog, type, cb, param, free_param_cb) 1.2. terminate_dlg (str callid, str ftag, str ttag, hdrs) - 1.3. set_dlg_var (dlg, key, val) - 1.4. get_dlg_var (dlg, key) - 1.5. get_current_dialog () + 1.3. lookup_terminate_dlg (unsigned int h_entry, unsigned int h_id, + hdrs) + + 1.4. set_dlg_var (dlg, key, val) + 1.5. get_dlg_var (dlg, key) + 1.6. get_current_dialog () -1.1. register_dlgcb (dialog, type, cb, param, free_param_cb) +1.1. register_dlgcb (dialog, type, cb, param, free_param_cb) Register a new callback to the dialog. @@ -964,14 +984,14 @@ Chapter 2. Developer Guide + DLGCB_SPIRALED - called when the dialog matches a spiraling request - it's a per dialog type. + DLGCB_DESTROY - * dialog_cb cb - callback function to be called. Prototype is: “void + * dialog_cb cb - callback function to be called. Prototype is: "void (dialog_cb) (struct dlg_cell* dlg, int type, struct dlg_cb_params * - params); ” + params); " * void *param - parameter to be passed to the callback function. * param_free callback_param_free - callback function to be called to - free the param. Prototype is: “void (param_free_cb) (void *param);” + free the param. Prototype is: "void (param_free_cb) (void *param);" -1.2. terminate_dlg (str callid, str ftag, str ttag, hdrs) +1.2. terminate_dlg (str callid, str ftag, str ttag, hdrs) Terminate a Dialog identified by callid, ftag and ttag in early or confirmed state. @@ -983,7 +1003,20 @@ Chapter 2. Developer Guide * str* hdrs - string containg extra headers (full format) to be added to the BYE requests of the dialog. -1.3. set_dlg_var (dlg, key, val) +1.3. lookup_terminate_dlg (unsigned int h_entry, unsigned int h_id, hdrs) + + Terminate a Dialog identified by h_entry and h_id (similar to + dlg_end_dlg command via XMLRPC). + + Meaning of parameters is as follows: + * unsigned int h_entry - Number of the table, where to find the + dialog + * unsigned int h_id - Number of the entry in the table, where to find + the dialog terminate. + * str* hdrs - string containg extra headers (full format) to be added + to the BYE requests of the dialog. + +1.4. set_dlg_var (dlg, key, val) Add a variable to the dialog structure @@ -992,7 +1025,7 @@ Chapter 2. Developer Guide * str* key - Name of the variable. * str* val - Value of the variable. -1.4. get_dlg_var (dlg, key) +1.5. get_dlg_var (dlg, key) Retrieves a variable attached to the dialog structure @@ -1000,13 +1033,13 @@ Chapter 2. Developer Guide * struct dlg_cell* dlg - dialog to get the variable from. * str* key - Name of the variable. -1.5. get_current_dialog () +1.6. get_current_dialog () Get the current dialog for a message, if exists Chapter 3. Frequently Asked Questions - 3.1. What happend with “use_tight_match” parameter? + 3.1. What happend with "use_tight_match" parameter? 3.2. Why is there a dialog_ng module and a dialog module? 3.3. Where can I find more about Kamailio? 3.4. Where can I post a question about this module? @@ -1014,48 +1047,48 @@ Chapter 3. Frequently Asked Questions 3.1. - What happend with “use_tight_match” parameter? + What happend with "use_tight_match" parameter? - The parameter was removed with version 1.3 as the option of tight - matching became mandatory and not configurable. Now, the tight matching - is done all the time (when using DID matching). + The parameter was removed with version 1.3 as the option of tight + matching became mandatory and not configurable. Now, the tight matching + is done all the time (when using DID matching). 3.2. - Why is there a dialog_ng module and a dialog module? + Why is there a dialog_ng module and a dialog module? - The dialog_ng module addresses shortcomings in the intial dialog module - design. It makes some large changes to the API and therefore must be - introduced slowly. It is currently in the early development stages. - Eventually the dialog_ng module should replace the dialog module. + The dialog_ng module addresses shortcomings in the intial dialog module + design. It makes some large changes to the API and therefore must be + introduced slowly. It is currently in the early development stages. + Eventually the dialog_ng module should replace the dialog module. 3.3. - Where can I find more about Kamailio? + Where can I find more about Kamailio? - Take a look at http://www.kamailio.org/. + Take a look at http://www.kamailio.org/. 3.4. - Where can I post a question about this module? + Where can I post a question about this module? - First at all check if your question was already answered on one of our - mailing lists: - * User Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users - * Developer Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev + First at all check if your question was already answered on one of our + mailing lists: + * User Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users + * Developer Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev - E-mails regarding any stable Kamailio release should be sent to - and e-mails regarding development - versions should be sent to . + E-mails regarding any stable Kamailio release should be sent to + and e-mails regarding development + versions should be sent to . - If you want to keep the mail private, send it to - . + If you want to keep the mail private, send it to + . 3.5. - How can I report a bug? + How can I report a bug? - Please follow the guidelines provided at: - http://sip-router.org/tracker. + Please follow the guidelines provided at: + http://sip-router.org/tracker. diff --git a/modules/dialplan/README b/modules/dialplan/README index 037309d6407..dad36b85bd1 100644 --- a/modules/dialplan/README +++ b/modules/dialplan/README @@ -8,8 +8,6 @@ Edited by Andreea-Ancuta Onofrei -Edited by - Juha Heinanen Copyright 2007-2008 Voice Sistem SRL diff --git a/modules/dispatcher/README b/modules/dispatcher/README index 8b2f4fdff59..ace355e2c91 100644 --- a/modules/dispatcher/README +++ b/modules/dispatcher/README @@ -10,17 +10,15 @@ Daniel-Constantin Mierla -Edited by - Carsten Bock ng-voice GmbH - Copyright © 2004 FhG FOKUS + Copyright 2004 FhG FOKUS - Copyright © 2005 Voice Sistem + Copyright 2005 Voice Sistem - Copyright © 2010 Daniel-Constantin Mierla (asipto.com) + Copyright 2010 Daniel-Constantin Mierla (asipto.com) __________________________________________________________________ Table of Contents @@ -734,10 +732,11 @@ Note + "5" - hash over authorization-username (Proxy-Authorization or "normal" authorization). If no username is found, round robin is used. - + "6" - random (using rand()). + + "6" - random destination (using rand()). + "7" - hash over the content of PVs string. Note: This works only when the parameter hash_pvar is set. - + "8" - use first destination (good for failover). + + "8" - select destination sorted by priority attribute value + (serial forking ordered by priority). + "9" - use weight based load distribution. You have to set the attribute 'weight' per each address in destination set. + "10" - use call load distribution. You have to set the diff --git a/modules/dmq/README b/modules/dmq/README index 8bc19e48e3b..c8aee048a13 100644 --- a/modules/dmq/README +++ b/modules/dmq/README @@ -10,13 +10,11 @@ Edited by Marius Ovidiu Bucur -Edited by - Charles Chance - Copyright © 2011 Marius Bucur + Copyright 2011 Marius Bucur - Copyright © 2013 Charles Chance, Sipcentric Ltd. + Copyright 2013 Charles Chance, Sipcentric Ltd. __________________________________________________________________ Table of Contents @@ -142,7 +140,7 @@ Chapter 1. Admin Guide The local server address. This is the interface over which the DMQ engine will send/receive messages. - Default value is “NULL”. + Default value is "NULL". Example 1.1. Set server_address parameter ... @@ -154,7 +152,7 @@ modparam("dmq", "server_address", "sip:10.0.0.20:5060") The address of another DMQ node from which the local node should retrieve initial information about all other nodes. - Default value is “NULL”. + Default value is "NULL". Example 1.2. Set notification_address parameter ... @@ -165,7 +163,7 @@ modparam("dmq", "notification_address", "sip:10.0.0.21:5060") The number of worker threads for sending/receiving messages. - Default value is “2”. + Default value is "2". Example 1.3. Set num_workers parameter ... @@ -177,7 +175,7 @@ modparam("dmq", "num_threads", 4) The number of seconds between node pings (for checking status of other nodes). - Minimum value is “60” (default). + Minimum value is "60" (default). Example 1.4. Set ping_interval parameter ... @@ -192,7 +190,7 @@ modparam("dmq", "ping_interval", 90) 4.4. dmq_t_replicate([skip_loop_test]) 4.5. dmq_is_from_node() -4.1. dmq_handle_message() +4.1. dmq_handle_message() Handles a DMQ message by passing it to the appropriate local peer (module). The peer is identified by the user part of the To header. @@ -207,7 +205,7 @@ modparam("dmq", "ping_interval", 90) } ... -4.2. dmq_send_message(peer, node, body, content_type) +4.2. dmq_send_message(peer, node, body, content_type) Sends a DMQ message directly from config file to a single node. @@ -225,7 +223,7 @@ modparam("dmq", "ping_interval", 90) text/plain"); ... -4.3. dmq_bcast_message(peer, body, content_type) +4.3. dmq_bcast_message(peer, body, content_type) Broadcasts a DMQ message from config file to all active nodes (except self). @@ -242,7 +240,7 @@ text/plain"); dmq_bcast_message("peer_name", "Message body...", "text/plain"); ... -4.4. dmq_t_replicate([skip_loop_test]) +4.4. dmq_t_replicate([skip_loop_test]) Replicates the current SIP message to all active nodes (except self). Useful for replicating REGISTER, PUBLISH etc. in a clustered @@ -264,7 +262,7 @@ text/plain"); dmq_t_replicate(); ... -4.5. dmq_is_from_node() +4.5. dmq_is_from_node() Checks whether the current message has been sent by another DMQ node in the cluster. @@ -301,7 +299,7 @@ Chapter 2. Developer Guide The module provides the following functions that can be used in other Kamailio modules. -1. dmq_load_api(dmq_api_t* api) +1. dmq_load_api(dmq_api_t* api) This function binds the DMQ module and fills the structure with the exported functions below. @@ -315,7 +313,7 @@ typedef struct dmq_api { } dmq_api_t; ... -2. register_dmq_peer(dmq_peer_t* peer) +2. register_dmq_peer(dmq_peer_t* peer) Registers an entity as a DMQ peer which permits receiving/sending messages between nodes which support the same peer. @@ -325,7 +323,7 @@ typedef struct dmq_api { Example to follow. ... -3. bcast_message(dmq_peer_t* peer, str* body, dmq_node_t* except, +3. bcast_message(dmq_peer_t* peer, str* body, dmq_node_t* except, dmq_resp_cback_t* resp_cback, int max_forwards, str* content_type) Broadcast a DMQ message to all nodes in the DMQ bus excluding self, @@ -336,7 +334,7 @@ dmq_resp_cback_t* resp_cback, int max_forwards, str* content_type) Example to follow. ... -4. send_message(dmq_peer_t* peer, str* body, dmq_node_t* node, +4. send_message(dmq_peer_t* peer, str* body, dmq_node_t* node, dmq_resp_cback_t* resp_cback, int max_forwards, str* content_type) Send a DMQ message to a single node. diff --git a/modules/dnssec/README b/modules/dnssec/README index 4ef2e0a5f1b..7802d73764b 100644 --- a/modules/dnssec/README +++ b/modules/dnssec/README @@ -120,5 +120,6 @@ Chapter 1. Admin Guide ... modparam("dnssec", "general_query_flags", 1) # QUERY_DONT_VALIDATE disable vali dation - modparam("dnssec", "general_query_flags", 10) # QUERY_IGNORE_SKEW | QUERY_NO_DLV + modparam("dnssec", "general_query_flags", 10) # QUERY_IGNORE_SKEW | QUERY_NO_DL +V ... diff --git a/modules/domain/README b/modules/domain/README index 18b45d7a737..f921c270dd3 100644 --- a/modules/domain/README +++ b/modules/domain/README @@ -402,7 +402,7 @@ Chapter 2. Developer Guide 1.1. is_domain_local(domain) -1.1. is_domain_local(domain) +1.1. is_domain_local(domain) Checks if domain given in str* parameter is local. diff --git a/modules/domainpolicy/README b/modules/domainpolicy/README index 0c337f17ddd..13d0e99b030 100644 --- a/modules/domainpolicy/README +++ b/modules/domainpolicy/README @@ -14,8 +14,6 @@ Otmar Lendl -Edited by - Klaus Darilion @@ -151,7 +149,7 @@ Chapter 1. Admin Guide This is URL of the database to be used. - Default value is "mysql://openser:openserrw@localhost/openser" + Default value is "mysql://kamailio:kamailiorw@localhost/kamailio" Example 1.1. Setting db_url parameter modparam("domainpolicy", "db_url", "postgres://proxy:frog23@db.sip-router.org/si diff --git a/modules/drouting/README b/modules/drouting/README index d9f858f0311..c7fc9dce319 100644 --- a/modules/drouting/README +++ b/modules/drouting/README @@ -6,8 +6,6 @@ Edited by Ovidiu Sas -Edited by - Anca-Maria Vamanu Copyright 2005-2008 Voice Sistem SRL diff --git a/modules/geoip/README b/modules/geoip/README index a8ac4ccd76c..437a0f41f23 100644 --- a/modules/geoip/README +++ b/modules/geoip/README @@ -10,14 +10,12 @@ Daniel-Constantin Mierla -Edited by - Alex Balashov Evariste Systems LLC - Copyright © 2010 Daniel-Constantin Mierla (asipto.com) + Copyright 2010 Daniel-Constantin Mierla (asipto.com) __________________________________________________________________ Table of Contents @@ -120,7 +118,7 @@ Chapter 1. Admin Guide Path to the GeoIP database file. - Default value is “null”. + Default value is "null". Example 1.1. Set path parameter ... @@ -131,7 +129,7 @@ modparam("geoip", "path", "/usr/local/share/GeoLiteCity.dat") 4.1. geoip_match(ipaddr, pvc) -4.1. geoip_match(ipaddr, pvc) +4.1. geoip_match(ipaddr, pvc) Match ipaddr against the GeoIP database and set the pvc container. The function has to be called before accessing a key via: $gip(pvc=>key). @@ -162,4 +160,4 @@ if(geoip_match("$si", "src")) + metro - metro code Exported pseudo-variables are documented at - http://www.kamailio.org/dokuwiki/. + http://www.kamailio.org/wiki/. diff --git a/modules/h350/README b/modules/h350/README index 83ce3ea31ef..8b7e9194257 100644 --- a/modules/h350/README +++ b/modules/h350/README @@ -5,7 +5,7 @@ Christian Schlatter University of North Carolina - Copyright © 2007 University of North Carolina + Copyright 2007 University of North Carolina __________________________________________________________________ Table of Contents diff --git a/modules/htable/README b/modules/htable/README index 322fac9c435..432f0ce7d61 100644 --- a/modules/htable/README +++ b/modules/htable/README @@ -11,19 +11,15 @@ Elena-Ramona Modroiu -Edited by - Alex Balashov -Edited by - Ovidiu Sas - Copyright © 2008-2011 http://www.asipto.com + Copyright 2008-2011 http://www.asipto.com __________________________________________________________________ Table of Contents @@ -199,7 +195,7 @@ Chapter 1. Admin Guide You can read more about hash tables at: http://en.wikipedia.org/wiki/Hash_table. - The “name” can be a static string or can include pseudo- variables that + The "name" can be a static string or can include pseudo- variables that will be replaced at runtime. Example 1.1. Accessing $sht(htname=>key) @@ -222,7 +218,7 @@ $sht(a=>$ci::srcip) = $si; the failed authentications per user and one for storing the time of last authentication attempt. To ensure unique name per user, the hash table uses a combination of authentication username and text - “::auth_count” and “::last_auth”. + "::auth_count" and "::last_auth". Example 1.2. Dictionary attack limitation ... @@ -619,7 +615,7 @@ modparam("htable", "enable_dmq", 1) 4.8. sht_iterator_end(iname) 4.9. sht_iterator_next(iname) -4.1. sht_print() +4.1. sht_print() Dump content of hash table to L_ERR log level. Intended for debug purposes. @@ -632,7 +628,7 @@ modparam("htable", "enable_dmq", 1) sht_print(); ... -4.2. sht_rm_name_re(htable=>regexp) +4.2. sht_rm_name_re(htable=>regexp) Delete all entries in the htable that match the name against regular expression. @@ -645,7 +641,7 @@ sht_print(); sht_rm_name_re("ha=>.*"); ... -4.3. sht_rm_value_re(htable=>regexp) +4.3. sht_rm_value_re(htable=>regexp) Delete all entries in the htable that match the value against regular expression. @@ -658,7 +654,7 @@ sht_rm_name_re("ha=>.*"); sht_rm_value_re("ha=>.*"); ... -4.4. sht_reset(htable) +4.4. sht_reset(htable) Delete all entries in the htable. The name of the hash table can be a dynamic string with variables. @@ -670,7 +666,7 @@ sht_rm_value_re("ha=>.*"); sht_reset("ha$var(x)"); ... -4.5. sht_lock(htable=>key) +4.5. sht_lock(htable=>key) Lock the slot in htable corespoding to the key item. Note that the locking is re-entrant for the process, therefore the lock and unlock @@ -683,7 +679,7 @@ sht_reset("ha$var(x)"); sht_lock("ha=>test"); ... -4.6. sht_unlock(htable=>key) +4.6. sht_unlock(htable=>key) Unlock the slot in htable corespoding to the key item. Note that the locking is re-entrant for the process, therefore the lock and unlock @@ -698,7 +694,7 @@ $sht(ha=>test) = $sht(ha=>test) + 10; sht_unlock("ha=>test"); ... -4.7. sht_iterator_start(iname, hname) +4.7. sht_iterator_start(iname, hname) Start an iterator for hash table named by the value of parameter hname. The parameter iname is used to identify the iterator. There can be up @@ -718,7 +714,7 @@ sht_unlock("ha=>test"); sht_iterator_start("i1", "h1"); ... -4.8. sht_iterator_end(iname) +4.8. sht_iterator_end(iname) Close the iterator identified by iname parameter and release the hash table slot aquired by the iterator. The iname value must be the same @@ -733,7 +729,7 @@ sht_iterator_start("i1", "h1"); sht_iterator_end("i1"); ... -4.9. sht_iterator_next(iname) +4.9. sht_iterator_next(iname) Move the iterator to the next item in hash table. It must be called also after sht_iterator_start() to get the first item in the hash @@ -778,7 +774,7 @@ sht_iterator_end("i1"); 6.2. sht_dump 6.3. sht_delete -6.1. sht_reload +6.1. sht_reload Reload a hash table from database. @@ -791,7 +787,7 @@ sht_iterator_end("i1"); _hash_table_name_ _empty_line_ -6.2. sht_dump +6.2. sht_dump Dump content of a hash table via MI. @@ -804,7 +800,7 @@ sht_iterator_end("i1"); _hash_table_name_ _empty_line_ -6.3. sht_delete +6.3. sht_delete Delete a key from a hash table via MI. @@ -834,7 +830,7 @@ sht_iterator_end("i1"); 7.7. htable.listTables 7.8. htable.stats -7.1. htable.get htable key +7.1. htable.get htable key Lists one value in a hash table @@ -853,7 +849,7 @@ kamcmd htable.get students daniel kamcmd htable.get students course[0] ... -7.2. htable.delete htable key +7.2. htable.delete htable key Delete one value in a hash table @@ -872,7 +868,7 @@ kamcmd htable.delete students anna kamcmd htable.delete students course[0] ... -7.3. htable.sets htable key value +7.3. htable.sets htable key value Set an item in hash table to string value. @@ -892,7 +888,7 @@ kamcmd htable.sets test x abc kamcmd htable.sets test x[0] abc ... -7.4. htable.seti htable key value +7.4. htable.seti htable key value Set an item in hash table to integer value. @@ -912,7 +908,7 @@ kamcmd htable.seti test x 123 kamcmd htable.sets test x[0] 123 ... -7.5. htable.dump htable +7.5. htable.dump htable Lists all the values in a hash table @@ -926,7 +922,7 @@ kamcmd htable.sets test x[0] 123 kamcmd htable.dump ipban ... -7.6. htable.reload htable +7.6. htable.reload htable Reload hash table from database. @@ -940,7 +936,7 @@ kamcmd htable.dump ipban kamcmd htable.reload ipban ... -7.7. htable.listTables +7.7. htable.listTables Lists all defined tables @@ -954,7 +950,7 @@ kamcmd htable.reload ipban kamcmd htable.listTables ... -7.8. htable.stats +7.8. htable.stats Get statistics for hash tables - name, number of slots, number of items, max number of items per slot, min number of items per slot. @@ -974,7 +970,7 @@ kamcmd htable.stats 8.1. htable:mod-init 8.2. htable:expired: -8.1. htable:mod-init +8.1. htable:mod-init When defined, the module calls event_route[htable:mod-init] after all modules have been initialized. A typical use case is to initialise @@ -987,7 +983,7 @@ event_route[htable:mod-init] { } ... -8.2. htable:expired:
+8.2. htable:expired:
When defined, the module calls event_route[htable:expired:
] when an entry in the given table expires. In this event route, the key and diff --git a/modules/imc/README b/modules/imc/README index c6220be6110..d64d3735772 100644 --- a/modules/imc/README +++ b/modules/imc/README @@ -232,7 +232,7 @@ modparam("imc", "extra_hdrs", "P-Flags: 3\r\n") 4.1. imc_manager() -4.1. imc_manager() +4.1. imc_manager() Handles Message method.It detects if the body of the message is a conference command.If so it executes it, otherwise it sends the message @@ -261,7 +261,7 @@ if(is_method("MESSAGE) 5.1. imc_list_rooms 5.2. imc_list_members -5.1. imc_list_rooms +5.1. imc_list_rooms Lists of the IM Conferencing rooms. @@ -273,7 +273,7 @@ if(is_method("MESSAGE) :imc_list_rooms:_reply_fifo_file_ _empty_line_ -5.2. imc_list_members +5.2. imc_list_members Listing of the members in IM Conferencing rooms. @@ -291,7 +291,7 @@ if(is_method("MESSAGE) 6.1. active_rooms -6.1. active_rooms +6.1. active_rooms Number of active IM Conferencing rooms. diff --git a/modules/ims_auth/README b/modules/ims_auth/README index 32b43716072..caceb897f27 100644 --- a/modules/ims_auth/README +++ b/modules/ims_auth/README @@ -15,9 +15,15 @@ Richard Good Smile Communications - Copyright © 2007 FhG FOKUS +Edited by - Copyright © 2012 Smile Communications +Carsten Bock + + ng-voice GmbH + + Copyright 2007 FhG FOKUS + + Copyright 2012 Smile Communications __________________________________________________________________ Table of Contents @@ -42,14 +48,19 @@ Richard Good 3.8. registration_qop (string) 3.9. cxdx_forced_peer (string) 3.10. cxdx_dest_realm (string) + 3.11. max_nonce_reuse (integer) + 3.12. add_authinfo_hdr (integer) + 3.13. ignore_failed_auth (integer) + 3.14. av_check_only_impu (integer) 4. Functions 4.1. ims_www_authorize(realm, table) - 4.2. ims_www_authenticate(realm, table) - 4.3. ims_www_challenge(realm, table) - 4.4. ims_proxy_challenge(realm, table) - 4.5. ims_proxy_authenticate(realm, table) + 4.2. ims_www_authenticate(realm) + 4.3. ims_www_challenge(route_block, realm) + 4.4. ims_www_challenge(route_block, realm, algorithm) + 4.5. ims_proxy_challenge(route_block, realm, table) + 4.6. ims_proxy_authenticate(realm, table) 5. Statistics @@ -65,12 +76,17 @@ Richard Good 1.5. av_request_at_once parameter usage 1.6. av_request_at_sync parameter usage 1.7. registration_default_algorithm parameter usage - 1.8. load_credentials parameter usage + 1.8. registration_qop parameter usage 1.9. cxdx_forced_peer parameter usage - 1.10. version_table parameter usage - 1.11. www_authorize usage - 1.12. proxy_authorize usage - 1.13. proxy_authorize usage + 1.10. cxdx_dest_realm parameter usage + 1.11. max_nonce_reuse parameter usage + 1.12. add_authinfo_hdr parameter usage + 1.13. ignore_failed_auth parameter usage + 1.14. av_check_only_impu parameter usage + 1.15. www_authorize usage + 1.16. ims_www_challenge usage + 1.17. ims_www_challenge usage + 1.18. proxy_authorize usage Chapter 1. Admin Guide @@ -94,14 +110,19 @@ Chapter 1. Admin Guide 3.8. registration_qop (string) 3.9. cxdx_forced_peer (string) 3.10. cxdx_dest_realm (string) + 3.11. max_nonce_reuse (integer) + 3.12. add_authinfo_hdr (integer) + 3.13. ignore_failed_auth (integer) + 3.14. av_check_only_impu (integer) 4. Functions 4.1. ims_www_authorize(realm, table) - 4.2. ims_www_authenticate(realm, table) - 4.3. ims_www_challenge(realm, table) - 4.4. ims_proxy_challenge(realm, table) - 4.5. ims_proxy_authenticate(realm, table) + 4.2. ims_www_authenticate(realm) + 4.3. ims_www_challenge(route_block, realm) + 4.4. ims_www_challenge(route_block, realm, algorithm) + 4.5. ims_proxy_challenge(route_block, realm, table) + 4.6. ims_proxy_authenticate(realm, table) 5. Statistics @@ -144,6 +165,10 @@ Chapter 1. Admin Guide 3.8. registration_qop (string) 3.9. cxdx_forced_peer (string) 3.10. cxdx_dest_realm (string) + 3.11. max_nonce_reuse (integer) + 3.12. add_authinfo_hdr (integer) + 3.13. ignore_failed_auth (integer) + 3.14. av_check_only_impu (integer) 3.1. name (string) @@ -163,7 +188,7 @@ modparam("ims_auth", "name", "sip:scscf3.ims.smilecoms.com:6060") Default value is fine for most people. Use the parameter if you really need to change it. - Default value is “1024”. + Default value is "1024". Example 1.2. auth_data_hash_size parameter usage ... @@ -175,7 +200,7 @@ modparam("ims_auth", "auth_data_hash_size", 1024) This is the time, in seconds, that a SENTauth vector is valid for. If there is no response ... - Default value is “60”. + Default value is "60". Example 1.3. auth_vector_timeout parameter usage ... @@ -186,7 +211,7 @@ modparam("ims_auth", "auth_vector_timeout", "domain") Time, in seconds, an used auth vector is valid for. - Default value is “60”. + Default value is "60". Example 1.4. password_column parameter usage ... @@ -224,7 +249,7 @@ modparam("ims_auth", "av_request_at_sync", 1) * MD5 * HSS-Selected - HSS will decide on auth algorithm - Default value is “AKAv1-MD5”. + Default value is "AKAv1-MD5". Example 1.7. registration_default_algorithm parameter usage ... @@ -235,18 +260,21 @@ modparam("ims_auth", "registration_default_algorithm", "HSS-Selected") The QOP options to put in the authorisation challenges. - Default value of this parameter is “auth,auth-int”. + Default value of this parameter is "auth,auth-int". - Example 1.8. load_credentials parameter usage + Example 1.8. registration_qop parameter usage ... -modparam("ims_auth", "load_credentials", "auth-int") +modparam("ims_auth", "registration_qop", "auth-int") ... 3.9. cxdx_forced_peer (string) - FQDN of Diameter Peer (HSS) to use for communication (MAR) + FQDN of Diameter Peer (HSS) to use for communication (MAR). If you use + this, the routing defined in your diameter xml configuration file (CDP) + will be ignored and as a result you will lose the benefits of load + balancing and failover. - Default value is “”. + Default value is "". Example 1.9. cxdx_forced_peer parameter usage ... @@ -257,20 +285,75 @@ modparam("ims_auth", "cxdx_forced_peer", "hss.ims.smilecoms.com") Destination realm to be used in Diameter messags to HSS - Default value is “ims.smilecoms.com”. + Default value is "ims.smilecoms.com". - Example 1.10. version_table parameter usage + Example 1.10. cxdx_dest_realm parameter usage ... modparam("ims_auth", "cxdx_dest_realm", "ims.smilecoms.com") ... +3.11. max_nonce_reuse (integer) + + Defines, how many times a nonce can be reused (provided nc is + incremented) + + Default value is "0" (don't allow reuse). + + Example 1.11. max_nonce_reuse parameter usage +... +modparam("ims_auth", "max_nonce_reuse", 1) +... + +3.12. add_authinfo_hdr (integer) + + Should an Authentication-Info header be added on 200 OK responses? + + Default value is "1" (add Authentication-Info header). + + Example 1.12. add_authinfo_hdr parameter usage +... +modparam("ims_auth", "add_authinfo_hdr", 0) +... + +3.13. ignore_failed_auth (integer) + + Ignore invalid passwords (only IMPI/IMPU is checked). + + It should be used only for testing, e.g. load balancing with SIPP where + we don't want to worry about auth. + + Default value is "0" (don't ingnore the failed authentication). + + Example 1.13. ignore_failed_auth parameter usage +... +modparam("ims_auth", "ignore_failed_auth", 1) +... + +3.14. av_check_only_impu (integer) + + When storing the authentication vectors for an account, use either + IMPI/IMPU (=0, default) or IMPU (=1). + + In case the IMPI is different from the IMPU, this option needs to be + enabled to allow registration from classic "SIP-clients", such as Snom + phones and others, as they do not send an authentication username in + the first REGISTER. + + Default value is "0" (store authentication vectors based on IMPI/IMPU). + + Example 1.14. av_check_only_impu parameter usage +... +modparam("ims_auth", "av_check_only_impu", 1) +... + 4. Functions 4.1. ims_www_authorize(realm, table) - 4.2. ims_www_authenticate(realm, table) - 4.3. ims_www_challenge(realm, table) - 4.4. ims_proxy_challenge(realm, table) - 4.5. ims_proxy_authenticate(realm, table) + 4.2. ims_www_authenticate(realm) + 4.3. ims_www_challenge(route_block, realm) + 4.4. ims_www_challenge(route_block, realm, algorithm) + 4.5. ims_proxy_challenge(route_block, realm, table) + 4.6. ims_proxy_authenticate(realm, table) 4.1. ims_www_authorize(realm, table) @@ -291,7 +374,7 @@ modparam("ims_auth", "cxdx_dest_realm", "ims.smilecoms.com") * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string “”. In case of REGISTER requests To + It must not be empty string "". In case of REGISTER requests To header field domain (e.g., variable $td) can be used (because this header field represents the user being registered), for all other messages From header field domain can be used (e.g., variable $fd). @@ -301,20 +384,20 @@ modparam("ims_auth", "cxdx_dest_realm", "ims.smilecoms.com") This function can be used from REQUEST_ROUTE. - Example 1.11. www_authorize usage + Example 1.15. www_authorize usage ... if (!www_authorize("kamailio.org", "subscriber")) { - www_challenge("kamailio.org", "1"); + www_challenge(""REG_MAR_REPLY"", "kamailio.org", "1"); }; ... -4.2. ims_www_authenticate(realm, table) +4.2. ims_www_authenticate(realm) - It is same function as www_authenticate(realm, table). This name is + It is the same function as www_authenticate(realm, table). This name is kept for backward compatibility, since it was named this way first time by it actually does user authentication. -4.3. ims_www_challenge(realm, table) +4.3. ims_www_challenge(route_block, realm) Name alias: proxy_authorize(realm, table) @@ -328,27 +411,86 @@ if (!www_authorize("kamailio.org", "subscriber")) { Negative return codes have the same meaning as for www_authenticate(). Meaning of the parameters is as follows: + * Route block to resume after async MAR Diameter reply. * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string “”. Apart of a static strinh, typical + It must not be empty string "". Apart of a static strinh, typical value is From header field domain (e.g., variable $fd). - If an empty string “” is used then the server will generate it from + If an empty string "" is used then the server will generate it from the request. From header field domain will be used as realm. The string may contain pseudo variables. - * table - Table to be used to lookup usernames and passwords (usually - subscribers table). This function can be used from REQUEST_ROUTE. - Example 1.12. proxy_authorize usage + Example 1.16. ims_www_challenge usage ... if (!proxy_authorize("$fd", "subscriber)) { - proxy_challenge("$fd", "1"); # Realm will be autogenerated + proxy_challenge(""REG_MAR_REPLY","$fd"); # Realm will be autogenerated }; ... + ... +route[REG_MAR_REPLY] +{ + #this is async so to know status we have to check the reply avp + xlog("L_DBG","maa_return code is $avp(s:maa_return_code)\n"); + + switch ($avp(s:maa_return_code)){ + case 1: #success + xlog("L_DBG", "MAR success - 401/407 response sent from mod +ule\n"); + break; + case -1: #failure + xlog("L_ERR", "MAR failure - error response sent from modul +e\n"); + break; + case -2: #error + xlog("L_ERR", "MAR error - sending error response now\n"); + t_reply("500", "MAR failed"); + break; + default: + xlog("L_ERR", "Unknown return code from MAR, value is [$avp +(s:uaa_return_code)]\n"); + t_reply("500", "Unknown response code from MAR"); + break; + } + exit; +} + +4.4. ims_www_challenge(route_block, realm, algorithm) + + Same as 4.3 except here there is the addiional option to specify the + authorisation algorithm + * algorithm - The algorithm to be used when challenging the client. + Can be AKAv1-MD5, AKAv2-MD5, MD5, or HSS-Selected. If left as an + empty string, the default algorithm will be chosen according to the + parameter registration_default_algorithm (see section 3.7) -4.4. ims_proxy_challenge(realm, table) + This function can be used from REQUEST_ROUTE. + + Example 1.17. ims_www_challenge usage +... + if (!ims_www_authenticate(NETWORKNAME)) { + #user has not been authenticated. Lets send a challenge via 401 +Unauthorized + if ($? == -2) { + t_reply("403", "Authentication Failed"); + exit; + } else if ($? == -3) { + t_reply("400", "Bad Request"); + exit; + } else if ($? == -9) { + xlog("L_DBG", "Authentication re-sync requested\n"); + ims_www_resync_auth("REG_RESYNC_REPLY", "$td"); + exit; + } else { + xlog("L_DBG","About to challenge! auth_ims\n"); + ims_www_challenge("REG_MAR_REPLY", "$td", "MD5"); + exit; + } + } + +4.5. ims_proxy_challenge(route_block, realm, table) Name alias: proxy_authorize(realm, table) @@ -362,12 +504,13 @@ if (!proxy_authorize("$fd", "subscriber)) { Negative return codes have the same meaning as for www_authenticate(). Meaning of the parameters is as follows: + * Route block to resume after async MAR Diameter reply. * realm - Realm is a opaque string that the user agent should present to the user so he can decide what username and password to use. Usually this is domain of the host the server is running on. - It must not be empty string “”. Apart of a static strinh, typical + It must not be empty string "". Apart of a static strinh, typical value is From header field domain (e.g., variable $fd). - If an empty string “” is used then the server will generate it from + If an empty string "" is used then the server will generate it from the request. From header field domain will be used as realm. The string may contain pseudo variables. * table - Table to be used to lookup usernames and passwords (usually @@ -375,14 +518,42 @@ if (!proxy_authorize("$fd", "subscriber)) { This function can be used from REQUEST_ROUTE. - Example 1.13. proxy_authorize usage + Example 1.18. proxy_authorize usage ... if (!proxy_authorize("$fd", "subscriber)) { - proxy_challenge("$fd", "1"); # Realm will be autogenerated + proxy_challenge("REG_MAR_REPLY","$fd", "1"); # Realm will be autogenera +ted }; ... +route[REG_MAR_REPLY] +{ + #this is async so to know status we have to check the reply avp + xlog("L_DBG","maa_return code is $avp(s:maa_return_code)\n"); + + switch ($avp(s:maa_return_code)){ + case 1: #success + xlog("L_DBG", "MAR success - 401/407 response sent from mod +ule\n"); + break; + case -1: #failure + xlog("L_ERR", "MAR failure - error response sent from modul +e\n"); + break; + case -2: #error + xlog("L_ERR", "MAR error - sending error response now\n"); + t_reply("500", "MAR failed"); + break; + default: + xlog("L_ERR", "Unknown return code from MAR, value is [$avp +(s:uaa_return_code)]\n"); + t_reply("500", "Unknown response code from MAR"); + break; + } + exit; +} +... -4.5. ims_proxy_authenticate(realm, table) +4.6. ims_proxy_authenticate(realm, table) It is same function as proxy_authenticate(realm, table). This name is kept for backward compatibility, since it was named this way first time diff --git a/modules/ims_isc/README b/modules/ims_isc/README index e8a83507ce2..13c39ffaf5b 100644 --- a/modules/ims_isc/README +++ b/modules/ims_isc/README @@ -15,9 +15,9 @@ Richard Good Smile Communications - Copyright © 2007 FhG FOKUS + Copyright 2007 FhG FOKUS - Copyright © 2012 Smile Communications + Copyright 2012 Smile Communications __________________________________________________________________ Table of Contents @@ -36,6 +36,7 @@ Richard Good 3.2. expires_grace (integer) 3.3. isc_fr_timeout (integer) 3.4. isc_fr_inv_timeout (integer) + 3.5. add_p_served_user (integer) 4. Functions @@ -49,9 +50,10 @@ Richard Good 1.2. expires_grace parameter usage 1.3. isc_fr_timeout parameter usage 1.4. isc_fr_inv_timeout parameter usage - 1.5. isc_match_filter_reg usage - 1.6. isc_match_filter usage - 1.7. isc_from_as usage + 1.5. add_p_served_user parameter usage + 1.6. isc_match_filter_reg usage + 1.7. isc_match_filter usage + 1.8. isc_from_as usage Chapter 1. Admin Guide @@ -69,6 +71,7 @@ Chapter 1. Admin Guide 3.2. expires_grace (integer) 3.3. isc_fr_timeout (integer) 3.4. isc_fr_inv_timeout (integer) + 3.5. add_p_served_user (integer) 4. Functions @@ -102,6 +105,7 @@ Chapter 1. Admin Guide 3.2. expires_grace (integer) 3.3. isc_fr_timeout (integer) 3.4. isc_fr_inv_timeout (integer) + 3.5. add_p_served_user (integer) 3.1. my_uri (string) @@ -154,6 +158,19 @@ modparam("ims_isc", "isc_fr_timeout", 5000) modparam("ims_isc", "isc_fr_inv_timeout", 20000) ... +3.5. add_p_served_user (integer) + + This boolean indicates if a P-Served-User should be added on the ISC + interface, according to RFC 5502. + + Default value is 0 (false) + + Example 1.5. add_p_served_user parameter usage +... +modparam("ims_isc", "add_p_served_user", 1) +# p-served user header will be enabled +... + 4. Functions 4.1. isc_match_filter_reg(reg_state,domain) @@ -176,7 +193,7 @@ modparam("ims_isc", "isc_fr_inv_timeout", 20000) This function can be used from REQUEST_ROUTE. - Example 1.5. isc_match_filter_reg usage + Example 1.6. isc_match_filter_reg usage ... isc_match_filter_reg("1","location"); ... @@ -196,7 +213,7 @@ isc_match_filter_reg("1","location"); This function can be used from REQUEST_ROUTE | FAILURE_ROUTE. - Example 1.6. isc_match_filter usage + Example 1.7. isc_match_filter usage ... isc_match_filter("orig","location"); ... @@ -214,7 +231,7 @@ isc_match_filter("orig","location"); This function can be used from REQUEST_ROUTE | FAILURE_ROUTE. - Example 1.7. isc_from_as usage + Example 1.8. isc_from_as usage ... if (!isc_from_as("orig")) { remove_hf("P-Asserted-Identity"); diff --git a/modules/ims_qos/README b/modules/ims_qos/README index 0f8407ad474..b30d8a0a2a5 100644 --- a/modules/ims_qos/README +++ b/modules/ims_qos/README @@ -15,9 +15,9 @@ Richard Good Smile Communications - Copyright © 2007 FhG FOKUS + Copyright 2007 FhG FOKUS - Copyright © 2012 Smile Communications + Copyright 2012 Smile Communications __________________________________________________________________ Table of Contents @@ -38,11 +38,12 @@ Richard Good 3.4. cdp_event_latency (integer) 3.5. cdp_event_threshold (integer) 3.6. cdp_event_latency_log (integer) + 3.7. authorize_video_flow (integer) 4. Functions - 4.1. Rx_AAR_Register(domain) - 4.2. Rx_AAR(domain) + 4.1. Rx_AAR_Register(route_block, domain) + 4.2. Rx_AAR(route_block, direction) 5. Statistics @@ -57,8 +58,9 @@ Richard Good 1.4. cdp_event_latency parameter usage 1.5. cdp_event_threshold parameter usage 1.6. cdp_event_latency_log parameter usage - 1.7. Rx_AAR_Register - 1.8. Rx_AAR + 1.7. authorize_video_flow parameter usage + 1.8. Rx_AAR_Register + 1.9. Rx_AAR Chapter 1. Admin Guide @@ -78,11 +80,12 @@ Chapter 1. Admin Guide 3.4. cdp_event_latency (integer) 3.5. cdp_event_threshold (integer) 3.6. cdp_event_latency_log (integer) + 3.7. authorize_video_flow (integer) 4. Functions - 4.1. Rx_AAR_Register(domain) - 4.2. Rx_AAR(domain) + 4.1. Rx_AAR_Register(route_block, domain) + 4.2. Rx_AAR(route_block, direction) 5. Statistics @@ -123,6 +126,7 @@ Chapter 1. Admin Guide 3.4. cdp_event_latency (integer) 3.5. cdp_event_threshold (integer) 3.6. cdp_event_latency_log (integer) + 3.7. authorize_video_flow (integer) 3.1. rx_dest_realm (string) @@ -138,8 +142,11 @@ modparam("ims_qos", "rx_dest_realm", "ims.smilecoms.com") 3.2. rx_forced_peer (string) - This is the optional name of the origin host of the Diameter server - (typically a PCRF). If not set then realm routing is used. + FQDN of the Diameter server (typically a PCRF) to communicate with. If + not set then realm routing is used. If you use this, the routing + defined in your diameter xml configuration file (CDP) will be ignored + and as a result you will lose the benefits of load balancing and + failover. Default value is ''. @@ -199,12 +206,25 @@ modparam("ims_qos", "cdp_event_threshold", 500) modparam("ims_qos", "cdp_event_latency_log", 1) ... +3.7. authorize_video_flow (integer) + + This is a flag that specifies whether or not to authorize video flows. + 1 means video flows will be authorized over Rx and 0 means video flows + will not be authorized over Rx + + Default value is 1. + + Example 1.7. authorize_video_flow parameter usage +... +modparam("ims_qos", "authorize_video_flow", 0) +... + 4. Functions - 4.1. Rx_AAR_Register(domain) - 4.2. Rx_AAR(domain) + 4.1. Rx_AAR_Register(route_block, domain) + 4.2. Rx_AAR(route_block, direction) -4.1. Rx_AAR_Register(domain) +4.1. Rx_AAR_Register(route_block, domain) Perform a AAR on Diameter RX interface to subscribe to signalling status. This purpose of this is tell a Diameter server (typically a @@ -213,6 +233,7 @@ modparam("ims_qos", "cdp_event_latency_log", 1) see 3GGP TS 29.214. Meaning of the parameters is as follows: + * Route block to resume after async UAR Diameter reply. * domain that usrloc_pcscf uses to store user information. This function can be used from REQUEST_ROUTE. @@ -220,10 +241,14 @@ modparam("ims_qos", "cdp_event_latency_log", 1) p.s. this is executed asynchronously. See example on how to retrieve return value - Example 1.7. Rx_AAR_Register + Example 1.8. Rx_AAR_Register ... - Rx_AAR_Register("location"); - +if(Rx_AAR_Register("REG_AAR_REPLY","location")==0){ + exit; +} +... +route[REG_AAR_REPLY] +{ switch ($avp(s:aar_return_code)) { case 1: xlog("L_DBG", "Diameter: AAR success on subscription to signalling\n @@ -235,37 +260,38 @@ modparam("ims_qos", "cdp_event_latency_log", 1) t_reply("403", "Can't register to QoS for signalling"); exit; } - ... -4.2. Rx_AAR(domain) +4.2. Rx_AAR(route_block, direction) Perform a AAR on Diameter RX interface to request resource authorisation from a Diameter server (typically a PCRF). For more details see 3GGP TS 29.214. Meaning of the parameters is as follows: - * domain that usrloc_pcscf uses to store user information. + * Route block to resume after async UAR Diameter reply. + * directionthe direction of this message - orig, term, etc. This function can be used from REQUEST_ROUTE or ONREPLY_ROUTE. p.s. this is executed asynchronously. See example on how to retrieve return value - Example 1.8. Rx_AAR + Example 1.9. Rx_AAR ... - Rx_AAR("location"); - - switch ($avp(s:aar_return_code)) { - case 1: - xlog("L_DBG", "Diameter: AAR success\n"); - break; - default: - xlog("L_ERR", "Diameter: AAR failed\n"); - t_reply("403", "QoS not authorized"); - exit; +if(Rx_AAR("ORIG_SESSION_AAR_REPLY","orig")==0){ + exit; +} +... +route[ORIGN_SESSION_AAR_REPLY] +{ + if ($avp(s:aar_return_code) != 1) { + xlog("L_ERR", "IMS: AAR failed Orig\n"); + dlg_terminate("all", "Sorry no QoS available"); + } else { + xlog("L_DBG", "Diameter: Orig AAR success on media authorization\n"); } - +} ... 5. Statistics diff --git a/modules/iptrtpproxy/README b/modules/iptrtpproxy/README index 50b62b02d2f..0da55001301 100644 --- a/modules/iptrtpproxy/README +++ b/modules/iptrtpproxy/README @@ -1,4 +1,3 @@ - The Iptrtpproxy module Tomas Mandys @@ -6,7 +5,7 @@ Tomas Mandys Iptel.org Copyright 2007 Tomas Mandys - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -25,32 +24,32 @@ Tomas Mandys 4. Functions - 4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids]) - 4.2. iptrtpproxy_update(gate_a_to_b, session_ids) - 4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids) - 4.4. iptrtpproxy_delete(session_ids) - 4.5. iptrtpproxy_authorize_media() - 4.6. iptrtpproxy_set_param(param, value) + 4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids]) + 4.2. iptrtpproxy_update(gate_a_to_b, session_ids) + 4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids) + 4.4. iptrtpproxy_delete(session_ids) + 4.5. iptrtpproxy_authorize_media() + 4.6. iptrtpproxy_set_param(param, value) 4.7. - iptrtpproxy_set_param("(aggregation/switchboard)_by_sip - _ip_(a/b)", sip_ip) + iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_ + ip_(a/b)", sip_ip) 4.8. iptrtpproxy_set_param("protected_session_ids", - sess_ids) + sess_ids) - 4.9. iptrtpproxy_set_param("o_name", value) - 4.10. iptrtpproxy_set_param("o_addr", value) - 4.11. iptrtpproxy_set_param("codec_set", value) - 4.12. iptrtpproxy_set_param("remove_codec_mask", value) + 4.9. iptrtpproxy_set_param("o_name", value) + 4.10. iptrtpproxy_set_param("o_addr", value) + 4.11. iptrtpproxy_set_param("codec_set", value) + 4.12. iptrtpproxy_set_param("remove_codec_mask", value) 5. Selects - 5.1. @iptrtpproxy.session_ids - 5.2. @iptrtpproxy.sdp_ip - 5.3. @iptrtpproxy.o_name - 5.4. @iptrtpproxy.o_addr - 5.5. @iptrtpproxy.auth_rights - 5.6. @iptrtpproxy.active_media_num + 5.1. @iptrtpproxy.session_ids + 5.2. @iptrtpproxy.sdp_ip + 5.3. @iptrtpproxy.o_name + 5.4. @iptrtpproxy.o_addr + 5.5. @iptrtpproxy.auth_rights + 5.6. @iptrtpproxy.active_media_num List of Examples @@ -79,55 +78,55 @@ Chapter 1. Admin Guide 4. Functions - 4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids]) - 4.2. iptrtpproxy_update(gate_a_to_b, session_ids) - 4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids) - 4.4. iptrtpproxy_delete(session_ids) - 4.5. iptrtpproxy_authorize_media() - 4.6. iptrtpproxy_set_param(param, value) + 4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids]) + 4.2. iptrtpproxy_update(gate_a_to_b, session_ids) + 4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids) + 4.4. iptrtpproxy_delete(session_ids) + 4.5. iptrtpproxy_authorize_media() + 4.6. iptrtpproxy_set_param(param, value) 4.7. - iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_ip_(a - /b)", sip_ip) + iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_ip_(a/ + b)", sip_ip) - 4.8. iptrtpproxy_set_param("protected_session_ids", sess_ids) - 4.9. iptrtpproxy_set_param("o_name", value) - 4.10. iptrtpproxy_set_param("o_addr", value) - 4.11. iptrtpproxy_set_param("codec_set", value) - 4.12. iptrtpproxy_set_param("remove_codec_mask", value) + 4.8. iptrtpproxy_set_param("protected_session_ids", sess_ids) + 4.9. iptrtpproxy_set_param("o_name", value) + 4.10. iptrtpproxy_set_param("o_addr", value) + 4.11. iptrtpproxy_set_param("codec_set", value) + 4.12. iptrtpproxy_set_param("remove_codec_mask", value) 5. Selects - 5.1. @iptrtpproxy.session_ids - 5.2. @iptrtpproxy.sdp_ip - 5.3. @iptrtpproxy.o_name - 5.4. @iptrtpproxy.o_addr - 5.5. @iptrtpproxy.auth_rights - 5.6. @iptrtpproxy.active_media_num + 5.1. @iptrtpproxy.session_ids + 5.2. @iptrtpproxy.sdp_ip + 5.3. @iptrtpproxy.o_name + 5.4. @iptrtpproxy.o_addr + 5.5. @iptrtpproxy.auth_rights + 5.6. @iptrtpproxy.active_media_num 1. Overview - This module provides similar functionality as nathelper but - communicates with netfilter kernel xt_RTPPROXY module using the - libipt_RTPPROXY userspace library. All RTP streams are manipulated - directly in kernel space, no data is copied from kernel to userspace + This module provides similar functionality as nathelper but + communicates with netfilter kernel xt_RTPPROXY module using the + libipt_RTPPROXY userspace library. All RTP streams are manipulated + directly in kernel space, no data is copied from kernel to userspace and back, it reduces load and delay. See http://www.2p.cz/en/netfilter_rtp_proxy for more details. - This Kamailio module is written as a light-weight module, there is no - dialog managment as in Nathelper. The reason is that such an API - should be provided by core or a specialized dialog manager module. - Because such module is not in git, session information may be stored - in extra attributes of the avp_db module and the session id itself in + This Kamailio module is written as a light-weight module, there is no + dialog management as in Nathelper. The reason is that such an API + should be provided by core or a specialized dialog manager module. + Because such module is not in git, session information may be stored in + extra attributes of the avp_db module and the session id itself in record route as cookie, see the rr module. - It should be able to support all cases as re-invites when SIP client - offers media change in SDP and when number of medias in offer/answer + It should be able to support all cases as re-invites when SIP client + offers media change in SDP and when number of medias in offer/answer are different. Nathelper may be still used for testing if client is behind the NAT. - There is also support for media authorization. Number of codec sets - may be defined. When a message containing SDP offer/answer is being + There is also support for media authorization. Number of codec sets may + be defined. When a message containing SDP offer/answer is being processed then current codecs and streams may be inspected, removed or signallized according a codec set. @@ -137,14 +136,14 @@ Chapter 1. Admin Guide 2. Dependencies - The following libraries or applications must be installed before + The following libraries or applications must be installed before running Kamailio with this module loaded: - * netfilter xt_RTPPROXY & libipt_RTPPROXY, see + * netfilter xt_RTPPROXY & libipt_RTPPROXY, see http://www.2p.cz/en/netfilter_rtp_proxy Note - The modules Makefile must be edited and iptdir setup to the directory + The modules Makefile must be edited and iptdir setup to the directory with the iptable sources (if different from ~/iptables). Alternatively compile the module using: make -C modules/iptrtpproxy iptdir=path_to_iptables_src @@ -160,8 +159,8 @@ Note 3.1. config (string) - References iptrtpproxy.cfg, see iptrtpproxy_helper. Default value is - /etc/iptrtpproxy.cfg. If only codec authorization is to be used then + References iptrtpproxy.cfg, see iptrtpproxy_helper. Default value is + /etc/iptrtpproxy.cfg. If only codec authorization is to be used then /dev/null may be used. 3.2. switchboard (string) @@ -173,26 +172,25 @@ Note name = "aggregation" | "sip-addr-" - The name is the switchboard name as declared in config and will be - used by script functions and references switchboard. It's mandatory + The name is the switchboard name as declared in config and will be used + by script functions and references switchboard. It's mandatory parameter. The special name * set values for all switchboards. - The sip-addr is address used by iptrtpproxy_ser_param(by_sip_ip) to - find a switchboard for particular connection. If not explicitly - configured then RTP switchboard gate address are used for this - feature. + The sip-addr is address used by iptrtpproxy_ser_param(by_sip_ip) to + find a switchboard for particular connection. If not explicitly + configured then RTP switchboard gate address are used for this feature. - The aggregation enables to aggregate more switchboards in cluster and - to widden bandwidth. Aggregation will take sip-addr from the first + The aggregation enables to aggregate more switchboards in cluster and + to widden bandwidth. Aggregation will take sip-addr from the first switchboard of its. Example 1.1. Declare switchboard ... modparam("iptrtpproxy", "config", "/etc/iptrtpproxy.cfg"); - modparam("iptrtpproxy", "switchboard", "name=my1;sip-addr-a=1.2.3.4;sip --addr-b=5.6.7.8"); - modparam("iptrtpproxy", "switchboard", "name=my2;sip-addr-a=2.3.4.5;sip --addr-b=3.4.5.6;aggregation=my23"); + modparam("iptrtpproxy", "switchboard", "name=my1;sip-addr-a=1.2.3.4;sip- +addr-b=5.6.7.8"); + modparam("iptrtpproxy", "switchboard", "name=my2;sip-addr-a=2.3.4.5;sip- +addr-b=3.4.5.6;aggregation=my23"); modparam("iptrtpproxy", "switchboard", "name=my3;aggregation=my23"); modparam("iptrtpproxy", "switchboard", "name=*;aggregation=my123"); ... @@ -201,14 +199,14 @@ Note Timeout in seconds used for rerequest remote RTP proxy via RPC command after preceeding error. In other words if a RPC server is unresponsive - at the moment then next attempt will be forced after this timeout. + at the moment then next attempt will be forced after this timeout. Default value is 30. 3.4. hostname (string) - The hostname used by RPC to identify machine where Ser is running to - communicate which RTP proxy via local interface. Default value is - taken from system hostname. + The hostname used by RPC to identify machine where Ser is running to + communicate which RTP proxy via local interface. Default value is taken + from system hostname. 3.5. declare_codec (string) @@ -217,112 +215,110 @@ Note 3.6. codec_set (string) - Declares new codec set. Codecs are declared for each media type + Declares new codec set. Codecs are declared for each media type independently. The format is: "name=" value * ( ";" name "=" value ) name = "media_type" | "rights" | "codecs" | "max_streams" | ( "rtp" | "rtcp" - ) "_" ( "bytes" | "packets" ) +) "_" ( "bytes" | "packets" ) media_types = "audio" | "video" | "application" | "text" | "message" | "data" - | "control" | "?" | "*" +| "control" | "?" | "*" The name is the codec set name to be defined. - The media_type belongs to type at m= SDP line. Question mark means + The media_type belongs to type at m= SDP line. Question mark means "unknown media" type and asterisk "all media types". - The max_streams defines how many streams (m= lines) is allowed per + The max_streams defines how many streams (m= lines) is allowed per media type. - The rights defines if particular codec is allowed 0, disallowed, i.e. - will be removed if bit AND operation with remove_codec_mask is - non-zero or its presence will be signallized by - @iptrtpproxy.auth_rights (any other value). + The rights defines if particular codec is allowed 0, disallowed, i.e. + will be removed if bit AND operation with remove_codec_mask is non-zero + or its presence will be signallized by @iptrtpproxy.auth_rights (any + other value). - The codecs comma separated list of codecs. Previous media_type&rights + The codecs comma separated list of codecs. Previous media_type&rights will be applied. - The rtp/rtcp_bytes/packets limits bandwidth per media_type (0 is - unlimited). It will override bandwidth limited by + The rtp/rtcp_bytes/packets limits bandwidth per media_type (0 is + unlimited). It will override bandwidth limited by iptrtpproxy_set_param("throttle_*"). Example 1.2. Declare codec_set ... # enable all codecs, default state when codec is declared - modparam("iptrtpproxy", "codec_set", "name=cs1;media_type=*;max_streams -=9999;rights=0;codecs=*"); + modparam("iptrtpproxy", "codec_set", "name=cs1;media_type=*;max_streams= +9999;rights=0;codecs=*"); # allow only 2 audio and 1 video stream - modparam("iptrtpproxy", "codec_set", "name=cs2;media_type=*;max_streams -=0;media_type=audio;max_streams=2;media_type=video;max_streams=1"); - # dtto, allow only a few audio and video codecs, GSM codec is allowed b -ut signallized - modparam("iptrtpproxy", "codec_set", "name=cs3;media_type=*;max_streams -=0;rights=1;codecs=*;media_type=audio;max_streams=2;rights=0;codecs=PCMU,G729,G -728,parityfec,telephone-events;rights=2;codecs=GSM;media_type=video;max_streams -=1;rights=0;codecs=jpeg,parityfec"); + modparam("iptrtpproxy", "codec_set", "name=cs2;media_type=*;max_streams= +0;media_type=audio;max_streams=2;media_type=video;max_streams=1"); + # dtto, allow only a few audio and video codecs, GSM codec is allowed bu +t signallized + modparam("iptrtpproxy", "codec_set", "name=cs3;media_type=*;max_streams= +0;rights=1;codecs=*;media_type=audio;max_streams=2;rights=0;codecs=PCMU,G729,G72 +8,parityfec,telephone-events;rights=2;codecs=GSM;media_type=video;max_streams=1; +rights=0;codecs=jpeg,parityfec"); # limit max. bandwidth for video - modparam("iptrtpproxy", "codec_set", "name=cs4;media_type=video;rtp_byt -es=10000;rtcp_bytes=1000"); + modparam("iptrtpproxy", "codec_set", "name=cs4;media_type=video;rtp_byte +s=10000;rtcp_bytes=1000"); ... 4. Functions - 4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids]) - 4.2. iptrtpproxy_update(gate_a_to_b, session_ids) - 4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids) - 4.4. iptrtpproxy_delete(session_ids) - 4.5. iptrtpproxy_authorize_media() - 4.6. iptrtpproxy_set_param(param, value) - 4.7. - iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_ip_(a/b)", - sip_ip) - - 4.8. iptrtpproxy_set_param("protected_session_ids", sess_ids) - 4.9. iptrtpproxy_set_param("o_name", value) - 4.10. iptrtpproxy_set_param("o_addr", value) - 4.11. iptrtpproxy_set_param("codec_set", value) - 4.12. iptrtpproxy_set_param("remove_codec_mask", value) - -4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids]) - - Parses SDP content and allocates for each RTP media stream one RTP - proxy session. SDP is updates to reflect allocated sessions. - Switchboard/aggregation is set using iptrtpproxy_set_param(by_sip_ip) + 4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids]) + 4.2. iptrtpproxy_update(gate_a_to_b, session_ids) + 4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids) + 4.4. iptrtpproxy_delete(session_ids) + 4.5. iptrtpproxy_authorize_media() + 4.6. iptrtpproxy_set_param(param, value) + 4.7. iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_ip_(a/b)", + sip_ip) + + 4.8. iptrtpproxy_set_param("protected_session_ids", sess_ids) + 4.9. iptrtpproxy_set_param("o_name", value) + 4.10. iptrtpproxy_set_param("o_addr", value) + 4.11. iptrtpproxy_set_param("codec_set", value) + 4.12. iptrtpproxy_set_param("remove_codec_mask", value) + +4.1. iptrtpproxy_alloc(gate_a_to_b [, existing_sess_ids]) + + Parses SDP content and allocates for each RTP media stream one RTP + proxy session. SDP is updates to reflect allocated sessions. + Switchboard/aggregation is set using iptrtpproxy_set_param(by_sip_ip) or iptrtpproxy_set_param("switchboard/aggregation"). - Aggregation supports load balancing among more RTP proxies controlled - by RPC. The module try to allocate at machines/switchboards in - following order (priorities) not yet asked (or being heartbeated) - machines, responsive machines, switchboards having percentualy more + Aggregation supports load balancing among more RTP proxies controlled + by RPC. The module try to allocate at machines/switchboards in + following order (priorities) not yet asked (or being heartbeated) + machines, responsive machines, switchboards having percentualy more free slots, non responsive machines. - Proxy may hide caller identity provided at o= line using - @iptrtpproxy.o_name/addr and iptrtpproxy_set_param(o_name/addr) - functions. But the script is responsible for rewritting to original - values in a response or a callee initiated re-INVITE. Therefore + Proxy may hide caller identity provided at o= line using + @iptrtpproxy.o_name/addr and iptrtpproxy_set_param(o_name/addr) + functions. But the script is responsible for rewritting to original + values in a response or a callee initiated re-INVITE. Therefore original value need to be stored in-dialog. - * if gate_a_to_b bit 0 is set then SDP regards to gate-a to gate-b + * if gate_a_to_b bit 0 is set then SDP regards to gate-a to gate-b direction. - * protected_session_ids list of existing sessions enables reusing - already allocated sessions in re-INVITE without allocating new - sessions for each stream in SDP regardless a IP/port is required. + * protected_session_ids list of existing sessions enables reusing + already allocated sessions in re-INVITE without allocating new + sessions for each stream in SDP regardless a IP/port is required. It's mostly undesirable, typically "hold-on" is done via re-INVITE without any change. There is drawback because callee cannot change - IP:port in 200OK which is legal case in RFC3264. But because some - non-RFC3264 compliant phones dislike proactively changed IP:port - at RTP proxy it seems it's less evil. - * function returns true is a session was created, identifier is + IP:port in 200OK which is legal case in RFC3264. But because some + non-RFC3264 compliant phones dislike proactively changed IP:port at + RTP proxy it seems it's less evil. + * function returns true is a session was created, identifier is available via select @iptrtpproxy.session_ids. Example 1.3. iptrtpproxy_alloc usage ... - if (!iptrtpproxy_set_param("aggregation_by_sip_ip_a", "@received.ip")) -{ - if (!iptrtpproxy_set_param("switchboard_by_sip_ip_a", "@receive -d.ip")) { + if (!iptrtpproxy_set_param("aggregation_by_sip_ip_a", "@received.ip")) { + if (!iptrtpproxy_set_param("switchboard_by_sip_ip_a", "@received +.ip")) { t_reply("500", "RTP proxy error"); drop; } @@ -330,19 +326,19 @@ d.ip")) { eval_push("x:%@next_hop.src_ip"); if (@eval.get[-1] == @received.ip) { if (@iptrtpproxy.aggregation_a) { - iptrtpproxy_set_param("aggregation_b", "@iptrtpproxy.ag -gregation_a"); + iptrtpproxy_set_param("aggregation_b", "@iptrtpproxy.agg +regation_a"); } else { - iptrtpproxy_set_param("switchboard_b", "@iptrtpproxy.sw -itchboard_a"); + iptrtpproxy_set_param("switchboard_b", "@iptrtpproxy.swi +tchboard_a"); } } else { - if (!iptrtpproxy_set_param("aggregation_by_sip_ip_b", "@eval.ge -t[-1]")) { - if (!iptrtpproxy_set_param("switchboard_by_sip_ip_b", " -@eval.get[-1]")) { + if (!iptrtpproxy_set_param("aggregation_by_sip_ip_b", "@eval.get +[-1]")) { + if (!iptrtpproxy_set_param("switchboard_by_sip_ip_b", "@ +eval.get[-1]")) { t_reply("500", "RTP proxy error"); drop; } @@ -357,22 +353,22 @@ t[-1]")) { $sess_ids = @iptrtpproxy.session_ids; ... -4.2. iptrtpproxy_update(gate_a_to_b, session_ids) +4.2. iptrtpproxy_update(gate_a_to_b, session_ids) - Parses SDP content and updates sessions provided by session_ids and - updates SDP. If succesfull then session_ids may be changed (in case - e.g. media stream has port zero particular session is released), the - result of @iptrtpproxy.session_ids should be stored for future + Parses SDP content and updates sessions provided by session_ids and + updates SDP. If succesfull then session_ids may be changed (in case + e.g. media stream has port zero particular session is released), the + result of @iptrtpproxy.session_ids should be stored for future in-dialog usage. The SDP contect is also affected by iptrtpproxy_set_param(o_name/addr) - functions. If a stream is deactivated in SDP then Sessions may be + functions. If a stream is deactivated in SDP then Sessions may be deleted unless mentioned in protected_session_ids. - * if gate_a_to_b bit 0 is set then SDP regards to gate-a to gate-b + * if gate_a_to_b bit 0 is set then SDP regards to gate-a to gate-b direction. - if gate_a_to_b bit 1 is set then SDP is updated only, no RTP - session are affected. Should be used when handling retransmission - in onreply route, retransmission replies are not eaten be tm + if gate_a_to_b bit 1 is set then SDP is updated only, no RTP + session are affected. Should be used when handling retransmission + in onreply route, retransmission replies are not eaten be tm module! Example 1.4. iptrtpproxy_update usage @@ -384,11 +380,11 @@ t[-1]")) { } ... -4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids) +4.3. iptrtpproxy_adjust_timeout(gate_a_to_b, session_ids) - Adjust timeout for particular gate. It's useful in "200 OK" decrease + Adjust timeout for particular gate. It's useful in "200 OK" decrease timeout to learning timeout if INVITE has set (long) ringing timeout. - * if gate_a_to_b bit 0 is set then it regards to gate-a to gate-b + * if gate_a_to_b bit 0 is set then it regards to gate-a to gate-b direction. Example 1.5. iptrtpproxy_adjust_timeout usage @@ -404,11 +400,11 @@ t[-1]")) { } ... -4.4. iptrtpproxy_delete(session_ids) +4.4. iptrtpproxy_delete(session_ids) - Delete sessions identified by session_ids. May be used when dialog is - being destroyed (BYE) or when INVITE failed in failure route. If - protected_session_ids list is provided then this set is excluded from + Delete sessions identified by session_ids. May be used when dialog is + being destroyed (BYE) or when INVITE failed in failure route. If + protected_session_ids list is provided then this set is excluded from sessions to be deleted. Example 1.6. iptrtpproxy_delete usage @@ -417,16 +413,16 @@ t[-1]")) { iptrtpproxy_delete($sess_ids); ... -4.5. iptrtpproxy_authorize_media() +4.5. iptrtpproxy_authorize_media() Authorizes SDP media according currect codec_set. If bit AND operation - between rights in codec set and remove_codec_mask is non zero then - such a codec are to be removed. The result may be obtained from - @iptrtpproxy.auth_rights which returns max. right which has been + between rights in codec set and remove_codec_mask is non zero then such + a codec are to be removed. The result may be obtained from + @iptrtpproxy.auth_rights which returns max. right which has been applied when processing all codecs of enabled streams. - The function MUST NOT be called after iptrtpproxy_alloc/update! But - the function may be called several times to authorize using more codec + The function MUST NOT be called after iptrtpproxy_alloc/update! But the + function may be called several times to authorize using more codec sets. Example 1.7. iptrtpproxy_authorize_media usage @@ -455,91 +451,90 @@ t[-1]")) { } ... -4.6. iptrtpproxy_set_param(param, value) +4.6. iptrtpproxy_set_param(param, value) Set particular parameter needed mainly by - iptrtpproxy_alloc/update/adjust_timeout. The paramter value is - availble via @iptrtpproxy.. - * Supported parameters: expiration_timeout, ttl, learning_timeout, - always_learn, aggregation_a, aggregation_b, switchboard_a, - switchboard_b, throttle_mark, throttle_rtp_max_bytes, - throttle_rtp_max_packets, throttle_rtcp_max_bytes, + iptrtpproxy_alloc/update/adjust_timeout. The paramter value is availble + via @iptrtpproxy.. + * Supported parameters: expiration_timeout, ttl, learning_timeout, + always_learn, aggregation_a, aggregation_b, switchboard_a, + switchboard_b, throttle_mark, throttle_rtp_max_bytes, + throttle_rtp_max_packets, throttle_rtcp_max_bytes, throttle_rtcp_max_packets. -4.7. iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_ip_(a/b)", +4.7. iptrtpproxy_set_param("(aggregation/switchboard)_by_sip_ip_(a/b)", sip_ip) - Find corresponding aggregation or switchboard and set - @iptrtpproxy.aggregation_a/b or @iptrtpproxy.switchboard_a/b. - Switchboards/aggregations are compared against sip-addr, it allow + Find corresponding aggregation or switchboard and set + @iptrtpproxy.aggregation_a/b or @iptrtpproxy.switchboard_a/b. + Switchboards/aggregations are compared against sip-addr, it allow separate SIP and RTP traffic and RTP aggregation. - * sip_ip IP to be compared, typically @received.ip or + * sip_ip IP to be compared, typically @received.ip or @next_hop.src_ip. * function returns true if switchboard/aggregation was found -4.8. iptrtpproxy_set_param("protected_session_ids", sess_ids) +4.8. iptrtpproxy_set_param("protected_session_ids", sess_ids) Used for reusing sessions in iptrtpproxy_alloc, iptrtpproxy_update and iptrtpproxy_delete. -4.9. iptrtpproxy_set_param("o_name", value) +4.9. iptrtpproxy_set_param("o_name", value) - Username to be rewritten at o= line by iptrtpproxy_alloc/update to - hide caller identity. If value is blank then username is left - unchanged. + Username to be rewritten at o= line by iptrtpproxy_alloc/update to hide + caller identity. If value is blank then username is left unchanged. -4.10. iptrtpproxy_set_param("o_addr", value) +4.10. iptrtpproxy_set_param("o_addr", value) Address to be rewritten at o= line by iptrtpproxy_alloc/update to hide caller identity. If value is blank then address is left unchanged. -4.11. iptrtpproxy_set_param("codec_set", value) +4.11. iptrtpproxy_set_param("codec_set", value) - Codec set for iptrtpproxy_authorize_media. Current codec set may be + Codec set for iptrtpproxy_authorize_media. Current codec set may be obtained by @iptrtpproxy.codec_set. -4.12. iptrtpproxy_set_param("remove_codec_mask", value) +4.12. iptrtpproxy_set_param("remove_codec_mask", value) Mask used in iptrtpproxy_authorize_media. Current mask may be obtained by @iptrtpproxy.remove_codec_mask. 5. Selects - 5.1. @iptrtpproxy.session_ids - 5.2. @iptrtpproxy.sdp_ip - 5.3. @iptrtpproxy.o_name - 5.4. @iptrtpproxy.o_addr - 5.5. @iptrtpproxy.auth_rights - 5.6. @iptrtpproxy.active_media_num + 5.1. @iptrtpproxy.session_ids + 5.2. @iptrtpproxy.sdp_ip + 5.3. @iptrtpproxy.o_name + 5.4. @iptrtpproxy.o_addr + 5.5. @iptrtpproxy.auth_rights + 5.6. @iptrtpproxy.active_media_num -5.1. @iptrtpproxy.session_ids +5.1. @iptrtpproxy.session_ids Returns sessions allocated/updated in iptrtpproxy_alloc/update. The format is: -switchboard_name [ ":" [ session_id "/" created ] * ( "," session_id "/" create -d ) ] ] +switchboard_name [ ":" [ session_id "/" created ] * ( "," session_id "/" created + ) ] ] session_id = * ( [0-9] ) ; empty when no session allocated created = timestamp -5.2. @iptrtpproxy.sdp_ip +5.2. @iptrtpproxy.sdp_ip Return first rewritten IP provided at SDP c= line. -5.3. @iptrtpproxy.o_name +5.3. @iptrtpproxy.o_name Return username from original o= line. -5.4. @iptrtpproxy.o_addr +5.4. @iptrtpproxy.o_addr Return address from original o= line. -5.5. @iptrtpproxy.auth_rights +5.5. @iptrtpproxy.auth_rights Result of iptrtpproxy_authorize_media. -5.6. @iptrtpproxy.active_media_num +5.6. @iptrtpproxy.active_media_num - Returns number of active media streams in SDP. - iptrtpproxy_authorize_media may disable some streams, i.e. returned + Returns number of active media streams in SDP. + iptrtpproxy_authorize_media may disable some streams, i.e. returned value may change after authorization. diff --git a/modules/kazoo/README b/modules/kazoo/README index 659a978f365..5ada46878c8 100644 --- a/modules/kazoo/README +++ b/modules/kazoo/README @@ -10,7 +10,7 @@ Luis Azedo - Copyright © 2010, 2014 2600hz + Copyright 2010, 2014 2600hz __________________________________________________________________ Table of Contents @@ -51,8 +51,9 @@ Luis Azedo 4.3.1. amqp_consumer_ack_timeout(str) 4.3.2. amqp_interprocess_timeout(str) - 4.3.3. amqp_waitframe_timout(str) - 4.3.4. amqp_query_timout(str) + 4.3.3. amqp_waitframe_tiemout(str) + 4.3.4. amqp_query_timeout(str) + 4.3.5. amqp_query_timeout_avp(str) 4.4. presence related @@ -102,19 +103,20 @@ Luis Azedo 1.12. Set single_consumer_on_reconnect parameter 1.13. Set amqp_consumer_ack_timeout parameter 1.14. Set amqp_interprocess_timeout parameter - 1.15. Set amqp_waitframe_timout parameter - 1.16. Set amqp_query_timout parameter - 1.17. Set db_url parameter - 1.18. Set presentity_table parameter - 1.19. kazoo_publish usage - 1.20. kazoo_query usage - 1.21. kazoo_subscribe usage + 1.15. Set amqp_waitframe_timeout parameter + 1.16. Set amqp_query_timeout parameter + 1.17. >Set amqp_query_timeout_avp parameter + 1.18. Set db_url parameter + 1.19. Set presentity_table parameter + 1.20. kazoo_publish usage + 1.21. kazoo_query usage 1.22. kazoo_subscribe usage - 1.23. kazoo_pua_publish usage - 1.24. kazoo_encode usage - 1.25. kazoo_json usage - 1.26. kz.json usage - 1.27. kz.encode usage + 1.23. kazoo_subscribe usage + 1.24. kazoo_pua_publish usage + 1.25. kazoo_encode usage + 1.26. kazoo_json usage + 1.27. kz.json usage + 1.28. kz.encode usage Chapter 1. Admin Guide @@ -154,8 +156,9 @@ Chapter 1. Admin Guide 4.3.1. amqp_consumer_ack_timeout(str) 4.3.2. amqp_interprocess_timeout(str) - 4.3.3. amqp_waitframe_timout(str) - 4.3.4. amqp_query_timout(str) + 4.3.3. amqp_waitframe_tiemout(str) + 4.3.4. amqp_query_timeout(str) + 4.3.5. amqp_query_timeout_avp(str) 4.4. presence related @@ -246,16 +249,16 @@ event_route[kazoo:consumer-event-presence-update] { # presence is the value extracted from Event-Category field in json payload # update is the value extracted from Event-Name field in json payload -xlog("L_INFO", "received $(kzE{kz.json,Event-Package}) update for $(kzE{kz.json -,From})"); +xlog("L_INFO", "received $(kzE{kz.json,Event-Package}) update for $(kzE{kz.json, +From})"); ... } event_route[kazoo:consumer-event-presence] { # presence is the value extracted from Event-Category field in json payload -xlog("L_INFO", "received $(kzE{kz.json,Event-Package}) update for $(kzE{kz.json -,From})"); +xlog("L_INFO", "received $(kzE{kz.json,Event-Package}) update for $(kzE{kz.json, +From})"); ... } @@ -324,8 +327,9 @@ event_route[kazoo:consumer-event] 4.3.1. amqp_consumer_ack_timeout(str) 4.3.2. amqp_interprocess_timeout(str) - 4.3.3. amqp_waitframe_timout(str) - 4.3.4. amqp_query_timout(str) + 4.3.3. amqp_waitframe_tiemout(str) + 4.3.4. amqp_query_timeout(str) + 4.3.5. amqp_query_timeout_avp(str) 4.4. presence related @@ -362,7 +366,7 @@ modparam("kazoo", "amqp_consumer_processes", 10) The default name of the field in json payload to compose the event name 1st part - Default value is “Event-Category”. + Default value is "Event-Category". Example 1.4. Set amqp_consumer_event_key parameter ... @@ -374,7 +378,7 @@ modparam("kazoo", "amqp_consumer_event_key", "My-JSON-Field-Name") The default name of the field in json payload to compose the event name 2nd part - Default value is “Event-Name”. + Default value is "Event-Name". Example 1.5. Set amqp_consumer_event_subkey parameter ... @@ -510,29 +514,48 @@ modparam("kazoo", "amqp_interprocess_timeout_sec", 1) modparam("kazoo", "amqp_interprocess_timeout_micro", 200000) ... -4.3.3. amqp_waitframe_timout(str) +4.3.3. amqp_waitframe_tiemout(str) Timeout when checking for messages from rabbitmq. Default value is 100000 micro. - Example 1.15. Set amqp_waitframe_timout parameter + Example 1.15. Set amqp_waitframe_timeout parameter ... -modparam("kazoo", "amqp_waitframe_timout_sec", 1) -modparam("kazoo", "amqp_waitframe_timout_micro", 200000) +modparam("kazoo", "amqp_waitframe_timeout_sec", 1) +modparam("kazoo", "amqp_waitframe_timeout_micro", 200000) ... -4.3.4. amqp_query_timout(str) +4.3.4. amqp_query_timeout(str) Timeout when checking for reply messages from rabbitmq for kazoo_query commands. Default value is 2 sec. - Example 1.16. Set amqp_query_timout parameter + Example 1.16. Set amqp_query_timeout parameter ... -modparam("kazoo", "amqp_query_timout_sec", 1) -modparam("kazoo", "amqp_query_timout_micro", 200000) +modparam("kazoo", "amqp_query_timeout_sec", 1) +modparam("kazoo", "amqp_query_timeout_micro", 200000) +... + +4.3.5. amqp_query_timeout_avp(str) + + avp holding the value in seconds for Timeout when checking for reply + messages from rabbitmq for kazoo_query commands. + + Default value is NULL (no value). + + Example 1.17. >Set amqp_query_timeout_avp parameter +... +modparam("kazoo", "amqp_query_timeout_avp", "$var(kz_timeout)") + +route[SOME_ROUTE] +{ + $var(kz_timeout) = 12; + kazoo_query(exchange, routingkey, payload); +} + ... 4.4. presence related @@ -544,9 +567,9 @@ modparam("kazoo", "amqp_query_timout_micro", 200000) If set, the kazoo_ppua_publish function will update the presentity status in the database. - Default value is “NULL”. + Default value is "NULL". - Example 1.17. Set db_url parameter + Example 1.18. Set db_url parameter ... modparam("kazoo", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio") ... @@ -555,9 +578,9 @@ modparam("kazoo", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio") The name of the presentity table in the database. - Default value is “presentity”. + Default value is "presentity". - Example 1.18. Set presentity_table parameter + Example 1.19. Set presentity_table parameter ... modparam("kazoo", "presentity_table", "my_presentity_table") ... @@ -586,26 +609,25 @@ modparam("kazoo", "presentity_table", "my_presentity_table") 5.1. amqp related -5.1.1. kazoo_publish(exchange, routing_key, json_payload) +5.1.1. kazoo_publish(exchange, routing_key, json_payload) The function publishes a json payload to rabbitmq. The routing_key parameter should be encoded. This function can be used from ANY ROUTE. - Example 1.19. kazoo_publish usage + Example 1.20. kazoo_publish usage ... -$var(amqp_payload_request) = "{'Event-Category' : 'directory', 'Event-Name' : ' -reg_success', 'Contact' : '" + $var(fs_contact) + "', 'Call-ID' : '" + $ci + "' -, 'Realm' : '" + $fd +"', 'Username' : '" + $fU + "', 'From-User' : '" + $fU + -"', 'From-Host' : '" + $fd + "', 'To-User' : '" + $tU +"', 'To-Host' : '" + $td - + "', 'User-Agent' : '" + $ua +"' ," + $var(register_contants)+ " }"; -$var(amqp_routing_key) = "registration.success." + $(fd{kz.encode}) + "." + $fU -; +$var(amqp_payload_request) = "{'Event-Category' : 'directory', 'Event-Name' : 'r +eg_success', 'Contact' : '" + $var(fs_contact) + "', 'Call-ID' : '" + $ci + "', +'Realm' : '" + $fd +"', 'Username' : '" + $fU + "', 'From-User' : '" + $fU + "', + 'From-Host' : '" + $fd + "', 'To-User' : '" + $tU +"', 'To-Host' : '" + $td + " +', 'User-Agent' : '" + $ua +"' ," + $var(register_contants)+ " }"; +$var(amqp_routing_key) = "registration.success." + $(fd{kz.encode}) + "." + $fU; kazoo_publish("callmgr", $var(amqp_routing_key), $var(amqp_payload_request)); ... -5.1.2. kazoo_query(exchange, routing_key, json_payload [, target_var]) +5.1.2. kazoo_query(exchange, routing_key, json_payload [, target_var]) The function publishes a json payload to rabbitmq, waits for a correlated messageand puts the result in target_var. The routing_key @@ -614,15 +636,15 @@ kazoo_publish("callmgr", $var(amqp_routing_key), $var(amqp_payload_request)); This function can be used from ANY ROUTE. - Example 1.20. kazoo_query usage + Example 1.21. kazoo_query usage ... $var(amqp_payload_request) = "{'Event-Category' : 'call_event' , 'Event-Name' : - 'query_user_channels_req', 'Realm' : '" + $fd + "', 'Username' : '" + $fU + "' -, 'Active-Only' : false }"; +'query_user_channels_req', 'Realm' : '" + $fd + "', 'Username' : '" + $fU + "', +'Active-Only' : false }"; kazoo_encode("$ci", "$var(callid_encoded)"); $var(amqp_routing_key) = "call.status_req.$var(callid_encoded)"; -if(kazoo_query("callevt", $var(amqp_routing_key), $var(amqp_payload_request), " -$var(amqp_result)")) { +if(kazoo_query("callevt", $var(amqp_routing_key), $var(amqp_payload_request), "$ +var(amqp_result)")) { kazoo_json("$var(amqp_result)", "Channels[0].switch_url", "$du"); if($du != $null) { xlog("L_INFO", "$ci|log|user channels found redirecting call to $du"); @@ -631,19 +653,19 @@ $var(amqp_result)")) { } ... -5.1.3. kazoo_subscribe(exchange, exchange_type, queue, routing_key) +5.1.3. kazoo_subscribe(exchange, exchange_type, queue, routing_key) The function subscribes to exchange/type on queue with routing_key. The routing_key parameter should be encoded. This function must be called from event_route[kazoo:mod-init]. - Example 1.21. kazoo_subscribe usage + Example 1.22. kazoo_subscribe usage ... event_route[kazoo:mod-init] { - kazoo_subscribe("dialoginfo", "direct", "BLF-QUEUE-MY_HOSTNAME", "BLF-MY_HOS -TNAME"); + kazoo_subscribe("dialoginfo", "direct", "BLF-QUEUE-MY_HOSTNAME", "BLF-MY_HOST +NAME"); } event_route[kazoo:consumer-event] @@ -652,7 +674,7 @@ event_route[kazoo:consumer-event] } ... -5.1.4. kazoo_subscribe(json_description) +5.1.4. kazoo_subscribe(json_description) The function takes additional parameters to the subscribe function. @@ -670,13 +692,13 @@ event_route[kazoo:consumer-event] This function must be called from event_route[kazoo:mod-init]. - Example 1.22. kazoo_subscribe usage + Example 1.23. kazoo_subscribe usage ... event_route[kazoo:mod-init] { $var(payload) = "{ 'exchange' : 'dialoginfo' , 'type' : 'direct', 'queue' : - 'BLF-QUEUE-MY_HOSTNAME', 'routing' : 'BLF-MY_HOSTNAME', 'auto_delete' : 0, 'du -rable' : 1, 'no_ack' : 0, 'wait_for_consumer_ack' : 1 }"; +'BLF-QUEUE-MY_HOSTNAME', 'routing' : 'BLF-MY_HOSTNAME', 'auto_delete' : 0, 'dura +ble' : 1, 'no_ack' : 0, 'wait_for_consumer_ack' : 1 }"; kazoo_subscribe("$var(payload)"); } @@ -688,48 +710,48 @@ event_route[kazoo:consumer-event] 5.2. presence related -5.2.1. kazoo_pua_publish(json_payload) +5.2.1. kazoo_pua_publish(json_payload) The function build presentity state from json_payload and updates presentity table. This function can be used from ANY ROUTE. - Example 1.23. kazoo_pua_publish usage + Example 1.24. kazoo_pua_publish usage ... event_route[kazoo:consumer-event-presence-update] { - xlog("L_INFO", "received $(kzE{kz.json,Event-Package}) update for $(kzE{kz. -json,From})"); + xlog("L_INFO", "received $(kzE{kz.json,Event-Package}) update for $(kzE{kz.j +son,From})"); kazoo_pua_publish($kzE); - pres_refresh_watchers("$(kzE{kz.json,From})", "$(kzE{kz.json,Event-Package} -)", 1); + pres_refresh_watchers("$(kzE{kz.json,From})", "$(kzE{kz.json,Event-Package}) +", 1); } ... 5.3. other -5.3.1. kazoo_encode(to_encode, target_var) +5.3.1. kazoo_encode(to_encode, target_var) The function encodes the 1st parameter for amqp and puts the result in the 2nd parameter. This function can be used from ANY ROUTE. - Example 1.24. kazoo_encode usage + Example 1.25. kazoo_encode usage ... kazoo_encode("$ci", "$var(callid_encoded)"); $var(amqp_routing_key) = "call.status_req.$var(callid_encoded)"; ... -5.3.2. kazoo_json(json_payload, field, target_var) +5.3.2. kazoo_json(json_payload, field, target_var) The function extracts the value from a json payload and puts the result in the 3rd parameter. It can use nested values for the query part. This function can be used from ANY ROUTE. - Example 1.25. kazoo_json usage + Example 1.26. kazoo_json usage ... kazoo_json("$var(amqp_result)", "Channels[0].switch_url", "$du"); if($du != $null) { @@ -747,7 +769,7 @@ if($du != $null) { The prefix for kazoo transformations is kz. * json - Example 1.26. kz.json usage + Example 1.27. kz.json usage ... #kazoo_json("$var(amqp_result)", "Channels[0].switch_url", "$du"); $du = $kzR{kz.json,Channels[0].switch_url}; @@ -757,7 +779,7 @@ if($du != $null) { } ... * encode - Example 1.27. kz.encode usage + Example 1.28. kz.encode usage ... #kazoo_encode("$ci", "$var(callid_encoded)"); #$var(amqp_routing_key) = "call.status_req.$var(callid_encoded)"; diff --git a/modules/kex/README b/modules/kex/README index 7e12a866c41..4e65c0c6231 100644 --- a/modules/kex/README +++ b/modules/kex/README @@ -15,62 +15,60 @@ Daniel-Constantin Mierla -Edited by - Ovidiu Sas - Copyright © 2009 Daniel-Constantin Mierla + Copyright 2009 Daniel-Constantin Mierla - Copyright © 2014 VoIP Embedded, Inc. + Copyright 2014 VoIP Embedded, Inc. __________________________________________________________________ Table of Contents 1. Admin Guide - 1.1. Overview - 1.2. Dependencies - - 1.2.1. Kamailio Modules - 1.2.2. External Libraries or Applications - - 1.3. Functions - - 1.3.1. setsflag(flag) - 1.3.2. issflagset(flag) - 1.3.3. resetsflag(flag) - 1.3.4. setbflag(flag [, branch]) - 1.3.5. isbflagset(flag [, branch]) - 1.3.6. resetbflag(flag [, branch]) - 1.3.7. setdsturi(uri) - 1.3.8. resetdsturi() - 1.3.9. isdsturiset() - 1.3.10. pv_printf(var, str) - 1.3.11. is_myself(uri) - 1.3.12. setdebug(level) - 1.3.13. resetdebug() - 1.3.14. km_append_branch([uri]) - - 1.4. MI Commands - - 1.4.1. arg - 1.4.2. kill - 1.4.3. pwd - 1.4.4. uptime - 1.4.5. version - 1.4.6. which - 1.4.7. get_statistics - 1.4.8. reset_statistics - 1.4.9. clear_statistics - - 1.5. RPC Commands - - 1.5.1. pkg.stats - 1.5.2. stats.get_statistics - 1.5.3. stats.reset_statistics - 1.5.4. stats.clear_statistics + 1. Overview + 2. Dependencies + + 2.1. Kamailio Modules + 2.2. External Libraries or Applications + + 3. Functions + + 3.1. setsflag(flag) + 3.2. issflagset(flag) + 3.3. resetsflag(flag) + 3.4. setbflag(flag [, branch]) + 3.5. isbflagset(flag [, branch]) + 3.6. resetbflag(flag [, branch]) + 3.7. setdsturi(uri) + 3.8. resetdsturi() + 3.9. isdsturiset() + 3.10. pv_printf(var, str) + 3.11. is_myself(uri) + 3.12. setdebug(level) + 3.13. resetdebug() + 3.14. km_append_branch([uri]) + + 4. MI Commands + + 4.1. arg + 4.2. kill + 4.3. pwd + 4.4. uptime + 4.5. version + 4.6. which + 4.7. get_statistics + 4.8. reset_statistics + 4.9. clear_statistics + + 5. RPC Commands + + 5.1. pkg.stats + 5.2. stats.get_statistics + 5.3. stats.reset_statistics + 5.4. stats.clear_statistics List of Examples @@ -90,28 +88,90 @@ Ovidiu Sas Chapter 1. Admin Guide -1.1. Overview + Table of Contents + + 1. Overview + 2. Dependencies + + 2.1. Kamailio Modules + 2.2. External Libraries or Applications + + 3. Functions + + 3.1. setsflag(flag) + 3.2. issflagset(flag) + 3.3. resetsflag(flag) + 3.4. setbflag(flag [, branch]) + 3.5. isbflagset(flag [, branch]) + 3.6. resetbflag(flag [, branch]) + 3.7. setdsturi(uri) + 3.8. resetdsturi() + 3.9. isdsturiset() + 3.10. pv_printf(var, str) + 3.11. is_myself(uri) + 3.12. setdebug(level) + 3.13. resetdebug() + 3.14. km_append_branch([uri]) + + 4. MI Commands + + 4.1. arg + 4.2. kill + 4.3. pwd + 4.4. uptime + 4.5. version + 4.6. which + 4.7. get_statistics + 4.8. reset_statistics + 4.9. clear_statistics + + 5. RPC Commands + + 5.1. pkg.stats + 5.2. stats.get_statistics + 5.3. stats.reset_statistics + 5.4. stats.clear_statistics + +1. Overview This module collects extensions from Kamailio core. Kamailio Core CookBook is available at: http://kamailio.org/dokuwiki/ -1.2. Dependencies +2. Dependencies -1.2.1. Kamailio Modules + 2.1. Kamailio Modules + 2.2. External Libraries or Applications + +2.1. Kamailio Modules The following modules must be loaded before this module: * No dependencies on other Kamailio modules. -1.2.2. External Libraries or Applications +2.2. External Libraries or Applications The following libraries or applications must be installed before running Kamailio with this module loaded: * None. -1.3. Functions - -1.3.1. setsflag(flag) +3. Functions + + 3.1. setsflag(flag) + 3.2. issflagset(flag) + 3.3. resetsflag(flag) + 3.4. setbflag(flag [, branch]) + 3.5. isbflagset(flag [, branch]) + 3.6. resetbflag(flag [, branch]) + 3.7. setdsturi(uri) + 3.8. resetdsturi() + 3.9. isdsturiset() + 3.10. pv_printf(var, str) + 3.11. is_myself(uri) + 3.12. setdebug(level) + 3.13. resetdebug() + 3.14. km_append_branch([uri]) + +3.1. setsflag(flag) Set the script flag. @@ -129,7 +189,7 @@ $var(flag) = 11; setsflag("$var(flag)"); ... -1.3.2. issflagset(flag) +3.2. issflagset(flag) Return true of the script flag is set. @@ -147,7 +207,7 @@ if(issflagset("1")) } ... -1.3.3. resetsflag(flag) +3.3. resetsflag(flag) Reset the script flag. @@ -162,7 +222,7 @@ if(issflagset("1")) resetsflag("1"); ... -1.3.4. setbflag(flag [, branch]) +3.4. setbflag(flag [, branch]) Set the branch flag. @@ -183,7 +243,7 @@ $var(flag) = 11; setbflag("$var(flag)", "1"); ... -1.3.5. isbflagset(flag [, branch]) +3.5. isbflagset(flag [, branch]) Return true of the branch flag is set. @@ -204,7 +264,7 @@ if(isbflagset("1")) } ... -1.3.6. resetbflag(flag [, branch]) +3.6. resetbflag(flag [, branch]) Reset the branch flag. @@ -222,7 +282,7 @@ if(isbflagset("1")) resetbflag("1"); ... -1.3.7. setdsturi(uri) +3.7. setdsturi(uri) Set the destination address URI (outbound proxy address). @@ -239,7 +299,7 @@ resetbflag("1"); setdsturi("sip:10.0.0.10"); ... -1.3.8. resetdsturi() +3.8. resetdsturi() Reset the destination address URI (outbound proxy address). @@ -250,7 +310,7 @@ setdsturi("sip:10.0.0.10"); resetdsturi(); ... -1.3.9. isdsturiset() +3.9. isdsturiset() Check if the destination address URI (outbound proxy address) is set. @@ -264,7 +324,7 @@ if(isdsturiset()) } ... -1.3.10. pv_printf(var, str) +3.10. pv_printf(var, str) Evalues the str and sets the resulting value to variable var. For backward compatibility reasons, the same function can be executed via @@ -283,7 +343,7 @@ pv_printf("$ru", "sip:$rU@$fd"); pv_printf("$avp(x)", "From: $fU - To: $tU"); ... -1.3.11. is_myself(uri) +3.11. is_myself(uri) Check if the parameter matches the 'myself' condition (i.e., is a local IP or domain). @@ -302,7 +362,7 @@ if(is_myself("$fu")) { } ... -1.3.12. setdebug(level) +3.12. setdebug(level) Set the debug log level per process. @@ -320,7 +380,7 @@ $var(level) = 2; setdebug("$var(level)"); ... -1.3.13. resetdebug() +3.13. resetdebug() Reset the local debug log level back to the value of core parameter 'debug'. @@ -332,14 +392,24 @@ setdebug("$var(level)"); resetdebug(); ... -1.3.14. km_append_branch([uri]) +3.14. km_append_branch([uri]) This function was replaced by append_branch() from corex module, starting with version 4.0.0. -1.4. MI Commands +4. MI Commands -1.4.1. arg + 4.1. arg + 4.2. kill + 4.3. pwd + 4.4. uptime + 4.5. version + 4.6. which + 4.7. get_statistics + 4.8. reset_statistics + 4.9. clear_statistics + +4.1. arg Print command line arguments. @@ -351,7 +421,7 @@ resetdebug(); :arg:_reply_fifo_file_ _empty_line_ -1.4.2. kill +4.2. kill Kill the application. @@ -363,7 +433,7 @@ resetdebug(); :kill:_reply_fifo_file_ _empty_line_ -1.4.3. pwd +4.3. pwd Print working directory. @@ -375,7 +445,7 @@ resetdebug(); :pwd:_reply_fifo_file_ _empty_line_ -1.4.4. uptime +4.4. uptime Print uptime. @@ -387,7 +457,7 @@ resetdebug(); :uptime:_reply_fifo_file_ _empty_line_ -1.4.5. version +4.5. version Print version information. @@ -399,7 +469,7 @@ resetdebug(); :version:_reply_fifo_file_ _empty_line_ -1.4.6. which +4.6. which Print list of available MI commands. @@ -411,7 +481,7 @@ resetdebug(); :which:_reply_fifo_file_ _empty_line_ -1.4.7. get_statistics +4.7. get_statistics Print the list of available internal statistics. @@ -427,7 +497,7 @@ resetdebug(); _statsid_ _empty_line_ -1.4.8. reset_statistics +4.8. reset_statistics Reset internal statistics. @@ -440,7 +510,7 @@ resetdebug(); _statsid_ _empty_line_ -1.4.9. clear_statistics +4.9. clear_statistics Return statistics and reset their value in one command. @@ -453,9 +523,14 @@ resetdebug(); _statsid_ _empty_line_ -1.5. RPC Commands +5. RPC Commands + + 5.1. pkg.stats + 5.2. stats.get_statistics + 5.3. stats.reset_statistics + 5.4. stats.clear_statistics -1.5.1. pkg.stats +5.1. pkg.stats Print private memory (pkg) usage statistics per process. It can take optinally a filter to print statistics only for a specific process or @@ -473,7 +548,7 @@ resetdebug(); kamcmd pkg.stats rank 1 kamcmd pkg.stats index 10 -1.5.2. stats.get_statistics +5.2. stats.get_statistics Print the list of available internal statistics. @@ -488,7 +563,7 @@ resetdebug(); kamcmd stats.get_statistics unsupported_methods kamcmd stats.get_statistics shmem: fwd_requests fwd_replies -1.5.3. stats.reset_statistics +5.3. stats.reset_statistics Reset internal statistics. @@ -500,7 +575,7 @@ resetdebug(); kamcmd stats.reset_statistics unsupported_methods kamcmd stats.reset_statistics shmem: fwd_requests fwd_replies -1.5.4. stats.clear_statistics +5.4. stats.clear_statistics Return statistics and reset their value in one command. diff --git a/modules/lcr/README b/modules/lcr/README index 58268cfd42d..c3fcf2fcc68 100644 --- a/modules/lcr/README +++ b/modules/lcr/README @@ -10,7 +10,7 @@ Juha Heinanen - Copyright (c) 2005-2014 Juha Heinanen + Copyright 2005-2014 Juha Heinanen __________________________________________________________________ Table of Contents @@ -130,7 +130,7 @@ Juha Heinanen 1.37. Setting dont_strip_or_tag_flag module parameter 1.38. Set fetch_rows parameter 1.39. Set ping_interval parameter - 1.40. Set ping_inactive_threshold parameter + 1.40. Set ping_inactivate_threshold parameter 1.41. Set ping_valid_reply_codes parameter 1.42. Set ping_from parameter 1.43. Set ping_socket parameter @@ -665,7 +665,7 @@ modparam("lcr","weight_column", "target_weight") Default value is 1. - Example 1.27. Setting lcr_count module parameter + Example 1.27. Setting lcr_count module parameter ... modparam("lcr", "lcr_count", 10) ... @@ -729,7 +729,7 @@ modparam("lcr", "flags_avp", "$avp(i:712)") Default value is 0. - Example 1.32. Setting defunct_capability module parameter + Example 1.32. Setting defunct_capability module parameter ... modparam("lcr", "defunct_capability", 1) ... @@ -768,7 +768,7 @@ modparam("lcr", "defunct_gw_avp", "$avp(s:defunct_gw_avp)") Default value is 128. - Example 1.35. Setting lcr_rule_hash_size module parameter + Example 1.35. Setting lcr_rule_hash_size module parameter ... modparam("lcr", "lcr_rule_hash_size", 1024) ... @@ -779,7 +779,7 @@ modparam("lcr", "lcr_rule_hash_size", 1024) Default value is 128. - Example 1.36. Setting lcr_gw_count module parameter + Example 1.36. Setting lcr_gw_count module parameter ... modparam("lcr", "lcr_gw_count", 1024) ... @@ -791,7 +791,7 @@ modparam("lcr", "lcr_gw_count", 1024) Default value is -1 meaning that the flag is not defined. - Example 1.37. Setting dont_strip_or_tag_flag module parameter + Example 1.37. Setting dont_strip_or_tag_flag module parameter ... modparam("lcr", "dont_strip_or_tag_flag", 10) ... @@ -826,7 +826,7 @@ modparam("lcr", "fetch_rows", 3000) Default value is "0". - Example 1.39. Set ping_interval parameter + Example 1.39. Set ping_interval parameter ... modparam("lcr", "ping_interval", 15) ... @@ -836,12 +836,11 @@ modparam("lcr", "ping_interval", 15) Tells after how many failures (= inactivate_gw() function calls) a gateway is marked as inactive. - Default value is "1", i.e., gateway is marked inactive after first - failure. + Default value is "1", i.e., gateway is inactivated after first failure. - Example 1.40. Set ping_inactive_threshold parameter + Example 1.40. Set ping_inactivate_threshold parameter ... -modparam("lcr", "ping_inactive_threshold", 3) +modparam("lcr", "ping_inactivate_threshold", 3) ... 3.41. ping_valid_reply_codes (string) @@ -853,7 +852,7 @@ modparam("lcr", "ping_inactive_threshold", 3) Default value is "", i.e., only 2xx replies are considered as valid replies. - Example 1.41. Set ping_valid_reply_codes parameter + Example 1.41. Set ping_valid_reply_codes parameter ... modparam("lcr", "ping_valid_reply_codes", "403,405,501") ... @@ -864,7 +863,7 @@ modparam("lcr", "ping_valid_reply_codes", "403,405,501") Default value is "sip:pinger@localhost". - Example 1.42. Set ping_from parameter + Example 1.42. Set ping_from parameter ... modparam("lcr", "ping_from", "sip:proxy.operator.com") ... @@ -876,7 +875,7 @@ modparam("lcr", "ping_from", "sip:proxy.operator.com") Default value is "". - Example 1.43. Set ping_socket parameter + Example 1.43. Set ping_socket parameter ... modparam("lcr", "ping_socket", "192.98.102.10:5060") ... @@ -892,7 +891,7 @@ modparam("lcr", "ping_socket", "192.98.102.10:5060") 4.7. to_gw(lcr_id[, ip_addr, proto]) 4.8. to_any_gw([ip_addr, proto]) -4.1. load_gws(lcr_id[, uri_user[, caller_uri]]) +4.1. load_gws(lcr_id[, uri_user[, caller_uri]]) Loads attributes of matching gateways to gw_uri_avp (see Overview section). Argument lcr_id specifies the used LCR instance. It can be a @@ -920,7 +919,7 @@ if (!load_gws(1, $rU, $var(caller_uri))) { }; ... -4.2. next_gw() +4.2. next_gw() Upon first call, fetches attribute values stored in first gw_uri_avp, destroys that AVP, and rewrites Request-URI and possibly also @@ -958,7 +957,7 @@ if (!next_gw()) { }; ... -4.3. inactivate_gw() +4.3. inactivate_gw() Inactivates the gateway denoted by lcr_id_avp and defunct_gw_avp (which were set by previous next_gw() call). Use of this function requires @@ -979,7 +978,7 @@ failure_route [GW_FAILURE] { }; ... -4.4. defunct_gw(period) +4.4. defunct_gw(period) Defuncts gateway denoted by lcr_id_avp and defunct_gw_avp (which were set by previuos next_gw() call) for a period of seconds given as @@ -996,7 +995,7 @@ failure_route [GW_FAILURE] { defunct_gw(60); ... -4.5. from_gw(lcr_id[, ip_addr, proto]) +4.5. from_gw(lcr_id[, ip_addr, proto]) Checks if request comes from IP address and transport protocol specified for a gateway in LCR instance lcr_id. Fails if the LCR @@ -1030,7 +1029,7 @@ if (from_gw(1, $avp(s:real_source_addr), 2) { }; ... -4.6. from_any_gw([ip_addr, proto]) +4.6. from_any_gw([ip_addr, proto]) Checks if request comes from IP address and transport protocol specified for any gateway. Only LCR instances, where all gateways have @@ -1058,7 +1057,7 @@ if (from_gw(1, $avp(s:real_source_addr), 2) { $var(lcr_id) = from_any_gw("192.168.1.1", 3); ... -4.7. to_gw(lcr_id[, ip_addr, proto]) +4.7. to_gw(lcr_id[, ip_addr, proto]) Checks if in-dialog request goes to IP address and transport protocol specified for a gateway in LCR instance lcr_id. Fails if LCR instance @@ -1082,7 +1081,7 @@ if (to_gw("1")) { }; ... -4.8. to_any_gw([ip_addr, proto]) +4.8. to_any_gw([ip_addr, proto]) Checks if in-dialog request goes to IP address and transport protocol of any gateway. Only LCR instances, where all gateways have IP address, diff --git a/modules/malloc_test/README b/modules/malloc_test/README index 517102fa3e1..5387b82e7f3 100644 --- a/modules/malloc_test/README +++ b/modules/malloc_test/README @@ -1,4 +1,3 @@ - The malloc_test Module Andrei Pelinescu-Onciul @@ -6,7 +5,7 @@ Andrei Pelinescu-Onciul iptelorg GmbH Copyright 2010 iptelorg GmbH - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -27,9 +26,9 @@ Andrei Pelinescu-Onciul 4.1. mt.mem_alloc size [unit] 4.2. mt.mem_free [size] [unit] 4.3. mt.mem_used [unit] - 4.4. mt.mem_rnd_alloc min max total [unit] + 4.4. mt.mem_rnd_alloc min max total [unit] 4.5. mt.mem_test_start min max total min_int max_int - total_time [unit] + total_time [unit] 4.6. mt.mem_test_stop id 4.7. mt.mem_test_destroy id @@ -38,8 +37,8 @@ Andrei Pelinescu-Onciul List of Examples - 1.1. Set check_content in the config file - 1.2. Set check_content at runtime via sercmd + 1.1. Set check_content in the config file + 1.2. Set check_content at runtime via sercmd 1.3. men_alloc usage 1.4. mem_free usage 1.5. mt.mem_alloc usage @@ -71,9 +70,9 @@ Chapter 1. Admin Guide 4.1. mt.mem_alloc size [unit] 4.2. mt.mem_free [size] [unit] 4.3. mt.mem_used [unit] - 4.4. mt.mem_rnd_alloc min max total [unit] + 4.4. mt.mem_rnd_alloc min max total [unit] 4.5. mt.mem_test_start min max total min_int max_int total_time - [unit] + [unit] 4.6. mt.mem_test_stop id 4.7. mt.mem_test_destroy id @@ -82,8 +81,8 @@ Chapter 1. Admin Guide 1. Overview - This is a debugging/test module. It implements functions (both script - and rpcs) that can be used to stress the memory allocator or force + This is a debugging/test module. It implements functions (both script + and rpcs) that can be used to stress the memory allocator or force memory leaks. Warning @@ -96,7 +95,7 @@ Warning 2.1. check_content - When doing the tests, check also for the possibility of the memory + When doing the tests, check also for the possibility of the memory being overwritten. When activated, the allocated memory will be filled with a special pattern, that will be checked on free. @@ -104,10 +103,10 @@ Warning It can be changed also at runtime, via the rpc interface. - Example 1.1. Set check_content in the config file + Example 1.1. Set check_content in the config file modparam("malloc_test", "check_content", 1) - Example 1.2. Set check_content at runtime via sercmd + Example 1.2. Set check_content at runtime via sercmd $ kamcmd cfg.set_now_int malloc_test check_content 1 3. Functions @@ -121,7 +120,7 @@ $ kamcmd cfg.set_now_int malloc_test check_content 1 Note - This is a debugging function for simulating memory leaks or stressing + This is a debugging function for simulating memory leaks or stressing the memory allocator. It should not be used in production setups Example 1.3. men_alloc usage @@ -135,7 +134,7 @@ mem_alloc(1048576); # 1MB Note - This is a debugging function for simulating memory leaks or stressing + This is a debugging function for simulating memory leaks or stressing the memory allocator. It should not be used in production setups Example 1.4. mem_free usage @@ -148,9 +147,8 @@ mem_free(); 4.1. mt.mem_alloc size [unit] 4.2. mt.mem_free [size] [unit] 4.3. mt.mem_used [unit] - 4.4. mt.mem_rnd_alloc min max total [unit] + 4.4. mt.mem_rnd_alloc min max total [unit] 4.5. mt.mem_test_start min max total min_int max_int total_time [unit] - 4.6. mt.mem_test_stop id 4.7. mt.mem_test_destroy id 4.8. mt.mem_test_destroy_all id @@ -158,7 +156,7 @@ mem_free(); 4.1. mt.mem_alloc size [unit] - Allocates the specified number of bytes. unit is optional and can be + Allocates the specified number of bytes. unit is optional and can be one of: * b - bytes * k - KB @@ -170,7 +168,7 @@ mem_free(); 4.2. mt.mem_free [size] [unit] - Frees at least size bytes from the memory allocated by other + Frees at least size bytes from the memory allocated by other malloc_test functions (e.g. mt.mem_alloc). size is optional. If missing, everything will be freed. @@ -186,7 +184,7 @@ mem_free(); 4.3. mt.mem_used [unit] - Returns/displays how many bytes are allocated. The default unit is + Returns/displays how many bytes are allocated. The default unit is bytes (for all the possible units see above). unit is optional and can be one of: @@ -201,21 +199,21 @@ mem_free(); 4.4. mt.mem_rnd_alloc min max total [unit] - Allocates total_size memory, in pieces of random size between min .. - max (inclusive). unit is optional and represents the unit for all the + Allocates total_size memory, in pieces of random size between min .. + max (inclusive). unit is optional and represents the unit for all the given sizes (see above). Example 1.8. mt.mem_rnd_alloc usage $ kamcmd mt.mem_rnd_alloc 1 64 10240 k -4.5. mt.mem_test_start min max total min_int max_int total_time [unit] +4.5. mt.mem_test_start min max total min_int max_int total_time [unit] - Starts a malloc test that will take total_time to execute. Memory - allocations will be performed at intervals randomly chosen between - min_int and max_int (in ms). Each allocation will have a randomly + Starts a malloc test that will take total_time to execute. Memory + allocations will be performed at intervals randomly chosen between + min_int and max_int (in ms). Each allocation will have a randomly chosen size between min and max unit bytes. After total unit bytes are - allocated, everything is released/freed again and the allocations are - restarted. All the times are expressed in milliseconds. unit is + allocated, everything is released/freed again and the allocations are + restarted. All the times are expressed in milliseconds. unit is optional and represents the unit for all the given sizes (see above). Several tests can be run in parallel. @@ -235,8 +233,8 @@ mem_free(); 4.7. mt.mem_test_destroy id - Destroys the test indentified by id (besides stopping it, it also - frees all the data, including the statistics). + Destroys the test indentified by id (besides stopping it, it also frees + all the data, including the statistics). Example 1.11. mt.mem_test_destroy usage $ kamcmd mt.mem_test_destroy 1 @@ -250,10 +248,10 @@ mem_free(); 4.9. mt.mem_test_list [id] [unit] - Returns/displays data about the test identified by id, or if no id is + Returns/displays data about the test identified by id, or if no id is specified, it lists all the tests (running or stopped). - unit is optional. The default is is bytes (for all the possible units + unit is optional. The default is is bytes (for all the possible units see above). Example 1.13. mt.mem_test_list usage diff --git a/modules/mangler/README b/modules/mangler/README index a6761f7bff3..058b498b2a8 100644 --- a/modules/mangler/README +++ b/modules/mangler/README @@ -1,4 +1,3 @@ - The Mangler Module - SDP mangling Gabriel Vasile @@ -6,7 +5,7 @@ Gabriel Vasile FhG FOKUS Copyright 2003 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -19,11 +18,11 @@ Gabriel Vasile 3. Functions - 3.1. sdp_mangle_ip(pattern, newip) - 3.2. sdp_mangle_port(offset) - 3.3. encode_contact(encoding_prefix) - 3.4. decode_contact() - 3.5. decode_contact_header() + 3.1. sdp_mangle_ip(pattern, newip) + 3.2. sdp_mangle_port(offset) + 3.3. encode_contact(encoding_prefix) + 3.4. decode_contact() + 3.5. decode_contact_header() List of Examples @@ -45,11 +44,11 @@ Chapter 1. Admin Guide 3. Functions - 3.1. sdp_mangle_ip(pattern, newip) - 3.2. sdp_mangle_port(offset) - 3.3. encode_contact(encoding_prefix) - 3.4. decode_contact() - 3.5. decode_contact_header() + 3.1. sdp_mangle_ip(pattern, newip) + 3.2. sdp_mangle_port(offset) + 3.3. encode_contact(encoding_prefix) + 3.4. decode_contact() + 3.5. decode_contact_header() 1. Overview @@ -61,15 +60,14 @@ Chapter 1. Admin Guide 2.1. contact_flds_separator (string) - First char of this parameter is used as separator for - encoding/decoding Contact header. If you set this parameter to "-", - then an encoded uri might look - sip:user-password-ip-port-protocol@PublicIP + First char of this parameter is used as separator for encoding/decoding + Contact header. If you set this parameter to "-", then an encoded uri + might look sip:user-password-ip-port-protocol@PublicIP Warning - First char of this field must be set to a value which is not used - inside username,password or other fields of contact.Otherwise it is + First char of this field must be set to a value which is not used + inside username,password or other fields of contact.Otherwise it is possible for the decoding step to fail/produce wrong results. Default value is "*". @@ -81,27 +79,26 @@ modparam("mangler", "contact_flds_separator", "-") 3. Functions - 3.1. sdp_mangle_ip(pattern, newip) - 3.2. sdp_mangle_port(offset) - 3.3. encode_contact(encoding_prefix) - 3.4. decode_contact() - 3.5. decode_contact_header() + 3.1. sdp_mangle_ip(pattern, newip) + 3.2. sdp_mangle_port(offset) + 3.3. encode_contact(encoding_prefix) + 3.4. decode_contact() + 3.5. decode_contact_header() -3.1. sdp_mangle_ip(pattern, newip) +3.1. sdp_mangle_ip(pattern, newip) - Changes IP addresses inside SDP package in lines describing - connections like c=IN IP4 . Currently this function only changes IP4 - addresses since IP6 probably will not need to traverse NAT :) + Changes IP addresses inside SDP package in lines describing connections + like c=IN IP4 . Currently this function only changes IP4 addresses + since IP6 probably will not need to traverse NAT :) The function returns negative on error, or number of replacements + 1. Meaning of the parameters is as follows: * pattern - A ip address/mask pair used to match IP's located inside - SDP package in lines c=IN IP4 ip. This line will only be changed - if located IP is in the network described by this pattern. - Examples of valid patterns are "10.0.0.0/255.0.0.0" or - "10.0.0.0/8" etc. - * newip - A string representing the new IP to be put inside SDP + SDP package in lines c=IN IP4 ip. This line will only be changed if + located IP is in the network described by this pattern. Examples of + valid patterns are "10.0.0.0/255.0.0.0" or "10.0.0.0/8" etc. + * newip - A string representing the new IP to be put inside SDP package if old IP address matches pattern. Example 1.2. sdp_mangle_ip usage @@ -109,15 +106,15 @@ modparam("mangler", "contact_flds_separator", "-") sdp_mangle_ip("10.0.0.0/8","193.175.135.38"); ... -3.2. sdp_mangle_port(offset) +3.2. sdp_mangle_port(offset) - Changes ports inside SDP package in lines describing media like - m=audio 13451. + Changes ports inside SDP package in lines describing media like m=audio + 13451. The function returns negative on error, or number of replacements + 1. Meaning of the parameters is as follows: - * offset - A string representing an integer which will be + * offset - A string representing an integer which will be added/subtracted from the located port. Example 1.3. sdp_mangle_port usage @@ -125,36 +122,35 @@ sdp_mangle_ip("10.0.0.0/8","193.175.135.38"); sdp_mangle_port("-12000"); ... -3.3. encode_contact(encoding_prefix) +3.3. encode_contact(encoding_prefix) This function will encode uri-s inside Contact header in the following - manner sip:username:password@ip:port;transport=protocol goes - sip:enc_pref*username*ip*port*protocol@public_ip. "*" (asterisk) is - the default separator. + manner sip:username:password@ip:port;transport=protocol goes + sip:enc_pref*username*ip*port*protocol@public_ip. "*" (asterisk) is the + default separator. The function returns negative on error, 1 on success. Meaning of the parameters is as follows: - * encoding_prefix - Something to allow us to determine that a - contact is encoded public ip--a routable IP, most probably you - should put your external IP of your NAT box. + * encoding_prefix - Something to allow us to determine that a contact + is encoded public ip--a routable IP, most probably you should put + your external IP of your NAT box. Example 1.4. encode_contact usage ... if (src_ip == 10.0.0.0/8) encode_contact("enc_prefix","193.175.135.38"); ... -3.4. decode_contact() +3.4. decode_contact() - This function will decode the URI in first line in packets which come + This function will decode the URI in first line in packets which come with encoded URI in the following manner - sip:enc_pref*username*ip*port*protocol*src_ip*src_port*src_proto@publi - c_ip;parameters is converted to - sip:username:password@ip:port;parameters and will set destination URI - to sip:src_ip:src_port;transport=src_proto (so that the next forward() - or t_relay() will send the message back to src_ip:src_port using - src_proto). It uses the default set parameter for contact encoding - separator. + sip:enc_pref*username*ip*port*protocol*src_ip*src_port*src_proto@public + _ip;parameters is converted to sip:username:password@ip:port;parameters + and will set destination URI to sip:src_ip:src_port;transport=src_proto + (so that the next forward() or t_relay() will send the message back to + src_ip:src_port using src_proto). It uses the default set parameter for + contact encoding separator. The function returns negative on error, 1 on success. @@ -163,13 +159,13 @@ if (src_ip == 10.0.0.0/8) encode_contact("enc_prefix","193.175.135.38"); if (uri =~ "^enc*") { decode_contact(); } ... -3.5. decode_contact_header() +3.5. decode_contact_header() - This function will decode URIs inside Contact header in the same - manner as decode_contact(). The difference is that no dst_uri is set - (src_ip, src_port and src_proto are ignored) and instead of changing - the request uri, the Contact header URI is modified. It uses the - default set parameter for contact encoding separator. + This function will decode URIs inside Contact header in the same manner + as decode_contact(). The difference is that no dst_uri is set (src_ip, + src_port and src_proto are ignored) and instead of changing the request + uri, the Contact header URI is modified. It uses the default set + parameter for contact encoding separator. The function returns negative on error, 1 on success. diff --git a/modules/matrix/README b/modules/matrix/README index 935ab9fcddd..69e50899d0b 100644 --- a/modules/matrix/README +++ b/modules/matrix/README @@ -139,11 +139,11 @@ Chapter 1. Admin Guide The URL for the database connection. - Default value is "mysql://openserro:openserro@localhost/openser". + Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". Example 1.1. Set db_url parameter ... -modparam("matrix", "db_url", "mysql://openserro:openserro@localhost/openser") +modparam("matrix", "db_url", "mysql://kamailioro:kamailioro@localhost/kamailio") ... 3.2. matrix_table (string) @@ -264,7 +264,7 @@ Chapter 2. Module parameter for database access. URL to the database containing the data. - Default value is "mysql://openserro:openserro@localhost/openser". + Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". Example 2.1. Set db_url parameter ... diff --git a/modules/mediaproxy/README b/modules/mediaproxy/README index 122de0878d9..cb9e84e0fca 100644 --- a/modules/mediaproxy/README +++ b/modules/mediaproxy/README @@ -10,7 +10,7 @@ Dan Pascu - Copyright © 2004 Dan Pascu + Copyright 2004 Dan Pascu __________________________________________________________________ Table of Contents @@ -178,7 +178,7 @@ Chapter 1. Admin Guide mediaproxy is disabled, calls to its functions will have no effect, allowing you to use the same configuration without changes. - Default value is “0”. + Default value is "0". Example 1.1. Setting the disable parameter ... @@ -190,7 +190,7 @@ modparam("mediaproxy", "disable", 1) It is the path to the filesystem socket where the mediaproxy dispatcher listens for commands from the module. - Default value is “/var/run/mediaproxy/dispatcher.sock”. + Default value is "/var/run/mediaproxy/dispatcher.sock". Example 1.2. Setting the mediaproxy_socket parameter ... @@ -203,7 +203,7 @@ modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy/dispatcher.sock How much time (in milliseconds) to wait for an answer from the mediaproxy dispatcher. - Default value is “500”. + Default value is "500". Example 1.3. Setting the mediaproxy_timeout parameter ... @@ -225,7 +225,7 @@ modparam("mediaproxy", "mediaproxy_timeout", 500) to get the correct NAT IP address from where the SIP signaling originated. - Default value is “$avp(signaling_ip)”. + Default value is "$avp(signaling_ip)". Example 1.4. Setting the signaling_ip_avp parameter ... @@ -240,7 +240,7 @@ modparam("mediaproxy", "signaling_ip_avp", "$avp(nat_ip)") before calling use_media_proxy(), it will be preferred by the dispatcher over the normal selection algorithm. - Default value is “$avp(media_relay)”. + Default value is "$avp(media_relay)". Example 1.5. Setting the media_relay_avp parameter ... @@ -255,7 +255,7 @@ modparam("mediaproxy", "media_relay_avp", "$avp(media_relay)") selected then a low priority candidate will be added and if 'high-priority' is selected a high priority one. - Default value is “none”. + Default value is "none". Example 1.6. Setting the ice_candidate parameter ... @@ -269,7 +269,7 @@ modparam("mediaproxy", "ice_candidate", "low-priority") value in ice_candidate module parameter. If the AVP is not set, the default value will be used. - Default value is “$avp(ice_candidate)”. + Default value is "$avp(ice_candidate)". Example 1.7. Setting the ice_candidate_avp parameter ... diff --git a/modules/memcached/README b/modules/memcached/README index 6abdfbc8649..11da457f119 100644 --- a/modules/memcached/README +++ b/modules/memcached/README @@ -2,7 +2,7 @@ Memcached Module Henning Westerholt - Copyright © 2009 Henning Westerholt + Copyright 2009 Henning Westerholt __________________________________________________________________ Table of Contents @@ -81,7 +81,7 @@ Chapter 1. Admin Guide pseudo-variable: $mct(key). Entries are stored and retrieved from an external server application. - The “key” can be a static string and also any existing pseudo-variable. + The "key" can be a static string and also any existing pseudo-variable. Further interfaces to the functionality provided from memcached are also provided, like access to the atomic increment and decrement operations. @@ -188,7 +188,7 @@ xlog("stored value is $mct(test)"); # will return The servers to connect to. At the moment only one server is supported. - Default value is “localhost:11211”. + Default value is "localhost:11211". Example 1.5. Set servers parameter ... @@ -212,7 +212,7 @@ modparam("memcached", "servers", "localhost:11211") the mct psuedo-variable, or later on by setting a different timeout for an existing key with the mctex pseudo-variable. - Default value is “10800”s (3h). + Default value is "10800"s (3h). Example 1.6. Set expire parameter ... @@ -222,12 +222,12 @@ modparam("memcached", "expire", 10800) 4.3. mode (integer) The used storage mode for the memcached module for write access to the - hash table. A value of “0” means to set (overwrite) the old value, with - a value of “1” the module will not overwrite it. Here every entry to + hash table. A value of "0" means to set (overwrite) the old value, with + a value of "1" the module will not overwrite it. Here every entry to the hash table could be written only once, subsequent inserts will fail. - Default value is “0” (overwrite). + Default value is "0" (overwrite). Example 1.7. Set mode parameter ... @@ -238,7 +238,7 @@ modparam("memcached", "mode", 0) The timeout for the memcache servers access in milliseconds. - Default value is “5000” (5s). + Default value is "5000" (5s). Example 1.8. Set timeout parameter ... @@ -255,7 +255,7 @@ modparam("memcached", "timeout", 10000) better against memory leaks that could bring down your server, as the available memory pool is limited by the Kamailio configuration. - Default value is “0” (use system memory manager). + Default value is "0" (use system memory manager). Example 1.9. Set memory parameter ... @@ -270,7 +270,7 @@ modparam("memcached", "memory", 1) interoperability with existing applications that are not able to set this flag, you can force the module to evaluate all values as strings. - Default value is “0” (don't force string values). + Default value is "0" (don't force string values). Example 1.10. Set stringify parameter ... diff --git a/modules/mi_xmlrpc/README b/modules/mi_xmlrpc/README index 27eddbd4fb3..9d36b0dd892 100644 --- a/modules/mi_xmlrpc/README +++ b/modules/mi_xmlrpc/README @@ -8,8 +8,6 @@ Edited by Lavinia-Andreea Andrei -Edited by - Juha Heinanen Copyright 2006 Voice Sistem SRL diff --git a/modules/mohqueue/README b/modules/mohqueue/README index ab9cf1e23f9..fab17cea678 100644 --- a/modules/mohqueue/README +++ b/modules/mohqueue/README @@ -2,7 +2,7 @@ mohqueue Module Robert Boisvert - Copyright © 2013 Robert Boisvert, rdbprog@gmail.com + Copyright 2013 Robert Boisvert, rdbprog@gmail.com __________________________________________________________________ Table of Contents @@ -136,8 +136,8 @@ Chapter 1. Admin Guide Example 1.1. Set db_url: ... -modparam ("mohqueue", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio -") +modparam ("mohqueue", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio" +) ... 3.2. db_qtable and db_ctable (str) @@ -187,7 +187,7 @@ modparam ("mohqueue", "mohdir", "/var/kamailio/MOH") 4.3. mohq_retrieve (queue_name, URI) 4.4. mohq_count (queue_name, pvar) -4.1. mohq_process () +4.1. mohq_process () Checks to see if the current SIP message involves a queue. If it does it will process the message and return a TRUE value. @@ -224,7 +224,7 @@ request_route { } ... -4.2. mohq_send (queue_name) +4.2. mohq_send (queue_name) Normally calls enter the queue with an initial INVITE message that 1) has a RURI that matches a queue URI and 2) is passed through mohq_proc @@ -254,7 +254,7 @@ request_route { } ... -4.3. mohq_retrieve (queue_name, URI) +4.3. mohq_retrieve (queue_name, URI) Retrieves the oldest call in a queue and redirects it to a URI. Although the function returns, the transfer of the call may not have @@ -283,7 +283,7 @@ request_route { } ... -4.4. mohq_count (queue_name, pvar) +4.4. mohq_count (queue_name, pvar) Finds the number of calls that are in a queue. It will not count calls that are in the process of entering or exiting the queue. diff --git a/modules/mqueue/README b/modules/mqueue/README index 952e900436e..ce162f180e6 100644 --- a/modules/mqueue/README +++ b/modules/mqueue/README @@ -10,8 +10,6 @@ Elena-Ramona Modroiu -Edited by - Alex Balashov Evariste Systems diff --git a/modules/msilo/README b/modules/msilo/README index fee3574ff77..94bfa16fecc 100644 --- a/modules/msilo/README +++ b/modules/msilo/README @@ -14,8 +14,6 @@ Daniel-Constantin Mierla -Edited by - Juha Heinanen diff --git a/modules/msrp/README b/modules/msrp/README index e9e882b802a..24ef10f3dc7 100644 --- a/modules/msrp/README +++ b/modules/msrp/README @@ -10,8 +10,6 @@ Daniel-Constantin Mierla -Edited by - Alex Balashov diff --git a/modules/mtree/README b/modules/mtree/README index 2d2dbedf2ab..d75bfc61fdb 100644 --- a/modules/mtree/README +++ b/modules/mtree/README @@ -14,8 +14,6 @@ Juha Heinanen tutpro.com -Edited by - Juha Heinanen diff --git a/modules/nat_traversal/README b/modules/nat_traversal/README index 93ee58ba0b7..f0f5ef8bfba 100644 --- a/modules/nat_traversal/README +++ b/modules/nat_traversal/README @@ -10,7 +10,7 @@ Dan Pascu - Copyright © 2008 Dan Pascu + Copyright 2008 Dan Pascu __________________________________________________________________ Table of Contents @@ -405,7 +405,7 @@ Chapter 1. Admin Guide each endpoint will receive exactly one keepalive message. A negative value or zero will disable the keepalive functionality. - Default value is “60”. + Default value is "60". Example 1.1. Setting the keepalive_interval parameter ... @@ -418,7 +418,7 @@ modparam("nat_traversal", "keepalive_interval", 90) for this purpose are NOTIFY and OPTIONS. NOTIFY generates smaller replies from user agents, but they are almost entirely negative replies. Apparently almost none of the user agents understand that the - purpose of the NOTIFY with a “keep-alive” event is to keep NAT open, + purpose of the NOTIFY with a "keep-alive" event is to keep NAT open, even though many user agents send such NOTIFY requests themselves. However this does not affect the result at all, since the purpose is to trigger a response from the user agent behind NAT, positive or negative @@ -433,7 +433,7 @@ modparam("nat_traversal", "keepalive_interval", 90) times bigger than negative replies or replies to NOTIFY requests. For this reason the default value for the used method is NOTIFY. - Default value is “NOTIFY”. + Default value is "NOTIFY". Example 1.2. Setting the keepalive_method parameter ... @@ -448,7 +448,7 @@ modparam("nat_traversal", "keepalive_method", "OPTIONS") keepalive message, which is the same interface on which the request that triggered keepalive functionality arrived. - Default value is “sip:keepalive@proxy_ip” with proxy_ip being the + Default value is "sip:keepalive@proxy_ip" with proxy_ip being the actual IP of the outgoing interface. Example 1.3. Setting the keepalive_from parameter @@ -487,7 +487,7 @@ MyHeader: some_value\r\n") case it will store it in the Kamailio working directory, or an absolute path. - Default value is undefined “keepalive_state”. + Default value is undefined "keepalive_state". Example 1.5. Setting the keepalive_state_file parameter ... @@ -501,7 +501,7 @@ tate") 5.2. fix_contact() 5.3. nat_keepalive() -5.1. client_nat_test(type) +5.1. client_nat_test(type) Check if the client is behind NAT. What tests are performed is specified by the type parameter which is an integer given by the sum of @@ -531,7 +531,7 @@ if (client_nat_test("3")) { } ... -5.2. fix_contact() +5.2. fix_contact() Will replace the IP and port in the Contact header with the IP and port the SIP message was received from. Usually called after a succesful @@ -547,7 +547,7 @@ if (client_nat_test("3")) { } ... -5.3. nat_keepalive() +5.3. nat_keepalive() Trigger keepalive functionality for the source address of the request. When called it only sets some internal flags, which will trigger later diff --git a/modules/nathelper/README b/modules/nathelper/README index a526fe75a31..2d888e33351 100644 --- a/modules/nathelper/README +++ b/modules/nathelper/README @@ -12,25 +12,19 @@ Edited by Maxim Sobolev -Edited by - Bogdan-Andrei Iancu -Edited by - Juha Heinanen -Edited by - Ovidiu Sas - Copyright (c) 2003-2008 Sippy Software, Inc. + Copyright 2003-2008 Sippy Software, Inc. - Copyright (c) 2005 Voice Sistem SRL + Copyright 2005 Voice Sistem SRL - Copyright (c) 2009 TuTPro Inc. + Copyright 2009 TuTPro Inc. - Copyright (c) 2010 VoIPEmbedded Inc. + Copyright 2010 VoIPEmbedded Inc. __________________________________________________________________ Table of Contents @@ -438,7 +432,7 @@ modparam("nathelper", "udpping_from_path", 1) 5.8. handle_ruri_alias() 5.9. set_contact_alias() -5.1. fix_nated_contact() +5.1. fix_nated_contact() Rewrites the "Contact" header to contain the request's source address:port. @@ -451,7 +445,7 @@ modparam("nathelper", "udpping_from_path", 1) if (search("User-Agent: Cisco ATA.*") {fix_nated_contact();}; ... -5.2. fix_nated_sdp(flags [, ip_address]) +5.2. fix_nated_sdp(flags [, ip_address]) Alters the SDP information in orer to facilitate NAT traversal. What changes to be performed may be controled via the "flags" parameter. @@ -481,7 +475,7 @@ if (search("User-Agent: Cisco ATA.*") {fix_nated_contact();}; if (search("User-Agent: Cisco ATA.*") {fix_nated_sdp("3");}; ... -5.3. add_rcv_param([flag]), +5.3. add_rcv_param([flag]), Add a received parameter to the "Contact" header fields or the Contact URI. The parameter will contain the URI created from the source IP, @@ -505,7 +499,7 @@ add_rcv_param(); # add the parameter to the Contact header add_rcv_param("1"); # add the parameter to the Contact URI ... -5.4. fix_nated_register() +5.4. fix_nated_register() The function creates a URI consisting of the source IP, port, and protocol and stores the URI in an Attribute-Value-Pair. The URI will be @@ -523,7 +517,7 @@ add_rcv_param("1"); # add the parameter to the Contact URI fix_nated_register(); ... -5.5. nat_uac_test(flags) +5.5. nat_uac_test(flags) Tries to guess if client's request originated behind a nat. The parameter determines what heuristics is used. @@ -552,14 +546,14 @@ fix_nated_register(); This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE. -5.6. is_rfc1918(ip_address) +5.6. is_rfc1918(ip_address) Determines if the address in the parameter is an rfc1918 or rfc6598 address. The parameter allows pseudo-variables usage. This function can be used from ANY_ROUTE. -5.7. add_contact_alias([ip_addr, port, proto]) +5.7. add_contact_alias([ip_addr, port, proto]) Adds an ";alias=ip~port~transport" parameter to the contact URI containing either received ip, port, and transport protocol or those @@ -580,7 +574,7 @@ fix_nated_register(); }; ... -5.8. handle_ruri_alias() +5.8. handle_ruri_alias() Checks if the Request URI has an "alias" parameter and if so, removes it and sets the "$du" based on its value. Note that this means that @@ -615,7 +609,7 @@ fix_nated_register(); }; ... -5.9. set_contact_alias() +5.9. set_contact_alias() Adds an ";alias=ip~port~transport" parameter to the contact URI containing the received ip, port, and transport protocol. The new @@ -705,38 +699,38 @@ Chapter 2. Frequently Asked Questions 2.1. - What happend with "rtpproxy_disable" parameter? + What happend with "rtpproxy_disable" parameter? - It was removed as it became obsolete - now "rtpproxy_sock" can take - empty value to disable the rtpproxy functionality. + It was removed as it became obsolete - now "rtpproxy_sock" can take + empty value to disable the rtpproxy functionality. 2.2. - Where can I find more about Kamailio? + Where can I find more about Kamailio? - Take a look at http://www.kamailio.org/. + Take a look at http://www.kamailio.org/. 2.3. - Where can I post a question about this module? + Where can I post a question about this module? - First at all check if your question was already answered on one of our - mailing lists: - * User Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users - * Developer Mailing List - - http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev + First at all check if your question was already answered on one of our + mailing lists: + * User Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users + * Developer Mailing List - + http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev - E-mails regarding any stable Kamailio release should be sent to - and e-mails regarding development - versions should be sent to . + E-mails regarding any stable Kamailio release should be sent to + and e-mails regarding development + versions should be sent to . - If you want to keep the mail private, send it to - . + If you want to keep the mail private, send it to + . 2.4. - How can I report a bug? + How can I report a bug? - Please follow the guidelines provided at: - http://sip-router.org/tracker. + Please follow the guidelines provided at: + http://sip-router.org/tracker. diff --git a/modules/ndb_redis/README b/modules/ndb_redis/README index 03c5cc9b2c4..ddf44f74f8c 100644 --- a/modules/ndb_redis/README +++ b/modules/ndb_redis/README @@ -14,9 +14,9 @@ Vicente Hernando - Copyright © 2011 asipto.com + Copyright 2011 asipto.com - Copyright © 2012 www.systemonenoc.com + Copyright 2012 www.systemonenoc.com __________________________________________________________________ Table of Contents @@ -124,7 +124,7 @@ modparam("ndb_redis", "server", "name=srvY;unix=/tmp/redis.sock;db=3") 4.1. redis_cmd(srvname, command, ..., replyid) 4.2. redis_free(replyid) -4.1. redis_cmd(srvname, command, ..., replyid) +4.1. redis_cmd(srvname, command, ..., replyid) Send a command to REDIS server identified by srvname. The reply will be stored in a local container identified by replyid. All the parameters @@ -179,7 +179,7 @@ if(redis_cmd("srvN", "HMGET foo_key field1 field3", "r")) { } ... -4.2. redis_free(replyid) +4.2. redis_free(replyid) Frees data in a previous reply from memory. After this function call, accessing to a freed replyid returns null value. diff --git a/modules/osp/README b/modules/osp/README index 5e1c908d47d..ed8e737f653 100644 --- a/modules/osp/README +++ b/modules/osp/README @@ -14,7 +14,7 @@ Di-Shi Sun - Copyright © 2003 FhG FOKUS + Copyright 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -380,7 +380,7 @@ modparam("osp","use_rpid_calling_number",1) to use the different URI format in the SIP redirection message. If this value is set to 0, the OSP Module uses "xxxxxxxxxx@xxx.xxx.xxx.xxx" URI in the SIP redirection messages. If this value is set to 1, the OSP - Module will use “” URI in the SIP + Module will use "" URI in the SIP redirection messages. The default value is 0 Example 1.16. Setting the redirection URI format diff --git a/modules/outbound/README b/modules/outbound/README index 1f89d4c70b7..1c08f251114 100644 --- a/modules/outbound/README +++ b/modules/outbound/README @@ -4,7 +4,7 @@ Peter Dunkley Crocodile RCS Ltd - Copyright © 2012-2013 Crocodile RCS Ltd + Copyright 2012-2013 Crocodile RCS Ltd __________________________________________________________________ Table of Contents @@ -72,7 +72,7 @@ Chapter 1. Admin Guide 1.1. Edge Proxy Keep-Alives (STUN) Outbound Edge Proxies MUST support STUN NAT keep-alives on their SIP - UDP ports. Kamailio supports this though the “stun” module. + UDP ports. Kamailio supports this though the "stun" module. 1.2. Flow Timer @@ -81,9 +81,9 @@ Chapter 1. Admin Guide responses to REGISTERs. When using TCP or TLS as the SIP transport care should be taken to set - the “tcp_connection_lifetime” on the Edge Proxy to a value slightly + the "tcp_connection_lifetime" on the Edge Proxy to a value slightly larger than the interval the Registrar is using for flow timer. Setting - “tcp_connection_lifetime” to less than the interval could cause + "tcp_connection_lifetime" to less than the interval could cause connections to be lost, and setting it to a value much larger than the interval will keep connections open far longer than is required (which is wasteful). @@ -91,9 +91,9 @@ Chapter 1. Admin Guide Application-layer keep-alives are optional when the underlying transport already has a keep-alive mechanism. The WebSocket transport has a transport-layer keep-alive. When using the WebSocket transport - the “keepalive_timeout” should be set to a value a little greater than + the "keepalive_timeout" should be set to a value a little greater than the Registrar flow timer interval and a little less than the - “tcp_connection_lifetime”. + "tcp_connection_lifetime". Example 1.1. Edge Proxy Configuration #!KAMAILIO diff --git a/modules/p_usrloc/README b/modules/p_usrloc/README index 66d733460ec..f1d5909bb05 100644 --- a/modules/p_usrloc/README +++ b/modules/p_usrloc/README @@ -10,7 +10,7 @@ Patric Marschall 1&1 Internet AG - Copyright © 2007 1&1 Internet AG + Copyright 2007 1&1 Internet AG __________________________________________________________________ Table of Contents @@ -273,7 +273,7 @@ Warning The url to the master database where errors are written to. - Default value is “mysql://kamailio:kamailiorw@localhost/kamailio” + Default value is "mysql://kamailio:kamailiorw@localhost/kamailio" Example 1.1. Set write_db_url parameter ... @@ -299,7 +299,7 @@ modparam("p_usrloc", "read_db_url", "mysql://user:passwd@localhost/db") Specifies the table where the information about the distributed databases is stored. - Default value is “locdb”. + Default value is "locdb". Example 1.3. Set reg_db_table parameter ... @@ -310,7 +310,7 @@ modparam("p_usrloc", "reg_db_table", "locdb") Specifies the column where the id of a distributed database is stored. - Default value is “id”. + Default value is "id". Example 1.4. Set id_column parameter ... @@ -324,7 +324,7 @@ modparam("p_usrloc", "id_column", "id") least two databases available, the databases above the second are ignored. - Default value is “no”. + Default value is "no". Example 1.5. Set num_column parameter ... @@ -336,7 +336,7 @@ modparam("p_usrloc", "num_column", "nr") Specifies the column where the url of the distributed database is stored. - Default value is “url”. + Default value is "url". Example 1.6. Set url_column parameter ... @@ -348,7 +348,7 @@ modparam("p_usrloc", "url_column", "url") Specifies the column where the status of the distributed database is stored. - Default value is “status”. + Default value is "status". Example 1.7. Set status_column parameter ... @@ -361,7 +361,7 @@ modparam("p_usrloc", "status_column", "status") is stored. This field is set to the current time when a databases is turned off or turned on. - Default value is “failover”. + Default value is "failover". Example 1.8. Set failover_time_column parameter ... @@ -376,7 +376,7 @@ modparam("p_usrloc", "failover_time_column", "fail") stored in two databases and it takes the spare the complete expire time to be up to date, it is not very useful. - Default value is “spare”. + Default value is "spare". Example 1.9. Set spare_flag_column parameter ... @@ -389,7 +389,7 @@ modparam("p_usrloc", "spare_flag_column", "spare") stored. Each call to db_handle_error increases the error counter. After exceeding the error threshold, the database's status is set to off. - Default value is “errors”. + Default value is "errors". Example 1.10. Set error_column parameter ... @@ -403,7 +403,7 @@ modparam("p_usrloc", "error_column", "error") is only useful when using spares and prevents the module from taking a spare which shares the same risk as the broken database. - Default value is “rg”. + Default value is "rg". Example 1.11. Set risk_group_column parameter ... @@ -417,7 +417,7 @@ modparam("p_usrloc", "risk_group_column", "rg") equal or greater than the contact expiration time of the registrar module. - Default value is “3600”. + Default value is "3600". Example 1.12. Set expire_time parameter ... @@ -428,7 +428,7 @@ modparam("p_usrloc", "expire_time", "3600") Specifies the error value on which a database shall be turned of. - Default value is “50”. + Default value is "50". Example 1.13. Set db_err_threshold parameter ... @@ -442,7 +442,7 @@ modparam("p_usrloc", "db_err_threshold", "50") * 2 - Try to find a spare, if none found, just turn off the broken database - Default value is “1”. + Default value is "1". Example 1.14. Set failover_level parameter ... @@ -457,7 +457,7 @@ modparam("p_usrloc", "failover_level", "1") to provide a writeable master database, otherwise this check stays disabled. - Default value is “10”. + Default value is "10". Example 1.15. Set db_retry_interval parameter ... @@ -470,7 +470,7 @@ modparam("p_usrloc", "db_retry_interval", "10") data consistency. Keep in mind that this will probably decrease performance. - Default value is “0”. + Default value is "0". Example 1.16. Set db_use_transactions parameter ... @@ -484,7 +484,7 @@ modparam("p_usrloc", "db_use_transactions", "0") activate transaction the db_use_transactions parameter must be also set. - Default value is “READ UNCOMMITED”. + Default value is "READ UNCOMMITED". Example 1.17. Set db_transaction_level parameter ... @@ -496,7 +496,7 @@ modparam("p_usrloc", "db_transaction_level", "READ UNCOMMITED") Sets the write access to the master database. If set to 0, no write operations are permitted on the master database. - Default value is “0”. + Default value is "0". Example 1.18. Set write_on_master_db parameter ... @@ -508,7 +508,7 @@ modparam("p_usrloc", "write_on_master_db", "0") Sets the write access to the distributed databases. If set to 0, no write operations are permitted on the databases. - Default value is “0”. + Default value is "0". Example 1.19. Set write_on_db parameter ... @@ -520,7 +520,7 @@ modparam("p_usrloc", "write_on_db", "0") Specifies the period (in seconds) after a database connection expires. Usage of a too small value will probably decrease the performance. - Default value is “300”. + Default value is "300". Example 1.20. Set connection_expires parameter ... @@ -533,7 +533,7 @@ modparam("p_usrloc", "connection_expires", "300") the moment the only way is to use the CRC32 algorithm to compute the location ID. Any integer value is fine. - Default value is “0”. + Default value is "0". Example 1.21. Set alg_location parameter ... @@ -546,7 +546,7 @@ modparam("p_usrloc", "alg_location", 1) single. For example, if you have a location table that is large and needs to be partitioned, and a smaller table cfa that is ok to be on only the master db(so there is no need to have it distributed), you can - set this parameter to “location=cluster,cfa=single”. This means that a + set this parameter to "location=cluster,cfa=single". This means that a call to lookup(location) @@ -556,7 +556,7 @@ lookup(cfa) will be done on only the master database (as with usrloc module) - Default value is “location=cluster,cfa=single”. + Default value is "location=cluster,cfa=single". Example 1.22. Set domain_db parameter ... @@ -569,7 +569,7 @@ modparam("p_usrloc", "domain_db", "location=cluster,cfa=single") definition, the type is configured by using this parameter. Accepted values are single and cluster. - Default value is “single”. + Default value is "single". Example 1.23. Set default_db_type parameter ... @@ -581,7 +581,7 @@ modparam("p_usrloc", "default_db_type", "cluster") The URL of the default database for Location domains (for domains that are single). This must be configured if they are use. - Default value is “DEFAULT_DB_URL”. + Default value is "DEFAULT_DB_URL". Example 1.24. Set default_db_type parameter ... @@ -668,16 +668,16 @@ modparam("p_usrloc", "db_mode", 2) The module supports the decativation of redundant databases for maintenance reasons. This can be done by setting the status column of - the respective database in the p_usrloc to the value “2”. This setting + the respective database in the p_usrloc to the value "2". This setting is autodetected from all modules on the server cluster. Changes in the locdb table are periodically polled with help of a timer process. After one minute the all read and write traffic is removed from the deactivated database, and maintenance can be done. In order to activate the database again, after the maintenance has been - finished, the respective status column needs to be set to “0”. This is + finished, the respective status column needs to be set to "0". This is autodetected as well, the first module that noticed the change will set - the status column to “1” and setting the failover column to the current + the status column to "1" and setting the failover column to the current time and date. Write requests are now transfered again to the database, but no reads are done yet. @@ -723,14 +723,14 @@ Chapter 2. Developer's Guide These are the primary functions that are used to perform the SQL queries. -1. load_ul_db_api(ul_db_api_t * api) +1. load_ul_db_api(ul_db_api_t * api) Import the dbd API, setup the master database connection. Meaning of the parameters is as follows: * api - Pointer to distributed database API structure -2. int (* ul_db_insert_t) (str * table, str * first, str * second, db_key_t* +2. int (* ul_db_insert_t) (str * table, str * first, str * second, db_key_t* _k, db_val_t* _v, int _n) Lookup the first and if needed the second key, and insert the given @@ -744,7 +744,7 @@ _k, db_val_t* _v, int _n) * _v - Pointer to the inserted db values. * _n - Number of key-value pairs in _k and _v parameters. -3. int (* ul_db_update_t) (str * table, str * first, str * second, db_key_t* +3. int (* ul_db_update_t) (str * table, str * first, str * second, db_key_t* _k, db_op_t * _op, db_val_t* _v, db_key_t* _uk, db_val_t* _uv, int _n, int _un); @@ -763,7 +763,7 @@ _un); * _n - Number of key-value pairs in _k and _v parameters. * _un - Number of key-value pairs in _uk and _uv parameters. -4. int (* ul_db_insert_update_t) (str * table, str * first, str * second, +4. int (* ul_db_insert_update_t) (str * table, str * first, str * second, db_key_t* _k, db_val_t* _v, int _n) Lookup the first and if needed the second key, and insert on duplicate @@ -778,8 +778,8 @@ db_key_t* _k, db_val_t* _v, int _n) * _v - Pointer to the inserted or updated db values. * _n - Number of key-value pairs in _k and _v parameters. -5. int (* ul_db_replace_t) (str * table, str * first, str * second, -db_key_t* _k, db_val_t* _v, int _n) +5. int (* ul_db_replace_t) (str * table, str * first, str * second, db_key_t* +_k, db_val_t* _v, int _n) Lookup the first and if needed the second key, and replace the given values in the choosen databases. @@ -792,7 +792,7 @@ db_key_t* _k, db_val_t* _v, int _n) * _v - Pointer to the replaced db values. * _n - Number of key-value pairs in _k and _v parameters. -6. int (* ul_db_delete_t) (str * table, str * first, str * second, db_key_t* +6. int (* ul_db_delete_t) (str * table, str * first, str * second, db_key_t* _k, db_op_t* _o, db_val_t* _v, int _n) Lookup the first and if needed the second key, and delete the given @@ -807,7 +807,7 @@ _k, db_op_t* _o, db_val_t* _v, int _n) * _v - Pointer to the deleted db values. * _n - Number of key-value pairs in _k and _v parameters. -7. int (* ul_db_query_t) (str * table, str * first, str * second, db_con_t +7. int (* ul_db_query_t) (str * table, str * first, str * second, db_con_t *** _r_h, db_key_t* _k, db_op_t* _op, db_val_t* _v, db_key_t* _c, int _n, int _nc, db_key_t _o, db_res_t** _r); @@ -831,7 +831,7 @@ _nc, db_key_t _o, db_res_t** _r); * _o - Order by options for the query. * _nc - Pointer to the result set. -8. int (* ul_db_free_result_t)(db_con_t ** dbh, db_res_t * res); +8. int (* ul_db_free_result_t)(db_con_t ** dbh, db_res_t * res); Frees the given result set, . diff --git a/modules/path/README b/modules/path/README index 944a5fe9718..f67042cd3c2 100644 --- a/modules/path/README +++ b/modules/path/README @@ -8,11 +8,9 @@ Edited by Andreas Granig -Edited by - Richard Fuchs - Copyright © 2006 Inode GmbH + Copyright 2006 Inode GmbH __________________________________________________________________ Table of Contents @@ -93,18 +91,18 @@ Chapter 1. Admin Guide 1.1. Path insertion for registrations - For registrations in a scenario like “[UAC] -> [P1] -> [REG]”, the + For registrations in a scenario like "[UAC] -> [P1] -> [REG]", the "path" module can be used at the intermediate proxy P1 to insert a Path header into the message before forwarding it to the registrar REG. Two functions can be used to achieve this: - * add_path(...) adds a Path header in the form of “Path: - ” to the message using the address of the outgoing + * add_path(...) adds a Path header in the form of "Path: + " to the message using the address of the outgoing interface. A port is only added if it's not the default port 5060. If a username is passed to the function, it is also included in the - Path URI, like “Path: ”. + Path URI, like "Path: ". * add_path_received(...) also add a Path header in the same form as above, but also adds a parameter indicating the received-URI of the - message, like “Path: ”. + message, like "Path: ". This is especially useful if the proxy does NAT detection and wants to pass the NAT'ed address to the registrar. If the function is called with a username, it's included in the @@ -115,12 +113,12 @@ Chapter 1. Admin Guide If the NAT'ed address of an UAC is passed to the registrar, the registrar routes back subsequent requests using the Path header of the registration as Route header of the current request. If the - intermediate proxy had inserted a Path header including the “received” + intermediate proxy had inserted a Path header including the "received" parameter during the registration, this parameter will show up in the Route header of the new request as well, allowing the intermediate proxy to route to this address instead of the one propagated in the Route URI for tunneling through NAT. This behaviour can be activated by - setting the module parameter “use_received”. + setting the module parameter "use_received". 2. Dependencies @@ -131,7 +129,7 @@ Chapter 1. Admin Guide The following modules must be loaded before this module: * The "rr" module is needed for outbound routing according to the - “received” parameter. + "received" parameter. * The "outbound" module is needed for outbound routing as per RFC 5626. @@ -147,7 +145,7 @@ Chapter 1. Admin Guide 3.1. use_received (int) - If set to 1, the “received” parameter of the first Route URI is + If set to 1, the "received" parameter of the first Route URI is evaluated and used as destination-URI if present. Default value is 0. @@ -166,17 +164,17 @@ modparam("path", "use_received", 1) 4.5. add_path_received(user) 4.6. add_path_received(user, parameters) -4.1. add_path() +4.1. add_path() - This function is used to insert a Path header in the form “Path: - ”, where “1.2.3.4” is the address of the outgoing + This function is used to insert a Path header in the form "Path: + ", where "1.2.3.4" is the address of the outgoing interface. - If the “outbound” module was loaded before this module, and outbound is - required for this request, the header will be in the form “Path: - ”, where “flowtoken” is the RFC 5636 + If the "outbound" module was loaded before this module, and outbound is + required for this request, the header will be in the form "Path: + ", where "flowtoken" is the RFC 5636 flow-token that can be used to identify the source and local address - and transport the request was received on, and where “1.2.3.4” is the + and transport the request was received on, and where "1.2.3.4" is the address of the outgoing interface. This function can be used from REQUEST_ROUTE. @@ -189,10 +187,10 @@ if (!add_path()) { }; ... -4.2. add_path(user) +4.2. add_path(user) - This function adds a Path header in the form “Path: - ”. + This function adds a Path header in the form "Path: + ". Meaning of the parameters is as follows: * user - The username to be inserted as user part. SPVE is supported. @@ -207,10 +205,10 @@ if (!add_path("loadbalancer")) { }; ... -4.3. add_path(user, parameters) +4.3. add_path(user, parameters) - This function adds a Path header in the form “Path: - ” and appends the given parameters as additional + This function adds a Path header in the form "Path: + " and appends the given parameters as additional URI parameters. Meaning of the parameters is as follows: @@ -229,10 +227,10 @@ if (!add_path("loadbalancer", "ob")) { }; ... -4.4. add_path_received() +4.4. add_path_received() - This function adds a Path header in the form “Path: - ”, setting its own outgoing + This function adds a Path header in the form "Path: + ", setting its own outgoing address as domain-part, and the address the request has been received from as received-parameter. @@ -246,10 +244,10 @@ if (!add_path_received()) { }; ... -4.5. add_path_received(user) +4.5. add_path_received(user) - This function adds a Path header in the form “Path: - ”, setting 'user' as + This function adds a Path header in the form "Path: + ", setting 'user' as username part of address, its own outgoing address as domain-part, and the address the request has been received from as received-parameter. @@ -263,10 +261,10 @@ if (!add_path_received("inbound")) { }; ... -4.6. add_path_received(user, parameters) +4.6. add_path_received(user, parameters) - This function adds a Path header in the form “Path: - ”, setting 'user' as + This function adds a Path header in the form "Path: + ", setting 'user' as username part of address, its own outgoing address as domain-part, and the address the request has been received from as received-parameter. diff --git a/modules/pdb/README b/modules/pdb/README index 2bee8ec150a..681ef4617ff 100644 --- a/modules/pdb/README +++ b/modules/pdb/README @@ -7,14 +7,12 @@ Henning Westerholt 1&1 Internet AG -Edited by - Pawel Kuzak 1&1 Internet AG - Copyright © 2009 1&1 Internet AG + Copyright 2009 1&1 Internet AG __________________________________________________________________ Table of Contents @@ -116,7 +114,7 @@ Chapter 1. Admin Guide This is the timeout in milliseconds for the pdb_query function. - Default value is “50”. + Default value is "50". Example 1.1. Set timeout parameter ... @@ -138,7 +136,7 @@ modparam("pdb", "server", "localhost:10001,host.name:10001,192.168.1.7:10002") 4.1. pdb_query (string query, string dstavp) -4.1. pdb_query (string query, string dstavp) +4.1. pdb_query (string query, string dstavp) Sends the query string to all configured servers and stores the answer in dstavp. If it takes more than the configured timeout, false is @@ -162,7 +160,7 @@ cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id"); 5.2. pdb_activate 5.3. pdb_deactivate -5.1. pdb_status +5.1. pdb_status Prints the status of the module. This can either be "active" or "deactivated". @@ -172,7 +170,7 @@ cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id"); kamctl fifo pdb_status ... -5.2. pdb_activate +5.2. pdb_activate Activates the module. This is the default after loading the module. @@ -181,7 +179,7 @@ kamctl fifo pdb_status kamctl fifo pdb_activate ... -5.3. pdb_deactivate +5.3. pdb_deactivate Deactivates the module. No more queries are performed until it is activated again. As long as the module is deactivated, the pdb_query diff --git a/modules/pdt/README b/modules/pdt/README index 9773bfaa08a..7feb4999b2d 100644 --- a/modules/pdt/README +++ b/modules/pdt/README @@ -181,7 +181,7 @@ sip:12391001@mydomain.com => sip:91001@alpha.org URL of the database table to be used. - Default value is "mysql://openser:openserrw@localhost/openser". + Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". Example 1.2. Set db_url parameter ... diff --git a/modules/peering/README b/modules/peering/README index 54260b4926a..485b5e18171 100644 --- a/modules/peering/README +++ b/modules/peering/README @@ -10,7 +10,7 @@ Juha Heinanen - Copyright © 2008 Juha Heinanen + Copyright 2008 Juha Heinanen __________________________________________________________________ Table of Contents @@ -116,7 +116,7 @@ Chapter 1. Admin Guide This is the location of the configuration file of Radius client libraries. - Default value is “/usr/local/etc/radiusclient-ng/radiusclient.conf”. + Default value is "/usr/local/etc/radiusclient-ng/radiusclient.conf". Example 1.1. radius_config parameter usage modparam("peering", "radius_config", "/etc/broker/radiusclient.conf") @@ -127,7 +127,7 @@ modparam("peering", "radius_config", "/etc/broker/radiusclient.conf") sender of SIP Request verifies the request's destination using verify_destination() function. - Default value is the dictionary value of “Sip-Verify-Destination” + Default value is the dictionary value of "Sip-Verify-Destination" Service-Type. Example 1.2. verify_destination_service_type parameter usage @@ -139,7 +139,7 @@ modparam("peering", "verify_destination_service_type", 21) receiver of SIP Request verifies the request's source using verify_source() function. - Default value is the dictionary value of “Sip-Verify-Source” + Default value is the dictionary value of "Sip-Verify-Source" Service-Type. Example 1.3. verify_source_service_type parameter usage diff --git a/modules/permissions/README b/modules/permissions/README index 6b872fceb0d..d55e4ec752f 100644 --- a/modules/permissions/README +++ b/modules/permissions/README @@ -6,12 +6,8 @@ Edited by Miklos Tirpak -Edited by - Bogdan-Andrei Iancu -Edited by - Juha Heinanen Copyright 2003 Miklos Tirpak diff --git a/modules/pipelimit/README b/modules/pipelimit/README index 9f4caf115a7..084721cf206 100644 --- a/modules/pipelimit/README +++ b/modules/pipelimit/README @@ -8,8 +8,6 @@ Edited by Ovidiu Sas -Edited by - Daniel-Constantin Mierla Copyright 2013 VoIPEmbedded Inc. diff --git a/modules/prefix_route/README b/modules/prefix_route/README index ba3663c76f2..3ded7a2feff 100644 --- a/modules/prefix_route/README +++ b/modules/prefix_route/README @@ -1,4 +1,3 @@ - prefix_route Module Alfred E. Heggestad @@ -8,7 +7,7 @@ Alfred E. Heggestad Copyright 2007 Alfred E. Heggestad Copyright 2008 Telio Telecom AS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -64,13 +63,13 @@ Chapter 1. Admin Guide 1. Overview - The prefix_route module does routing based on a set of prefixes from - the database. The prefix rule-set is loaded from the database into a - binary tree in memory, either on startup or when issuing the - "prefix_route.reload" RPC command. When calling the "prefix_route()" - function from the ser.cfg configuration script, it will try to match - the user part of the request URI with the best matching route. If a - route is found, it will be used for further processing. If not found + The prefix_route module does routing based on a set of prefixes from + the database. The prefix rule-set is loaded from the database into a + binary tree in memory, either on startup or when issuing the + "prefix_route.reload" RPC command. When calling the "prefix_route()" + function from the ser.cfg configuration script, it will try to match + the user part of the request URI with the best matching route. If a + route is found, it will be used for further processing. If not found normal processing will continue. Development was sponsored by Telio Telecom. @@ -105,8 +104,8 @@ modparam("prefix_route", "db_table", "new_prefix_route") 2.3. exit (int) - If set, exit the execution of the configuration file when a route - block is executed upon matching a prefix. Otherwise return 1 (true). + If set, exit the execution of the configuration file when a route block + is executed upon matching a prefix. Otherwise return 1 (true). Default value is 1 (on). @@ -121,7 +120,7 @@ modparam("prefix_route", "exit", 0) 3.1. prefix_route([user]) - This function tries to find a route from the user part of the request + This function tries to find a route from the user part of the request URI (if no parameter is provided), or from the value of the parameter. The parameter can contain config variables. diff --git a/modules/presence/README b/modules/presence/README index 6395628559c..0018973388a 100644 --- a/modules/presence/README +++ b/modules/presence/README @@ -12,8 +12,6 @@ Edited by Anca-Maria Vamanu -Edited by - Juha Heinanen Copyright 2006 Voice Sistem SRL diff --git a/modules/presence_conference/README b/modules/presence_conference/README index 3914c825bdf..e87534b1cc2 100644 --- a/modules/presence_conference/README +++ b/modules/presence_conference/README @@ -6,7 +6,7 @@ Edited by Marius-Ovidiu Bucur - Copyright © 2010 Marius-Ovidiu Bucur + Copyright 2010 Marius-Ovidiu Bucur __________________________________________________________________ Table of Contents @@ -81,7 +81,7 @@ Chapter 1. Admin Guide Control usage of partial state notifiations. - Default value is “0”. + Default value is "0". Example 1.1. Set use_partial_states parameter ... @@ -92,7 +92,7 @@ modparam("presence_conference", "use_partial_states", 0) 4.1. conference_reset -4.1. conference_reset +4.1. conference_reset Reset internal data. diff --git a/modules/presence_dialoginfo/README b/modules/presence_dialoginfo/README index f62ebe33035..ae3f7642d36 100644 --- a/modules/presence_dialoginfo/README +++ b/modules/presence_dialoginfo/README @@ -13,15 +13,13 @@ Juha Heinanen -Edited by - Klaus Darilion - Copyright © 2007 Juha Heinanen + Copyright 2007 Juha Heinanen - Copyright © 2008 Klaus Darilion, IPCom (Module implementation was + Copyright 2008 Klaus Darilion, IPCom (Module implementation was partly sponsored by Silver Server (www.sil.at)) __________________________________________________________________ @@ -38,12 +36,14 @@ Klaus Darilion 3. Parameters 3.1. force_single_dialog (int) + 3.2. force_dummy_dialog (int) 4. Functions List of Examples 1.1. Set parameter + 1.2. Set parameter Chapter 1. Admin Guide @@ -58,6 +58,7 @@ Chapter 1. Admin Guide 3. Parameters 3.1. force_single_dialog (int) + 3.2. force_dummy_dialog (int) 4. Functions @@ -189,6 +190,7 @@ alice@example server server bob@example watcher@example 3. Parameters 3.1. force_single_dialog (int) + 3.2. force_dummy_dialog (int) 3.1. force_single_dialog (int) @@ -205,13 +207,29 @@ alice@example server server bob@example watcher@example state more intersting than confirmed as often you might want to pickup a call if the originall callee is already busy in a call. - Default value is “0”. + Default value is "0". Example 1.1. Set parameter ... modparam("presence_dialoginfo", "force_single_dialog", 1) ... +3.2. force_dummy_dialog (int) + + By default the module returns null body if there are no bodies to + aggregate. some sip clients like Bria expect at least one dialog. you + can activate this parameter to send a dummy dialog. + + If this parameter is set and there are no dialog bodies to aggregate, + it will return a dummy dialog. + + Default value is "0". + + Example 1.2. Set parameter +... +modparam("presence_dialoginfo", "force_dummy_dialog", 1) +... + 4. Functions None to be used in configuration file. diff --git a/modules/presence_mwi/README b/modules/presence_mwi/README index 86327c41ebd..304d965a131 100644 --- a/modules/presence_mwi/README +++ b/modules/presence_mwi/README @@ -10,7 +10,7 @@ Juha Heinanen - Copyright © 2007 Juha Heinanen + Copyright 2007 Juha Heinanen __________________________________________________________________ Table of Contents @@ -53,8 +53,8 @@ Chapter 1. Admin Guide before calling handle_publish() and handle_subscribe() functions. The module implements a simple check of content type - “application/simple-message-summary:” Content must start with - “Messages-Waiting” status line followed by zero or more lines that + "application/simple-message-summary:" Content must start with + "Messages-Waiting" status line followed by zero or more lines that consist of tabs and printable ASCII characters. 2. Dependencies diff --git a/modules/presence_profile/README b/modules/presence_profile/README index 491fdcf32f7..2e4c8df9e40 100644 --- a/modules/presence_profile/README +++ b/modules/presence_profile/README @@ -10,8 +10,6 @@ Mészáros Mihály -Edited by - Alex Balashov diff --git a/modules/presence_reginfo/README b/modules/presence_reginfo/README index a485ba78786..ecf51b3df19 100644 --- a/modules/presence_reginfo/README +++ b/modules/presence_reginfo/README @@ -10,7 +10,7 @@ Carsten Bock - Copyright © 2011 Carsten Bock, carsten@ng-voice.com, + Copyright 2011 Carsten Bock, carsten@ng-voice.com, http://www.ng-voice.com __________________________________________________________________ diff --git a/modules/print/README b/modules/print/README index 33279796f29..94f46c0a7f3 100644 --- a/modules/print/README +++ b/modules/print/README @@ -1,4 +1,3 @@ - Print Module Andrei Pelinescu-Onciul @@ -6,7 +5,7 @@ Andrei Pelinescu-Onciul FhG FOKUS Copyright 2003 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -20,7 +19,7 @@ Andrei Pelinescu-Onciul 3. Functions - 3.1. print(txt) + 3.1. print(txt) List of Examples @@ -40,12 +39,12 @@ Chapter 1. Admin Guide 3. Functions - 3.1. print(txt) + 3.1. print(txt) 1. Overview This is an example module. It implements only one function that prints - its string parameter to stdout (it won't work if ser is started in + its string parameter to stdout (it won't work if ser is started in daemon mode). It also shows how module parameters can be declared. 2. Parameters @@ -77,9 +76,9 @@ modparam("print", "int_param", 42) 3. Functions - 3.1. print(txt) + 3.1. print(txt) -3.1. print(txt) +3.1. print(txt) Prints string to stdout. diff --git a/modules/print_lib/README b/modules/print_lib/README index 5d93909d4b8..0b3c9463d13 100644 --- a/modules/print_lib/README +++ b/modules/print_lib/README @@ -1,4 +1,3 @@ - Print_lib Module Andrei Pelinescu-Onciul @@ -6,7 +5,7 @@ Andrei Pelinescu-Onciul FhG FOKUS Copyright 2003 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -15,7 +14,7 @@ Andrei Pelinescu-Onciul 1. Overview 2. Functions - 2.1. print_stderr(txt) + 2.1. print_stderr(txt) List of Examples @@ -28,20 +27,20 @@ Chapter 1. Admin Guide 1. Overview 2. Functions - 2.1. print_stderr(txt) + 2.1. print_stderr(txt) 1. Overview This is an example module. It implements only one function that prints - its string parameter to stderr (it won't work if server is started in - daemon mode). Its prupose is to show how to link to an internal - library (lib/print). + its string parameter to stderr (it won't work if server is started in + daemon mode). Its prupose is to show how to link to an internal library + (lib/print). 2. Functions - 2.1. print_stderr(txt) + 2.1. print_stderr(txt) -2.1. print_stderr(txt) +2.1. print_stderr(txt) Prints string to stderr. diff --git a/modules/pua/README b/modules/pua/README index c8c7d8add17..a62b54eec3b 100644 --- a/modules/pua/README +++ b/modules/pua/README @@ -186,7 +186,7 @@ modparam("pua", "hash_size", 11) Database url. - Default value is ">mysql://openser:openserrw@localhost/openser". + Default value is ">mysql://kamailio:kamailiorw@localhost/kamailio". Example 1.2. Set db_url parameter ... diff --git a/modules/pua_bla/README b/modules/pua_bla/README index be12537fcf7..56bf6a0f31e 100644 --- a/modules/pua_bla/README +++ b/modules/pua_bla/README @@ -8,7 +8,7 @@ Edited by Anca-Maria Vamanu - Copyright © 2007 Voice Sistem SRL + Copyright 2007 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -99,7 +99,7 @@ Chapter 1. Admin Guide The default domain for the registered users to be used when constructing the uri for the registrar callback. - Default value is “NULL”. + Default value is "NULL". Example 1.1. Set default_domain parameter ... @@ -113,7 +113,7 @@ modparam("pua_bla", "default_domain", "kamailio.org") Publish. It stops sending a Notification with the same information to the sender. - Default value is “NULL”. + Default value is "NULL". Example 1.2. Set header_name parameter ... @@ -124,7 +124,7 @@ modparam("pua_bla", "header_name", "Sender") The outbound_proxy uri to be used when sending Subscribe requests. - Default value is “NULL”. + Default value is "NULL". Example 1.3. Set outbound_proxy parameter ... @@ -145,7 +145,7 @@ modparam("pua_bla", "server_address", "sip:bla@160.34.23.12") 4.1. bla_set_flag 4.2. bla_handle_notify -4.1. bla_set_flag +4.1. bla_set_flag The function is used to mark REGISTER requests made to a BLA AOR. The modules subscribes to the registered contacts for dialog;sla event. @@ -156,7 +156,7 @@ if(is_method("REGISTER") && to_uri=~"bla_aor@kamailio.org") bla_set_flag(); ... -4.2. bla_handle_notify +4.2. bla_handle_notify The function handles Notify requests sent from phones on the same BLA to the server. The message is transformed in Publish request and passed diff --git a/modules/pua_dialoginfo/README b/modules/pua_dialoginfo/README index 4f685fc5381..7785919cd0c 100644 --- a/modules/pua_dialoginfo/README +++ b/modules/pua_dialoginfo/README @@ -13,8 +13,6 @@ Klaus Darilion IPCom (Module implementation was partly sponsored by Silver Server (www.sil.at)) -Edited by - Klaus Darilion IPCom diff --git a/modules/pua_mi/README b/modules/pua_mi/README index bfeaccf832d..ba52420a81c 100644 --- a/modules/pua_mi/README +++ b/modules/pua_mi/README @@ -8,8 +8,6 @@ Edited by Anca-Maria Vamanu -Edited by - Juha Heinanen Copyright 2006 Voice Sistem SRL diff --git a/modules/pua_usrloc/README b/modules/pua_usrloc/README index 942f2dd6ab5..5544c05a1f9 100644 --- a/modules/pua_usrloc/README +++ b/modules/pua_usrloc/README @@ -133,7 +133,7 @@ modparam("pua_usrloc", "branch_flag", 9) 4.1. pua_set_publish() -4.1. pua_set_publish() +4.1. pua_set_publish() The function is used to mark REGISTER requests that have to issue a PUBLISH. The PUBLISH is issued when REGISTER is saved in location diff --git a/modules/purple/README b/modules/purple/README index eea0de54e38..08d48b82190 100644 --- a/modules/purple/README +++ b/modules/purple/README @@ -11,7 +11,7 @@ Eric Ptak - Copyright © 2008 Atos Worldline + Copyright 2008 Atos Worldline __________________________________________________________________ Table of Contents @@ -178,7 +178,7 @@ CREATE TABLE purplemap ( The URL to connect to database. - Default value is “mysql://openserro:openserro@localhost/openser”. + Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". Example 1.4. Set db_url parameter ... @@ -224,7 +224,7 @@ modparam("purple", "httpProxy_port", 3128) 5.2. purple_handle_publish() 5.3. purple_handle_subscribe() -5.1. purple_send_message() +5.1. purple_send_message() Send message to a purple destination. @@ -241,7 +241,7 @@ if (is_method("MESSAGE")) { } ... -5.2. purple_handle_publish() +5.2. purple_handle_publish() Handle PUBLISH to a purple destination. @@ -256,7 +256,7 @@ if(is_method("PUBLISH")) { } ... -5.3. purple_handle_subscribe() +5.3. purple_handle_subscribe() Handle SUBSCRIBE to a purple destination. diff --git a/modules/ratelimit/README b/modules/ratelimit/README index 30515606e02..90fd7fff9a9 100644 --- a/modules/ratelimit/README +++ b/modules/ratelimit/README @@ -10,12 +10,8 @@ Edited by Ovidiu Sas -Edited by - Bogdan Vasile Harjoc -Edited by - Hendrik Scholz Copyright 2006 Freenet Cityline GmbH @@ -327,7 +323,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") 6.1. rl_check([pvar]) 6.2. rl_check_pipe([pipe_no]) -6.1. rl_check([pvar]) +6.1. rl_check([pvar]) Check the current request against the matched ratelimit algorithm. If no parameter is provided, the queue will be matched based on method @@ -374,7 +370,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") }; ... -6.2. rl_check_pipe([pipe_no]) +6.2. rl_check_pipe([pipe_no]) Check the current request against the matched ratelimit algorithm. If no parameter is provided, the queue will be matched based on method @@ -419,7 +415,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") 7.8. rl.push_load 7.9. rl.set_dbg -7.1. rl.stats +7.1. rl.stats Lists the parameters and variables in the ratelimit module. @@ -430,7 +426,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.stats -7.2. rl.set_pipe +7.2. rl.set_pipe Sets the pipe parameters for the given pipe id. @@ -444,7 +440,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.set_pipe 2 RED 10 -7.3. rl.get_pipes +7.3. rl.get_pipes Gets the list of in use pipes. @@ -455,7 +451,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.get_pipes -7.4. rl.set_queue +7.4. rl.set_queue Sets the queue parameters for the given queue id. @@ -469,7 +465,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.set_queue 3 INVITE 2 -7.5. rl.get_queues +7.5. rl.get_queues Gets the list of in use queues. @@ -480,7 +476,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.get_queues -7.6. rl.set_pid +7.6. rl.set_pid Sets the PID Controller parameters for the Feedback Algorithm. @@ -494,7 +490,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.set_pid 0.5 0.5 0.5 -7.7. rl.get_pid +7.7. rl.get_pid Gets the list of in use PID Controller parameters. @@ -505,7 +501,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.get_pid -7.8. rl.push_load +7.8. rl.push_load Force the value of the load parameter. This method is useful for testing the Feedback algorithm. @@ -519,7 +515,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000") RPC Command Format: kamcmd rl.push_load 0.85 -7.9. rl.set_dbg +7.9. rl.set_dbg This function will enable/disable a WARNING debug log exposing the internal counters for each pipe (useful in monitoring the ratelimit diff --git a/modules/registrar/README b/modules/registrar/README index 059a21070a1..99d7db79096 100644 --- a/modules/registrar/README +++ b/modules/registrar/README @@ -12,8 +12,6 @@ Edited by Jan Janak -Edited by - Bogdan-Andre Iancu Copyright 2003 FhG FOKUS diff --git a/modules/rls/README b/modules/rls/README index 62c9f96755c..324f6edb5ab 100644 --- a/modules/rls/README +++ b/modules/rls/README @@ -8,7 +8,7 @@ Edited by Anca-Maria Vamanu - Copyright © 2007 Voice Sistem SRL + Copyright 2007 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -223,7 +223,7 @@ Chapter 1. Admin Guide The database url. - Default value is “mysql://openser:openserrw@localhost/openser”. + Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". Example 1.1. Set db_url parameter ... @@ -241,7 +241,7 @@ modparam("rls", "db_url", "dbdriver://username:password@dbhost/dbname") same time. This parameter enables each server to have its own (possibly local) rls_presentity table. - Default value is a mirror of the “db_url” setting. + Default value is a mirror of the "db_url" setting. Example 1.2. Set rlpres_db_url parameter ... @@ -253,7 +253,7 @@ modparam("rls", "rlpres_db_url", "dbdriver://username:password@dbhost/dbname") The xcap database url. This parameter only needs to be specified if the rls db and integerated xcap server db have different urls. - Default value is a mirror of the “db_url” setting. + Default value is a mirror of the "db_url" setting. Example 1.3. Set xcap_db_url parameter ... @@ -267,7 +267,7 @@ modparam("rls", "xcap_db_url", "dbdriver://username:password@dbhost/dbname") in a database, allowing scalability at the expense of speed. Mode 1 is reserved. - Default value is “0” + Default value is "0" Example 1.4. Set db_mode parameter ... @@ -281,7 +281,7 @@ modparam("rls", "db_mode", 2) the name of the table must be the same as the one set for the xcap_client module. - Default value is “xcap”. + Default value is "xcap". Example 1.5. Set xcap_table parameter ... @@ -293,7 +293,7 @@ modparam("rls", "xcap_table", "xcaps"); The name of the db table where resource lists subscription information is stored. - Default value is “rls_watchers”. + Default value is "rls_watchers". Example 1.6. Set rlsubs_table parameter ... @@ -305,7 +305,7 @@ modparam("rls", "rlsubs_table", "rls_subscriptions") The name of the db table where notified event specific information is stored. - Default value is “rls_presentity”. + Default value is "rls_presentity". Example 1.7. Set rlpres_table parameter ... @@ -317,7 +317,7 @@ modparam("rls", "rlpres_table", "rls_notify") The period at which to check for expired information. 0 means do not check. - Default value is “100”. + Default value is "100". Example 1.8. Set clean_period parameter ... @@ -332,7 +332,7 @@ modparam("rls", "clean_period", 100) rls_watchers on different timeouts. This is useful when they are in different databases. - Default value is “-1”. + Default value is "-1". Example 1.9. Set rlpres_clean_period parameter ... @@ -346,7 +346,7 @@ modparam("rls", "rlpres_clean_period", 100) presence state of the subscribed list or watcher information within this many seconds of a change occurring. - Default value is “5”. + Default value is "5". Example 1.10. Set waitn_time parameter ... @@ -363,7 +363,7 @@ modparam("rls", "waitn_time", 10) Separate notifier processes are only run when db_mode is 2 (DB only mode). - Default value is “10”. + Default value is "10". Example 1.11. Set notifier_poll_rate parameter ... @@ -377,7 +377,7 @@ modparam("rls", "notifier_poll_rate", 20) Separate notifier processes are only run when db_mode is 2 (DB only mode). - Default value is “1”. + Default value is "1". Example 1.12. Set notifier_processes parameter ... @@ -388,7 +388,7 @@ modparam("rls", "notifier_processes", 2) The maximum accepted expires for a subscription to a list. - Default value is “7200”. + Default value is "7200". Example 1.13. Set max_expires parameter ... @@ -406,7 +406,7 @@ modparam("rls", "max_expires", 10800) seconds ago are deleted from the database. Negative offsets are treated as though an offset of zero was specifed. - Default value is “0”. + Default value is "0". Example 1.14. Set expires_offset parameter ... @@ -419,7 +419,7 @@ modparam("rls", "expires_offset", 0) This parameter will be used as the power of 2 when computing table size. - Default value is “9 (512)”. + Default value is "9 (512)". Example 1.15. Set hash_size parameter ... @@ -430,7 +430,7 @@ modparam("rls", "hash_size", 11) The address of the xcap server. - Default value is “NULL”. + Default value is "NULL". Example 1.16. Set hash_size parameter ... @@ -442,7 +442,7 @@ modparam("rls", "xcap_root", "http://192.168.2.132/xcap-root:800") This parameter should be set if only integrated xcap servers are used to store resource lists. - Default value is “0”. + Default value is "0". Example 1.17. Set integrated_xcap_server parameter ... @@ -457,7 +457,7 @@ modparam("rls", "integrated_xcap_server", 1) same machine, to call handle_subscribe on the message causing this code. - Default value is “0”. + Default value is "0". Example 1.18. Set to_presence_code parameter ... @@ -470,7 +470,7 @@ modparam("rls", "to_presence_code", 10) should also be handled by RLS they should be added using this parameter. It can be set more than once. - Default value is “"presence"”. + Default value is ""presence"". Example 1.19. Set rls_event parameter ... @@ -482,7 +482,7 @@ modparam("rls", "rls_event", "dialog;sla") The SIP address where to send RLS subscriptions (outbound proxy address as SIP URI). - Default value is “NULL”. + Default value is "NULL". Example 1.20. Set outbound_proxy parameter ... @@ -562,7 +562,7 @@ modparam("rls", "max_backend_subs", 30) 4.2. rls_handle_notify() 4.3. rls_update_subs(uri, event) -4.1. rls_handle_subscribe([watcher_uri]) +4.1. rls_handle_subscribe([watcher_uri]) This function detects if a Subscribe message should be handled by RLS. If not it replies with the configured to_presence_code. If it is, it @@ -600,7 +600,7 @@ For rls only: ... -4.2. rls_handle_notify() +4.2. rls_handle_notify() This function can be used from REQUEST_ROUTE. @@ -610,7 +610,7 @@ if(method=="NOTIFY") rls_handle_notify(); ... -4.3. rls_update_subs(uri, event) +4.3. rls_update_subs(uri, event) This function can be used in configuration to trigger updates to resource list subscriptions (for example, after the contents of a @@ -643,7 +643,7 @@ Within event_route[xhttp:request]: 5.1. rls_cleanup -5.1. rls_cleanup +5.1. rls_cleanup Manually triggers the cleanup functions forthe rls_watchers and rls_presentity tables. Useful if you have set clean_period to zero or diff --git a/modules/rr/README b/modules/rr/README index 4344b4849ae..2f86733b960 100644 --- a/modules/rr/README +++ b/modules/rr/README @@ -16,8 +16,6 @@ Edited by Jan Janak -Edited by - Bogdan-Andrei Iancu Copyright 2003 FhG FOKUS diff --git a/modules/rtpengine/README b/modules/rtpengine/README index b38d92c7e15..6780d1a298e 100644 --- a/modules/rtpengine/README +++ b/modules/rtpengine/README @@ -12,39 +12,29 @@ Edited by Maxim Sobolev -Edited by - Bogdan-Andrei Iancu -Edited by - Juha Heinanen -Edited by - Sas Ovidiu -Edited by - Carsten Bock ng-voice GmbH -Edited by - Richard Fuchs Sipwise GmbH - Copyright (c) 2003-2008 Sippy Software, Inc. + Copyright 2003-2008 Sippy Software, Inc. - Copyright (c) 2005 Voice Sistem SRL + Copyright 2005 Voice Sistem SRL - Copyright (c) 2009-2014 TuTPro Inc. + Copyright 2009-2014 TuTPro Inc. - Copyright (c) 2010 VoIPEmbedded Inc. + Copyright 2010 VoIPEmbedded Inc. - Copyright (c) 2013-2014 Sipwise GmbH + Copyright 2013-2014 Sipwise GmbH __________________________________________________________________ Table of Contents @@ -305,7 +295,7 @@ modparam("rtpengine", "setid_avp", "$avp(setid)") 5.5. rtpengine_manage([flags]) 5.6. start_recording() -5.1. set_rtpengine_set(setid[, setid]) +5.1. set_rtpengine_set(setid[, setid]) Sets the ID of the RTP proxy set to be used for the next rtpengine_delete(), rtpengine_offer(), rtpengine_answer() or @@ -333,7 +323,7 @@ set_rtpengine_set("2"); rtpengine_offer(); ... -5.2. rtpengine_offer([flags]) +5.2. rtpengine_offer([flags]) Rewrites SDP body to ensure that media is passed through an RTP proxy. To be invoked on INVITE for the cases the SDP bodies are in INVITE and @@ -529,7 +519,7 @@ onreply_route[2] ... } -5.3. rtpengine_answer([flags]) +5.3. rtpengine_answer([flags]) Rewrites SDP body to ensure that media is passed through an RTP proxy. To be invoked on 200 OK for the cases the SDP bodies are in INVITE and @@ -545,7 +535,7 @@ onreply_route[2] See rtpengine_offer() function example above for example. -5.4. rtpengine_delete([flags]) +5.4. rtpengine_delete([flags]) Tears down the RTPProxy session for the current call. @@ -559,7 +549,7 @@ onreply_route[2] rtpengine_delete(); ... -5.5. rtpengine_manage([flags]) +5.5. rtpengine_manage([flags]) Manage the RTPProxy session - it combines the functionality of rtpengine_offer(), rtpengine_answer() and rtpengine_delete(), detecting @@ -589,7 +579,7 @@ rtpengine_delete(); rtpengine_manage(); ... -5.6. start_recording() +5.6. start_recording() This function will send a signal to the RTP proxy to record the RTP stream on the RTP proxy. This function is not supported by Sipwise @@ -636,7 +626,7 @@ start_recording(); NOTE: if a RTP proxy is defined multiple times (in the same or diferente sete), all of its instances will be enables/disabled. - Example 1.14. nh_enable_rtpp usage + Example 1.14. nh_enable_rtpp usage ... $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0 ... @@ -648,7 +638,7 @@ $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0 No parameter. - Example 1.15. nh_show_rtpp usage + Example 1.15. nh_show_rtpp usage ... $ kamctl fifo nh_show_rtpp ... diff --git a/modules/rtpproxy/README b/modules/rtpproxy/README index e8a2094ec26..098af8fbd04 100644 --- a/modules/rtpproxy/README +++ b/modules/rtpproxy/README @@ -1,4 +1,3 @@ - rtpproxy Module Maxim Sobolev @@ -13,20 +12,12 @@ Edited by Maxim Sobolev -Edited by - Bogdan-Andrei Iancu -Edited by - Juha Heinanen -Edited by - Sas Ovidiu -Edited by - Carsten Bock ng-voice GmbH @@ -38,7 +29,7 @@ Carsten Bock Copyright 2009-2012 TuTPro Inc. Copyright 2010 VoIPEmbedded Inc. - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -67,17 +58,17 @@ Carsten Bock 5. Functions - 5.1. set_rtp_proxy_set(setid) - 5.2. rtpproxy_offer([flags [, ip_address]]) - 5.3. rtpproxy_answer([flags [, ip_address]]) - 5.4. rtpproxy_destroy([flags]) - 5.5. unforce_rtp_proxy() - 5.6. rtpproxy_manage([flags [, ip_address]]) - 5.7. rtpproxy_stream2uac(prompt_name, count), - 5.8. rtpproxy_stream2uas(prompt_name, count) - 5.9. rtpproxy_stop_stream2uac(), - 5.10. start_recording() - 5.11. rtpproxy_stop_stream2uas(prompt_name, count) + 5.1. set_rtp_proxy_set(setid) + 5.2. rtpproxy_offer([flags [, ip_address]]) + 5.3. rtpproxy_answer([flags [, ip_address]]) + 5.4. rtpproxy_destroy([flags]) + 5.5. unforce_rtp_proxy() + 5.6. rtpproxy_manage([flags [, ip_address]]) + 5.7. rtpproxy_stream2uac(prompt_name, count), + 5.8. rtpproxy_stream2uas(prompt_name, count) + 5.9. rtpproxy_stop_stream2uac(), + 5.10. start_recording() + 5.11. rtpproxy_stop_stream2uas(prompt_name, count) 6. Exported Pseudo Variables @@ -142,17 +133,17 @@ Chapter 1. Admin Guide 5. Functions - 5.1. set_rtp_proxy_set(setid) - 5.2. rtpproxy_offer([flags [, ip_address]]) - 5.3. rtpproxy_answer([flags [, ip_address]]) - 5.4. rtpproxy_destroy([flags]) - 5.5. unforce_rtp_proxy() - 5.6. rtpproxy_manage([flags [, ip_address]]) - 5.7. rtpproxy_stream2uac(prompt_name, count), - 5.8. rtpproxy_stream2uas(prompt_name, count) - 5.9. rtpproxy_stop_stream2uac(), - 5.10. start_recording() - 5.11. rtpproxy_stop_stream2uas(prompt_name, count) + 5.1. set_rtp_proxy_set(setid) + 5.2. rtpproxy_offer([flags [, ip_address]]) + 5.3. rtpproxy_answer([flags [, ip_address]]) + 5.4. rtpproxy_destroy([flags]) + 5.5. unforce_rtp_proxy() + 5.6. rtpproxy_manage([flags [, ip_address]]) + 5.7. rtpproxy_stream2uac(prompt_name, count), + 5.8. rtpproxy_stream2uas(prompt_name, count) + 5.9. rtpproxy_stop_stream2uac(), + 5.10. start_recording() + 5.11. rtpproxy_stop_stream2uas(prompt_name, count) 6. Exported Pseudo Variables @@ -165,37 +156,37 @@ Chapter 1. Admin Guide 1. Overview - This is a module that enables media streams to be proxied via an - rtpproxy. Rtpproxies know to work with this module are Sippy RTPproxy + This is a module that enables media streams to be proxied via an + rtpproxy. Rtpproxies know to work with this module are Sippy RTPproxy http://www.rtpproxy.org and ngcp-rtpproxy-ng - http://deb.sipwise.com/spce/2.6/pool/main/n/ngcp-mediaproxy-ng. Some - features of the rtpproxy module apply only to one of the two + http://deb.sipwise.com/spce/2.6/pool/main/n/ngcp-mediaproxy-ng. Some + features of the rtpproxy module apply only to one of the two rtpproxies. 2. Multiple RTPProxy usage - The rtpproxy module can support multiple rtpproxies for + The rtpproxy module can support multiple rtpproxies for balancing/distribution and control/selection purposes. - The module allows definition of several sets of rtpproxies. - Load-balancing will be performed over a set and the admin has the + The module allows definition of several sets of rtpproxies. + Load-balancing will be performed over a set and the admin has the ability to choose what set should be used. The set is selected via its - id - the id being defined with the set. Refer to the "rtpproxy_sock" + id - the id being defined with the set. Refer to the "rtpproxy_sock" module parameter definition for syntax description. - The balancing inside a set is done automatically by the module based - on the weight of each rtpproxy from the set. + The balancing inside a set is done automatically by the module based on + the weight of each rtpproxy from the set. - The selection of the set is done from script prior using + The selection of the set is done from script prior using unforce_rtp_proxy(), rtpproxy_offer() or rtpproxy_answer() functions - see the set_rtp_proxy_set() function. - For backward compatibility reasons, a set with no id take by default + For backward compatibility reasons, a set with no id take by default the id 0. Also if no set is explicitly set before unforce_rtp_proxy(), rtpproxy_offer() or rtpproxy_answer() the 0 id set will be used. - IMPORTANT: if you use multiple sets, take care and use the same set - for both rtpproxy_offer()/rtpproxy_answer() and unforce_rtpproxy()!! + IMPORTANT: if you use multiple sets, take care and use the same set for + both rtpproxy_offer()/rtpproxy_answer() and unforce_rtpproxy()!! 3. Dependencies @@ -210,7 +201,7 @@ Chapter 1. Admin Guide 3.2. External Libraries or Applications - The following libraries or applications must be installed before + The following libraries or applications must be installed before running Kamailio with this module loaded: * None. @@ -231,15 +222,15 @@ Chapter 1. Admin Guide 4.1. rtpproxy_sock (string) Used to define the list of RTPPRoxy instances to connect to. These can - be UNIX sockets or IPv4/IPv6 UDP sockets. Each modparam entry will - insert sockets into a single set. If no set ID is given, the default + be UNIX sockets or IPv4/IPv6 UDP sockets. Each modparam entry will + insert sockets into a single set. If no set ID is given, the default set ID '0' will be used. To define multiple sets add the set number at - the beginning of each parameter followed by '=='. Sockets can be - weighted by adding '=#' to a socket where # is an integer. A socket - with a weight of 2 will be chosen twice as often as one with a weight + the beginning of each parameter followed by '=='. Sockets can be + weighted by adding '=#' to a socket where # is an integer. A socket + with a weight of 2 will be chosen twice as often as one with a weight of 1. - Default value is "NONE" (disabled). + Default value is "NONE" (disabled). Example 1.1. Set rtpproxy_sock parameter ... @@ -259,11 +250,11 @@ modparam("rtpproxy", "rtpproxy_sock", 4.2. rtpproxy_disable_tout (integer) - Once RTPProxy was found unreachable and marked as disabled, the - rtpproxy module will not attempt to establish communication to - RTPProxy for rtpproxy_disable_tout seconds. + Once RTPProxy was found unreachable and marked as disabled, the + rtpproxy module will not attempt to establish communication to RTPProxy + for rtpproxy_disable_tout seconds. - Default value is "60". + Default value is "60". Example 1.2. Set rtpproxy_disable_tout parameter ... @@ -274,7 +265,7 @@ modparam("rtpproxy", "rtpproxy_disable_tout", 20) Timeout value in waiting for reply from RTPProxy. - Default value is "1". + Default value is "1". Example 1.3. Set rtpproxy_tout parameter ... @@ -283,10 +274,10 @@ modparam("rtpproxy", "rtpproxy_tout", 2) 4.4. rtpproxy_retr (integer) - How many times the module should retry to send and receive after + How many times the module should retry to send and receive after timeout was generated. - Default value is "5". + Default value is "5". Example 1.4. Set rtpproxy_retr parameter ... @@ -295,8 +286,8 @@ modparam("rtpproxy", "rtpproxy_retr", 2) 4.5. nortpproxy_str (string) - This parameter sets the SDP attribute used by rtpproxy to mark the - message's SDP attachemnt with information that it have already been + This parameter sets the SDP attribute used by rtpproxy to mark the + message's SDP attachemnt with information that it have already been changed. If empty string, no marker will be added or checked. @@ -305,7 +296,7 @@ Note The string must be a complete SDP line, including the EOH (\r\n). - Default value is "a=nortpproxy:yes\r\n". + Default value is "a=nortpproxy:yes\r\n". Example 1.5. Set nortpproxy_str parameter ... @@ -315,13 +306,13 @@ modparam("rtpproxy", "nortpproxy_str", "a=sdpmangled:yes\r\n") 4.6. timeout_socket (string) The parameter sets the RTP timeout socket, which is transmitted to the - RTP-Proxy. It will be used by the RTP proxy to signal back that a - media stream timed out. + RTP-Proxy. It will be used by the RTP proxy to signal back that a media + stream timed out. If it is an empty string, no timeout socket will be transmitted to the RTP-Proxy. - Default value is "" (nothing). + Default value is "" (nothing). Example 1.6. Set timeout_socket parameter ... @@ -330,15 +321,15 @@ modparam("rtpproxy", "timeout_socket", "xmlrpc:http://127.0.0.1:8000/RPC2") 4.7. ice_candidate_priority_avp (string) - If specified and if value of the avp value is not 0, rtpproxy_manage - function adds ICE relay candidate attributes to sdp stream(s) + If specified and if value of the avp value is not 0, rtpproxy_manage + function adds ICE relay candidate attributes to sdp stream(s) containing ICE candidate attributes. - If value of the avp is 1, added candidates have high priority. If - value of the avp is 2 (default), added candidates have low priority. + If value of the avp is 1, added candidates have high priority. If value + of the avp is 2 (default), added candidates have low priority. - There is no default value meaning that no ICE relay candidates are - added in any circumstance. + There is no default value meaning that no ICE relay candidates are + added in any circumstance. Example 1.7. Set ice_candidate_priority_avp parameter ... @@ -347,8 +338,8 @@ modparam("rtpproxy", "ice_candidate_priority_avp", "$avp(ice_priority)") 4.8. extra_id_pv (string) - The parameter sets the PV defination to use when the "b" parameter is - used on unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or + The parameter sets the PV defination to use when the "b" parameter is + used on unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or rtpproxy_manage() command. Default is empty, the "b" parameter may not be used then. @@ -360,9 +351,9 @@ modparam("rtpproxy", "extra_id_pv", "$avp(extra_id)") 4.9. db_url (string) - The database URL to load rtp_proxy sets from. If this parameter is - set, the module will attempt to load the rtpproxy sets from the - specified database and will ignore any 'rtpproxy_sock' modparams. + The database URL to load rtp_proxy sets from. If this parameter is set, + the module will attempt to load the rtpproxy sets from the specified + database and will ignore any 'rtpproxy_sock' modparams. Default is empty, a database will not be used. @@ -384,8 +375,8 @@ modparam("rtpproxy", "table_name", "my_rtpp_sets") 4.11. rtp_inst_pvar (string) - A pseudo variable to store the chosen RTPProxy address. If this - parameter is set, the instance URL will be stored in the given + A pseudo variable to store the chosen RTPProxy address. If this + parameter is set, the instance URL will be stored in the given variable. By default, this parameter is not set. @@ -407,26 +398,26 @@ xlog("L_INFO", "Chose rtpp instance $var(RTP_INSTANCE)\n"); 5. Functions - 5.1. set_rtp_proxy_set(setid) - 5.2. rtpproxy_offer([flags [, ip_address]]) - 5.3. rtpproxy_answer([flags [, ip_address]]) - 5.4. rtpproxy_destroy([flags]) - 5.5. unforce_rtp_proxy() - 5.6. rtpproxy_manage([flags [, ip_address]]) - 5.7. rtpproxy_stream2uac(prompt_name, count), - 5.8. rtpproxy_stream2uas(prompt_name, count) - 5.9. rtpproxy_stop_stream2uac(), - 5.10. start_recording() - 5.11. rtpproxy_stop_stream2uas(prompt_name, count) - -5.1. set_rtp_proxy_set(setid) - - Sets the Id of the rtpproxy set to be used for the next - unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or + 5.1. set_rtp_proxy_set(setid) + 5.2. rtpproxy_offer([flags [, ip_address]]) + 5.3. rtpproxy_answer([flags [, ip_address]]) + 5.4. rtpproxy_destroy([flags]) + 5.5. unforce_rtp_proxy() + 5.6. rtpproxy_manage([flags [, ip_address]]) + 5.7. rtpproxy_stream2uac(prompt_name, count), + 5.8. rtpproxy_stream2uas(prompt_name, count) + 5.9. rtpproxy_stop_stream2uac(), + 5.10. start_recording() + 5.11. rtpproxy_stop_stream2uas(prompt_name, count) + +5.1. set_rtp_proxy_set(setid) + + Sets the Id of the rtpproxy set to be used for the next + unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or rtpproxy_manage() command. The parameter can be an integer or a config variable holding an integer. - This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, + This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE. Example 1.13. set_rtp_proxy_set usage @@ -435,102 +426,101 @@ set_rtp_proxy_set("2"); rtpproxy_offer(); ... -5.2. rtpproxy_offer([flags [, ip_address]]) +5.2. rtpproxy_offer([flags [, ip_address]]) Rewrites SDP body to ensure that media is passed through an RTP proxy. - To be invoked on INVITE for the cases the SDPs are in INVITE and 200 - OK and on 200 OK when SDPs are in 200 OK and ACK. + To be invoked on INVITE for the cases the SDPs are in INVITE and 200 OK + and on 200 OK when SDPs are in 200 OK and ACK. Meaning of the parameters is as follows: * flags - flags to turn on some features. - + 1 - append first Via branch to Call-ID when sending command - to rtpproxy. This can be used to create one media session per - branch on the rtpproxy. When sending a subsequent "delete" - command to the rtpproxy, you can then stop just the session + + 1 - append first Via branch to Call-ID when sending command to + rtpproxy. This can be used to create one media session per + branch on the rtpproxy. When sending a subsequent "delete" + command to the rtpproxy, you can then stop just the session for a specific branch when passing the flag '1' or '2' in the - "unforce_rtpproxy", or stop all sessions for a call when not - passing one of those two flags there. This is especially - useful if you have serially forked call scenarios where - rtpproxy gets an "update" command for a new branch, and then - a "delete" command for the previous branch, which would - otherwise delete the full call, breaking the subsequent - "lookup" for the new branch. This flag is only supported by + "unforce_rtpproxy", or stop all sessions for a call when not + passing one of those two flags there. This is especially + useful if you have serially forked call scenarios where + rtpproxy gets an "update" command for a new branch, and then a + "delete" command for the previous branch, which would + otherwise delete the full call, breaking the subsequent + "lookup" for the new branch. This flag is only supported by the ngcp-mediaproxy-ng rtpproxy at the moment! - + 2 - append second Via branch to Call-ID when sending command + + 2 - append second Via branch to Call-ID when sending command to rtpproxy. See flag '1' for its meaning. - + 3 - behave like flag 1 is set for a request and like flag 2 - is set for a reply. - + a - flags that UA from which message is received doesn't + + 3 - behave like flag 1 is set for a request and like flag 2 is + set for a reply. + + a - flags that UA from which message is received doesn't support symmetric RTP. (automatically sets the 'r' flag) - + b - append branch specific variable to Call-ID when sending - command to rtpproxy. This creates one rtpproxy session per - unique variable. Works similar to the 1, 2 and 3 parameter, - but is usefull when forking to multiple destinations on - different address families or network segments, requiring - different rtpproxy parameters. The variable value is taken - from the "extra_id_pv". When used, it must be used in every - call to rtpproxy_manage(), rtpproxy_offer(), - rtpproxy_answer() and rtpproxy_destroy() with the same - contents of the PV. The b parameter may not be used in - conjunction with the 1, 2 or 3 parameter to use the Via - branch in the Call-ID. - + l - force "lookup", that is, only rewrite SDP when - corresponding session already exists in the RTP proxy. By + + b - append branch specific variable to Call-ID when sending + command to rtpproxy. This creates one rtpproxy session per + unique variable. Works similar to the 1, 2 and 3 parameter, + but is usefull when forking to multiple destinations on + different address families or network segments, requiring + different rtpproxy parameters. The variable value is taken + from the "extra_id_pv". When used, it must be used in every + call to rtpproxy_manage(), rtpproxy_offer(), rtpproxy_answer() + and rtpproxy_destroy() with the same contents of the PV. The b + parameter may not be used in conjunction with the 1, 2 or 3 + parameter to use the Via branch in the Call-ID. + + l - force "lookup", that is, only rewrite SDP when + corresponding session already exists in the RTP proxy. By default is on when the session is to be completed. - + i, e - these flags specify the direction of the SIP message. - These flags only make sense when rtpproxy is running in - bridge mode. 'i' means internal network (LAN), 'e' means - external network (WAN). 'i' corresponds to rtpproxy's first - interface, 'e' corresponds to rtpproxy's second interface. - You always have to specify two flags to define the incoming - network and the outgoing network. For example, 'ie' should be - used for SIP message received from the local interface and - sent out on the external interface, and 'ei' vice versa. - Other options are 'ii' and 'ee'. So, for example if a SIP - requests is processed with 'ie' flags, the corresponding - response must be processed with 'ie' flags. - Note: As rtpproxy in bridge mode s per default asymmetric, - you have to specify the 'w' flag for clients behind NAT! See - also above notes! - + x - this flag a shortcut for using the "ie" or "ei"-flags of - RTP-Proxy, in order to do automatic bridging between IPv4 on - the "internal network" and IPv6 on the "external network". - The distinction is done by the given IP in the SDP, e.g. a - IPv4 Address will always call "ie" to the RTPProxy (IPv4(i) - to IPv6(e)) and an IPv6Address will always call "ei" to the + + i, e - these flags specify the direction of the SIP message. + These flags only make sense when rtpproxy is running in bridge + mode. 'i' means internal network (LAN), 'e' means external + network (WAN). 'i' corresponds to rtpproxy's first interface, + 'e' corresponds to rtpproxy's second interface. You always + have to specify two flags to define the incoming network and + the outgoing network. For example, 'ie' should be used for SIP + message received from the local interface and sent out on the + external interface, and 'ei' vice versa. Other options are + 'ii' and 'ee'. So, for example if a SIP requests is processed + with 'ie' flags, the corresponding response must be processed + with 'ie' flags. + Note: As rtpproxy in bridge mode s per default asymmetric, you + have to specify the 'w' flag for clients behind NAT! See also + above notes! + + x - this flag a shortcut for using the "ie" or "ei"-flags of + RTP-Proxy, in order to do automatic bridging between IPv4 on + the "internal network" and IPv6 on the "external network". The + distinction is done by the given IP in the SDP, e.g. a IPv4 + Address will always call "ie" to the RTPProxy (IPv4(i) to + IPv6(e)) and an IPv6Address will always call "ei" to the RTPProxy (IPv6(e) to IPv4(i)). - Note: Please note, that this will only work properly with - non-dual-stack user-agents or with dual-stack clients - according to RFC6157 (which suggest ICE for Dual-Stack - implementations). This short-cut will not work properly with - RFC4091 (ANAT) compatible clients, which suggests having - different m-lines with different IP-protocols grouped + Note: Please note, that this will only work properly with + non-dual-stack user-agents or with dual-stack clients + according to RFC6157 (which suggest ICE for Dual-Stack + implementations). This short-cut will not work properly with + RFC4091 (ANAT) compatible clients, which suggests having + different m-lines with different IP-protocols grouped together. - + f - instructs rtpproxy to ignore marks inserted by another - rtpproxy in transit to indicate that the session is already - goes through another proxy. Allows creating a chain of + + f - instructs rtpproxy to ignore marks inserted by another + rtpproxy in transit to indicate that the session is already + goes through another proxy. Allows creating a chain of proxies. - + r - flags that IP address in SDP should be trusted. Without - this flag, rtpproxy ignores address in the SDP and uses - source address of the SIP message as media address which is - passed to the RTP proxy. - + o - flags that IP from the origin description (o=) should be + + r - flags that IP address in SDP should be trusted. Without + this flag, rtpproxy ignores address in the SDP and uses source + address of the SIP message as media address which is passed to + the RTP proxy. + + o - flags that IP from the origin description (o=) should be also changed. - + c - flags to change the session-level SDP connection (c=) IP + + c - flags to change the session-level SDP connection (c=) IP if media-description also includes connection information. - + w - flags that for the UA from which message is received, + + w - flags that for the UA from which message is received, support symmetric RTP must be forced. - + zNN - requests the RTPproxy to perform re-packetization of - RTP traffic coming from the UA which has sent the current - message to increase or decrease payload size per each RTP - packet forwarded if possible. The NN is the target payload - size in ms, for the most codecs its value should be in 10ms - increments, however for some codecs the increment could - differ (e.g. 30ms for GSM or 20ms for G.723). The RTPproxy - would select the closest value supported by the codec. This - feature could be used for significantly reducing bandwith - overhead for low bitrate codecs, for example with G.729 going - from 10ms to 100ms saves two thirds of the network bandwith. + + zNN - requests the RTPproxy to perform re-packetization of RTP + traffic coming from the UA which has sent the current message + to increase or decrease payload size per each RTP packet + forwarded if possible. The NN is the target payload size in + ms, for the most codecs its value should be in 10ms + increments, however for some codecs the increment could differ + (e.g. 30ms for GSM or 20ms for G.723). The RTPproxy would + select the closest value supported by the codec. This feature + could be used for significantly reducing bandwith overhead for + low bitrate codecs, for example with G.729 going from 10ms to + 100ms saves two thirds of the network bandwith. * ip_address - new SDP IP address. This function can be used from ANY_ROUTE. @@ -567,23 +557,23 @@ onreply_route[2] ... } -5.3. rtpproxy_answer([flags [, ip_address]]) +5.3. rtpproxy_answer([flags [, ip_address]]) Rewrites SDP body to ensure that media is passed through an RTP proxy. - To be invoked on 200 OK for the cases the SDPs are in INVITE and 200 - OK and on ACK when SDPs are in 200 OK and ACK. + To be invoked on 200 OK for the cases the SDPs are in INVITE and 200 OK + and on ACK when SDPs are in 200 OK and ACK. - See rtpproxy_answer() function description above for the meaning of - the parameters. + See rtpproxy_answer() function description above for the meaning of the + parameters. - This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, + This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE. Example 1.15. rtpproxy_answer usage See rtpproxy_offer() function example above for example. -5.4. rtpproxy_destroy([flags]) +5.4. rtpproxy_destroy([flags]) Tears down the RTPProxy session for the current call. @@ -591,60 +581,60 @@ onreply_route[2] Meaning of the parameters is as follows: * flags - flags to turn on some features. - + 1 - append first Via branch to Call-ID when sending command - to rtpproxy. This can be used to create one media session per - branch on the rtpproxy. When sending a subsequent "delete" - command to the rtpproxy, you can then stop just the session + + 1 - append first Via branch to Call-ID when sending command to + rtpproxy. This can be used to create one media session per + branch on the rtpproxy. When sending a subsequent "delete" + command to the rtpproxy, you can then stop just the session for a specific branch when passing the flag '1' or '2' in the - "unforce_rtpproxy", or stop all sessions for a call when not - passing one of those two flags there. This is especially - useful if you have serially forked call scenarios where - rtpproxy gets an "update" command for a new branch, and then - a "delete" command for the previous branch, which would - otherwise delete the full call, breaking the subsequent - "lookup" for the new branch. This flag is only supported by + "unforce_rtpproxy", or stop all sessions for a call when not + passing one of those two flags there. This is especially + useful if you have serially forked call scenarios where + rtpproxy gets an "update" command for a new branch, and then a + "delete" command for the previous branch, which would + otherwise delete the full call, breaking the subsequent + "lookup" for the new branch. This flag is only supported by the ngcp-mediaproxy-ng rtpproxy at the moment! - + 2 - append second Via branch to Call-ID when sending command + + 2 - append second Via branch to Call-ID when sending command to rtpproxy. See flag '1' for its meaning. - + b - append branch specific variable to Call-ID when sending - command to rtpproxy. See rtpproxy_offer() for details. + + b - append branch specific variable to Call-ID when sending + command to rtpproxy. See rtpproxy_offer() for details. - t - do not include To tag to "delete" command to rtpproxy - thus causing full call to be deleted. Useful for deleting - unused rtpproxy call when 200 OK is received on a branch, - where rtpproxy is not needed. + t - do not include To tag to "delete" command to rtpproxy thus + causing full call to be deleted. Useful for deleting unused + rtpproxy call when 200 OK is received on a branch, where + rtpproxy is not needed. Example 1.16. rtpproxy_destroy usage ... rtpproxy_destroy(); ... -5.5. unforce_rtp_proxy() +5.5. unforce_rtp_proxy() Same as rtpproxy_destroy(). -5.6. rtpproxy_manage([flags [, ip_address]]) +5.6. rtpproxy_manage([flags [, ip_address]]) - Manage the RTPProxy session - it combines the functionality of - rtpproxy_offer(), rtpproxy_answer() and unforce_rtpproxy(), detecting + Manage the RTPProxy session - it combines the functionality of + rtpproxy_offer(), rtpproxy_answer() and unforce_rtpproxy(), detecting internally based on message type and method which one to execute. - It can take the same parameters as rtpproxy_offer(). The flags - parameter to rtpproxy_manage() can be a configuration variable + It can take the same parameters as rtpproxy_offer(). The flags + parameter to rtpproxy_manage() can be a configuration variable containing the flags as a string. Functionality: * If INVITE with SDP, then do rtpproxy_offer() * If INVITE with SDP, when the tm module is loaded, mark transaction - with internal flag FL_SDP_BODY to know that the 1xx and 2xx are - for rtpproxy_answer() + with internal flag FL_SDP_BODY to know that the 1xx and 2xx are for + rtpproxy_answer() * If ACK with SDP, then do rtpproxy_answer() - * If BYE or CANCEL, or called within a FAILURE_ROUTE[], then do + * If BYE or CANCEL, or called within a FAILURE_ROUTE[], then do unforce_rtpproxy() * If reply to INVITE with code >= 300 do unforce_rtpproxy() - * If reply with SDP to INVITE having code 1xx and 2xx, then do - rtpproxy_answer() if the request had SDP or tm is not loaded, + * If reply with SDP to INVITE having code 1xx and 2xx, then do + rtpproxy_answer() if the request had SDP or tm is not loaded, otherwise do rtpproxy_offer() This function can be used from ANY_ROUTE. @@ -654,35 +644,35 @@ rtpproxy_destroy(); rtpproxy_manage(); ... -5.7. rtpproxy_stream2uac(prompt_name, count), +5.7. rtpproxy_stream2uac(prompt_name, count), - Instruct the RTPproxy to stream prompt/announcement pre-encoded with + Instruct the RTPproxy to stream prompt/announcement pre-encoded with the makeann command from the RTPproxy distribution. The uac/uas suffix - selects who will hear the announcement relatively to the current + selects who will hear the announcement relatively to the current transaction - UAC or UAS. For example invoking the rtpproxy_stream2uac - in the request processing block on ACK transaction will play the - prompt to the UA that has generated original INVITE and ACK while - rtpproxy_stop_stream2uas on 183 in reply processing block will play - the prompt to the UA that has generated 183. - - Apart from generating announcements, another possible application of - this function is implementing music on hold (MOH) functionality. When - count is -1, the streaming will be in loop indefinitely until the + in the request processing block on ACK transaction will play the prompt + to the UA that has generated original INVITE and ACK while + rtpproxy_stop_stream2uas on 183 in reply processing block will play the + prompt to the UA that has generated 183. + + Apart from generating announcements, another possible application of + this function is implementing music on hold (MOH) functionality. When + count is -1, the streaming will be in loop indefinitely until the appropriate rtpproxy_stop_stream2xxx is issued. - In order to work correctly, these functions require that a session in + In order to work correctly, these functions require that a session in the RTPproxy already exists. Also those functions don't alter the SDP, - so that they are not a substitute for calling rtpproxy_offer or + so that they are not a substitute for calling rtpproxy_offer or rtpproxy_answer. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE. Meaning of the parameters is as follows: - * prompt_name - name of the prompt to stream. Should be either - absolute pathname or pathname relative to the directory where + * prompt_name - name of the prompt to stream. Should be either + absolute pathname or pathname relative to the directory where RTPproxy runs. - * count - number of times the prompt should be repeated. A value of - -1 means that it will be streaming in a loop indefinitely, until + * count - number of times the prompt should be repeated. A value of + -1 means that it will be streaming in a loop indefinitely, until the appropriate rtpproxy_stop_stream2xxx is issued. Example 1.18. rtpproxy_stream2xxx usage @@ -697,23 +687,23 @@ rtpproxy_manage(); }; ... -5.8. rtpproxy_stream2uas(prompt_name, count) +5.8. rtpproxy_stream2uas(prompt_name, count) See function rtpproxy_stream2uac(prompt_name, count). -5.9. rtpproxy_stop_stream2uac(), +5.9. rtpproxy_stop_stream2uac(), - Stop streaming of announcement/prompt/MOH started previously by the - respective rtpproxy_stream2xxx. The uac/uas suffix selects whose + Stop streaming of announcement/prompt/MOH started previously by the + respective rtpproxy_stream2xxx. The uac/uas suffix selects whose announcement relatively to tha current transaction should be stopped - UAC or UAS. These functions can be used from REQUEST_ROUTE, ONREPLY_ROUTE. -5.10. start_recording() +5.10. start_recording() - This function will send a signal to the RTP-Proxy to record the RTP - stream on the RTP-Proxy. This function is only supported by Sippy + This function will send a signal to the RTP-Proxy to record the RTP + stream on the RTP-Proxy. This function is only supported by Sippy RTPproxy at the moment! This function can be used from REQUEST_ROUTE and ONREPLY_ROUTE. @@ -723,7 +713,7 @@ rtpproxy_manage(); start_recording(); ... -5.11. rtpproxy_stop_stream2uas(prompt_name, count) +5.11. rtpproxy_stop_stream2uas(prompt_name, count) See function rtpproxy_stop_stream2uac(prompt_name, count). @@ -734,9 +724,9 @@ start_recording(); 6.1. $rtpstat Returns the RTP-Statistics from the RTP-Proxy. The RTP-Statistics from - the RTP-Proxy are provided as a string and it does contain several - packet-counters. The statistics must be retrieved before the session - is deleted (before unforce_rtpproxy()). + the RTP-Proxy are provided as a string and it does contain several + packet-counters. The statistics must be retrieved before the session is + deleted (before unforce_rtpproxy()). Example 1.20. $rtpstat-Usage ... @@ -750,30 +740,30 @@ start_recording(); 7.1. nh_enable_rtpp - Enables a rtp proxy if parameter value is greater than 0. Disables it + Enables a rtp proxy if parameter value is greater than 0. Disables it if a zero value is given. - The first parameter is the rtp proxy url (exactly as defined in the + The first parameter is the rtp proxy url (exactly as defined in the config file). The second parameter value must be a number in decimal. - NOTE: if a rtpproxy is defined multiple times (in the same or - different sets), all of its instances will be enabled/disabled. + NOTE: if a rtpproxy is defined multiple times (in the same or different + sets), all of its instances will be enabled/disabled. - Example 1.21. nh_enable_rtpp usage + Example 1.21. nh_enable_rtpp usage ... $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0 ... 7.2. nh_show_rtpp - Displays all the rtp proxies and their information: set and status + Displays all the rtp proxies and their information: set and status (disabled or not, weight and recheck_ticks). No parameter. - Example 1.22. nh_show_rtpp usage + Example 1.22. nh_show_rtpp usage ... $ kamctl fifo nh_show_rtpp ... diff --git a/modules/sca/README b/modules/sca/README index 7ca1b4c4ccd..99fb1f36003 100644 --- a/modules/sca/README +++ b/modules/sca/README @@ -256,7 +256,7 @@ modparam( "sca", "db_update_interval", 120 ) 4.1. sca_handle_subscribe() 4.2. sca_call_info_update() -4.1. sca_handle_subscribe() +4.1. sca_handle_subscribe() The function handling call-info and line-seize SUBSCRIBE requests. It stores or updates the subscriptions in shared memory, and sends NOTIFYs @@ -284,7 +284,7 @@ if ( is_method( "SUBSCRIBE" )) { } ... -4.2. sca_call_info_update() +4.2. sca_call_info_update() The sca_call_info_update function updates call state for SCA appearances. If a request or response packet contains a Call-Info diff --git a/modules/sdpops/README b/modules/sdpops/README index 74b049d9d7a..43b442f3b56 100644 --- a/modules/sdpops/README +++ b/modules/sdpops/README @@ -126,7 +126,7 @@ Chapter 1. Admin Guide 3. Parameters - The module does not export any config parameter yet. + The module does not export any config parameters yet. 4. Functions diff --git a/modules/seas/README b/modules/seas/README index abffbd8bc80..25a0a19c351 100644 --- a/modules/seas/README +++ b/modules/seas/README @@ -11,7 +11,7 @@ Elias Baixas www.voztele.com - Copyright © 2006 VozTelecom Sistemas + Copyright 2006 VozTelecom Sistemas __________________________________________________________________ Table of Contents @@ -348,7 +348,7 @@ t_reply("500","App Server not connected"); Server, which is in charge of making it reach back to the user. The Application Server implements the network protocol, it takes care of everything needed for a proper communication between user and server, - so the servlet doesn’t have to care about these things. The servlet + so the servlet doesn't have to care about these things. The servlet uses a set of resources from the Application Server, such as Session management, service routing or chaining, and request/response header composition. @@ -462,7 +462,7 @@ ServletException, IOException SipServlet UML diagram The Servlet programming language is JAVA, which offers a wide spectrum - of programming API’s dealing with all kinds of techniques, tools and + of programming API's dealing with all kinds of techniques, tools and resources, which also are available seamlessly from the Servlet context. @@ -488,7 +488,7 @@ ServletException, IOException Convergence of SIP and HTTP protocols into the same Application Server offers, amongst others, the following key advantages: - -It doesn’t require to have 2 different servers (Http and Sip) so it + -It doesn't require to have 2 different servers (Http and Sip) so it relieves from maintenance problems, and eases user and configuration provisioning. @@ -521,7 +521,7 @@ ServletException, IOException -Click-to-dial: users could initiate SIP sessions only by clicking a link on a web page, without the need of the Web-Browser being SIP-aware nor needing even a SIP phone: the server could handle all the logic so - the user who clicked could receive a call from the server’s SIP + the user who clicked could receive a call from the server's SIP network. 2.2. Configuring WeSIP to work with SEAS @@ -1016,10 +1016,10 @@ Chapter 2. Developer Guide members: name, version, transport, host, proto, port, port_str, params, comment, received, rport, etc. each of these members gives quick access to each of the parts of the header. For example, a via header like - this: “Via: SIP/2.0/UDP 192.168.1.64:5070;branch=z9hG4bK-c02c60cc” - would have the member proto pointing to the “U” of “UDP”, and a length - of 3, the host member would be pointing to “192.168.1.64” and have a - length of 12, the branch member would be pointing to “z9hG4bK-c02c60cc” + this: "Via: SIP/2.0/UDP 192.168.1.64:5070;branch=z9hG4bK-c02c60cc" + would have the member proto pointing to the "U" of "UDP", and a length + of 3, the host member would be pointing to "192.168.1.64" and have a + length of 12, the branch member would be pointing to "z9hG4bK-c02c60cc" and a length of 16, and so on. This structure is the result of the parsing. All this meta-information @@ -1161,7 +1161,7 @@ Chapter 2. Developer Guide two past the end of the URI, so that the length of the last header can be computed. - The reason to have the “other parameters” and headers flags at the + The reason to have the "other parameters" and headers flags at the beginning (just after the strictly URI stuff), is that it will be necessary to know the length of the parameters section and the headers section. The parameters can appear in an arbitrary order, they won't be @@ -1206,7 +1206,7 @@ Chapter 2. Developer Guide 2.2.5. Codification of Accept and Content-Type headers These two kinds of headers carry mime type and subtype definitions in - the form “type/subtype” (ie. text/xml, application/sdp or whatever). + the form "type/subtype" (ie. text/xml, application/sdp or whatever). For internal handling of this headers, SER codifies the known types and subtypes into a single 32 bit integer, with the highest two bytes giving the mime type, and the lowest two bytes giving the subtype. @@ -1374,7 +1374,7 @@ Chapter 2. Developer Guide } - this would let in the “results” array all the indexes in the headers + this would let in the "results" array all the indexes in the headers table that refer to a Route header. Then, the Route codification for each of the headers could be reached thanks to the two-byte unsigned integer that follows each of the header identifiers. @@ -1423,7 +1423,7 @@ Chapter 2. Developer Guide RequestIn events: they start with the Action length in bytes, then follows a byte giving the type of action, then follows the Hash Index and the Label associated with the transaction that is being replied, - and finally the SIP Message in raw format. It doesn’t use the SEAS + and finally the SIP Message in raw format. It doesn't use the SEAS codification described above, because SER can easily parse the JAIN provided Response to process it and send it out, so the pre-parsing is not needed in that direction. @@ -1431,7 +1431,7 @@ Chapter 2. Developer Guide In order to generate Client Transactions, that is, sending SIP Requests out, JAIN utilizes another kind of action called Seas Request Action. In this case, when JAIN generates the Request to be sent out, it - doesn’t have any means to know the transaction identifier (hash index + doesn't have any means to know the transaction identifier (hash index and label) that will be assigned to it by SER, so a new mechanism has bee implemented to correlate JAIN requests to SER transactions. Basically, JAIN-SIP assigns a unique identifier (an integer) that is diff --git a/modules/sipcapture/README b/modules/sipcapture/README index 9f3be3613c8..80f667630fc 100644 --- a/modules/sipcapture/README +++ b/modules/sipcapture/README @@ -10,9 +10,9 @@ Alexandr Dubovikov - Copyright © 2011 QSC AG + Copyright 2011 QSC AG - Copyright © 2011 http://www.qsc.de + Copyright 2011 http://www.qsc.de __________________________________________________________________ Table of Contents @@ -426,7 +426,7 @@ modparam("sipcapture", "insert_retry_timeout", 10) + on + off The parameter is optional - if missing, the command will return the - status of the SIP message capturing (as string “on” or “off” ) + status of the SIP message capturing (as string "on" or "off" ) without changing anything. MI FIFO Command Format: @@ -446,7 +446,7 @@ modparam("sipcapture", "insert_retry_timeout", 10) * on or off: turns on/off SIP message capturing. Possible values are: + on + off - * “check” does not change sipcapture status, just reports the current + * "check" does not change sipcapture status, just reports the current status. 6. Database setup diff --git a/modules/sipt/README b/modules/sipt/README index a129e6f052b..a6e845a12aa 100644 --- a/modules/sipt/README +++ b/modules/sipt/README @@ -5,7 +5,7 @@ Torrey Searle Voxbone SA - Copyright © 2013 Voxbone SA + Copyright 2013 Voxbone SA __________________________________________________________________ Table of Contents @@ -102,9 +102,9 @@ Chapter 1. Admin Guide 3.1. sipt_destination(destination, hops, nai) updates the IAM in the body if it exists, setting the called party - number to “destination” with the nature address specified in “nai” and + number to "destination" with the nature address specified in "nai" and decrementing the hop counter value if present. If the hop counter - header is missing it will be added with the value of “hops”. + header is missing it will be added with the value of "hops". Example 1.1. sipt_destination(destination, hops, nai) usage ... @@ -117,9 +117,9 @@ sipt_destination($rU, 31, 4); 3.2. sipt_set_calling(origin, nai, presentation, screening) updates the IAM in the body if it exists, setting (or adding) the - calling party number to “origin” with the nature address specified in - “nai” and setting the presentation and screening values to - “presentation” and “screening”. + calling party number to "origin" with the nature address specified in + "nai" and setting the presentation and screening values to + "presentation" and "screening". Example 1.2. sipt_set_calling(origin, nai, presentation, screening) usage diff --git a/modules/siptrace/README b/modules/siptrace/README index 5dfa7a76691..0d52abaef73 100644 --- a/modules/siptrace/README +++ b/modules/siptrace/README @@ -10,15 +10,13 @@ Alexandr Dubovikov -Edited by - Daniel-Constantin Mierla - Copyright (c) 2010 asipto.com + Copyright 2010 asipto.com - Copyright (c) 2006 voice-system.ro + Copyright 2006 voice-system.ro __________________________________________________________________ Table of Contents @@ -424,7 +422,7 @@ modparam("siptrace", "force_send_sock", "sip:10.1.1.2:5000") 4.1. sip_trace([address]) -4.1. sip_trace([address]) +4.1. sip_trace([address]) Store or forward the current processed SIP message in database. It is stored in the form prior applying changes made to it. @@ -449,7 +447,7 @@ sip_trace("sip:10.1.1.2:5085"); 5.1. sip_trace -5.1. sip_trace +5.1. sip_trace Name: sip_trace @@ -470,7 +468,7 @@ sip_trace("sip:10.1.1.2:5085"); 6.1. siptrace.status param -6.1. siptrace.status param +6.1. siptrace.status param Name: siptrace.status diff --git a/modules/siputils/README b/modules/siputils/README index 978d0c47989..d320968ef91 100644 --- a/modules/siputils/README +++ b/modules/siputils/README @@ -32,12 +32,8 @@ Edited by Jan Janak -Edited by - Bogdan-Andrei Iancu -Edited by - Gabriel Vasile Copyright 2008, 2005, 2003 1&1 Internet AG, FhG Fokus, Voice Sistem diff --git a/modules/sms/README b/modules/sms/README index 316846e378f..af8034e0e9d 100644 --- a/modules/sms/README +++ b/modules/sms/README @@ -1,4 +1,3 @@ - SMS Module Bogdan Iancu @@ -6,7 +5,7 @@ Bogdan Iancu FhG FOKUS Copyright 2003 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -32,8 +31,8 @@ Bogdan Iancu 4. Functions - 4.1. sms_send_msg_to_net(network_name) - 4.2. sms_send_msg() + 4.1. sms_send_msg_to_net(network_name) + 4.2. sms_send_msg() List of Examples @@ -72,8 +71,8 @@ Chapter 1. Admin Guide 4. Functions - 4.1. sms_send_msg_to_net(network_name) - 4.2. sms_send_msg() + 4.1. sms_send_msg_to_net(network_name) + 4.2. sms_send_msg() 1. Overview @@ -81,54 +80,54 @@ Chapter 1. Admin Guide 1.2. Numbering Plan 1.3. Address Mapping - This module provides a way of communication between SIP network (via + This module provides a way of communication between SIP network (via SIP MESSAGE) and GSM networks (via ShortMessageService). Communication - is possible from SIP to SMS and vice versa. The module provides - facilities like SMS confirmation--the gateway can confirm to the SIP - user if his message really reached its destination as a SMS--or - multi-part messages--if a SIP messages is too long it will be split - and sent as multiple SMS. - - Errors occurred because of an invalid number or a too long message or - because of an internal modem malfunction are reported back to the SIP + is possible from SIP to SMS and vice versa. The module provides + facilities like SMS confirmation--the gateway can confirm to the SIP + user if his message really reached its destination as a SMS--or + multi-part messages--if a SIP messages is too long it will be split and + sent as multiple SMS. + + Errors occurred because of an invalid number or a too long message or + because of an internal modem malfunction are reported back to the SIP user via a SIP message containing explanations regarding the error. 1.1. Hardware Requirements - The SMS module needs a GSM modem to be able to send/receive the SMS - messages. Usually, this kind of modems are externals, linked to the - machine via serial cable. The modem can be a dedicated one (as the - ones provided by FALCOM) or can be a GSM telephone that has an - internal modem (as the latest mobile phones from NOKIA and ERICSSON). + The SMS module needs a GSM modem to be able to send/receive the SMS + messages. Usually, this kind of modems are externals, linked to the + machine via serial cable. The modem can be a dedicated one (as the ones + provided by FALCOM) or can be a GSM telephone that has an internal + modem (as the latest mobile phones from NOKIA and ERICSSON). 1.2. Numbering Plan - The gateway accepts and advertises phone numbers in international - format, more specific like: +(international code)(area code)(number). - Ex: Germany, D1 = +49 170 5678181 Romania, Connex = +40 722 123456 A - number in this format is expected to be placed as username into RURI - or in the To header. If RURI misses the username, the To header will - be consider. Also, the gateway will advertise in this format the - username in Contact headers (in SIP replies and requests) and in From - headers (in SIP requests). + The gateway accepts and advertises phone numbers in international + format, more specific like: +(international code)(area code)(number). + Ex: Germany, D1 = +49 170 5678181 Romania, Connex = +40 722 123456 A + number in this format is expected to be placed as username into RURI or + in the To header. If RURI misses the username, the To header will be + consider. Also, the gateway will advertise in this format the username + in Contact headers (in SIP replies and requests) and in From headers + (in SIP requests). 1.3. Address Mapping - To identify the destination number of the SMS, the gateway expects to - have a mobile number in username of the SIP destination address (for - example sip:+401704678811@iptel.org). For the reverse direction, - because the gateway has only one GSM number, the destination SIP - address has to be encapsulated into the SMS body. The gateway expects - to find a SIP address at the beginning of the SMS body in - "sip:user.host" format. Everything before the SIP address will be - discarded, the useful text begins exactly after the address (for - example SMS="For sip:user@host hello world!!" -> SIP="hello world"), - view configuration for disable this behavior (modems parameters 's' y - 't'). In order to facilitate replying, the gateway sends all the SMS - messages with a header containing the source SIP address in the - following format: "From sip:user@host (if you reply DONOT remove - it)". When an SMS-reply is received having this header (all - of it or truncated at the end), the header will be left out (it will + To identify the destination number of the SMS, the gateway expects to + have a mobile number in username of the SIP destination address (for + example sip:+401704678811@iptel.org). For the reverse direction, + because the gateway has only one GSM number, the destination SIP + address has to be encapsulated into the SMS body. The gateway expects + to find a SIP address at the beginning of the SMS body in + "sip:user.host" format. Everything before the SIP address will be + discarded, the useful text begins exactly after the address (for + example SMS="For sip:user@host hello world!!" -> SIP="hello world"), + view configuration for disable this behavior (modems parameters 's' y + 't'). In order to facilitate replying, the gateway sends all the SMS + messages with a header containing the source SIP address in the + following format: "From sip:user@host (if you reply DONOT remove + it)". When an SMS-reply is received having this header (all + of it or truncated at the end), the header will be left out (it will not be in the SIP message). 2. Dependencies @@ -156,22 +155,22 @@ list_of_params = modem_param *( ";" modem_param ) modem_param = name "=" value The following parameters can be used: - * d=device (mandatory) - Device associated with modem (/dev/ttyS0, + * d=device (mandatory) - Device associated with modem (/dev/ttyS0, /dev/modem, etc.). * p=pin (optional) - SIM PIN - default is NULL. * m=mode (optional) - Modem working mode ("ASCII","OLD","DIGICOM","NEW"). Default value is "NEW". - * c=SMS_Center (optional) - SMS center number for that modem. - Default is the SMS center set on the SIM card. + * c=SMS_Center (optional) - SMS center number for that modem. Default + is the SMS center set on the SIM card. * b=baudrate (optional) - Default is 19600. - * r=retry (optional) - How many times to try to re-send a SMS that + * r=retry (optional) - How many times to try to re-send a SMS that reported error. Default is twice. - * l=looping (optional) - Time for modem to wait before performing a + * l=looping (optional) - Time for modem to wait before performing a new check for incomimg/outgoing SMS/SIP_MSG. Default is 20. * t=to (optional) - uri for sip header TO. Default is NULL. * s=scan (optional) - Values: 0: NOT SCAN uri from body sms, use URI - in t=to. 1: SCAN uri from body sms (normal mode, default mode, - clasic mode) 2: SCAN MIX (both modes), First SCAN Default is 1 + in t=to. 1: SCAN uri from body sms (normal mode, default mode, + clasic mode) 2: SCAN MIX (both modes), First SCAN Default is 1 (SCAN). Note @@ -194,14 +193,14 @@ list_of_params = set_param *( ";" set_param ) set_param = name "=" value The following parameters can be used: - * m=msx_sms_per_call (optional) - Maximum number of SMS send / - received from that net in one modem loop. Default is 10. This + * m=msx_sms_per_call (optional) - Maximum number of SMS send / + received from that net in one modem loop. Default is 10. This parameter was introduced to avoid starvation. - Example of the starvation--a modem can send SMS for more than 1 - networks. If you have a huge number of SMS for the first network - and the number of incoming SIP messages is equal to the sent SMS - per same unit of time, the modem will never get to send SMS for - the next networks. + Example of the starvation--a modem can send SMS for more than 1 + networks. If you have a huge number of SMS for the first network + and the number of incoming SIP messages is equal to the sent SMS + per same unit of time, the modem will never get to send SMS for the + next networks. Note @@ -229,14 +228,14 @@ modparam("sms", "links", "NOKIA[D1;d2]") ... The modem NOKIA will send SMS from D1 and D2 net (in this order !). if - in a net queue are more then max_sms_per_call SMS the modem will not + in a net queue are more then max_sms_per_call SMS the modem will not sleep before starting the next loop ! Shortly, if messages are waiting to be sent, the modem will not go in sleep. 3.4. default_net (string) - The default network to use. If no one specified, the first defined - network is used. This parameter is useful only if the "sms_send_msg" + The default network to use. If no one specified, the first defined + network is used. This parameter is useful only if the "sms_send_msg" exported function is used (see Section 4, "Functions"). Example 1.4. Set default_net parameter @@ -246,7 +245,7 @@ modparam("sms", "default_net", "D1") 3.5. max_sms_parts (integer) - Shows in how many parts (SMS messages) a SIP message can be split. If + Shows in how many parts (SMS messages) a SIP message can be split. If exceeded, the SIP message will be sent truncated and the SIP user will get back another message containing the unsent part. @@ -259,9 +258,9 @@ modparam("sms", "max_sms_parts", 10) 3.6. domain_str (string) - Specify a fake domain name to be used by the gateway. The Contact - headers and the From header from request will be construct based on - this fake domain name. It's useful when the gateway is transparently + Specify a fake domain name to be used by the gateway. The Contact + headers and the From header from request will be construct based on + this fake domain name. It's useful when the gateway is transparently hidden behind a proxy/register (located on different machines). Default is the name of the machine the gateway is running on. @@ -285,14 +284,14 @@ modparam("sms", "use_contact", 1) 3.8. sms_report_type (integer) - If the modem should ask for SMS confirmation from the SMS Center. If - the SMSC reply with an error code, the gateway will send back to SIP - user a SIP message containing the text (or part of it) that couldn't - be send. Two report mechanisms are implemented: + If the modem should ask for SMS confirmation from the SMS Center. If + the SMSC reply with an error code, the gateway will send back to SIP + user a SIP message containing the text (or part of it) that couldn't be + send. Two report mechanisms are implemented: * 1 - the reports are delivered by the GSM device as SMS reports (so far supported only by Nokia modems); - * 2 - the reports are delivered as async. CDS responses (supported - by almost all modems, except Ericsson). + * 2 - the reports are delivered as async. CDS responses (supported by + almost all modems, except Ericsson). Default is 0 (no report). @@ -303,12 +302,12 @@ modparam("sms", "sms_report_type", 1) 4. Functions - 4.1. sms_send_msg_to_net(network_name) - 4.2. sms_send_msg() + 4.1. sms_send_msg_to_net(network_name) + 4.2. sms_send_msg() -4.1. sms_send_msg_to_net(network_name) +4.1. sms_send_msg_to_net(network_name) - Put the SIP msg in the specified network queue. The function return + Put the SIP msg in the specified network queue. The function return error if the number encapsulated into SIP message is malformed, if the content_type is incorrect or because of some internal failures. @@ -334,7 +333,7 @@ if (sms_send_msg_to_net("D1")) }; ... -4.2. sms_send_msg() +4.2. sms_send_msg() The same as the previous one, but use the default network queue. diff --git a/modules/snmpstats/README b/modules/snmpstats/README index 12d2c3189b6..affa52f3bd6 100644 --- a/modules/snmpstats/README +++ b/modules/snmpstats/README @@ -8,8 +8,6 @@ Edited by Jeffrey Magder -Edited by - Olle E. Johansson Copyright 2006 SOMA Networks, Inc. diff --git a/modules/textops/README b/modules/textops/README index 711d9826bd4..9bebfb6f630 100644 --- a/modules/textops/README +++ b/modules/textops/README @@ -11,19 +11,15 @@ Andrei Pelinescu-Onciul -Edited by - Daniel-Constantin Mierla -Edited by - Juha Heinanen - Copyright © 2003 FhG FOKUS + Copyright 2003 FhG FOKUS __________________________________________________________________ Table of Contents @@ -203,7 +199,7 @@ Chapter 1. Admin Guide 1.1. Known Limitations - search ignores folded lines. For example, search(“(From|f):.*@foo.bar”) + search ignores folded lines. For example, search("(From|f):.*@foo.bar") doesn't match the following From header field: From: medabeda ;tag=1234 @@ -266,7 +262,7 @@ From: medabeda 3.38. append_body_part(txt,content_type[, content_disposition]) 3.39. remove_body_part(content_type) -3.1. search(re) +3.1. search(re) Searches for the re in the message. @@ -281,7 +277,7 @@ From: medabeda if ( search("[Ss][Ii][Pp]") ) { /*....*/ }; ... -3.2. search_body(re) +3.2. search_body(re) Searches for the re in the body of the message. @@ -296,7 +292,7 @@ if ( search("[Ss][Ii][Pp]") ) { /*....*/ }; if ( search_body("[Ss][Ii][Pp]") ) { /*....*/ }; ... -3.3. search_hf(hf, re, flags) +3.3. search_hf(hf, re, flags) Searches for the re in the body of a header field. @@ -315,7 +311,7 @@ if ( search_body("[Ss][Ii][Pp]") ) { /*....*/ }; if ( search_hf("From", ":test@", "a") ) { /*....*/ }; ... -3.4. search_append(re, txt) +3.4. search_append(re, txt) Searches for the first match of re and appends txt after it. @@ -331,7 +327,7 @@ if ( search_hf("From", ":test@", "a") ) { /*....*/ }; search_append("[Oo]pen[Ss]er", " SIP Proxy"); ... -3.5. search_append_body(re, txt) +3.5. search_append_body(re, txt) Searches for the first match of re in the body of the message and appends txt after it. @@ -348,7 +344,7 @@ search_append("[Oo]pen[Ss]er", " SIP Proxy"); search_append_body("[Oo]pen[Ss]er", " SIP Proxy"); ... -3.6. replace(re, txt) +3.6. replace(re, txt) Replaces the first occurrence of re with txt. @@ -364,7 +360,7 @@ search_append_body("[Oo]pen[Ss]er", " SIP Proxy"); replace("openser", "Kamailio SIP Proxy"); ... -3.7. replace_body(re, txt) +3.7. replace_body(re, txt) Replaces the first occurrence of re in the body of the message with txt. @@ -381,7 +377,7 @@ replace("openser", "Kamailio SIP Proxy"); replace_body("openser", "Kamailio SIP Proxy"); ... -3.8. replace_all(re, txt) +3.8. replace_all(re, txt) Replaces all occurrence of re with txt. @@ -397,7 +393,7 @@ replace_body("openser", "Kamailio SIP Proxy"); replace_all("openser", "Kamailio SIP Proxy"); ... -3.9. replace_body_all(re, txt) +3.9. replace_body_all(re, txt) Replaces all occurrence of re in the body of the message with txt. Matching is done on a per-line basis. @@ -414,7 +410,7 @@ replace_all("openser", "Kamailio SIP Proxy"); replace_body_all("openser", "Kamailio SIP Proxy"); ... -3.10. replace_body_atonce(re, txt) +3.10. replace_body_atonce(re, txt) Replaces all occurrence of re in the body of the message with txt. Matching is done over the whole body. @@ -433,7 +429,7 @@ if(has_body() && replace_body_atonce("^.+$", "")) remove_hf("Content-Type"); ... -3.11. subst('/re/repl/flags') +3.11. subst('/re/repl/flags') Replaces re with repl (sed or perl like). @@ -454,12 +450,12 @@ if(has_body() && replace_body_atonce("^.+$", "")) if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1\u\2/ig') ) {}; # replace the uri in to: with the value of avp sip_address (just an example) -if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig') -) {}; +if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig') ) + {}; ... -3.12. subst_uri('/re/repl/flags') +3.12. subst_uri('/re/repl/flags') Runs the re substitution on the message uri (like subst but works only on the uri) @@ -483,12 +479,11 @@ if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:3463\1@\2;orig_uri=\0/i')){$ # adds the avp 'uri_prefix' as prefix to numeric uris, and save the original # uri (\0 match) as a parameter: orig_uri (just an example) -if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:$avp(uri_prefix)\1@\2;orig_uri=\0/i')){ -$ +if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:$avp(uri_prefix)\1@\2;orig_uri=\0/i')){$ ... -3.13. subst_user('/re/repl/flags') +3.13. subst_user('/re/repl/flags') Runs the re substitution on the message uri (like subst_uri but works only on the user portion of the uri) @@ -515,7 +510,7 @@ if (subst_user('/(.*)3642$/$avp(user_prefix)\13642/')){$ ... -3.14. subst_body('/re/repl/flags') +3.14. subst_body('/re/repl/flags') Replaces re with repl (sed or perl like) in the body of the message. @@ -536,7 +531,7 @@ if ( subst_body('/^o=(.*) /o=$fU /') ) {}; ... -3.15. subst_hf(hf, subexp, flags) +3.15. subst_hf(hf, subexp, flags) Perl-like substitutions in the body of a header field. @@ -556,7 +551,7 @@ if ( subst_body('/^o=(.*) /o=$fU /') ) {}; if ( subst_hf("From", "/:test@/:best@/", "a") ) { /*....*/ }; ... -3.16. set_body(txt,content_type) +3.16. set_body(txt,content_type) Set body to a SIP message. @@ -573,7 +568,7 @@ if ( subst_hf("From", "/:test@/:best@/", "a") ) { /*....*/ }; set_body("test", "text/plain"); ... -3.17. set_reply_body(txt,content_type) +3.17. set_reply_body(txt,content_type) Set body to a SIP reply to be generated by Kamailio. @@ -590,7 +585,7 @@ set_body("test", "text/plain"); set_reply_body("test", "text/plain"); ... -3.18. filter_body(content_type) +3.18. filter_body(content_type) Filters multipart/mixed body by leaving out all other body parts except the first body part of given type. @@ -613,7 +608,7 @@ if (has_body("multipart/mixed")) { } ... -3.19. append_to_reply(txt) +3.19. append_to_reply(txt) Append txt as header to the reply. @@ -629,7 +624,7 @@ append_to_reply("Foo: bar\r\n"); append_to_reply("Foo: $rm at $Ts\r\n"); ... -3.20. append_hf(txt[, hdr]) +3.20. append_hf(txt[, hdr]) Appends 'txt' as header after first header field or after last 'hdr' header field. @@ -648,7 +643,7 @@ append_hf("P-hint: VOICEMAIL\r\n"); append_hf("From-username: $fU\r\n", "Call-ID"); ... -3.21. insert_hf(txt[, hdr]) +3.21. insert_hf(txt[, hdr]) Inserts 'txt' as header before the first header field or before first 'hdr' header field if 'hdr' is given. @@ -669,7 +664,7 @@ insert_hf("P-hint: VOICEMAIL\r\n", "Call-ID"); insert_hf("To-username: $tU\r\n", "Call-ID"); ... -3.22. append_urihf(prefix, suffix) +3.22. append_urihf(prefix, suffix) Append header field name with original Request-URI in middle. @@ -685,14 +680,14 @@ insert_hf("To-username: $tU\r\n", "Call-ID"); append_urihf("CC-Diversion: ", "\r\n"); ... -3.23. is_present_hf(hf_name) +3.23. is_present_hf(hf_name) Return true if a header field is present in message. Note The function is also able to distinguish the compact names. For exmaple - “From” will match with “f” + "From" will match with "f" Meaning of the parameters is as follows: * hf_name - Header field name.(long or compact form) @@ -705,7 +700,7 @@ Note if (is_present_hf("From")) log(1, "From HF Present"); ... -3.24. is_present_hf_re(hf_name_re) +3.24. is_present_hf_re(hf_name_re) Return true if a header field whose name matches regular expression 'hf_name_re' is present in message. @@ -721,12 +716,12 @@ if (is_present_hf("From")) log(1, "From HF Present"); if (is_present_hf_re("^P-")) log(1, "There are headers starting with P-\n"); ... -3.25. append_time() +3.25. append_time() Adds a time header to the reply of the request. You must use it before functions that are likely to send a reply, e.g., save() from - 'registrar' module. Header format is: “Date: %a, %d %b %Y %H:%M:%S - GMT”, with the legend: + 'registrar' module. Header format is: "Date: %a, %d %b %Y %H:%M:%S + GMT", with the legend: * %a abbreviated week of day name (locale) * %d day of month as decimal number * %b abbreviated month name (locale) @@ -745,10 +740,10 @@ if (is_present_hf_re("^P-")) log(1, "There are headers starting with P-\n"); append_time(); ... -3.26. append_time_to_request() +3.26. append_time_to_request() - Adds a time header to the request. Header format is: “Date: %a, %d %b - %Y %H:%M:%S GMT”, with the legend: + Adds a time header to the request. Header format is: "Date: %a, %d %b + %Y %H:%M:%S GMT", with the legend: * %a abbreviated week of day name (locale) * %d day of month as decimal number * %b abbreviated month name (locale) @@ -768,7 +763,7 @@ if(!is_present_hf("Date")) append_time_to_request(); ... -3.27. is_method(name) +3.27. is_method(name) Check if the method of the message matches the name. If name is a known method (invite, cancel, ack, bye, options, info, update, register, @@ -805,9 +800,9 @@ if(is_method("OPTION|UPDATE")) } ... -3.28. remove_hf(hname) +3.28. remove_hf(hname) - Remove from message all headers with name “hname”. Header matching is + Remove from message all headers with name "hname". Header matching is case-insensitive. Matches and removes also the compact header forms. Returns true if at least one header is found and removed. @@ -830,10 +825,10 @@ remove_hf("Contact") remove_hf("m") ... -3.29. remove_hf_re(re) +3.29. remove_hf_re(re) Remove from message all headers with name matching regular expression - “re” + "re" Returns true if at least one header is found and removed. @@ -851,16 +846,16 @@ if(remove_hf_re("^P-")) } ... -3.30. has_body(), has_body(mime) +3.30. has_body(), has_body(mime) The function returns true if the SIP message has a body attached. The - checked includes also the “Content-Length” header presence and value. + checked includes also the "Content-Length" header presence and value. If a parameter is given, the mime described will be also checked - against the “Content-Type” header. + against the "Content-Type" header. Meaning of the parameters is as follows: - * mime - mime to be checked against the “Content-Type” header. If not + * mime - mime to be checked against the "Content-Type" header. If not present or 0, this check will be disabled. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, @@ -874,7 +869,7 @@ if(has_body("application/sdp")) } ... -3.31. is_audio_on_hold() +3.31. is_audio_on_hold() The function returns true if the SIP message has a body attached and at least one audio stream in on hold. @@ -890,7 +885,7 @@ if(is_audio_on_hold()) } ... -3.32. is_privacy(privacy_type) +3.32. is_privacy(privacy_type) The function returns true if the SIP message has a Privacy header field that includes the given privacy_type among its privacy values. See @@ -908,7 +903,7 @@ if(is_privacy("id")) } ... -3.33. in_list(subject, list, separator) +3.33. in_list(subject, list, separator) Function checks if subject string is found in list string where list items are separated by separator string. Subject and list strings may @@ -926,7 +921,7 @@ if (in_list("$var(subject)", "$var(list)", ",") { } ... -3.34. cmp_str(str1, str2) +3.34. cmp_str(str1, str2) The function returns true if the two parameters matches as string case sensitive comparison. @@ -942,7 +937,7 @@ if(cmp_str("$rU", "kamailio")) } ... -3.35. cmp_istr(str1, str2) +3.35. cmp_istr(str1, str2) The function returns true if the two parameters matches as string case insensitive comparison. @@ -958,7 +953,7 @@ if(cmp_istr("$rU@you", "kamailio@YOU")) } ... -3.36. starts_with(str1, str2) +3.36. starts_with(str1, str2) The function returns true if the first string starts with the second string. @@ -974,7 +969,7 @@ if (starts_with("$rU", "+358")) } ... -3.37. set_body_multipart([txt,content_type][,boundary]) +3.37. set_body_multipart([txt,content_type][,boundary]) Set multipart body to a SIP message. If called with no parameters, will convert present body to multipart. @@ -1009,7 +1004,7 @@ text --delimiter ... -3.38. append_body_part(txt,content_type[, content_disposition]) +3.38. append_body_part(txt,content_type[, content_disposition]) Append a part on multipart body SIP message. Will use "unique-boundary-1" as boundary. @@ -1030,8 +1025,8 @@ text Example 1.38. append_body_part usage ... $var(b) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c" -append_body_part("$var(b)", "application/vnd.cirpack.isdn-ext", "signal;handlin -g=required"); +append_body_part("$var(b)", "application/vnd.cirpack.isdn-ext", "signal;handling +=required"); ... Will append this the body: ... @@ -1043,7 +1038,7 @@ Content-Disposition: signal;handling=required --unique-boundary-1 ... -3.39. remove_body_part(content_type) +3.39. remove_body_part(content_type) Remove a part on a multipart body SIP message. @@ -1080,10 +1075,10 @@ Chapter 2. Developer Guide 1.1. load_textops(*import_structure) -1.1. load_textops(*import_structure) +1.1. load_textops(*import_structure) For programmatic use only--import the Textops API. Meaning of the parameters is as follows: - * import_structure - Pointer to the import structure - see “struct - textops_binds” in modules/textops/api.h + * import_structure - Pointer to the import structure - see "struct + textops_binds" in modules/textops/api.h diff --git a/modules/timer/README b/modules/timer/README index 22dade483df..59682ed337d 100644 --- a/modules/timer/README +++ b/modules/timer/README @@ -1,4 +1,3 @@ - timer module Tomas Mandys @@ -6,7 +5,7 @@ Tomas Mandys Iptel.org Copyright 2007 iptelorg GmbH - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -21,9 +20,9 @@ Tomas Mandys 5. Functions - 5.1. timer_enable(timer_id, enable_disable) - 5.2. @timer.timer.timer_id.enabled - 5.3. @timer.executed + 5.1. timer_enable(timer_id, enable_disable) + 5.2. @timer.timer.timer_id.enabled + 5.3. @timer.executed 6. Examples @@ -49,9 +48,9 @@ Chapter 1. Admin Guide 5. Functions - 5.1. timer_enable(timer_id, enable_disable) - 5.2. @timer.timer.timer_id.enabled - 5.3. @timer.executed + 5.1. timer_enable(timer_id, enable_disable) + 5.2. @timer.timer.timer_id.enabled + 5.3. @timer.executed 6. Examples @@ -67,8 +66,8 @@ Chapter 1. Admin Guide timer_id = alphanum slow_fast = "slow" | "fast" - declare_timer_syntax = timer_id "=" (route#|route_name) "," interval ", -" slow_fast "," ["enable"] + declare_timer_syntax = timer_id "=" (route#|route_name) "," interval "," + slow_fast "," ["enable"] enable_disable = "0" | "1" 4. Parameters @@ -83,31 +82,31 @@ Chapter 1. Admin Guide declare_timer = declare_timer_syntax timer_id is timer identifier, route is handler to be called when timer - is triggered, interval is timer interval in milliseconds, slow_fast + is triggered, interval is timer interval in milliseconds, slow_fast determines if handler will be hooked in slow or fast timer queue, fast - timer handler returns as quickly as possible, slow timer handler may + timer handler returns as quickly as possible, slow timer handler may spend longer time, see ser/doc/timers.txt documentation. Use enable to enable timer when ser is starting, otherwise use timer_enable to start it later. Example 1.1. Example declare_timer ... - modparam("timer", "declare_timer", "MY_TIMER=MY_TIMER_ROUTE,10,slow,ena -ble"); + modparam("timer", "declare_timer", "MY_TIMER=MY_TIMER_ROUTE,10,slow,enab +le"); ... 5. Functions - 5.1. timer_enable(timer_id, enable_disable) - 5.2. @timer.timer.timer_id.enabled - 5.3. @timer.executed + 5.1. timer_enable(timer_id, enable_disable) + 5.2. @timer.timer.timer_id.enabled + 5.3. @timer.executed -5.1. timer_enable(timer_id, enable_disable) +5.1. timer_enable(timer_id, enable_disable) - Enable/disable timer route specified by timer_id. Because of timer - core API the callback is not disabled immediately but is removed from - handler by itself not to decrease performance. Disabling and enabling - in sequence may be tricky. timer_id references to timer declared by + Enable/disable timer route specified by timer_id. Because of timer core + API the callback is not disabled immediately but is removed from + handler by itself not to decrease performance. Disabling and enabling + in sequence may be tricky. timer_id references to timer declared by declare_timer. Example 1.2. timer_enable usage @@ -115,7 +114,7 @@ ble"); timer_enable("MY_TIMER", 1); ... -5.2. @timer.timer.timer_id.enabled +5.2. @timer.timer.timer_id.enabled Return true ("1") if timer specified by timer_id is enabled, otherwise returns false ("0"). @@ -125,7 +124,7 @@ ble"); .... } -5.3. @timer.executed +5.3. @timer.executed Returns name of timer which has been executed, i.e. non empty value is returned only when handler is being processed. @@ -162,9 +161,9 @@ route["ONTIMER2"] { Example 1.6. Using timer module for testing a functionality - The timer module may be used to test a functionality being developed - and not requiring real request.A developer may put tested code in - route section which is called once after ser starts. + The timer module may be used to test a functionality being developed + and not requiring real request.A developer may put tested code in route + section which is called once after ser starts. loadmodule "timer"; loadmodule "xprint"; diff --git a/modules/tls/README b/modules/tls/README index aaa7b0b7d90..f37be650ce5 100644 --- a/modules/tls/README +++ b/modules/tls/README @@ -392,7 +392,7 @@ Creating CA certificate cd ca 2. create ca directory structure and files (see ca(1)) - mkdir demoCA #default CA name, edit /etc/ss/openssl.cnf + mkdir demoCA #default CA name, edit /etc/ssl/openssl.cnf mkdir demoCA/private mkdir demoCA/newcerts touch demoCA/index.txt diff --git a/modules/tmrec/README b/modules/tmrec/README index afee28b0b8d..9ca9bdef342 100644 --- a/modules/tmrec/README +++ b/modules/tmrec/README @@ -10,14 +10,10 @@ Daniel-Constantin Mierla -Edited by - Alex Balashov -Edited by - Richard Fuchs diff --git a/modules/tmx/README b/modules/tmx/README index c417390abb8..31cbaed14de 100644 --- a/modules/tmx/README +++ b/modules/tmx/README @@ -16,8 +16,6 @@ Daniel-Constantin Mierla -Edited by - Juha Heinanen diff --git a/modules/uid_auth_db/README b/modules/uid_auth_db/README index b88ec291023..e3bcd545064 100644 --- a/modules/uid_auth_db/README +++ b/modules/uid_auth_db/README @@ -1,4 +1,3 @@ - UID Auth DB Module Jan Janak @@ -11,7 +10,7 @@ Jakob Schlyter Copyright 2002, 2003 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -75,16 +74,16 @@ Chapter 1. Admin Guide 1. Overview - This module contains all authentication related functions that need - the access to the database. This module should be used together with - auth module, it cannot be used independently because it depends on the - module. Select this module if you want to use database to store + This module contains all authentication related functions that need the + access to the database. This module should be used together with auth + module, it cannot be used independently because it depends on the + module. Select this module if you want to use database to store authentication information like subscriber usernames and passwords. If you want to use radius authentication, then use auth_radius instead. 2. Dependencies - The module depends on the following modules (in the other words the + The module depends on the following modules (in the other words the listed modules must be loaded before this module): * auth. Generic authentication functions. * database. Any database module (currently mysql, postgres, dbtext) @@ -104,11 +103,10 @@ Chapter 1. Admin Guide 3.1. db_url (string) This is URL of the database to be used. Value of the parameter depends - on the database module used. For example for mysql and postgres - modules this is something like - mysql://username:password@host:port/database. For dbtext module (which - stores data in plaintext files) it is directory in which the database - resides. + on the database module used. For example for mysql and postgres modules + this is something like mysql://username:password@host:port/database. + For dbtext module (which stores data in plaintext files) it is + directory in which the database resides. Default value is "mysql://serro:47serro11@localhost/ser". @@ -117,9 +115,8 @@ modparam("auth_db", "db_url", "mysql://foo:bar@foobar.org/ser") 3.2. user_column (string) - This is the name of the column holding usernames. Default value is - fine for most people. Use the parameter if you really need to change - it. + This is the name of the column holding usernames. Default value is fine + for most people. Use the parameter if you really need to change it. Default value is "username". @@ -129,8 +126,8 @@ modparam("auth_db", "user_column", "user") 3.3. domain_column (string) This is the name of the column holding domains of users. Default value - is fine for most people. Use the parameter if you really need to - change it. + is fine for most people. Use the parameter if you really need to change + it. Default value is "domain". @@ -139,10 +136,10 @@ modparam("auth_db", "domain_column", "domain") 3.4. password_column (string) - This is the name of the column holding passwords. Passwords can be + This is the name of the column holding passwords. Passwords can be either stored as plain text or pre-calculated HA1 strings. HA1 strings - are MD5 hashes of username, password, and realm. HA1 strings are more - safe because the server doesn't need to know plaintext passwords and + are MD5 hashes of username, password, and realm. HA1 strings are more + safe because the server doesn't need to know plaintext passwords and they cannot be obtained from HA1 strings. Default value is "ha1". @@ -152,8 +149,8 @@ modparam("auth_db", "password_column", "password") 3.5. rpid_column (string) - This is the name of the column holding information for the - Remote-Party-ID header field. Default value is fine for most people. + This is the name of the column holding information for the + Remote-Party-ID header field. Default value is fine for most people. Use the parameter if you really need to change it. Default value is "rpid". @@ -163,24 +160,24 @@ modparam("auth_db", "rpid_column", "remote_party_id") 3.6. calculate_ha1 (integer) - This parameter tells server whether it should read plaintext password + This parameter tells server whether it should read plaintext password from the database or HA1 string. If the parameter is set to 1 then the server will assume that the column pointed to by plain_password_column - contains plaintext passwords and it will calculate HA1 strings on the + contains plaintext passwords and it will calculate HA1 strings on the fly. If the parameter is set to 0 then the server assumes that the database - contains HA1 strings directly and will not calculate them. In this - case it will use value of password_column as name of column with HA1 - password. If username parameter of credentials contains also @domain - (some user agents put domain in username parameter), then column - pointed to by password_column_2 parameter will be used instead. This - column should also contain HA1 strings but they should be calculated - including the domain in the username parameter (as opposed to - password_column which (when containing HA1 strings) should always + contains HA1 strings directly and will not calculate them. In this case + it will use value of password_column as name of column with HA1 + password. If username parameter of credentials contains also @domain + (some user agents put domain in username parameter), then column + pointed to by password_column_2 parameter will be used instead. This + column should also contain HA1 strings but they should be calculated + including the domain in the username parameter (as opposed to + password_column which (when containing HA1 strings) should always contains HA1 strings calculated without domain in username. - This ensures that the authentication will always work when using + This ensures that the authentication will always work when using pre-calculated HA1 string, not depending on the presence of the domain in username. @@ -191,7 +188,7 @@ modparam("auth_db", "calculate_ha1", 1) 3.7. plain_password_column (string) - This parameter holds the name of column holding plain text password. + This parameter holds the name of column holding plain text password. This column is used when calculate_ha1 is set. Default value is "password". @@ -201,9 +198,9 @@ modparam("auth_db", "plain_password_column", "password") 3.8. password_column_2 (string) - As described in the previous section this parameter contains name of - column holding pre-calculated HA1 string that were calculated - including the domain in the username. This parameter is used only when + As described in the previous section this parameter contains name of + column holding pre-calculated HA1 string that were calculated including + the domain in the username. This parameter is used only when calculate_ha1 is set to 0 and user agent send a credentials containing the domain in the username. @@ -214,10 +211,10 @@ modparam("auth_db", "password_column_2", "ha1_2") 3.9. use_rpid (integer) - This parameter specifies whether the server should fetch a value for + This parameter specifies whether the server should fetch a value for the Remote-Party-ID header field from the database. - If the parameter is set to 1 the server expects to find a value for + If the parameter is set to 1 the server expects to find a value for this header in the column specified by the rpid_column parameter. Default value of this parameter is 0. @@ -232,24 +229,24 @@ modparam("auth_db", "use_rpid", 1) 4.1. www_authorize(realm, table) - The function verifies credentials according to RFC2617. If the - credentials are verified successfully then the function will succeed - and mark the credentials as authorized (marked credentials can be - later used by some other functions). If the function was unable to - verify the credentials for some reason then it will fail and the - script should call www_challenge which will challenge the user again. + The function verifies credentials according to RFC2617. If the + credentials are verified successfully then the function will succeed + and mark the credentials as authorized (marked credentials can be later + used by some other functions). If the function was unable to verify the + credentials for some reason then it will fail and the script should + call www_challenge which will challenge the user again. Meaning of the parameters is as follows: - * realm. Realm is a opaque string that the user agent should - present to the user so he can decide what username and password to - use. Usually this is domain of the host the server is running on. - If an empty string "" is used then the server will generate it - from the request. In case of REGISTER requests To header field - domain will be used (because this header field represents a user - being registered), for all other messages From header field domain - will be used. - * table. Table to be used to lookup usernames and passwords - (usually subscribers table). + * realm. Realm is a opaque string that the user agent should present + to the user so he can decide what username and password to use. + Usually this is domain of the host the server is running on. If an + empty string "" is used then the server will generate it from the + request. In case of REGISTER requests To header field domain will + be used (because this header field represents a user being + registered), for all other messages From header field domain will + be used. + * table. Table to be used to lookup usernames and passwords (usually + subscribers table). Example 1.10. www_authorize usage ... @@ -260,22 +257,21 @@ if (www_authorize("iptel.org", "subscriber")) { 4.2. proxy_authorize(realm, table) - The function verifies credentials according to RFC2617. If the - credentials are verified successfully then the function will succeed - and mark the credentials as authorized (marked credentials can be - later used by some other functions). If the function was unable to - verify the credentials for some reason then it will fail and the - script should call proxy_challenge which will challenge the user - again. + The function verifies credentials according to RFC2617. If the + credentials are verified successfully then the function will succeed + and mark the credentials as authorized (marked credentials can be later + used by some other functions). If the function was unable to verify the + credentials for some reason then it will fail and the script should + call proxy_challenge which will challenge the user again. Meaning of the parameters is as follows: - * realm - Realm is a opaque string that the user agent should - present to the user so he can decide what username and password to - use. Usually this is domain of the host the server is running on. - If an empty string "" is used then the server will generate it - from the request. From header field domain will be used as realm. - * table - Table to be used to lookup usernames and passwords - (usually subscribers table). + * realm - Realm is a opaque string that the user agent should present + to the user so he can decide what username and password to use. + Usually this is domain of the host the server is running on. + If an empty string "" is used then the server will generate it from + the request. From header field domain will be used as realm. + * table - Table to be used to lookup usernames and passwords (usually + subscribers table). Example 1.11. proxy_authorize usage ... diff --git a/modules/uid_avp_db/README b/modules/uid_avp_db/README index a8eb8ca9fba..e8991c7cc54 100644 --- a/modules/uid_avp_db/README +++ b/modules/uid_avp_db/README @@ -1,4 +1,3 @@ - UID AVP DB Module Jiri Kuthan @@ -7,7 +6,7 @@ Jiri Kuthan Copyright 2004, 2005 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -81,22 +80,22 @@ Chapter 1. Admin Guide 1. Overview - This module contains several functions that can be used to manipulate - the contents of AVPs (Attribute-Value pairs). The AVPs are variables - attached to the SIP message being processed. Each variable has its - name and value. AVPs can be used to store arbitrary data or as a means - of inter-module comminication. + This module contains several functions that can be used to manipulate + the contents of AVPs (Attribute-Value pairs). The AVPs are variables + attached to the SIP message being processed. Each variable has its name + and value. AVPs can be used to store arbitrary data or as a means of + inter-module comminication. - You may also want to check the avpops module which is more flexible - and contains more functions. In future SER releases the avp module - will be probably deprecated in favor of avpops module. + You may also want to check the avpops module which is more flexible and + contains more functions. In future SER releases the avp module will be + probably deprecated in favor of avpops module. - Domain module operates in caching mode. Domain module reads the - default values of AVPs into cache memory when the module is loaded. - After that default values is re-read only when module is given - avp_list_reload fifo command. Any changes in usr_preferences_types - table must thus be followed by avp_list_reload command in order to - reflect them in module behavior. + Domain module operates in caching mode. Domain module reads the default + values of AVPs into cache memory when the module is loaded. After that + default values is re-read only when module is given avp_list_reload + fifo command. Any changes in usr_preferences_types table must thus be + followed by avp_list_reload command in order to reflect them in module + behavior. 2. Dependencies @@ -144,7 +143,7 @@ Chapter 1. Admin Guide 3.5. username_column (string) - Name of the column containing the username of the subscriber in uri + Name of the column containing the username of the subscriber in uri attributes table. Default value is "username". @@ -182,24 +181,24 @@ Chapter 1. Admin Guide 3.11. scheme_column (string) - The name of the column containing subscriber's scheme in uri + The name of the column containing subscriber's scheme in uri attributes. Default value is "scheme". 3.12. attr_group (string) - 'Extra attribute' group definition. It can be repeated to define more + 'Extra attribute' group definition. It can be repeated to define more attribute groups. - The group definition contains one or more assignments in the form + The group definition contains one or more assignments in the form key=value. Possible keys are: id Attribute group identifier. Must be set. table - Table name used for storing attributes from this attribute + Table name used for storing attributes from this attribute group. Must be set. flag @@ -210,26 +209,26 @@ Chapter 1. Admin Guide Column name holding key. Default value is "id". name_column - Column name used for storing attribute name. Default value is + Column name used for storing attribute name. Default value is "name". value_column - Column name used for storing attribute value. Default value is + Column name used for storing attribute value. Default value is "value". type_column - Column name used for storing attribute type. Default value is + Column name used for storing attribute type. Default value is "type". flags_column - Column name used for storing attribute flags. Default value is + Column name used for storing attribute flags. Default value is "flags". None defined by default. Example 1.1. attribute group definition -modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_c -olumn=dlg_id"); +modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_co +lumn=dlg_id"); Table used for these attributes: mysql> describe dlg_attrs; @@ -255,10 +254,10 @@ route { 3.13. auto_unlock_extra_attrs (string) - Determines the action when any of the 'extra attributes' lock is + Determines the action when any of the 'extra attributes' lock is detected when routing script execution was finished. When the value of - this parameter is zero (default) BUG level message is logged, but the - lock is kept, so another process trying to obtain the lock might get + this parameter is zero (default) BUG level message is logged, but the + lock is kept, so another process trying to obtain the lock might get stuck. If the value is nonzero, DEBUG level message is sent to the log and all the locks are released. @@ -280,24 +279,24 @@ route { track $fu - Load user attributes into from track. In this case the + Load user attributes into from track. In this case the second parameter is UID used to search attributes. $tu - Load user attributes into to track. In this case the + Load user attributes into to track. In this case the second parameter is UID used to search attributes. $fr - Load uri attributes into from track. In this case the + Load uri attributes into from track. In this case the second parameter is URI used to search attributes. $tr - Load uri attributes into to track. In this case the - second parameter is URI used to search attributes. + Load uri attributes into to track. In this case the second + parameter is URI used to search attributes. id - Identifier used for searching attributes. When searching for - user attributes it is UID, when searchnig uri attributes it is + Identifier used for searching attributes. When searching for + user attributes it is UID, when searchnig uri attributes it is URI. 4.2. load_extra_attrs (group_id, id) @@ -305,7 +304,7 @@ route { Loads 'extra attributes' stored by previous call to save_extra_attrs. group_id - Identifies attribute group, see Section 3.12, "attr_group + Identifies attribute group, see Section 3.12, "attr_group (string)". id @@ -316,7 +315,7 @@ route { Saves 'extra attributes' flagged by group flag under given id. group_id - Identifies attribute group, see Section 3.12, "attr_group + Identifies attribute group, see Section 3.12, "attr_group (string)". id @@ -327,7 +326,7 @@ route { Removes all extra attributes with given id. group_id - Identifies attribute group, see Section 3.12, "attr_group + Identifies attribute group, see Section 3.12, "attr_group (string)". id @@ -335,11 +334,11 @@ route { 4.5. lock_extra_attrs (group_id, id) - Locks extra attributes. Currently locks whole attribute group (not - only id). + Locks extra attributes. Currently locks whole attribute group (not only + id). group_id - Identifies attribute group, see Section 3.12, "attr_group + Identifies attribute group, see Section 3.12, "attr_group (string)". id @@ -351,7 +350,7 @@ route { only id). group_id - Identifies attribute group, see Section 3.12, "attr_group + Identifies attribute group, see Section 3.12, "attr_group (string)". id @@ -395,8 +394,8 @@ loadmodule "/home/kubartv/SER/lib/ser/modules/gflags.so" modparam("usrloc", "db_mode", 1); modparam("usrloc|avp_db", "db_url", "mysql://ser:heslo@127.0.0.1/ser") -modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_c -olumn=dlg_id"); +modparam("avp_db", "attr_group", "id=dlg,flag=dialog_flag,table=dlg_attrs,key_co +lumn=dlg_id"); modparam("gflags", "load_global_attrs", 1); @@ -416,7 +415,7 @@ route["create_dialog"] { onreply_route["dialog_creation_reply"] { xplog("L_ERR", "dialog creation reply (%rs, %@cseq.method) [%@from.tag, - %@to.tag]\n"); +%@to.tag]\n"); $res = @msg.response.code; xplog("L_ERR", " ... response: %$res\n"); @@ -425,15 +424,15 @@ onreply_route["dialog_creation_reply"] { break; } if ($res < 101) { - xplog("L_ERR", " ... I won't create dialog from 100 response.\n -"); + xplog("L_ERR", " ... I won't create dialog from 100 response.\n" +); break; } - del_attr("$id"); # xlset_attr works strange when the attribute already -exists - xlset_attr("$id", "call-id:%@call_id caller_tag:%@from.tag callee_tag:% -@to.tag"); + del_attr("$id"); # xlset_attr works strange when the attribute already e +xists + xlset_attr("$id", "call-id:%@call_id caller_tag:%@from.tag callee_tag:%@ +to.tag"); if ($res > 299) { xplog("L_ERR", " ... dialog terminated\n"); remove_extra_attrs("dlg", "$id"); @@ -472,8 +471,8 @@ route["save_dialog"] { # use this if you want to delete destroyed dialogs: # remove_extra_attrs("dlg", "$id"); - # else if you want leave them in DB (with the time of terminati -on) + # else if you want leave them in DB (with the time of terminatio +n) $dlg_destroyed_at = @sys.now.local; # set flag for attributes with name beggining with dlg_ @@ -494,8 +493,8 @@ route["load_dialog_data"] { del_attr("$dlg_init_method"); # used as flag of succesful read of data - # delete all used dlg attrs (because load_extra_attrs doesn't delete th -em itself before adding) + # delete all used dlg attrs (because load_extra_attrs doesn't delete the +m itself before adding) del_attr("$dlg_init_method"); del_attr("$dlg_caller"); del_attr("$dlg_callee"); @@ -516,20 +515,20 @@ route["load_dialog"] { # tries to load dialog according tags and callid # try to load dialog - del_attr("$id"); # xlset_attr works strange when the attribute already -exists - xlset_attr("$id", "call-id:%@call_id caller_tag:%@from.tag callee_tag:% -@to.tag"); + del_attr("$id"); # xlset_attr works strange when the attribute already e +xists + xlset_attr("$id", "call-id:%@call_id caller_tag:%@from.tag callee_tag:%@ +to.tag"); if (route("load_dialog_data")) { $dir = "caller2callee"; return 1; } # try to load dialog in other direction - del_attr("$id"); # xlset_attr works strange when the attribute already -exists - xlset_attr("$id", "call-id:%@call_id caller_tag:%@to.tag callee_tag:%@f -rom.tag"); + del_attr("$id"); # xlset_attr works strange when the attribute already e +xists + xlset_attr("$id", "call-id:%@call_id caller_tag:%@to.tag callee_tag:%@fr +om.tag"); if (route("load_dialog_data")) { $dir = "callee2caller"; return 1; @@ -545,8 +544,8 @@ route["update_dialog_reply"] { # target refresh for INVITE dialogs if ($dir == "caller2calle") { # if request from caller - $dlg_callee = @contact; # update callee's contact (resp -onse!) + $dlg_callee = @contact; # update callee's contact (respo +nse!) } else { $dlg_caller = @contact; @@ -562,8 +561,8 @@ route["update_dialog"] { # target refresh for INVITE dialogs if ($dir == "caller2calle") { # if request from caller - $dlg_caller = @contact; # update caller's contact (requ -est!) + $dlg_caller = @contact; # update caller's contact (reque +st!) } else { $dlg_callee = @contact; @@ -571,19 +570,19 @@ est!) } if ($dir == "caller2callee") { # if request from caller - # TODO: verify CSeq before modifying and return 500 if lower th -an last one + # TODO: verify CSeq before modifying and return 500 if lower tha +n last one $dlg_caller_cseq = @cseq.num; } else { - # TODO: verify CSeq before modifying and return 500 if lower th -an last one + # TODO: verify CSeq before modifying and return 500 if lower tha +n last one $dlg_callee_cseq = @cseq.num; } if (method=="BYE") { - $dlg_status = "pre-destroyed"; # to see that BYE already went t -hrough + $dlg_status = "pre-destroyed"; # to see that BYE already went th +rough } return 1; } @@ -603,7 +602,7 @@ route["trace_dialog"] { onreply_route["dialog_reply"] { if ($id) { xplog("L_ERR", "In-dialog reply (%rs, %@cseq.method) [%@to.tag, - %@from.tag]\n"); +%@from.tag]\n"); if (!route("load_dialog")) { xplog("L_ERR", "Can't load dialog data\n"); } @@ -662,8 +661,7 @@ route { # initial request or non-dialog message if (method=="INVITE") { route("create_dialog"); - # we don't save the dialog here because AVPs will be se -t + # we don't save the dialog here because AVPs will be set # when reply comes and the dialog will be stored then } else { @@ -679,8 +677,8 @@ t t_on_reply("dialog_reply"); } else { - xplog("L_ERR", "Message within unknown dialog: %@cseq, -to_tag=%@to.tag from_tag=%@from.tag\n"); + xplog("L_ERR", "Message within unknown dialog: %@cseq, t +o_tag=%@to.tag from_tag=%@from.tag\n"); } } diff --git a/modules/uid_domain/README b/modules/uid_domain/README index 7c7af947e51..8b180902163 100644 --- a/modules/uid_domain/README +++ b/modules/uid_domain/README @@ -1,4 +1,3 @@ - UID Domain Module Juha Heinanen @@ -6,7 +5,7 @@ Juha Heinanen Copyright 2002-2010 Juha Heinanen - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -116,49 +115,49 @@ Chapter 1. Admin Guide 1.2. Domain-level Configuration Attributes 1.3. Caching - Domain modules, as the name suggests, implements support for multiple - independent virtual domains hosted on one SIP server. This is often + Domain modules, as the name suggests, implements support for multiple + independent virtual domains hosted on one SIP server. This is often useful if you have multiple domain names and you want to make them all work and appear as one. Alternatively you might find the module useful - if you want to run a shared SIP service for multiple independent - customers. The module stores all supported domains and associated - configuration in a database table. Most of the information can be + if you want to run a shared SIP service for multiple independent + customers. The module stores all supported domains and associated + configuration in a database table. Most of the information can be cached in memory for performance reasons. 1.1. Virtual Domains - The domain module adds support for so-called virtual domains. A - virtual domain is just a collection of domain names and associated - configuration information identified by a unique identifier. We refer - to the domain identifier as DID elsewhere in the documentation. DID + The domain module adds support for so-called virtual domains. A virtual + domain is just a collection of domain names and associated + configuration information identified by a unique identifier. We refer + to the domain identifier as DID elsewhere in the documentation. DID stands for "Domain IDentifier". In traditional POST world the term DID has a different meaning though. Please be aware that this is just pure coincidence. - All domain names that belong to one virtual domain are - interchangeable. From SIP server's perspective there is no difference - between them. They can be used in SIP URIs interchangeably and the - behavior of the SIP server will not be affected. This is called - "domain name normalization" and it is one of the steps performed early - during SIP message processing. + All domain names that belong to one virtual domain are interchangeable. + From SIP server's perspective there is no difference between them. They + can be used in SIP URIs interchangeably and the behavior of the SIP + server will not be affected. This is called "domain name normalization" + and it is one of the steps performed early during SIP message + processing. - The DID identifier can be anything. To the SIP server DIDs are just + The DID identifier can be anything. To the SIP server DIDs are just opaque strings and what format you choose depends on your requirements - and the type of the setup. You can use numbers in smaller setups if - the size of the data is a concern. You can set the DID to the - canonical domain name of the domain. You can use RFC 4122 style UUIDs - if your setup is large and distributed. You can use anything as long - as it can be represented as string. The only requirement is that the - identifier of each virtual domain must be unique. - - The following example illustrates how one virtual domain can be + and the type of the setup. You can use numbers in smaller setups if the + size of the data is a concern. You can set the DID to the canonical + domain name of the domain. You can use RFC 4122 style UUIDs if your + setup is large and distributed. You can use anything as long as it can + be represented as string. The only requirement is that the identifier + of each virtual domain must be unique. + + The following example illustrates how one virtual domain can be represented. The iptel.org domain runs a public SIP service. The users - of the service can use SIP URIs of form sip:username@iptel.org. The - SIP service is distributed, there is a number of SIP servers. The SIP - servers are also available through a number of other domain names, - such as sip.iptel.org, proxy.iptel.org and so on. We created one - virtual domain in the domain module and added all such domain names to - the virtual domain: + of the service can use SIP URIs of form sip:username@iptel.org. The SIP + service is distributed, there is a number of SIP servers. The SIP + servers are also available through a number of other domain names, such + as sip.iptel.org, proxy.iptel.org and so on. We created one virtual + domain in the domain module and added all such domain names to the + virtual domain: Example 1.1. Virtual Domain iptel.org iptel @@ -168,17 +167,17 @@ iptel +---proxy.iptel.org +---213.192.59.75 - In the example above, we chose "iptel" as the unique identifier for - the virtual domain. This identifier is permanent. It never changes. - Over time we may change domain names assigned to this virtual domain, - but this identifier never changes. The main reason why virtual domain + In the example above, we chose "iptel" as the unique identifier for the + virtual domain. This identifier is permanent. It never changes. Over + time we may change domain names assigned to this virtual domain, but + this identifier never changes. The main reason why virtual domain identifiers must never change is that because they are referenced from - other tables, for example the accounting table. The data in the - accounting table is long-lived, usually archived, and this ensures - that the data will still reference correct virtual domain, no matter - what domain names are assigned to it. + other tables, for example the accounting table. The data in the + accounting table is long-lived, usually archived, and this ensures that + the data will still reference correct virtual domain, no matter what + domain names are assigned to it. - The virtual domain described above will be stored in the domain table + The virtual domain described above will be stored in the domain table in the database: Example 1.2. Database Representation of Virtual Domain @@ -191,42 +190,42 @@ iptel | iptel | 213.192.59.75 | 33 | +-------+-----------------+-------+ - Because all domain names that belong to one particular virtual domain - are equal, it does not matter which domain name is used in the host - part of the SIP URI. Thus an imaginary user joe with SIP URI - sip:joe@iptel.org will also be reachable as sip:joe@sip.iptel.org, - sip:joe@proxy.iptel.org, and sip:joe@213.192.59.75. If we add a new - domain name to this virtual domain then joe will also be able to use - the new domain name in his SIP URI, without the need to change + Because all domain names that belong to one particular virtual domain + are equal, it does not matter which domain name is used in the host + part of the SIP URI. Thus an imaginary user joe with SIP URI + sip:joe@iptel.org will also be reachable as sip:joe@sip.iptel.org, + sip:joe@proxy.iptel.org, and sip:joe@213.192.59.75. If we add a new + domain name to this virtual domain then joe will also be able to use + the new domain name in his SIP URI, without the need to change anything. 1.2. Domain-level Configuration Attributes - In addition to a number of domain names, each virtual domain can also - have extra configuration information associated with it. The - possibility to configure the SIP server sightly differently in each - virtual domain is, in fact, the main reason why we introduced the - concept of virtual domains. We wanted to have one SIP server which - will provide SIP service to multiple different customers and each of - the customers may have slightly different configuration requirements. + In addition to a number of domain names, each virtual domain can also + have extra configuration information associated with it. The + possibility to configure the SIP server sightly differently in each + virtual domain is, in fact, the main reason why we introduced the + concept of virtual domains. We wanted to have one SIP server which will + provide SIP service to multiple different customers and each of the + customers may have slightly different configuration requirements. That's how domain-level configuration attributes were born. Because the administrator of the SIP server seldom knows configuration - requirements in advance, we decided to implement a generic solution - and store all configuration options in named attributes. Named - attributes are just like variables, they have a name and they have a - value. Attributes are accessible from the configuration script of the - SIP server. Domain-level attributes are attributes that are associated - with a particular virtual domain. They can be used to store additional - configuration for the entire virtual domain, that is all users that - belong (or have SIP URI) in that particular virtual domain. - Domain-level attributes can be overridden be user-level attributes - with the same name configured for a particular user. In other words a - domain level attribute will only be effective if no user-level - attribute with the same name exists. - - Domain-level attributes are stored in a separate table. The name of - the table is domain_attrs and it is defined as follows: + requirements in advance, we decided to implement a generic solution and + store all configuration options in named attributes. Named attributes + are just like variables, they have a name and they have a value. + Attributes are accessible from the configuration script of the SIP + server. Domain-level attributes are attributes that are associated with + a particular virtual domain. They can be used to store additional + configuration for the entire virtual domain, that is all users that + belong (or have SIP URI) in that particular virtual domain. + Domain-level attributes can be overridden be user-level attributes with + the same name configured for a particular user. In other words a domain + level attribute will only be effective if no user-level attribute with + the same name exists. + + Domain-level attributes are stored in a separate table. The name of the + table is domain_attrs and it is defined as follows: Example 1.3. Table domain_attrs +-------+------------------+------+-----+---------+-------+ @@ -239,55 +238,54 @@ iptel | flags | int(10) unsigned | NO | | 0 | | +-------+------------------+------+-----+---------+-------+ - Each attribute has name, type and value. A single attribute can have - multiple values and in that case it will occupy more rows in the - table. Each attribute is associated with a particular virtual domain - using the DID identifier. Domain-level attributes can contain just - about anything. It is a generic configuration mechanism and it is up - to you to define a list of attribute that are meaningful in your setup - and use those attributes in the routing part of the configuration - file. - - Attributes for a particular virtual-domain are made available to - script function by the lookup_domain function. This is the function - that is used to map domain names to DIDs. One of the side-effects of - the function is that it makes domain-level attributes available to - script function if a matching virtual domain is found. - - When caching is enabled, all attributes from domain_attrs table are - cached in memory, just like virtual domain themselves. If you disable - caching then the domain module will attempt to load attributes from - the database each time you call lookup_domain. Attributes cached in - memory can be realoaded with the domain.reload management function. + Each attribute has name, type and value. A single attribute can have + multiple values and in that case it will occupy more rows in the table. + Each attribute is associated with a particular virtual domain using the + DID identifier. Domain-level attributes can contain just about + anything. It is a generic configuration mechanism and it is up to you + to define a list of attribute that are meaningful in your setup and use + those attributes in the routing part of the configuration file. + + Attributes for a particular virtual-domain are made available to script + function by the lookup_domain function. This is the function that is + used to map domain names to DIDs. One of the side-effects of the + function is that it makes domain-level attributes available to script + function if a matching virtual domain is found. + + When caching is enabled, all attributes from domain_attrs table are + cached in memory, just like virtual domain themselves. If you disable + caching then the domain module will attempt to load attributes from the + database each time you call lookup_domain. Attributes cached in memory + can be realoaded with the domain.reload management function. 1.3. Caching - Domain module operates in caching or non-caching mode depending on + Domain module operates in caching or non-caching mode depending on value of module parameter db_mode. In caching mode domain module reads - the contents of domain table into cache memory when the module is - loaded. After that domain table is re-read only when module is given - domain_reload fifo command. Any changes in domain table must thus be - followed by domain_reload command in order to reflect them in module - behavior. In non-caching mode domain module always queries domain - table in the database. - - Caching is implemented using a hash table. The size of the hash table - is given by HASH_SIZE constant defined in domain_mod.h. Its "factory - default" value is 128. Caching mode is highly recommended if you want + the contents of domain table into cache memory when the module is + loaded. After that domain table is re-read only when module is given + domain_reload fifo command. Any changes in domain table must thus be + followed by domain_reload command in order to reflect them in module + behavior. In non-caching mode domain module always queries domain table + in the database. + + Caching is implemented using a hash table. The size of the hash table + is given by HASH_SIZE constant defined in domain_mod.h. Its "factory + default" value is 128. Caching mode is highly recommended if you want to use domain-level attributes. 2. Dependencies - The module depends on the following modules (in the other words the + The module depends on the following modules (in the other words the listed modules must be loaded before this module): * database - Any database module 3. Known Limitations - There is an unlikely race condition on domain list update. If a - process uses a table, which is reloaded at the same time twice through - FIFO, the second reload will delete the original table still in use by - the process. + There is an unlikely race condition on domain list update. If a process + uses a table, which is reloaded at the same time twice through FIFO, + the second reload will delete the original table still in use by the + process. 4. Parameters @@ -316,8 +314,8 @@ modparam("domain", "db_url", "mysql://ser:pass@db_host/ser") 4.2. db_mode (integer) - Database mode. Value 0 means non-caching, 1 means caching is enabled. - It is highly recommended to enable caching if you want to use + Database mode. Value 0 means non-caching, 1 means caching is enabled. + It is highly recommended to enable caching if you want to use domain-level attributes. Default value is 1 (caching). @@ -327,8 +325,8 @@ modparam("domain", "db_mode", 0) # Do not use caching 4.3. domain_table (string) - Name of table containing names of local domains that the proxy is - responsible for. Local users must have in their SIP URI a host part + Name of table containing names of local domains that the proxy is + responsible for. Local users must have in their SIP URI a host part that is equal to one of the domains stored in this table. Default value is "domain". @@ -338,10 +336,10 @@ modparam("domain", "domain_table", "new_name") 4.4. did_col (string) - This is the name of the column in domain table that contains the - unique identifiers of virtual domains. Domains names found in this - table are arranged into virtual domains. Each virtual domain must have - a unique identifier and it can contain one or more domain names. + This is the name of the column in domain table that contains the unique + identifiers of virtual domains. Domains names found in this table are + arranged into virtual domains. Each virtual domain must have a unique + identifier and it can contain one or more domain names. Default value is "did". @@ -359,10 +357,10 @@ modparam("domain", "domain_col", "domain") 4.6. flags_col (string) - This is the name of the column in domain table which stores various - flags. Each row in the table has a bunch of generic flags that can be - used mark the row disabled, deleted, etc. The flags allow for more - flexible administration of the data in the database and they are + This is the name of the column in domain table which stores various + flags. Each row in the table has a bunch of generic flags that can be + used mark the row disabled, deleted, etc. The flags allow for more + flexible administration of the data in the database and they are present in several other tables too. Default value is "flags". @@ -372,11 +370,11 @@ modparam("domain", "flags_col", "domain") 4.7. domattr_table (string) - This parameter can be used to configure the name of the table that is - used to store domain-level attributes. Domain level attributes are - attributes that are associated with a particular virtual domain. They - are typically used to store additional domain-wide settings that - should apply to all users who belong to the domain. + This parameter can be used to configure the name of the table that is + used to store domain-level attributes. Domain level attributes are + attributes that are associated with a particular virtual domain. They + are typically used to store additional domain-wide settings that should + apply to all users who belong to the domain. Default value is "domain_attrs". @@ -386,10 +384,9 @@ modparam("domain", "domattr_table", "domain_attrs") 4.8. domattr_did (string) Use this parameter to configure the name of the column in domain_attrs - table that is used to store the did of the virtual domain the - attribute belongs to. Normally there is no need to configure this - parameter, unless you want adapt to module to a different database - schema. + table that is used to store the did of the virtual domain the attribute + belongs to. Normally there is no need to configure this parameter, + unless you want adapt to module to a different database schema. Default value is "did". @@ -399,9 +396,9 @@ modparam("domain", "domattr_did", "did") 4.9. domattr_name (string) Use this parameter to configure the name of the column in domain_attrs - table that is used to store the name of the attribute. Normally there - is no need to configure this parameter, unless you want adapt to - module to a different database schema. + table that is used to store the name of the attribute. Normally there + is no need to configure this parameter, unless you want adapt to module + to a different database schema. Default value is "name". @@ -411,9 +408,9 @@ modparam("domain", "domattr_name", "name") 4.10. domattr_type (string) Use this parameter to configure the name of the column in domain_attrs - table that is used to store the type of the attribute. Normally there - is no need to configure this parameter, unless you want adapt to - module to a different database schema. + table that is used to store the type of the attribute. Normally there + is no need to configure this parameter, unless you want adapt to module + to a different database schema. Default value is "type". @@ -424,8 +421,8 @@ modparam("domain", "domattr_type", "type") Use this parameter to configure the name of the column in domain_attrs table that is used to store the value of the attribute. Normally there - is no need to configure this parameter, unless you want adapt to - module to a different database schema. + is no need to configure this parameter, unless you want adapt to module + to a different database schema. Default value is "value". @@ -434,11 +431,11 @@ modparam("domain", "domattr_value", "value") 4.12. domattr_flags (string) - This is the name of the column in domain_attrs table which stores + This is the name of the column in domain_attrs table which stores various flags. Each row in the table has a bunch of generic flags that - can be used mark the row disabled, deleted, etc. The flags allow for - more flexible administration of the data in the database and they are - present in several other tables too. You do not have to touch this + can be used mark the row disabled, deleted, etc. The flags allow for + more flexible administration of the data in the database and they are + present in several other tables too. You do not have to touch this parameter under normal circumstances. Default value is "flags". @@ -448,16 +445,16 @@ modparam("domain", "domattr_flags", "flags") 4.13. load_domain_attrs (integer) - This parameter can be used to enable/disable user of domain-level - attributes. Domain-level attributes are variables that can be used to - store additional configuration that applies to the whole virtual - domain and all users within the virtual domain. Domain-level - attributes are stored in domain_attrs. If you set this parameter to a - non-zero value then the server will make domain-level attributes - available to the script every time you call function lookup_domain. If - you set the parameter to 0 then domain-level attributes will be - ignored, the domain module will not load them from the database and - the lookup function will not make them available to the script. + This parameter can be used to enable/disable user of domain-level + attributes. Domain-level attributes are variables that can be used to + store additional configuration that applies to the whole virtual domain + and all users within the virtual domain. Domain-level attributes are + stored in domain_attrs. If you set this parameter to a non-zero value + then the server will make domain-level attributes available to the + script every time you call function lookup_domain. If you set the + parameter to 0 then domain-level attributes will be ignored, the domain + module will not load them from the database and the lookup function + will not make them available to the script. Default value is 0. @@ -471,21 +468,21 @@ modparam("domain", "load_domain_attrs", 1) 5.1. is_local(domain) - This function can be used to test whether a given domain name in - parameter belongs to one of the virtual domains defined in the domain + This function can be used to test whether a given domain name in + parameter belongs to one of the virtual domains defined in the domain table. Such domain name is said to be local. The function returns 1 if the domain name is found in the domain table and -1 otherwise. - The first parameter of the function can be anything that returns a - string with domain name. In its simplest form it can be a string with - domain name: is_local("iptel.org"). You can also test a domain name - stored in an attribute: is_local("$my_domain"). And finally you can - test a domain name present in the SIP message with selects: + The first parameter of the function can be anything that returns a + string with domain name. In its simplest form it can be a string with + domain name: is_local("iptel.org"). You can also test a domain name + stored in an attribute: is_local("$my_domain"). And finally you can + test a domain name present in the SIP message with selects: is_local("@ruri.host"). - Note: Unlike function lookup_domain, this function does not make - domain attributes of the virtual domain available to the script. - Domain attributes are simply ignored by this function. + Note: Unlike function lookup_domain, this function does not make domain + attributes of the virtual domain available to the script. Domain + attributes are simply ignored by this function. Example 1.17. is_uri_host_local_local usage ... @@ -496,46 +493,46 @@ if (is_local("@ruri.host")) { 5.2. lookup_domain(attr_group, domain) - This is the main function of the domain module. It can be used to - implement support for virtual domains in the SIP server. Each virtual + This is the main function of the domain module. It can be used to + implement support for virtual domains in the SIP server. Each virtual domain is identified by a unique identifier (opaque string) and it can - have one or more associated domain names. Given a domain name in the - second parameter, this function finds the associated virtual domain - identifier (known as DID) and stores it in an attribute for later - user. In addition to that the function also loads all domain-level - attributes for the virtual domain and makes them available to the - configuration script. + have one or more associated domain names. Given a domain name in the + second parameter, this function finds the associated virtual domain + identifier (known as DID) and stores it in an attribute for later user. + In addition to that the function also loads all domain-level attributes + for the virtual domain and makes them available to the configuration + script. The first parameter of the function identifies the group of attributes - where the DID and domain-level attributes shall be stored. The value - of the first parameter can be either "$fd" for the domain-level - attribute group that belongs to the calling party (From), or "$td" for - the domain-level attribute group that belongs to the called party + where the DID and domain-level attributes shall be stored. The value of + the first parameter can be either "$fd" for the domain-level attribute + group that belongs to the calling party (From), or "$td" for the + domain-level attribute group that belongs to the called party (Request-URI). The value of the second parameter can be a simple string, an attribute name, or a select. See the documentation of function is_local for more details. - If a match is found then the DID of the virtual domain will be stored - either in $fd.did or in $td.did, depending on the value of the first - parameter. In addition to that domain-level attributes, if any, will - be available as either $fd. or $td.. + If a match is found then the DID of the virtual domain will be stored + either in $fd.did or in $td.did, depending on the value of the first + parameter. In addition to that domain-level attributes, if any, will be + available as either $fd. or $td.. - The function returns 1 when a matching virtual domain for the given + The function returns 1 when a matching virtual domain for the given domain name was found and -1 otherwise. - The following example shows a typical use of the function. In a multi - domain setup, one has to typically figure out where the both the - calling and the called domains are local (i.e. configured on the - server as the domains the server is responsible for). This is - typically done by calling function lookup_domain twice, once with the - hostname part of the From header as parameter and secondly with the - hostname part of the Request-URI as parameter. - - The type of the situation can be then determined from the value of - corresponding attributes ($td.did and $fd.did). A non-existing - attribute value indicates that the domain name is not local (it does + The following example shows a typical use of the function. In a multi + domain setup, one has to typically figure out where the both the + calling and the called domains are local (i.e. configured on the server + as the domains the server is responsible for). This is typically done + by calling function lookup_domain twice, once with the hostname part of + the From header as parameter and secondly with the hostname part of the + Request-URI as parameter. + + The type of the situation can be then determined from the value of + corresponding attributes ($td.did and $fd.did). A non-existing + attribute value indicates that the domain name is not local (it does not belong to any virtual domain configured in the domain table). Example 1.18. lookup_domain usage @@ -572,26 +569,26 @@ if ($fd.did && $td.did) { 6.1. domain.reload - Causes domain module to re-read the contents of domain table into - cache memory. If domain-level attributes are used then it will also - re-load the contents of the domain_attrs table in the memory cache. + Causes domain module to re-read the contents of domain table into cache + memory. If domain-level attributes are used then it will also re-load + the contents of the domain_attrs table in the memory cache. 6.2. domain.dump - Causes domain module to dump hash indexes and domain names in its - cache memory. + Causes domain module to dump hash indexes and domain names in its cache + memory. 7. Internal API - The domain module has an internal API which can be used to access - additional functions of the module (i.e. functions that are normally + The domain module has an internal API which can be used to access + additional functions of the module (i.e. functions that are normally not available from the routing script). Currently the API exports only - the function is_domain_local. That function can be used to determine - whether a given domain name is on the list of locally configured - domain names. + the function is_domain_local. That function can be used to determine + whether a given domain name is on the list of locally configured domain + names. - If you want to use the internal API of domain module from your module - then you need to include the header file domain_api.h and call + If you want to use the internal API of domain module from your module + then you need to include the header file domain_api.h and call load_domain_api first. Example 1.19. Calling load_domain_api @@ -603,7 +600,7 @@ if (load_domain_api(&dom_api) != 0) { /* error */ } - After that you can call function is_domain_local whose pointer is + After that you can call function is_domain_local whose pointer is stored in the initialized data structure: str tmp = STR_STATIC_INIT("mydomain.com"); diff --git a/modules/uid_gflags/README b/modules/uid_gflags/README index 4997b422100..464d5cb4b01 100644 --- a/modules/uid_gflags/README +++ b/modules/uid_gflags/README @@ -1,4 +1,3 @@ - UID Gflags Module Jiri Kuthan @@ -6,7 +5,7 @@ Jiri Kuthan Copyright 2004 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -51,14 +50,14 @@ Chapter 1. Admin Guide 1. Overview - The module implements global flags. The difference between the global - flags and flags that can be used in the configuration file or AVPs is - that they the scope of the global flags is not limited to the SIP - message or transaction being processed. Global flags are always + The module implements global flags. The difference between the global + flags and flags that can be used in the configuration file or AVPs is + that they the scope of the global flags is not limited to the SIP + message or transaction being processed. Global flags are always available, their contents is not forgotten when a SIP transaction gets destroyed in SER. - Global flags can be accessed from the configuration script, for + Global flags can be accessed from the configuration script, for example: if (is_ugflag("1")) { t_relay_to_udp("10.0.0.1", "5060"); @@ -66,9 +65,9 @@ if (is_ugflag("1")) { t_relay_to_udp("10.0.0.2", "5060"); }; - The value of the global flags can be manipulated by external tools - such as the web interface of SER or cmd line administration tools. One - particular application of global flags could be runtime configuration + The value of the global flags can be manipulated by external tools such + as the web interface of SER or cmd line administration tools. One + particular application of global flags could be runtime configuration changes without the need to restart SER. 2. Parameters @@ -77,7 +76,7 @@ if (is_ugflag("1")) { 2.1. initial (integer) - The initial value of global flags. Each bit in the integer represents + The initial value of global flags. Each bit in the integer represents one flag. Default value is 0. @@ -90,8 +89,8 @@ if (is_ugflag("1")) { 3.1. set_gflag(flag_num) - Set the flag identified by flag_num to 1. The range of flag_num is 0 - to 31. + Set the flag identified by flag_num to 1. The range of flag_num is 0 to + 31. Example 1.1. set_ugflag usage ... @@ -100,8 +99,8 @@ set_ugflag("2"); 3.2. reset_ugflag(flag_num) - Set the flag identified by flag_num to 0. The range of flag_num is 0 - to 31. + Set the flag identified by flag_num to 0. The range of flag_num is 0 to + 31. Example 1.2. reset_ugflag usage ... @@ -110,38 +109,38 @@ reset_ugflag("2"); 3.3. is_ugflag(flag_num) - Returns 1 when flag identified by flag_num is set, 0 otherwise. The + Returns 1 when flag identified by flag_num is set, 0 otherwise. The range of flag_num parameter is 0 to 31. 4. FIFO Interface - The state of the global flags can be read and modified over the FIFO - interface of SER. This module implements the following FIFO interface + The state of the global flags can be read and modified over the FIFO + interface of SER. This module implements the following FIFO interface functions: * set_gflag - Set the value of a flag to 1. The function accepts one parameter which is the number of the flag to be set. * reset_gflag - Reset the value of a flag to 0. The function accepts one parameter which is the number of the flag to be reset. - * is_gflag - Return the status of a flag. The FIFO function would - return TRUE if the flag is set and FALSE if it is not set. The - only parameter of this function is the number of the flag. + * is_gflag - Return the status of a flag. The FIFO function would + return TRUE if the flag is set and FALSE if it is not set. The only + parameter of this function is the number of the flag. 5. XMLRPC Interface The state of the global flags can be read and modified over the XMLRPC - interface. This module implements the following XMLRPC interface + interface. This module implements the following XMLRPC interface commands: - * gflags.set - Set the value of a flag to 1. The function accepts - one parameter which is the number of the flag to be set. - * gflags.reset - Reset the value of a flag to 0. The function - accepts one parameter which is the number of the flag to be reset. - * gflags.is_set - Return the status of a flag. The FIFO function - would return TRUE if the flag is set and FALSE if it is not set. + * gflags.set - Set the value of a flag to 1. The function accepts one + parameter which is the number of the flag to be set. + * gflags.reset - Reset the value of a flag to 0. The function accepts + one parameter which is the number of the flag to be reset. + * gflags.is_set - Return the status of a flag. The FIFO function + would return TRUE if the flag is set and FALSE if it is not set. The only parameter of this function is the number of the flag. * gflags.flush - Flush the state of global flags into database. * gflags.dump - Return the status of all flags. The value is TRUE if the flag is set and FALSE if the flag is not set. The function has no parameters. - * global.reload - Reload values from global_attrs DB table. This + * global.reload - Reload values from global_attrs DB table. This function does not have any parameters. There is no return value on success. diff --git a/modules/uid_uri_db/README b/modules/uid_uri_db/README index 5926fe1fa75..f86c04e22e0 100644 --- a/modules/uid_uri_db/README +++ b/modules/uid_uri_db/README @@ -1,4 +1,3 @@ - UID Uri_db Module Jan Janak @@ -6,7 +5,7 @@ Jan Janak FhG FOKUS Copyright 2003 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -27,9 +26,9 @@ Jan Janak 4. Functions - 4.1. check_to() - 4.2. check_from() - 4.3. does_uri_exist() + 4.1. check_to() + 4.2. check_from() + 4.3. does_uri_exist() List of Examples @@ -64,9 +63,9 @@ Chapter 1. Admin Guide 4. Functions - 4.1. check_to() - 4.2. check_from() - 4.3. does_uri_exist() + 4.1. check_to() + 4.2. check_from() + 4.3. does_uri_exist() 1. Overview @@ -178,11 +177,11 @@ modparam("module", "subscriber_domain_column", "domain") 4. Functions - 4.1. check_to() - 4.2. check_from() - 4.3. does_uri_exist() + 4.1. check_to() + 4.2. check_from() + 4.3. does_uri_exist() -4.1. check_to() +4.1. check_to() Check To username against URI table or digest credentials. @@ -193,7 +192,7 @@ if (check_to()) { }; ... -4.2. check_from() +4.2. check_from() Check From username against URI table or digest credentials. @@ -204,7 +203,7 @@ if (check_from()) { }; ... -4.3. does_uri_exist() +4.3. does_uri_exist() Check if username in the request URI belongs to an existing user. diff --git a/modules/uri_db/README b/modules/uri_db/README index 2a7d42c07e4..aa8226ee4ab 100644 --- a/modules/uri_db/README +++ b/modules/uri_db/README @@ -8,8 +8,6 @@ Edited by Jan Janak -Edited by - Bogdan-Andrei Iancu Copyright 2003 FhG FOKUS diff --git a/modules/userblacklist/README b/modules/userblacklist/README index cbedc95cd8f..3622f6cfae5 100644 --- a/modules/userblacklist/README +++ b/modules/userblacklist/README @@ -7,14 +7,12 @@ Henning Westerholt 1&1 Internet AG -Edited by - Pawel Kuzak 1&1 Internet AG - Copyright © 2008 1&1 Internet AG + Copyright 2008 1&1 Internet AG __________________________________________________________________ Table of Contents @@ -178,7 +176,7 @@ Chapter 1. Admin Guide If set to non-zero value, the domain column in the userblacklist is used. - Default value is “0”. + Default value is "0". Example 1.1. Set use_domain parameter ... @@ -194,7 +192,7 @@ modparam("userblacklist", "use_domain", 0) matching. Please be aware that memory requirements for storing the routing tree in shared memory will also increase by a factor of 12.8. - Default value is “10”. + Default value is "10". Example 1.2. Set match_mode parameter ... @@ -212,7 +210,7 @@ modparam("userblacklist", "match_mode", 128) 4.3. check_blacklist ([string table]) 4.4. check_whitelist (string table) -4.1. check_user_blacklist (string user, string domain, string number, string +4.1. check_user_blacklist (string user, string domain, string number, string table) Finds the longest prefix that matches the request URI user (or the @@ -233,7 +231,7 @@ if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)")) { } ... -4.2. check_user_whitelist (string user, string domain, string number, string +4.2. check_user_whitelist (string user, string domain, string number, string table) Finds the longest prefix that matches the request URI user (or the @@ -254,7 +252,7 @@ if (!check_user_whitelist("$avp(i:80)", "$avp(i:82)")) { } ... -4.3. check_blacklist ([string table]) +4.3. check_blacklist ([string table]) Finds the longest prefix that matches the request URI for the given table. If a match is found and it is not set to whitelist, false is @@ -269,7 +267,7 @@ if (!check_blacklist("globalblacklist")) { } ... -4.4. check_whitelist (string table) +4.4. check_whitelist (string table) Finds the longest prefix that matches the request URI for the given table. If a match is found and it is set to whitelist, true is @@ -287,7 +285,7 @@ if (!check_whitelist("globalblacklist")) { 5.1. reload_blacklist -5.1. reload_blacklist +5.1. reload_blacklist Reload the internal global blacklist cache. This is necessary after the database tables for the global blacklist have been changed. @@ -327,8 +325,8 @@ kamctl fifo reload_blacklist ... This table will setup a global blacklist for all numbers, only allowing - calls starting with “1”. Numbers that starting with “123456” and - “123455787” are also blacklisted, because the longest prefix will be + calls starting with "1". Numbers that starting with "123456" and + "123455787" are also blacklisted, because the longest prefix will be matched. Example 1.9. Example database content - userblacklist table @@ -347,10 +345,10 @@ kamctl fifo reload_blacklist ... This table will setup user specific blacklists for certain usernames. - For example for user “49721123456788” the prefix “1234” will be not - allowed, but the number “123456788” is allowed. Additionally a domain + For example for user "49721123456788" the prefix "1234" will be not + allowed, but the number "123456788" is allowed. Additionally a domain could be specified that is used for username matching if the - “use_domain” parameter is set. + "use_domain" parameter is set. Chapter 2. Module parameter for database access. @@ -373,7 +371,7 @@ Chapter 2. Module parameter for database access. URL to the database containing the data. - Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”. + Default value is "mysql://kamailioro:kamailioro@localhost/kamailio". Example 2.1. Set db_url parameter ... @@ -385,7 +383,7 @@ modparam("userblacklist", "db_url", "dbdriver://username:password@dbhost/dbname" Name of the userblacklist table for the userblacklist module. - Default value is “userblacklist”. + Default value is "userblacklist". Example 2.2. Set userblacklist_table parameter ... @@ -443,7 +441,7 @@ modparam("userblacklist", "userblacklist_whitelist_col", "whitelist") note that this table is used when the check_blacklist function is called with no parameters. - Default value is “globalblacklist”. + Default value is "globalblacklist". Example 2.8. Set globalblacklist_table parameter ... diff --git a/modules/usrloc/README b/modules/usrloc/README index 10abbaaa503..403f7f1f46b 100644 --- a/modules/usrloc/README +++ b/modules/usrloc/README @@ -12,8 +12,6 @@ Edited by Jan Janak -Edited by - Bogdan-Andrei Iancu Copyright 2003 FhG FOKUS @@ -848,7 +846,7 @@ modparam("usrloc", "db_insert_null", 1) 5.5. ul_add 5.6. ul_show_contact -5.1. ul_rm +5.1. ul_rm Deletes an entire AOR record (including its contacts). @@ -857,7 +855,7 @@ modparam("usrloc", "db_insert_null", 1) * AOR - user AOR in username[@domain] format (domain must be supplied only if use_domain option is on). -5.2. ul_rm_contact +5.2. ul_rm_contact Deletes a contact from an AOR record. @@ -867,7 +865,7 @@ modparam("usrloc", "db_insert_null", 1) only if use_domain option is on). * contact - exact contact to be removed -5.3. ul_dump +5.3. ul_dump Dumps the entire content of the USRLOC in memory cache @@ -876,11 +874,11 @@ modparam("usrloc", "db_insert_null", 1) "brief", a brief dump will be done (only AOR and contacts, with no other details) -5.4. ul_flush +5.4. ul_flush Triggers the flush of USRLOC memory cache into DB. -5.5. ul_add +5.5. ul_add Adds a new contact for an user AOR. @@ -896,7 +894,7 @@ modparam("usrloc", "db_insert_null", 1) * cflags - per branch flags of the contact * methods - mask with supported requests of the contact -5.6. ul_show_contact +5.6. ul_show_contact Dumps the contacts of an user AOR. @@ -917,14 +915,14 @@ modparam("usrloc", "db_insert_null", 1) 6.8. ul.db_contacts 6.9. ul.db_expired_contacts -6.1. ul.dump +6.1. ul.dump Dumps the content of the location table Parameters: * None. -6.2. ul.lookup table AOR +6.2. ul.lookup table AOR Looks up the contents of an AOR entry in the location table @@ -933,7 +931,7 @@ modparam("usrloc", "db_insert_null", 1) * AOR - user AOR in username[@domain] format (domain must be supplied only if use_domain option is on). -6.3. ul.rm table AOR +6.3. ul.rm table AOR Deletes an entire AOR record (including its contacts). @@ -942,7 +940,7 @@ modparam("usrloc", "db_insert_null", 1) * AOR - user AOR in username[@domain] format (domain must be supplied only if use_domain option is on). -6.4. ul.rm_contact table AOR contact +6.4. ul.rm_contact table AOR contact Deletes a contact from an AOR record. @@ -952,11 +950,11 @@ modparam("usrloc", "db_insert_null", 1) only if use_domain option is on). * contact - exact contact to be removed -6.5. ul.flush +6.5. ul.flush Triggers the flush of USRLOC memory cache into DB. -6.6. ul.add +6.6. ul.add Adds a new contact for an user AOR. @@ -972,7 +970,7 @@ modparam("usrloc", "db_insert_null", 1) * cflags - per branch flags of the contact * methods - mask with supported requests of the contact -6.7. ul.db_users +6.7. ul.db_users Tell number of different users (AoRs) in a location table that have unexpired contacts. @@ -981,7 +979,7 @@ modparam("usrloc", "db_insert_null", 1) * table name - location table where the users are looked for, for example, location. -6.8. ul.db_contacts +6.8. ul.db_contacts Tell number of unexpired contacts in a location table. @@ -989,7 +987,7 @@ modparam("usrloc", "db_insert_null", 1) * table name - location table where the contacts are looked for, for example, location. -6.9. ul.db_expired_contacts +6.9. ul.db_expired_contacts Tell number of expired contacts in a location table. @@ -1078,7 +1076,7 @@ Chapter 2. Developer Guide 1.15. ul_register_ulcb(type ,callback, param) 1.16. ul_get_num_users() -1.1. ul_register_domain(name) +1.1. ul_register_domain(name) The function registers a new domain. Domain is just another name for table used in registrar. The function is called from fixups in @@ -1093,7 +1091,7 @@ Chapter 2. Developer Guide * const char* name - Name of the domain (also called table) to be registered. -1.2. ul_insert_urecord(domain, aor, rec) +1.2. ul_insert_urecord(domain, aor, rec) The function creates a new record structure and inserts it in the specified domain. The record is structure that contains all the @@ -1108,7 +1106,7 @@ Chapter 2. Developer Guide * urecord_t** rec - The newly created record structure. -1.3. ul_delete_urecord(domain, aor) +1.3. ul_delete_urecord(domain, aor) The function deletes all the contacts bound with the given Address Of Record. @@ -1120,7 +1118,7 @@ Chapter 2. Developer Guide * str* aor - Address of record (aka username) of the record, that should be deleted. -1.4. ul_delete_urecord_by_ruid(domain, ruid) +1.4. ul_delete_urecord_by_ruid(domain, ruid) The function deletes from given domain a contact with given ruid. @@ -1130,7 +1128,7 @@ Chapter 2. Developer Guide * str* ruid - ruid of contact that should be deleted. -1.5. ul_get_urecord(domain, aor) +1.5. ul_get_urecord(domain, aor) The function returns pointer to record with given Address of Record. @@ -1140,7 +1138,7 @@ Chapter 2. Developer Guide * str* aor - Address of Record of request record. -1.6. ul_lock_udomain(domain) +1.6. ul_lock_udomain(domain) The function lock the specified domain, it means, that no other processes will be able to access during the time. This prevents race @@ -1151,14 +1149,14 @@ Chapter 2. Developer Guide Meaning of the parameters is as follows: * udomain_t* domain - Domain to be locked. -1.7. ul_unlock_udomain(domain) +1.7. ul_unlock_udomain(domain) Unlock the specified domain previously locked by ul_lock_udomain. Meaning of the parameters is as follows: * udomain_t* domain - Domain to be unlocked. -1.8. ul_release_urecord(record) +1.8. ul_release_urecord(record) Do some sanity checks - if all contacts have been removed, delete the entire record structure. @@ -1166,7 +1164,7 @@ Chapter 2. Developer Guide Meaning of the parameters is as follows: * urecord_t* record - Record to be released. -1.9. ul_insert_ucontact(record, contact, expires, q, callid, cseq, flags, +1.9. ul_insert_ucontact(record, contact, expires, q, callid, cseq, flags, cont, ua, sock) The function inserts a new contact in the given record with specified @@ -1187,7 +1185,7 @@ cont, ua, sock) * struct socket_info *sock - socket on which the REGISTER message was received on. -1.10. ul_delete_ucontact (record, contact) +1.10. ul_delete_ucontact (record, contact) The function deletes given contact from record. @@ -1197,7 +1195,7 @@ cont, ua, sock) * ucontact_t* contact - Contact to be deleted. -1.11. ul_get_ucontact(record, contact) +1.11. ul_get_ucontact(record, contact) The function tries to find contact with given Contact URI and returns pointer to structure representing the contact. @@ -1207,7 +1205,7 @@ cont, ua, sock) * str_t* contact - URI of the request contact. -1.12. ul_get_all_ucontacts (buf, len, flags) +1.12. ul_get_all_ucontacts (buf, len, flags) The function retrieves all contacts of all registered users and returns them in the caller-supplied buffer. If the buffer is too small, the @@ -1228,7 +1226,7 @@ cont, ua, sock) * unsigned int flags - Flags that must be set. -1.13. ul_update_ucontact(contact, expires, q, callid, cseq, set, res, ua, +1.13. ul_update_ucontact(contact, expires, q, callid, cseq, set, res, ua, sock) The function updates contact with new values. @@ -1247,7 +1245,7 @@ sock) * struct socket_info *sock - socket on which the REGISTER message was received on. -1.14. ul_bind_ursloc( api ) +1.14. ul_bind_ursloc( api ) The function imports all functions that are exported by the USRLOC module. Overs for other modules which want to user the internal USRLOC @@ -1256,7 +1254,7 @@ sock) Meaning of the parameters is as follows: * usrloc_api_t* api - USRLOC API -1.15. ul_register_ulcb(type ,callback, param) +1.15. ul_register_ulcb(type ,callback, param) The function register with USRLOC a callback function to be called when some event occures inside USRLOC. @@ -1269,6 +1267,6 @@ sock) * void *param - some parameter to be passed to the callback each time when it is called. -1.16. ul_get_num_users() +1.16. ul_get_num_users() The function loops through all domains summing up the number of users. diff --git a/modules/utils/README b/modules/utils/README index 43e3f21893e..152ea54030f 100644 --- a/modules/utils/README +++ b/modules/utils/README @@ -8,9 +8,9 @@ Carsten Bock ng-voice GmbH - Copyright (c) 2008-2009 Juha Heinanen + Copyright 2008-2009 Juha Heinanen - Copyright (c) 2013 Carsten Bock, ng-voice GmbH + Copyright 2013 Carsten Bock, ng-voice GmbH __________________________________________________________________ Table of Contents @@ -183,7 +183,7 @@ modparam("utils", "xcap_table", "pres_xcap") 4.1. http_query(url, [post-data], result) 4.2. xcap_auth_status(watcher_uri, presentity_uri) -4.1. http_query(url, [post-data], result) +4.1. http_query(url, [post-data], result) Sends HTTP GET or POST request according to URL given in "url" parameter, which is a string that may contain pseudo variables. @@ -221,7 +221,7 @@ switch ($retcode) { } ... -4.2. xcap_auth_status(watcher_uri, presentity_uri) +4.2. xcap_auth_status(watcher_uri, presentity_uri) Function checks in the presence server database if a watcher is authorized to subscribe to event "presence" of presentity. Sphere diff --git a/modules/websocket/README b/modules/websocket/README index 49d869368ca..28187b43701 100644 --- a/modules/websocket/README +++ b/modules/websocket/README @@ -4,7 +4,7 @@ Peter Dunkley Crocodile RCS Ltd - Copyright © 2012-2013 Crocodile RCS Ltd + Copyright 2012-2013 Crocodile RCS Ltd __________________________________________________________________ Table of Contents @@ -129,11 +129,11 @@ Chapter 1. Admin Guide 2.1. Initiating a connection A WebSocket connection is initiated with an HTTP GET. The xhttp module - is used to handle this GET and call the Section 5.1, “ - ws_handle_handshake() ” exported function. + is used to handle this GET and call the Section 5.1, " + ws_handle_handshake() " exported function. event_route[xhttp:request] should perform some validation of the HTTP - headers before calling Section 5.1, “ ws_handle_handshake() ”. The + headers before calling Section 5.1, " ws_handle_handshake() ". The event_route can also be used to make sure the HTTP GET has the correct URI, perform HTTP authentication on the WebSocket connection, and check the Origin header (RFC 6454) to ensure a browser-based SIP UA or MSRP @@ -436,7 +436,7 @@ modparam("websocket", "cors_mode", 2) 5.1. ws_handle_handshake() 5.2. ws_close([status, reason[, connection_id]]) -5.1. ws_handle_handshake() +5.1. ws_handle_handshake() This function checks an HTTP GET request for the required headers and values, and (if successful) upgrades the connection from HTTP to @@ -455,7 +455,7 @@ Note ws_handle_handshake(); ... -5.2. ws_close([status, reason[, connection_id]]) +5.2. ws_close([status, reason[, connection_id]]) This function closes a WebSocket connection. @@ -496,7 +496,7 @@ ws_close(4000, "Because I say so"); Name: ws.dump Parameters: - * order (optional) - “id_hash”, “used_desc”, or “used_asc”. + * order (optional) - "id_hash", "used_desc", or "used_asc". Note @@ -581,7 +581,7 @@ Note 7.1. websocket:closed -7.1. websocket:closed +7.1. websocket:closed When defined, the module calls event_route[websocket:closed] when a connection closes. The connection may be identified using the the $si diff --git a/modules/xcap_client/README b/modules/xcap_client/README index 6ca0313f9fb..2aeeb314682 100644 --- a/modules/xcap_client/README +++ b/modules/xcap_client/README @@ -8,7 +8,7 @@ Edited by Anca-Maria Vamanu - Copyright © 2007 Voice Sistem SRL + Copyright 2007 Voice Sistem SRL __________________________________________________________________ Table of Contents @@ -89,7 +89,7 @@ Chapter 1. Admin Guide queries, applicable to any kind of XCAP server or with an management command that should be sent by the server upon an update. - The module is currently used by the “presence_xml” module, if the + The module is currently used by the "presence_xml" module, if the 'integrated_xcap_server' parameter is not set. 2. Dependencies @@ -119,7 +119,7 @@ Chapter 1. Admin Guide The database url. - Default value is “mysql://openser:openserrw@localhost/openser”. + Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". Example 1.1. Set db_url parameter ... @@ -130,7 +130,7 @@ modparam("xcap_client", "db_url", "dbdriver://username:password@dbhost/dbname") The name of the db table where XCAP documents are stored. - Default value is “xcap”. + Default value is "xcap". Example 1.2. Set xcap_table parameter ... @@ -146,7 +146,7 @@ modparam("xcap_client", "xcap_table", "xcaps") To disable it set this parameter to 0. - Default value is “1”. + Default value is "1". Example 1.3. Set periodical_query parameter ... @@ -160,7 +160,7 @@ modparam("xcap_client", "periodical_query", 0) To disable it set this parameter to 0. - Default value is “100”. + Default value is "100". Example 1.4. Set query_period parameter ... @@ -175,7 +175,7 @@ modparam("xcap_client", "query_period", 50) 5.1. refreshXcapDoc -5.1. refreshXcapDoc +5.1. refreshXcapDoc Management command that should be sent by an XCAP server when a stored document changes. @@ -207,7 +207,7 @@ Chapter 2. Developer Guide callback to be called when the management command refreshXcapDoc is received and the document in question is retrieved. -1. bind_xcap_api(xcap_api_t* api) +1. bind_xcap_api(xcap_api_t* api) This function allows binding the needed functions. @@ -230,7 +230,7 @@ typedef struct xcap_api { }xcap_api_t; ... -2. get_elem +2. get_elem Field type: ... @@ -296,7 +296,7 @@ typedef struct ns_list If the intention is to retrieve the whole document this argument must be NULL. -3. register_xcb +3. register_xcb Field type: ... diff --git a/modules/xcap_server/README b/modules/xcap_server/README index ae39965094b..8b34860363b 100644 --- a/modules/xcap_server/README +++ b/modules/xcap_server/README @@ -10,7 +10,7 @@ Daniel-Constantin Mierla - Copyright © 2010 asipto.com + Copyright 2010 asipto.com __________________________________________________________________ Table of Contents @@ -44,10 +44,10 @@ Daniel-Constantin Mierla List of Examples - 1.1. Set the “db_url” parameter - 1.2. Set the “xcap_table” parameter + 1.1. Set the "db_url" parameter + 1.2. Set the "xcap_table" parameter 1.3. Set url_match parameter - 1.4. Set the “buf_size” parameter + 1.4. Set the "buf_size" parameter 1.5. Set xml_ns parameter 1.6. Set directory_scheme parameter 1.7. Set directory_hostname parameter @@ -146,9 +146,9 @@ Chapter 1. Admin Guide Database URL. - Default value is “mysql://kamailio:kamailiorw@localhost/kamailio”. + Default value is "mysql://kamailio:kamailiorw@localhost/kamailio". - Example 1.1. Set the “db_url” parameter + Example 1.1. Set the "db_url" parameter ... modparam("xcap_server", "db_url", "mysql://user:passwd@host.com/dbname") ... @@ -157,9 +157,9 @@ modparam("xcap_server", "db_url", "mysql://user:passwd@host.com/dbname") The name of table where to store the xcap documents. - Default value is “xcap”. + Default value is "xcap". - Example 1.2. Set the “xcap_table” parameter + Example 1.2. Set the "xcap_table" parameter ... modparam("xcap_server", "xcap_table", "xcapdocs") ... @@ -179,9 +179,9 @@ modparam("xcap_server", "xcap_root", "/xcap-root/") Size of local buffer for handling XCAP documents. - Default value is “1024”. + Default value is "1024". - Example 1.4. Set the “buf_size” parameter + Example 1.4. Set the "buf_size" parameter ... modparam("xcap_server", "buf_size", 2048) ... @@ -252,7 +252,7 @@ modparam("xcap_server", "directory_hostname", "xcap.example.com") 4.2. xcaps_get(uri, path) 4.3. xcaps_del(uri, path) -4.1. xcaps_put(uri, path, doc) +4.1. xcaps_put(uri, path, doc) Handle XCAP PUT command. @@ -272,7 +272,7 @@ event_route[xhttp:request] { } ... -4.2. xcaps_get(uri, path) +4.2. xcaps_get(uri, path) Handle XCAP GET command. @@ -292,7 +292,7 @@ event_route[xhttp:request] { } ... -4.3. xcaps_del(uri, path) +4.3. xcaps_del(uri, path) Handle XCAP DELETE command. @@ -319,7 +319,7 @@ event_route[xhttp:request] { target, domain, uri_adoc. Exported pseudo-variables are documented at - http://www.kamailio.org/dokuwiki/. + http://www.kamailio.org/wiki/. Example 1.11. $xcapuri(...) PV ... diff --git a/modules/xhttp/README b/modules/xhttp/README index 92ec726ce67..972ee4f05ad 100644 --- a/modules/xhttp/README +++ b/modules/xhttp/README @@ -10,8 +10,6 @@ Daniel-Constantin Mierla -Edited by - Alex Balashov diff --git a/modules/xhttp_pi/README b/modules/xhttp_pi/README index 0bf12d4362c..96373d2d6cd 100644 --- a/modules/xhttp_pi/README +++ b/modules/xhttp_pi/README @@ -10,7 +10,7 @@ Ovidiu Sas - Copyright © 2012-2013 VoIP Embedded Inc. + Copyright 2012-2013 VoIP Embedded Inc. __________________________________________________________________ Table of Contents @@ -286,7 +286,7 @@ modparam("xhttp", "framework", "/usr/local/etc/kamailio/pi_framework.xml") 7.1. dispatch_xhttp_pi() -7.1. dispatch_xhttp_pi() +7.1. dispatch_xhttp_pi() Handle the HTTP request and generate a response. @@ -314,7 +314,7 @@ event_route[xhttp:request] { 8.1. xhttp_pi.reload -8.1. xhttp_pi.reload +8.1. xhttp_pi.reload Reloads the xml framework. diff --git a/modules/xhttp_rpc/README b/modules/xhttp_rpc/README index b85f033e012..3f988b8c20e 100644 --- a/modules/xhttp_rpc/README +++ b/modules/xhttp_rpc/README @@ -10,13 +10,11 @@ Ovidiu Sas -Edited by - Alex Balashov - Copyright © 2011 VoIPEmbedded Inc. + Copyright 2011 VoIPEmbedded Inc. __________________________________________________________________ Table of Contents @@ -145,7 +143,7 @@ modparam("xhttp", "xhttp_rpc_buf_size", 1024) 4.1. dispatch_xhttp_rpc() -4.1. dispatch_xhttp_rpc() +4.1. dispatch_xhttp_rpc() Handle the HTTP request and generate a response. diff --git a/modules/xmlops/README b/modules/xmlops/README index 51893bfaa76..2a3a7a76221 100644 --- a/modules/xmlops/README +++ b/modules/xmlops/README @@ -1,4 +1,3 @@ - XMLOPS Module Daniel-Constantin Mierla @@ -7,7 +6,7 @@ Daniel-Constantin Mierla Copyright 2009 asipto.com - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -26,7 +25,7 @@ Daniel-Constantin Mierla 4. Pseudo-Variables - 4.1. $xml(name=>spec) + 4.1. $xml(name=>spec) List of Examples @@ -51,11 +50,11 @@ Chapter 1. Admin Guide 4. Pseudo-Variables - 4.1. $xml(name=>spec) + 4.1. $xml(name=>spec) 1. Overview - This is a module implementing functions and pseudo-variables for XML + This is a module implementing functions and pseudo-variables for XML operations. 2. Dependencies @@ -70,7 +69,7 @@ Chapter 1. Admin Guide 2.2. External Libraries or Applications - The following libraries or applications must be installed before + The following libraries or applications must be installed before running kamailio with this module loaded: * libxml - for compilation from source, the development headers from this library are needed as well. @@ -93,7 +92,7 @@ modparam("xmlops", "buf_size", 8192) 3.2. xml_ns (str) - Register xml namespace prefix. Parameter value must have the format: + Register xml namespace prefix. Parameter value must have the format: 'prefix=uri'. Example 1.2. Set xml_ns parameter @@ -103,11 +102,11 @@ modparam("xmlops", "xml_ns", "rpid=urn:ietf:params:xml:ns:pidf:rpid") 4. Pseudo-Variables - 4.1. $xml(name=>spec) + 4.1. $xml(name=>spec) -4.1. $xml(name=>spec) +4.1. $xml(name=>spec) - Pseudo-variable for XML document operations using xpath syntax. For + Pseudo-variable for XML document operations using xpath syntax. For more see the Pseudo-Variables Cookbook. Example 1.3. xml usage diff --git a/modules/xprint/README b/modules/xprint/README index 3688619ba5e..679b4d20dc4 100644 --- a/modules/xprint/README +++ b/modules/xprint/README @@ -1,4 +1,3 @@ - The Xprint Module Elena-Ramona Modroiu @@ -6,7 +5,7 @@ Elena-Ramona Modroiu Asipto Copyright 2003 FhG FOKUS - _________________________________________________________________ + __________________________________________________________________ Table of Contents @@ -20,8 +19,8 @@ Elena-Ramona Modroiu 4. Functions - 4.1. xplog(level, format) - 4.2. xpdbg(format) + 4.1. xplog(level, format) + 4.2. xpdbg(format) 2. Developer Guide @@ -29,21 +28,21 @@ Elena-Ramona Modroiu 1.1. Functions - 1.1.1. int xbind(xl_api_t *xl_api) - 1.1.2. int xparse(char *s, xl_elog_p *el) - 1.1.3. int shm_xparse(char *s, xl_elog_p *el) - 1.1.4. int xparse2(char *s, xl_elog_p *el, - xl_parse_cb cb) + 1.1.1. int xbind(xl_api_t *xl_api) + 1.1.2. int xparse(char *s, xl_elog_p *el) + 1.1.3. int shm_xparse(char *s, xl_elog_p *el) + 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb + cb) 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, - xl_parse_cb cb) + xl_parse_cb cb) - 1.1.6. xfree(xl_elog_p el) - 1.1.7. shm_xfree(xl_elog_p el) + 1.1.6. xfree(xl_elog_p el) + 1.1.7. shm_xfree(xl_elog_p el) 1.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, - char *buf, int *len) + char *buf, int *len) - 1.1.9. str *xnulstr() + 1.1.9. str *xnulstr() List of Examples @@ -63,19 +62,19 @@ Chapter 1. Admin Guide 4. Functions - 4.1. xplog(level, format) - 4.2. xpdbg(format) + 4.1. xplog(level, format) + 4.2. xpdbg(format) 1. Overview - IMPORTANT: this is former xlog module from SIP Express Router (SER) - kept because it is used by other modules via API to get the value for - strings with specifiers. If you want to print log messages from + IMPORTANT: this is former xlog module from SIP Express Router (SER) + kept because it is used by other modules via API to get the value for + strings with specifiers. If you want to print log messages from configuration file, use the real module named 'xlog'. - This module provides the possibility to print user formatted log or - debug messages from SER scripts, similar to printf function but now a - specifier is replaced with a part of the SIP request. Section 2, + This module provides the possibility to print user formatted log or + debug messages from SER scripts, similar to printf function but now a + specifier is replaced with a part of the SIP request. Section 2, "Implemented Specifiers" shows what can be printed out. 2. Implemented Specifiers @@ -86,14 +85,14 @@ Chapter 1. Admin Guide * %ci : call-id * %cs : cseq * %ct : contact header - * %Cxy : color printing based on escape sequences (x - foreground - color, y - background color). The values for colors: x - default - color of the terminal; s - Black; r - Red; g - Green; y - Yellow; - b - Blue; p - Purple; c - Cyan; w - White + * %Cxy : color printing based on escape sequences (x - foreground + color, y - background color). The values for colors: x - default + color of the terminal; s - Black; r - Red; g - Green; y - Yellow; b + - Blue; p - Purple; c - Cyan; w - White * %ds : destination set * %fu : 'From' uri * %ft : 'From' tag - * %Hn : host's hostname (if system hostname is FQDN, part before + * %Hn : host's hostname (if system hostname is FQDN, part before first .) * %Hd : host's domain (if system hosntame is FQDN, part behind first .) @@ -112,7 +111,7 @@ Chapter 1. Admin Guide * %rr : reply's reason * %rs : reply's status * %rt : 'Refer-To' uri - * %Ri : IP address of the interface where the request has been + * %Ri : IP address of the interface where the request has been received * %Rp : received port * %si : IP source address @@ -125,32 +124,32 @@ Chapter 1. Admin Guide * %ua : User agent header field * %uq : unique id (per SER's process) - to make really unique id use %uq-%px-%mx or %uq-%px-%Tx - * %{name[N]} : print the body of the Nth header identified by - 'name'. If [N] is omitted then the body of the first header is - printed. The first header is got when N=0, for the second N=1, - a.s.o. To print the last header of that type, use -1, no other - negative values are supported now. No white spaces are allowed - inside the specifier (before }, before or after {, [, ] symbols). - When N='*', all headers of that type are printed. - The module should identify most of compact header names (the ones + * %{name[N]} : print the body of the Nth header identified by 'name'. + If [N] is omitted then the body of the first header is printed. The + first header is got when N=0, for the second N=1, a.s.o. To print + the last header of that type, use -1, no other negative values are + supported now. No white spaces are allowed inside the specifier + (before }, before or after {, [, ] symbols). When N='*', all + headers of that type are printed. + The module should identify most of compact header names (the ones recognized by ser which should be all at this moment), if not, the compact form has to be specified explicitely. It is recommended to - use dedicated specifiers for headers (e.g., %ua for user agent + use dedicated specifiers for headers (e.g., %ua for user agent header), if they are available -- they are faster. * % : print the value of AVP optionally %indexed by the [N] value It uses AVPs subindexing, e.g. if you don't specify subindex and there are more AVPs with the same name, the result is NULL. To - specify first AVP use [1], negative values are indexes counted + specify first AVP use [1], negative values are indexes counted backward through the list. - * %@select.framework[N].value : print the value of select framework - call. For detailed info what calls are available see select + * %@select.framework[N].value : print the value of select framework + call. For detailed info what calls are available see select framework documentation (and modules documentation, as modules can extend select framework calls). * %| or %(space) : end of %@select.framework identifier. If you need - to concatenate select framework call and another non-whitespace - literal, you need to explicitelly set the end of the select + to concatenate select framework call and another non-whitespace + literal, you need to explicitelly set the end of the select framework identifier. - E.g. %@ruri.user%|@%@ruri.host converts all featured request uri + E.g. %@ruri.user%|@%@ruri.host converts all featured request uri into user@host form only. 3. Parameters @@ -170,10 +169,10 @@ modparam("xprint", "buf_size", 8192) 4. Functions - 4.1. xplog(level, format) - 4.2. xpdbg(format) + 4.1. xplog(level, format) + 4.2. xpdbg(format) -4.1. xplog(level, format) +4.1. xplog(level, format) Print a formated message using LOG function. @@ -194,7 +193,7 @@ modparam("xprint", "buf_size", 8192) xplog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> 2nd via <%{via[1]}>\n"); ... -4.2. xpdbg(format) +4.2. xpdbg(format) Print a formatted message using DBG function. @@ -214,50 +213,50 @@ Chapter 2. Developer Guide 1.1. Functions - 1.1.1. int xbind(xl_api_t *xl_api) - 1.1.2. int xparse(char *s, xl_elog_p *el) - 1.1.3. int shm_xparse(char *s, xl_elog_p *el) - 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) + 1.1.1. int xbind(xl_api_t *xl_api) + 1.1.2. int xparse(char *s, xl_elog_p *el) + 1.1.3. int shm_xparse(char *s, xl_elog_p *el) + 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb - cb) + cb) - 1.1.6. xfree(xl_elog_p el) - 1.1.7. shm_xfree(xl_elog_p el) + 1.1.6. xfree(xl_elog_p el) + 1.1.7. shm_xfree(xl_elog_p el) 1.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char - *buf, int *len) + *buf, int *len) - 1.1.9. str *xnulstr() + 1.1.9. str *xnulstr() 1. Module API 1.1. Functions - 1.1.1. int xbind(xl_api_t *xl_api) - 1.1.2. int xparse(char *s, xl_elog_p *el) - 1.1.3. int shm_xparse(char *s, xl_elog_p *el) - 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - 1.1.6. xfree(xl_elog_p el) - 1.1.7. shm_xfree(xl_elog_p el) + 1.1.1. int xbind(xl_api_t *xl_api) + 1.1.2. int xparse(char *s, xl_elog_p *el) + 1.1.3. int shm_xparse(char *s, xl_elog_p *el) + 1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) + 1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) + 1.1.6. xfree(xl_elog_p el) + 1.1.7. shm_xfree(xl_elog_p el) 1.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char *buf, - int *len) + int *len) - 1.1.9. str *xnulstr() + 1.1.9. str *xnulstr() 1.1. Functions -1.1.1. int xbind(xl_api_t *xl_api) +1.1.1. int xbind(xl_api_t *xl_api) Bind to the xprint module API. Meaning of the parameters is as follows: - * xl_api - structure that the xprint module functions are bind to. - The functions can be executed as xl_api.xparse(), + * xl_api - structure that the xprint module functions are bind to. + The functions can be executed as xl_api.xparse(), xl_api.xprint()... Return value: 0 - success, <0 - error. -1.1.2. int xparse(char *s, xl_elog_p *el) +1.1.2. int xparse(char *s, xl_elog_p *el) Parse an xl-formatted string in private memory. @@ -267,30 +266,30 @@ Chapter 2. Developer Guide Return value: 0 - success, <0 - error. -1.1.3. int shm_xparse(char *s, xl_elog_p *el) +1.1.3. int shm_xparse(char *s, xl_elog_p *el) - Parse an xl-formatted string in shared memory. See xparse() function + Parse an xl-formatted string in shared memory. See xparse() function for details. -1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) +1.1.4. int xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - Parse an xl-formatted string in private memory. This function is able - to identify regular expression back references, for example \1, \2, - \3... When a back reference is found the callback function is called - that is supposed to farther parse the back reference and fill in the + Parse an xl-formatted string in private memory. This function is able + to identify regular expression back references, for example \1, \2, + \3... When a back reference is found the callback function is called + that is supposed to farther parse the back reference and fill in the xl_elog structure. Meaning of the parameters is as follows: * s - string to be parsed. * el - returned xl-lib list. - * cb - callback function for parsing the regular expression back + * cb - callback function for parsing the regular expression back references. - The prototype of the callback function is: typedef int (*xl_parse_cb) + The prototype of the callback function is: typedef int (*xl_parse_cb) (str *s, int shm, xl_elog_p el); Parameters of the callback function: - * s - regular expression back reference to be parsed (without the + * s - regular expression back reference to be parsed (without the leading '\' character). * shm - indicates whether or not shared memory needs to be used. (1: shared memory, 0: private memory) @@ -299,26 +298,26 @@ Chapter 2. Developer Guide Return value: 0 - success, <0 - error. -1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) +1.1.5. int shm_xparse2(char *s, xl_elog_p *el, xl_parse_cb cb) - Parse an xl-formatted string in shared memory supporting regular + Parse an xl-formatted string in shared memory supporting regular expression back references. See xparse2() function for details. -1.1.6. xfree(xl_elog_p el) +1.1.6. xfree(xl_elog_p el) Free the xl-lib list allocated by xparse() or xparse2(). Meaning of the parameters is as follows: * el - xl-lib list to be freed. -1.1.7. shm_xfree(xl_elog_p el) +1.1.7. shm_xfree(xl_elog_p el) Free the xl-lib list allocated by shm_xparse() or shm_xparse2(). Meaning of the parameters is as follows: * el - xl-lib list to be freed. -1.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char *buf, int *len) +1.1.8. int xprint(struct sip_msg* msg, xl_elog_p el, char *buf, int *len) Evaluate the xl-formatted string and print the result into a buffer. @@ -326,11 +325,11 @@ Chapter 2. Developer Guide * msg - SIP message pointer. * el - xl-lib list to be evaluated. * buf - pre-allocated buffer that is filled in with the result. - * len - length of the printed string. len needs to be set to the + * len - length of the printed string. len needs to be set to the maximum length of the result buffer before calling this function. Return value: 0 - success, <0 - error. -1.1.9. str *xnulstr() +1.1.9. str *xnulstr() Return the string "".