diff --git a/modules/b2b_logic/README b/modules/b2b_logic/README index 18d321dc5d8..9c4a5523235 100644 --- a/modules/b2b_logic/README +++ b/modules/b2b_logic/README @@ -509,14 +509,14 @@ modparam("b2b_logic", "b2bl_early_update", 1) simple pass-through of messages from one side to another, and no additional scripting or dedicated routes are required. - * flags (string, optional) - meanings of the flags is as - follows: - + t[nn] - Call setup timeout. 0 sets timeout to - max_duration value. Example: t300. - + a - Transparent authentication. In this mode b2b - passes your 401 or 407 authentication request to - destination server. - + p - Preserve To: header. + * flags (string, optional) - CSV list of the following flags: + + setup-timeout=[nn] - Call setup timeout. 0 sets + timeout to max_duration value. Example: + "setup-timeout=300". + + transparent-auth - Transparent authentication. In this + mode b2b passes your 401 or 407 authentication request + to destination server. + + preserve-to - Preserve To: header. * req_route (string, optional) - name of the script route to be called when requests belonging to this B2B session are received. This parameter will override the global @@ -634,25 +634,25 @@ b2b_client_new("client1", "sip:alice@opensips.org"); * provmedia_uri (string, optional) - URI of the provisional media server to be connected with the caller while the callee answers. - * flags (string, optional) - meanings of the flags is as - follows: - + t[nn] - Maximum duration of the B2B session. If the - lifetime expires, the B2BUA will send BYE messages to - both ends and delete the record. Example: t300. - + n - Enable rfc3515 NOTIFY to inform the agent sending - the REFER of the status of the reference. - + f - Rollback call to state before bridging in case of - transfer failed, don't hangup the call (default - behaviour). - + h - Put the old entity on hold before bridging it to - the new entity. - + r - Do not attempt late SDP negociation with the new - entity. Start the bridging by first contacting the new - entity using the initial SDP received from the old - entity. After the new entity answers, send a reINVITE - without body to the old entity. Use the current SDP - received in this new answer from the old entity to - trigger a renegociation with the new entity. + * flags (string, optional) - CSV list of the following flags: + + max_duration=[nn] - Maximum duration of the B2B + session. If the lifetime expires, the B2BUA will send + BYE messages to both ends and delete the record. + Example: "max_duration=300". + + notify - Enable rfc3515 NOTIFY to inform the agent + sending the REFER of the status of the reference. + + rollback-failed - Rollback call to state before + bridging in case of transfer failed, don't hangup the + call (default behaviour). + + hold - Put the old entity on hold before bridging it + to the new entity. + + no-late-sdp - Do not attempt late SDP negociation with + the new entity. Start the bridging by first contacting + the new entity using the initial SDP received from the + old entity. After the new entity answers, send a + reINVITE without body to the old entity. Use the + current SDP received in this new answer from the old + entity to trigger a renegociation with the new entity. This function can be used from the b2b_logic request routes. diff --git a/modules/cfgutils/README b/modules/cfgutils/README index c0194012804..30079d1e9f2 100644 --- a/modules/cfgutils/README +++ b/modules/cfgutils/README @@ -30,7 +30,7 @@ cfgutils Module 1.4.10. set_count(var_to_count, ret_var) 1.4.11. set_select_weight(int_list_var) 1.4.12. ts_usec_delta(t1_sec, t1_usec, t2_sec, - t2_usec, delta) + t2_usec, [delta_str], [delta_int]) 1.4.13. check_time_rec(time_string, [timestamp]) 1.4.14. get_static_lock(key) @@ -424,18 +424,23 @@ set_count($avp(dids), $var(num_dids)); $var(next_gw_idx) = set_select_weight($avp(gw_success_rates)); ... -1.4.12. ts_usec_delta(t1_sec, t1_usec, t2_sec, t2_usec, delta) +1.4.12. ts_usec_delta(t1_sec, t1_usec, t2_sec, t2_usec, [delta_str], +[delta_int]) - This function returns the difference between two timestamps, - specified in seconds and microseconds. The result is returned - in the last parameter, expressed in microseconds. + This function returns the absolute difference between the two + given timestamps. The result is expressed as microseconds and + can be returned as either string or integer. + + WARNING: when using delta_int, the function will return error + code -1 in case the difference overflows the signed integer + holder! (i.e. a diff of ~35 minutes or more) This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE. Example 1.18. ts_usec_delta usage ... -ts_usec_delta($var(t1s), 300, 10, $var(t2ms), $var(result)); +ts_usec_delta($var(t1s), 300, 10, $var(t2us), $var(diff_str)); ... 1.4.13. check_time_rec(time_string, [timestamp]) diff --git a/modules/clusterer/README b/modules/clusterer/README index 992d4db1199..d93b11724ff 100644 --- a/modules/clusterer/README +++ b/modules/clusterer/README @@ -309,7 +309,7 @@ modparam("clusterer", "db_table", "clusterer") state) by any module build on top of clusterer engine, like dialog or presence. - Note that ohter tags may be dynamically learned during runtime + Note that other tags may be dynamically learned during runtime via clustering communication with other nodes. The format for this value is “tag_name / cluster_id = diff --git a/modules/dialog/README b/modules/dialog/README index 7a60ac0cdb4..c93713b990e 100644 --- a/modules/dialog/README +++ b/modules/dialog/README @@ -93,10 +93,10 @@ dialog Module 1.7.12. unset_dlg_profile(profile,[value]) 1.7.13. is_in_profile(profile,[value]) 1.7.14. get_profile_size(profile,[value],size) - 1.7.15. set_dlg_flag(idx) - 1.7.16. test_and_set_dlg_flag(idx, value) - 1.7.17. reset_dlg_flag(idx) - 1.7.18. is_dlg_flag_set(idx) + 1.7.15. set_dlg_flag(flag) + 1.7.16. test_and_set_dlg_flag(flag, value) + 1.7.17. reset_dlg_flag(flag) + 1.7.18. is_dlg_flag_set(flag) 1.7.19. store_dlg_value(name,val) 1.7.20. fetch_dlg_value(name,val) 1.7.21. set_dlg_sharing_tag(tag_name) @@ -903,9 +903,9 @@ modparam("dialog", "flags_column", "flags_c_name") 1.6.37. profiles_with_value (string) - List of names for profiles with values. Flags /b or /s allow - sharing profiles between OpenSIPS instances using the clusterer - module or a CacheDB backend, respectively. + List of names (alphanumerical) for profiles with values. Flags + /b or /s allow sharing profiles between OpenSIPS instances + using the clusterer module or a CacheDB backend, respectively. Default value is “empty”. @@ -917,9 +917,10 @@ annels/s; codecUsed/b;") 1.6.38. profiles_no_value (string) - List of names for profiles without values. Flags /b or /s allow - sharing profiles between OpenSIPS instances using the clusterer - module or a CacheDB backend, respectively. + List of names (alphanumerical) for profiles without values. + Flags /b or /s allow sharing profiles between OpenSIPS + instances using the clusterer module or a CacheDB backend, + respectively. Default value is “empty”. @@ -1462,7 +1463,7 @@ if ( get_dialogs_by_profile("caller",$fU,$avp(dlg_jsons),$avp(dlg_no)) ) if (load_dialog_ctx("$var(callid)")) { xlog("The dialog '$var(callid)' already has a duration " "of $DLG_lifetime seconds\n"); - if (is_in_profile("inbound_call")) + if (is_in_profile("inboundCall")) xlog("this dialog is an inbound call\n"); unload_dialog_ctx(); } @@ -1503,7 +1504,7 @@ if (load_dialog_ctx("$var(callid)")) { Example 1.63. set_dlg_profile usage ... -set_dlg_profile("inbound_call"); +set_dlg_profile("inboundCall"); set_dlg_profile("caller",$fu); ... @@ -1525,7 +1526,7 @@ set_dlg_profile("caller",$fu); Example 1.64. unset_dlg_profile usage ... -unset_dlg_profile("inbound_call"); +unset_dlg_profile("inboundCall"); unset_dlg_profile("caller",$fu); ... @@ -1553,7 +1554,7 @@ unset_dlg_profile("caller",$fu); Example 1.65. is_in_profile usage ... -if (is_in_profile("inbound_call")) { +if (is_in_profile("inboundCall")) { log("this request belongs to a inbound call\n"); } ... @@ -1593,14 +1594,14 @@ get_profile_size("caller", $fu, $var(size)); xlog("currently, the user $fu has $var(size) active outgoing calls\n"); ... -1.7.15. set_dlg_flag(idx) +1.7.15. set_dlg_flag(flag) - Sets the dialog flag index idx to true. The dialog flags are + Sets the dialog flag named flag to true. The dialog flags are dialog persistent and they can be accessed (set and test) for all requests belonging to the dialog. Parameters: - * idx (int) - The flag index can be between 0 and 31. + * flag (string, static) - The flag name. NOTE: the dialog must be created before using this function (use create_dialog() function before). @@ -1610,15 +1611,15 @@ xlog("currently, the user $fu has $var(size) active outgoing calls\n"); Example 1.67. set_dlg_flag usage ... -set_dlg_flag(3); +set_dlg_flag("MY_DLG_FLAG"); ... -1.7.16. test_and_set_dlg_flag(idx, value) +1.7.16. test_and_set_dlg_flag(flag, value) - Atomically checks if the dialog flag index idx is equal to + Atomically checks if the dialog flag named flag is equal to value. If true, changes the value with the opposite one. This operation is done under the dialog lock. - * idx (int) - The flag index can be between 0 and 31. + * flag (string, static) - The flag name. * value (int) - The value should be 0 (false) or 1 (true). NOTE: the dialog must be created before using this function @@ -1629,17 +1630,17 @@ set_dlg_flag(3); Example 1.68. test_and_set_dlg_flag usage ... -test_and_set_dlg_flag(3, 0); +test_and_set_dlg_flag("MY_DLG_FLAG", 0); ... -1.7.17. reset_dlg_flag(idx) +1.7.17. reset_dlg_flag(flag) - Resets the dialog flag index idx to false. The dialog flags are - dialog persistent and they can be accessed (set and test) for - all requests belonging to the dialog. + Resets the dialog flag named flag to false. The dialog flags + are dialog persistent and they can be accessed (set and test) + for all requests belonging to the dialog. Parameters: - * idx (int) - The flag index can be between 0 and 31. + * flag (string, static) - The flag name. NOTE: the dialog must be created before using this function (use create_dialog() function before). @@ -1649,17 +1650,17 @@ test_and_set_dlg_flag(3, 0); Example 1.69. reset_dlg_flag usage ... -reset_dlg_flag(16); +reset_dlg_flag("MY_DLG_FLAG"); ... -1.7.18. is_dlg_flag_set(idx) +1.7.18. is_dlg_flag_set(flag) - Returns true if the dialog flag index idx is set. The dialog + Returns true if the dialog flag named flag is set. The dialog flags are dialog persistent and they can be accessed (set and test) for all requests belonging to the dialog. Parameters: - * idx (int) - The flag index can be between 0 and 31. + * flag (string, static) - The flag name. NOTE: the dialog must be created before using this function (use create_dialog() function before). @@ -1669,8 +1670,8 @@ reset_dlg_flag(16); Example 1.70. is_dlg_flag_set usage ... -if (is_dlg_flag_set(16)) { - xlog("dialog flag 16 is set\n"); +if (is_dlg_flag_set("MY_DLG_FLAG")) { + xlog("dialog flag MY_DLG_FLAG is set\n"); } ... @@ -2041,7 +2042,7 @@ GIwZjAzNGM1ZDY * value (optional)- string value to toughen the check; MI FIFO Command Format: - opensips-cli -x mi profile_get_size inbound_calls + opensips-cli -x mi profile_get_size inboundCalls 1.9.5. profile_list_dlgs @@ -2062,7 +2063,7 @@ GIwZjAzNGM1ZDY * value (optional)- string value to toughen the check; MI FIFO Command Format: - opensips-cli -x mi profile_list_dlgs inbound_calls + opensips-cli -x mi profile_list_dlgs inboundCalls 1.9.6. profile_get_values @@ -2077,7 +2078,7 @@ GIwZjAzNGM1ZDY * profile - name of the profile to list the dialog for. MI FIFO Command Format: - opensips-cli -x mi profile_get_values inbound_calls + opensips-cli -x mi profile_get_values inboundCalls 1.9.7. profile_end_dlgs @@ -2094,7 +2095,7 @@ GIwZjAzNGM1ZDY only the dialogs with the specified value MI FIFO Command Format: - opensips-cli -x mi profile_end_dlgs inbound_calls + opensips-cli -x mi profile_end_dlgs inboundCalls 1.9.8. dlg_db_sync @@ -2286,10 +2287,10 @@ GIwZjAzNGM1ZDY 1.10.4. $DLG_flags - Returns the dialog flags array (as a single integer value) of - the dialog corresponding to the processed sequential request. - This PV will be available only for sequential requests, after - doing loose_route(). + Returns the dialog flags (as a list of flag names separted by + space) of the dialog corresponding to the processed sequential + request. This PV will be available only for sequential + requests, after doing loose_route(). NULL will be returned if there is no dialog for the request. diff --git a/modules/dispatcher/README b/modules/dispatcher/README index 9eac14f76ac..92be4ab70f6 100644 --- a/modules/dispatcher/README +++ b/modules/dispatcher/README @@ -1215,10 +1215,15 @@ opensips-cli -x mi ds_list Parameters: * partition (optional) - name of the partition to be - reloaded. + reloaded. default partition is "default". + * inherit_state (optional) : whether inherit old state of the + destination , default is y. + + “n”: no inherit state + + “y”: inherit state MI FIFO Command Format: opensips-cli -x mi ds_reload +opensips-cli -x mi ds_reload inherit_state=n 1.5.4. ds_push_script_attrs diff --git a/modules/mid_registrar/README b/modules/mid_registrar/README index 49ff1c7ac32..fa98ab1f5a6 100644 --- a/modules/mid_registrar/README +++ b/modules/mid_registrar/README @@ -1029,57 +1029,61 @@ ownership_tag]]]]) registrar. If a database is used, then this must be name of the usrloc table which stores the contacts * flags (string, optional) - string of the following flags: - + 'm' (Memory only) - save the contacts only in memory - cache without no DB operation; - + 'r' (no Reply) - do not generate a SIP reply to the - current REGISTER request. - + 'cNN' (max Contacts) - this flag can be used to limit - the number of contacts for this AOR (Address of - Record) in the user location database. A value of 0 - disables the check. Specifying this parameter will - override the global max_contacts module parameter. - + 'f' (Force registration) - this flag can be used to - force the registration of NEW contacts even if the - maximum number of contacts is reached. In such cases, - older contacts will be removed to make space for the - new ones, without exceeding the maximum allowed - number. This flag only makes sense if "cNN" is used. - + 'o' (Only request contacts) - Only include the - REGISTER request's Contacts in the 200 OK reply, in - case the registration is successful. While this is - against RFC 3261, it may be useful in certain - scenarios. - + 'Mxx' (contact Matching mode) - How the matching + + 'memory-only' - (old m flag) save the contacts only in + memory cache without no DB operation; + + 'no-reply' - (old r flag) do not generate a SIP reply + to the current REGISTER request. + + 'max-contacts=[int]' - (old c flag) this flag can be + used to limit the number of contacts for this AOR + (Address of Record) in the user location database. + Value 0 disables the check. This parameter overrides + the global "max_contacts" module parameter. + + 'force-registration' - (old f flag) this flag can be + used to force the registration of NEW contacts even if + the maximum number of contacts is reached. In such a + case, older contacts will be removed to make space to + the new ones, without exceeding the maximum allowed + number. This flag makes sense only if "max-contacts" + is used. + + 'matching-mode=[val]' - (old M flag) How the matching should be performed between the uploaded contacts (by the currently handled REGISTER) and the already know contacts (in memory or DB). This options will be used only for the current operation and can be: - o 'M0' - contact URI matching only - o 'M1' - contact URI and SIP Call-ID matching - o 'M' - only the value of the given URI + o '0' - contact URI matching only + o '1' - contact URI and SIP Call-ID matching + o '' - only the value of the given URI param will be used for matching (for example - M) - + 'p0' (Path support - 'off' mode) The Path header is - saved into usrloc, but is never included in the reply. - + 'p1' (Path support - 'loose' mode) The Path header is - always saved into usrloc, and is only included in the - reply if Path support is indicated in the registration - request by the “path” option of the “Supported” - header. - + 'p2' (Path support - 'strict' mode) The path header is - only saved into usrloc if Path support is indicated in + ) + + 'path-off' - (old p0 flag) (Path support - 'off' mode) + - The Path header is saved into usrloc, but is never + included in the reply. + + 'path-lazy' - (old p1 flag) (Path support - lazy mode) + The Path header is saved into usrloc, but is only + included in the reply if path support is indicated in the registration request by the “path” option of the - “Supported” header. If no Path support is indicated, - the request is rejected with “420 - Bad Extension” and - the header “Unsupported: path” is included in the - reply along with the received “Path” header. This mode - is the one recommended by RFC 3327. - + 'v' (path receiVed) if set, the “received” parameter - of the first Path URI of a registration is set as - received-uri and the NAT branch flag is set for this - contact. This is useful if the registrar is placed - behind a SIP loadbalancer, which passes the nat'ed UAC - address as “received” parameter in it's Path uri. + “Supported” header. + + 'path-strict' - (old p2 flag) (Path support - strict + mode) - The path header is only saved into usrloc, if + path support is indicated in the registration request + by the “path” option of the “Supported” header. If no + path support is indicated, the request is rejected + with “420 - Bad Extension” and the header + “Unsupported: path” is included in the reply along + with the received “Path” header. This mode is the one + recommended by RFC-3327. + + 'path-received' - (old v flag) if set, the “received” + parameter of the first Path URI of a registration is + set as received-uri and the NAT branch flag is set for + this contact. This is useful if the registrar is + placed behind a SIP loadbalancer, which passes the + nat'ed UAC address as “received” parameter in it's + Path uri. + + 'only-request-contacts' - (old o flag) Only include + the REGISTER request's Contacts in the 200 OK reply, + in case the registration is successful. While this is + against RFC 3261, it may be useful in certain + scenarios. * aor (string, optional) - a custom Address-of-Record. If not given, the AOR will be taken from the To header URI * outgoing_expires (int, optional) - only relevant in @@ -1173,8 +1177,8 @@ if (is_method("REGISTER")) { registrar. If a database is used, then this must be name of the usrloc table which stores the contacts * flags (string, optional) - + 'b' (no Branches) - this flag controls how the - mid_registrar_lookup() function processes multiple + + 'no-branches' - (old b flag) this flag controls how + the mid_registrar_lookup() function processes multiple contacts. If there are multiple contacts for the given username in usrloc and this flag is not set, Request-URI will be overwritten with the highest-q @@ -1183,13 +1187,13 @@ if (is_method("REGISTER")) { the flag is set, only Request-URI will be overwritten with the highest-q rated contact and the rest will be left unprocessed. - + 'B' (to Branches only) - this flags forces all found - contacts to be uploaded only as branches (in the - destination set) and not at all in the R-URI of the - current message. Using this option allows the + + 'to-branches-only' - (old B flag) this flags forces + all found contacts to be uploaded only as branches (in + the destination set) and not at all in the R-URI of + the current message. Using this option allows the mid_registrar_lookup() function to also be used in the context of a SIP reply. - + 'r' (bRanch lookup) - this flag enables searching + + 'branch' - (old r flag) this flag enables searching through existing branches for aor's and expanding them to contacts. For example, you have got AOR A in your ruri but you also want to forward your calls to AOR B. @@ -1198,31 +1202,34 @@ if (is_method("REGISTER")) { expand AOR B to contacts, which will be put back into the branches. The AOR's that were in branches before the function call shall be removed. - WARNING: if you want this flag activated, the 'b' (no - Branches) flag must not be set, because by setting + WARNING: if you want this flag activated, the + 'no-branches' flag must not be set, because by setting that flag you won't allow mid_registrar_lookup() to write in a branch. - + 'm' (Method filtering) - setting this flag will enable - contact filtering based on the supported methods - listed in the "Allow" header field during + + 'method-filtering' - (old m flag) setting this flag + will enable contact filtering based on the supported + methods listed in the "Allow" header field during registration. Contacts which did not present an "Allow" header field during registration are assumed to support all standard SIP methods. - + 'u' (User-Agent filtering) - this flag enables regexp - filtering by user-agent. It's useful with enabled - append_branches parameter. Regexp must follow the 'u' - flag and must use format like 'u/regexp/'. - + 'i' (Case insensitive search) - this flag enables case - insensitive filtering for the 'u' flag. - + 'e' (Use extended regexp) - this flag enables using of - extended regexp format for the 'u' flag. - + 'g' (Global lookup) - this flag is only relevant with - federated user location clustering. If set, the - mid_registrar_lookup() function will not only perform - the classic in-memory "search-AoR-and-push-branches" - operation, but will also perform a metadata lookup and - append an additional branch for each returned result. - The "in-memory branches" correspond to local contacts + + 'ua-filtering=[val]' (old u flag) (User-Agent + filtering) - this flag enables regexp filtering by + user-agent. It's useful with enabled append_branches + parameter. The value must use the format '/regexp/'. + + 'case-insensitive' (old i flag) - this flag enables + case insensitive filtering for the 'ua-filtering' + flag. + + 'extended-regexp' - (old e flag) this flag enables + using of extended regexp format for the 'ua-filtering' + flag. + + 'global' (old g flag) (Global lookup) - this flag is + only relevant with federated user location clustering. + If set, the mid_registrar_lookup() function will not + only perform the classic in-memory + "search-AoR-and-push-branches" operation, but will + also perform a metadata lookup and append an + additional branch for each returned result. The + "in-memory branches" correspond to local contacts (current location), while the "metadata branches" correspond to contacts available on one or more of the remaining locations of the platform. @@ -1234,14 +1241,15 @@ if (is_method("REGISTER")) { information: o the AoR (e.g. "vladimir@federation-cluster") o the home IP (e.g. "10.0.0.223") - + 'yXXXXX' (Max pinging latency) - maximally accepted - contact pinging latency (microseconds). Contacts of an - AoR with a higher latency will be discarded during - mid_registrar_lookup(). - + 'Y' (Sort by pinging latency) - contacts will be + + 'max-ping-latency=[int]' - (old y flag) maximally + accepted contact pinging latency (microseconds). + Contacts of an AoR with a higher latency will be + discarded during mid_registrar_lookup(). + + 'sort-by-latency' - (old Y flag) contacts will be picked in ascending order of their last successful pinging latency (fastest ping -> slowest ping). This - flag may work together with the "y" flag. + flag may work together with the "max-ping-latency" + flag. * aor (string, optional) - a custom Address-of-Record. If not given, the AOR will be taken from the Request-URI diff --git a/modules/nathelper/README b/modules/nathelper/README index 68b3942ef6f..b5d7a2219ce 100644 --- a/modules/nathelper/README +++ b/modules/nathelper/README @@ -479,21 +479,23 @@ if (search("User-Agent: Cisco ATA.*") { "a=oldoip" for old origin ip and "a=oldcip" for old meda ip. Meaning of the parameters is as follows: - * flags (int) - the value may be a bitwise OR of the - following flags: - + 0x01 - adds “a=direction:active” SDP line; - + 0x02 - rewrite media IP address (c=) with source - address of the message or the provided IP address (the - provided IP address takes precedence over the source - address). - + 0x04 - adds “a=nortpproxy:yes” SDP line; - + 0x08 - rewrite IP from origin description (o=) with - source address of the message or the provided IP - address (the provided IP address takes precedence over - the source address). - + 0x10 - force rewrite of null media IP and/or origin IP - address. Without this flag, null IPs are left - untouched. + * flags (string) - the value may be a CSV of the following + flags: + + add-dir-active - (old 0x01 flag) adds + “a=direction:active” SDP line; + + rewrite-media-ip - (old 0x02 flag) rewrite media IP + address (c=) with source address of the message or the + provided IP address (the provided IP address takes + precedence over the source address). + + add-no-rtpproxy - (old 0x04 flag) adds + “a=nortpproxy:yes” SDP line; + + rewrite-origin-ip - (old 0x08 flag) rewrite IP from + origin description (o=) with source address of the + message or the provided IP address (the provided IP + address takes precedence over the source address). + + rewrite-null-ips - (old 0x10 flag) force rewrite of + null media IP and/or origin IP address. Without this + flag, null IPs are left untouched. * ip_address (string, optional) - IP to be used for rewriting SDP. If not specified, the received signalling IP will be used. NOTE: For the IP to be used, you need to use 0x02 or @@ -558,24 +560,27 @@ fix_nated_register(); Tries to guess if client's request originated behind a nat. The parameter determines what heuristics is used. - Meaning of the flags (int) parameter is as follows: - * 1 - Contact header field is searched for occurrence of - RFC1918 / RFC6598 addresses. - * 2 - the "received" test is used: address in Via is compared - against source IP address of signaling - * 4 - Top Most VIA is searched for occurrence of RFC1918 / - RFC6598 addresses - * 8 - SDP is searched for occurrence of RFC1918 / RFC6598 - addresses - * 16 - test if the source port is different from the port in - Via - * 32 - address in Contact is compared against source IP - address of signaling - * 64 - Port in Contact is compared against source port of + Meaning of the flags (string) parameter is as follows: + * private-contact - (old 1 flag) Contact header field is + searched for occurrence of RFC1918 / RFC6598 addresses. + * diff-ip-src-via - (old 2 flag) the "received" test is used: + address in Via is compared against source IP address of signaling - - All flags can be bitwise combined, the test returns true if any - of the tests identified a NAT. + * private-via - (old 4 flag) Top Most VIA is searched for + occurrence of RFC1918 / RFC6598 addresses + * private-sdp - (old 8 flag) SDP is searched for occurrence + of RFC1918 / RFC6598 addresses + * diff-port-src-via - (old 16 flag) test if the source port + is different from the port in Via + * diff-ip-src-contact - (old 32 flag) address in Contact is + compared against source IP address of signaling + * diff-port-src-contact - (old 64 flag) Port in Contact is + compared against source port of signaling + * carrier-grade-nat - (old 128 flag) also include RFC 6333 + addresses in the checks for ct, via and sdp flags. + + A CSV of the above flags can be provided, the test returns true + if any of the tests identified a NAT. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE. diff --git a/modules/python/README b/modules/python/README index 4e98116d035..db916d9b660 100644 --- a/modules/python/README +++ b/modules/python/README @@ -106,9 +106,13 @@ Chapter 1. Admin Guide available only for requests * set_dst_uri() - sets the destination URI of the message; available only for requests - * getHeader() - returns the header of a message the - destination address (OpenSIPS address) of the message - * call_function() - calls a function from the script + * getHeader() - returns the header of a message + * call_function() - calls built-in script function or + function exported by other module + * get_pseudoVar(name) - returns the value of the the + pseudo-variable specified by the name as Unicode string. + * set_pseudoVar(name, value) - sets pseudo-variable using + Unicode string value. 1.2. Dependencies @@ -163,7 +167,7 @@ modparam("python", "child_init_method", "child_initializer") 1.4.1. python_exec(method_name [, extra_args]) - Thhis function is used to execute a method from the Python + This function is used to execute a method from the Python module loaded. This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, diff --git a/modules/registrar/README b/modules/registrar/README index 84b78ede61c..04979604209 100644 --- a/modules/registrar/README +++ b/modules/registrar/README @@ -792,71 +792,78 @@ modparam("registrar", "pn_enable_purr", true) If database is used then this must be name of the table which stores the contacts. * flags (string, optional) - string of the following flags: - + 'm' (Memory only) - save the contacts only in memory - cache without no DB operation; - + 'r' (no Reply) - do not generate a SIP reply to the - current REGISTER request. - + 's' (Socket header) - look into REGISTER request for a - header which contains a socket description - (proto:IP:port). This socket info will be stored by - register instead of the received socket info. - + 'cnn' (max Contacts) - this flag can be used to limit - the number of contacts for this AOR (Address of - Record) in the user location database. Value 0 - disables the check. This parameter overrides the - global "max_contacts" module parameter. - + 'e(int)' (minimum expires) - this flag can be used to - set minimum register expiration time. Values lower - than this minimum will be automatically set to the - minimum. Value 0 disables the checking. This parameter - overrides the global min_expires module parameter. - + 'E(int)' (maximum expires) - this flag can be used to - set maximum register expiration time. Values higher - than this maximum will be automatically set to the - maximum. Value 0 disables the checking. This parameter - overrides the global max_expires module parameter. - + 'f' (force registration) - this flag can be used to - force the registration of NEW contacts even if the - maximum number of contacts is reached. In such a case, - older contacts will be removed to make space to the - new ones, without exceeding the maximum allowed - number. This flag makes sense only if "cxx" is used. - + 'o' (Only request contacts) - Only include the - REGISTER request's Contacts in the 200 OK reply, in - case the registration is successful. While this is - against RFC 3261, it may be useful in certain - scenarios. - + 'Mxx' (contact Matching mode) - How the matching + + 'memory-only' - (old m flag) save the contacts only in + memory cache without no DB operation; + + 'no-reply' - (old r flag) do not generate a SIP reply + to the current REGISTER request. + + 'max-contacts=[int]' - (old c flag) this flag can be + used to limit the number of contacts for this AOR + (Address of Record) in the user location database. + Value 0 disables the check. This parameter overrides + the global "max_contacts" module parameter. + + 'force-registration' - (old f flag) this flag can be + used to force the registration of NEW contacts even if + the maximum number of contacts is reached. In such a + case, older contacts will be removed to make space to + the new ones, without exceeding the maximum allowed + number. This flag makes sense only if "max-contacts" + is used. + + 'matching-mode=[val]' - (old M flag) How the matching should be performed between the uploaded contacts (by the currently handled REGISTER) and the already know contacts (in memory or DB). This options will be used only for the current operation and can be: - o 'M0' - contact URI matching only - o 'M1' - contact URI and SIP Call-ID matching - o 'M' - only the value of the given URI + o '0' - contact URI matching only + o '1' - contact URI and SIP Call-ID matching + o '' - only the value of the given URI param will be used for matching (for example - M) - + 'p0' (Path support - 'off' mode) The Path header is - saved into usrloc, but is never included in the reply. - + 'p1' (Path support - lazy mode) The Path header is - saved into usrloc, but is only included in the reply - if path support is indicated in the registration - request by the “path” option of the “Supported” - header. - + 'p2' (Path support - strict mode) The path header is - only saved into usrloc, if path support is indicated - in the registration request by the “path” option of - the “Supported” header. If no path support is - indicated, the request is rejected with “420 - Bad - Extension” and the header “Unsupported: path” is - included in the reply along with the received “Path” - header. This mode is the one recommended by RFC-3327. - + 'v' (path receiVed) if set, the “received” parameter - of the first Path URI of a registration is set as - received-uri and the NAT branch flag is set for this - contact. This is useful if the registrar is placed - behind a SIP loadbalancer, which passes the nat'ed UAC - address as “received” parameter in it's Path uri. + ) + + 'path-off' - (old p0 flag) (Path support - 'off' mode) + - The Path header is saved into usrloc, but is never + included in the reply. + + 'path-lazy' - (old p1 flag) (Path support - lazy mode) + The Path header is saved into usrloc, but is only + included in the reply if path support is indicated in + the registration request by the “path” option of the + “Supported” header. + + 'path-strict' - (old p2 flag) (Path support - strict + mode) - The path header is only saved into usrloc, if + path support is indicated in the registration request + by the “path” option of the “Supported” header. If no + path support is indicated, the request is rejected + with “420 - Bad Extension” and the header + “Unsupported: path” is included in the reply along + with the received “Path” header. This mode is the one + recommended by RFC-3327. + + 'path-received' - (old v flag) if set, the “received” + parameter of the first Path URI of a registration is + set as received-uri and the NAT branch flag is set for + this contact. This is useful if the registrar is + placed behind a SIP loadbalancer, which passes the + nat'ed UAC address as “received” parameter in it's + Path uri. + + 'only-request-contacts' - (old o flag) Only include + the REGISTER request's Contacts in the 200 OK reply, + in case the registration is successful. While this is + against RFC 3261, it may be useful in certain + scenarios. + + 'socket-header' - (old s flag) look into REGISTER + request for a header which contains a socket + description (proto:IP:port). This socket info will be + stored by register instead of the received socket + info. + + 'min-expires=[int]' - (old e flag) this flag can be + used to set minimum register expiration time. Values + lower than this minimum will be automatically set to + the minimum. Value 0 disables the checking. This + parameter overrides the global min_expires module + parameter. + + 'max-expires=[int]' - (old E flag) this flag can be + used to set maximum register expiration time. Values + higher than this maximum will be automatically set to + the maximum. Value 0 disables the checking. This + parameter overrides the global max_expires module + parameter. This parameter is a string composed of a set of flags. * aor (string, optional) - a custom AOR; if missing, the AOR will be taken from the default place - the TO header URI. @@ -883,14 +890,14 @@ save("location"); ... # save into 'location', do not update DB, max 5 contacts per AOR, # use default AOR (TO URI) -save("location","mc5"); +save("location","memory-only, max-contacts=5"); ... # save into 'location', no flags, use as AOR the FROM URI save("location","",$fu); ... # save into 'location', no DB update, force registration, take AOR from AVP -save("location","mr", $avp(aor)); +save("location","memory-only, no-reply", $avp(aor)); ... # save into 'location', mark the contacts with the "vip" ownership tag a nd @@ -975,10 +982,10 @@ remove("location", "sip:bob@atlanta.com", , , " slowest ping). This - flag may work together with the "y" flag. + flag may work together with the "max-ping-latency" + flag. * AOR (string, optional) - AOR to lookup for; if missing, the RURI is used as AOR; diff --git a/modules/tm/README b/modules/tm/README index f4f9d2812e3..24ed79f3838 100644 --- a/modules/tm/README +++ b/modules/tm/README @@ -103,6 +103,13 @@ tm Module 1.7.9. 5xx_transactions 1.7.10. 6xx_transactions 1.7.11. inuse_transactions + 1.7.12. retransmission_req_T1_1 + 1.7.13. retransmission_req_T1_2 + 1.7.14. retransmission_req_T1_3 + 1.7.15. retransmission_req_T2 + 1.7.16. retransmission_rpl_T2 + 1.7.17. timeout_finalresponse + 1.7.18. timeout_finalresponse 2. Developer Guide @@ -750,15 +757,14 @@ modparam("tm", "cluster_auto_cancel", no) The function may take two optional parameters. - The first parameter is a number representing a set of flags for - controlling the internal behaviour. The flags may be given in - decimal or hexa format; supported flags are: - * 0x01 - deprecated, not used any more - * 0x02 - do not internally generate and send a "477 Send - failed (477/TM)" SIP reply in case of a global forwarding - failure (i.e. forwarding for each branch has failed due to - internal errors, bad R-URI, bad message, lack of network - reachability, etc.). + The first parameter is a comma separated list of string flags + for controlling the internal behaviour. The supported flags + are: + * no-auto-477 - (old 0x02 flag) do not internally generate + and send a "477 Send failed (477/TM)" SIP reply in case of + a global forwarding failure (i.e. forwarding for each + branch has failed due to internal errors, bad R-URI, bad + message, lack of network reachability, etc.). This flag only applies if the transaction was not previously created by t_newtran(). When a global forwarding failure occurs, no SIP request is relayed and therefore no @@ -766,19 +772,22 @@ modparam("tm", "cluster_auto_cancel", no) failure_route, if one is set. Useful if you want to implement a failover logic for when none of the currently created branches can be forwarded to. - * 0x04 - disable the DNS failover for the transaction. Only - first IP will be used. It disables the failover both at - transport and transaction level. - * 0x08 - If the request is a CANCEL, trust and pass further - the Reason header from the received CANCEL - shortly, will - propagate the Reason header. - * 0x10 - Allows OpenSIPS to inspect and follow the - Content-Disposition "no-cancel" indication (if present). As - per RFC3841, section 9.1, the TM module may be instructed - not to cancel all ongoing branches when a 2xx reply is - received. It will keep the pending branches ongoing until - (1) all branches will receive a final reply or (2) the - transactionhits the timeout. + * no-dns-failover - (old 0x04 flag) disable the DNS failover + for the transaction. Only first IP will be used. It + disables the failover both at transport and transaction + level. + * pass-reason-hdr - (old 0x08 flag) If the request is a + CANCEL, trust and pass further the Reason header from the + received CANCEL - shortly, will propagate the Reason + header. + * allow-no-cancel - (old 0x10 flag) Allows OpenSIPS to + inspect and follow the Content-Disposition "no-cancel" + indication (if present). As per RFC3841, section 9.1, the + TM module may be instructed not to cancel all ongoing + branches when a 2xx reply is received. It will keep the + pending branches ongoing until (1) all branches will + receive a final reply or (2) the transactionhits the + timeout. The second parameter is a string representing an outbound proxy (a fixed destination) where the message should be sent. The @@ -1305,10 +1314,10 @@ t_relay(); Parameters: * uri (string) - * flags (int, optional) - a set of flags for controlling the - internal behaviour - for description see the above - “t_relay([flags])” function. Note that only 0x4 is - applicable here. + * flags (string, optional) - a set of flags for controlling + the internal behaviour - for description see the above + “t_relay([flags])” function. Note that only no-dns-failover + is applicable here. This functions can be used from REQUEST_ROUTE. @@ -1546,6 +1555,46 @@ NVITE" Number of transactions existing in memory at current time. +1.7.12. retransmission_req_T1_1 + + Number of request retransmissions due to T1 1 timer, the first + retransmission interval (typical 500ms). + +1.7.13. retransmission_req_T1_2 + + Number of request retransmissions due to T1 2 timer, the second + retransmission interval (typical 1s). + +1.7.14. retransmission_req_T1_3 + + Number of request retransmissions due to T1 3 timer, the third + retransmission interval (typical 2s). + +1.7.15. retransmission_req_T2 + + Number of request retransmissions due to T2 , the final + retransmission interval (typical 4s). + +1.7.16. retransmission_rpl_T2 + + Number of reply retransmissions, all done with the same + retransmission interval T2, typical 4s. + +1.7.17. timeout_finalresponse + + Number of transactional timeouts without receiving any kind of + reply (not even provisional) from the B side. Such timeouts + indicate a communication / reachability issue. Note: a single + transaction may count multiple such timeouts due forking. + +1.7.18. timeout_finalresponse + + Number of transactional INVITE timeouts without receiving a + FINAL reply (provisional may be received) from the B side. Such + timeouts indicate a "not answer" event and it is not a + signalling issue. Note: a single transaction may count multiple + such timeouts due forking. + Chapter 2. Developer Guide 2.1. Functions diff --git a/modules/uac/README b/modules/uac/README index ed2d65c39de..d9d6af89817 100644 --- a/modules/uac/README +++ b/modules/uac/README @@ -66,12 +66,6 @@ Chapter 1. Admin Guide If the dialog module is loaded and a dialog can be created, then the auto mode can be done more efficiently. - Known limitations in this version: - * authentication does not support qop auth-int, just qop - auth; - * CSeq not increased during authentication - the response may - be rejected. - 1.2. Dependencies 1.2.1. OpenSIPS Modules @@ -220,12 +214,45 @@ uac_restore_from(); credentials provided by the uac_auth module (static or via AVPs). + As optional parameter, the function may receive a list of auth + algorithms to be considered / supported during authentication: + * MD5, MD5-sess + * SHA-256, SHA-256-sess (may be missing, depends on lib + support) + * SHA-512-256, SHA-512-256-sess (may be missing, depends on + lib support) + + Note that the CSeq is automatically increased during + authentication. + This function can be used from FAILURE_ROUTE. + NOTE: when used without dialog support, the uac_auth() function + cannot be used for authenticating in-dialog requests, as there + is no mechanism to store the CSeq changes that are required for + ensuring the correctness of the dialog. The only exception are + BYE messages, which are the last messages within a call, hence + no further adjustments are needed. The function can still be + used for authenticating the initial INVITE though. + Example 1.8. uac_auth usage ... uac_auth(); ... +failure_route[check_auth] { + ... + if ($T_reply_code==407) { + if (uac_auth("MD5,MD5-sess")) { + # auth is succesful, just relay + t_relay(); + exit; + } + # auth failed (no credentials maybe) + # so continue handling the 407 reply + } + ... +} +... Chapter 2. Frequently Asked Questions