Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/manual/Interface-Binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The **Binary Internal Interface** is an OpenSIPS core interface which offers an

## Configuring the Binary Internal Interface listeners

In order to listen for incoming Binary Packets, a **bin:** interface must be specified. Its number of listener processes can be tuned with *[tcp_workers](https://docs.opensips.org/manual/devel/script-coreparameters#tcp_workers)* core parameter.
In order to listen for incoming Binary Packets, a **bin:** interface must be specified. Its number of listener processes can be tuned with *[tcp_workers](./Script-CoreParameters.md#tcp_workers)* core parameter.

```opensips

Expand All @@ -30,7 +30,7 @@ Examples of cluster-enabled modules which use the binary interface are **dialog*

```

More details can be found in the [dialog](../../modules/dialog/README.md#dialog_clustering) and [usrloc](../../modules/usrloc/README.md#distributed_sip_user_location) documentation pages.
More details can be found in the [dialog](../../modules/dialog/README.md#dialog-clustering) and [usrloc](../../modules/usrloc/README.md#distributed-sip-user-location) documentation pages.

---

Expand All @@ -42,7 +42,7 @@ In order to **send packets**, the interface provides the following primitives:
* *int bin_init(str *mod_name, int packet_type)* - begins the construction of a new Binary Packet
* *int bin_push_str(const str *info)* - add a string to the Binary Packet that is currently being built
* *int bin_push_int(int info)* - add an integer to the Binary Packet that is currently being built
* *int bin_send(union sockaddr_union *de*[tcp_workers](https://docs.opensips.org/manual/devel/script-coreparameters#tcp_workers) *core parameter.st)* - sends the Binary Packet to a given destination over UDP
* *int bin_send(union sockaddr_union *dest)* - sends the Binary Packet to a given destination over UDP



Expand Down
6 changes: 3 additions & 3 deletions docs/manual/Interface-CoreEvents.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Parameters:

Process Auto-Scaling (upscale and downscale).

This event is triggered whenever a new process is created (forked) or a process is terminated due the auto-scaling logic. In order to have this event trigger, the [auto-scaling](https://docs.opensips.org/manual/devel/script-coreparameters#auto_scaling_profile) must be enabled in your configuration.
This event is triggered whenever a new process is created (forked) or a process is terminated due the auto-scaling logic. In order to have this event trigger, the [auto-scaling](./Script-CoreParameters.md#auto_scaling_profile) must be enabled in your configuration.

Parameters:
* **group_type**: the type/name of the scaling group (UDP/TCP/TIMER).
Expand Down Expand Up @@ -93,15 +93,15 @@ Parameters:

Log message produced.

This event is triggered whenever a log message is produced by OpenSIPS. In order to have this event trigger, the [log_event_enabled](https://docs.opensips.org/manual/3-4/script-coreparameters#log_event_enabled) must be enabled in your configuration.
This event is triggered whenever a log message is produced by OpenSIPS. In order to have this event trigger, the [log_event_enabled](./Script-CoreParameters.md#log_event_enabled) must be enabled in your configuration.

Parameters:
* **time**: time when the log message was produced
* **pid**: the PID of the processes that produced this log message
* **level**: the log level of this message ("DBG", "INFO" etc.)
* **module**: module that produced this log message; absent for logs triggered from the script by the **xlog()** function
* **function**: internal function that produced this log message; absent for logs triggered from the script by the **xlog()** function
* **prefix**: logging prefix, configured via the [log_prefix](https://docs.opensips.org/manual/3-4/script-coreparameters#log_prefix) parameter. This parameter is absent if the parameter is not configured.
* **prefix**: logging prefix, configured via the [log_prefix](./Script-CoreParameters.md#log_prefix) parameter. This parameter is absent if the parameter is not configured.
* **message**: the actual log message content

## E_PROFILING_PROC
Expand Down
16 changes: 8 additions & 8 deletions docs/manual/Interface-CoreMI.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ Adds a rule to a non-readonly blacklist.

**Arguments**:
* *name*- the name of the blacklist to add to
* *rule* - a string containing a blacklist rule, according to [**dst_blacklist**](https://docs.opensips.org/manual/devel/script-coreparameters#dst_blacklist) parameter
* *rule* - a string containing a blacklist rule, according to [**dst_blacklist**](./Script-CoreParameters.md#dst_blacklist) parameter
* *expire* (optional) - indicates the number of seconds the rule should expire
**Output**: success or failed object.

Expand All @@ -429,7 +429,7 @@ Removes a rule from a non-readonly blacklist.

**Arguments**:
* *name* - the name of the blacklist to remove from
* *rule* - a string containing a blacklist rule, according to [**dst_blacklist**](https://docs.opensips.org/manual/devel/script-coreparameters#dst_blacklist) parameter
* *rule* - a string containing a blacklist rule, according to [**dst_blacklist**](./Script-CoreParameters.md#dst_blacklist) parameter
**Output**: success or failed object.

Examples of usage:
Expand Down Expand Up @@ -478,10 +478,10 @@ you can also terminate by id:
## Status Report

### status_report:get
The MI equivalent of the [sr_check_status() script function](https://docs.opensips.org/manual/devel/script-corefunctions#sr_check_status) - to get the status of an 'status/report' identifier/group.
The MI equivalent of the [sr_check_status() script function](./Script-CoreFunctions.md#sr_check_status-group-identifier) - to get the status of an 'status/report' identifier/group.

**Arguments**: a mandatory *group* and optional *identifier*, see the parameters of the [sr_check_status() script function](https://docs.opensips.org/manual/devel/script-corefunctions#sr_check_status).
**Output**: the readiness, the status and details of the identifier/group (see the aggregation note for the return code of the [sr_check_status() script function](https://docs.opensips.org/manual/devel/script-corefunctions#sr_check_status)
**Arguments**: a mandatory *group* and optional *identifier*, see the parameters of the [sr_check_status() script function](./Script-CoreFunctions.md#sr_check_status-group-identifier).
**Output**: the readiness, the status and details of the identifier/group (see the aggregation note for the return code of the [sr_check_status() script function](./Script-CoreFunctions.md#sr_check_status-group-identifier)

Examples of usage:
```bash
Expand All @@ -505,7 +505,7 @@ $ opensips-mi status_report:get drouting all
### status_report:status
Command to list the status of the identifiers within one or all 'status/report' groups.

**Arguments**: an optional 'status/report' *group*, see the [sr_check_status() script function](https://docs.opensips.org/manual/devel/script-corefunctions#sr_check_status) for more details.
**Arguments**: an optional 'status/report' *group*, see the [sr_check_status() script function](./Script-CoreFunctions.md#sr_check_status-group-identifier) for more details.
**Output**: the readiness, the status and details for all the identifiers within the requested group, or within all defined/registered groups.

Examples of usage:
Expand Down Expand Up @@ -553,7 +553,7 @@ $ opensips-mi status_report:status
Command to list the full set of reports (logs) collected by 'status/report' identifiers.

**Arguments**:
* an optional 'status/report' *group*, see the [sr_check_status() script function](https://docs.opensips.org/manual/devel/script-corefunctions#sr_check_status) for more details. If missing, all the groups will be listed.
* an optional 'status/report' *group*, see the [sr_check_status() script function](./Script-CoreFunctions.md#sr_check_status-group-identifier) for more details. If missing, all the groups will be listed.
* an optional 'identifier'. If missing, all the identifiers within the group will be listed.
**Output**: the reports/logs for the requested identifiers, or for all identifiers within the groups.

Expand Down Expand Up @@ -624,7 +624,7 @@ $ opensips-mi status_report:reports
Command to list all the existing identifiers in OpenSIPS or only from a certain group.

**Arguments**:
* an optional 'status/report' *group*, see the [sr_check_status() script function](https://docs.opensips.org/manual/3-3/script-corefunctions#sr_check_status) for more details. If missing, the identifiers from all the groups will be listed.
* an optional 'status/report' *group*, see the [sr_check_status() script function](./Script-CoreFunctions.md#sr_check_status-group-identifier) for more details. If missing, the identifiers from all the groups will be listed.
**Output**: an array of groups, each group being an array of identifiers .

Examples of usage:
Expand Down
12 changes: 6 additions & 6 deletions docs/manual/Interface-StatusReport.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ I most of the cases, the status and reports of an identifier are internally prod

## Scripting functions

The SR Interface provides a script function to check the readiness status of an identifier (or of an entire group), see the [sr_check_status( group, \[identifier\])](https://docs.opensips.org/manual/devel/script-corefunctions#sr_check_status) function.
The SR Interface provides a script function to check the readiness status of an identifier (or of an entire group), see the [sr_check_status( group, \[identifier\])](./Script-CoreFunctions.md#sr_check_status-group-identifier) function.

---

## MI functions

The SR Interface provides multiple functions to check/list the status of one/multiple identifiers and to list their reports:
* [sr_get_status](https://docs.opensips.org/manual/devel/interface-coremi#sr_get_status)
* [sr_list_status](https://docs.opensips.org/manual/devel/interface-coremi#sr_list_status)
* [sr_list_reports](https://docs.opensips.org/manual/devel/interface-coremi#sr_list_reports)
* [sr_list_identifiers](https://docs.opensips.org/manual/devel/interface-coremi#sr_list_identifiers)
* [status_report:get](./Interface-CoreMI.md#status_reportget)
* [status_report:status](./Interface-CoreMI.md#status_reportstatus)
* [status_report:reports](./Interface-CoreMI.md#status_reportreports)
* [status_report:identifiers](./Interface-CoreMI.md#status_reportidentifiers)

---

## Events

The SR framework raises an event each time the status of a Status/Report identifier changes. See the [E_CORE_SR_STATUS_CHANGED event](https://docs.opensips.org/manual/devel/interface-coreevents#E_CORE_SR_STATUS_CHANGED) for more details.
The SR framework raises an event each time the status of a Status/Report identifier changes. See the [E_CORE_SR_STATUS_CHANGED event](./Interface-CoreEvents.md#e_core_sr_status_changed) for more details.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/manual/Script-CoreFunctions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ add_local_rport();

## assert(statement, [description])

Only works if [enable_asserts](https://docs.opensips.org/manual/devel/script-coreparameters#mpath) is set to *true*. If the given expression evaluates to *false*, script execution is stopped and the [error_route](https://docs.opensips.org/manual/devel/script-routes#error_route) is executed. If [abort_on_assert](https://docs.opensips.org/manual/devel/script-coreparameters#dns_try_ipv6) is enabled, OpenSIPS will also shutdown.
Only works if [enable_asserts](./Script-CoreParameters.md#enable_asserts) is set to *true*. If the given expression evaluates to *false*, script execution is stopped and the [error_route](./Script-Routes.md#error_route) is executed. If [abort_on_assert](./Script-CoreParameters.md#abort_on_assert) is enabled, OpenSIPS will also shutdown.

Example of usage:
```opensips
Expand Down
12 changes: 6 additions & 6 deletions docs/manual/Script-CoreParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Default value is `false`.



Only relevant if [asserts](https://docs.opensips.org/manual/devel/script-corefunctions#assert) are enabled. Set to `true` to make OpenSIPS shut down immediately when a script assert fails.
Only relevant if [asserts](./Script-CoreFunctions.md#assertstatement-description) are enabled. Set to `true` to make OpenSIPS shut down immediately when a script assert fails.

Example of usage:
```opensips
Expand Down Expand Up @@ -443,7 +443,7 @@ Example of usage:
### enable_asserts
Default value is `false`.

Set to `true` to enable the [assert](https://docs.opensips.org/manual/devel/script-corefunctions#assert) script statement.
Set to `true` to enable the [assert](./Script-CoreFunctions.md#assertstatement-description) script statement.

Example of usage:
```opensips
Expand Down Expand Up @@ -1236,7 +1236,7 @@ Default value is `false`.
On top of RFC 5923 connection reuse, TCP connections in OpenSIPS are also persistent across multiple SIP dialogs. This can be controlled with the [tcp_connection_lifetime](#tcp_connection_lifetime) global parameter.

> [!WARNING]
> Enabling the global `tcp_accept_aliases` parameter for end-user initiated connections, which are most likely grouped by one or more public IPs, is an open vector for call hijacking. In such platforms, use the [force_tcp_alias()](https://docs.opensips.org/manual/devel/script-corefunctions#force_tcp_alias) core function to employ RFC 5923 behavior only with adjacent SIP proxies.
> Enabling the global `tcp_accept_aliases` parameter for end-user initiated connections, which are most likely grouped by one or more public IPs, is an open vector for call hijacking. In such platforms, use the [force_tcp_alias()](./Script-CoreFunctions.md#force_tcp_aliasport_alias) core function to employ RFC 5923 behavior only with adjacent SIP proxies.

Example of usage:
```opensips
Expand Down Expand Up @@ -1532,7 +1532,7 @@ xlog_buf_size = 8388608 # given in bytes

### xlog_force_color

Enables the use of [$C(xy)](Script-CoreVar.md#foreground-and-background-colors) color escape sequences in [xlog()](https://docs.opensips.org/manual/devel/script-corefunctions#xlog). Otherwise, color escape sequences have no effect. The default value is `false`.
Enables the use of [$C(xy)](Script-CoreVar.md#foreground-and-background-colors) color escape sequences in [xlog()](./Script-CoreFunctions.md#xloglog_level-format_string). Otherwise, color escape sequences have no effect. The default value is `false`.

Usage example:

Expand All @@ -1542,7 +1542,7 @@ xlog_force_color = true

### xlog_level

Similar to [log_level](#log_level), this parameter independently controls the verbosity of the [xlog()](https://docs.opensips.org/manual/devel/script-corefunctions#xlog) functions. This allows you to separately control the verbosity level for logs generated by code and logs generated by `xlog()`. The default value is `2` / `L_NOTICE`.
Similar to [log_level](#log_level), this parameter independently controls the verbosity of the [xlog()](./Script-CoreFunctions.md#xloglog_level-format_string) functions. This allows you to separately control the verbosity level for logs generated by code and logs generated by `xlog()`. The default value is `2` / `L_NOTICE`.

Usage example:

Expand All @@ -1552,7 +1552,7 @@ xlog_level = 3 # L_DBG

### xlog_print_level

Default level for printing logs generated by the [xlog()](https://docs.opensips.org/manual/devel/script-corefunctions#xlog) core function when the `log_level` parameter is omitted. The default value is `2` / `L_NOTICE`.
Default level for printing logs generated by the [xlog()](./Script-CoreFunctions.md#xloglog_level-format_string) core function when the `log_level` parameter is omitted. The default value is `2` / `L_NOTICE`.

Usage example:

Expand Down
4 changes: 2 additions & 2 deletions docs/manual/Script-Routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Example of usage:

Note that if a 'route(X)' is called from a 'branch_route[Y]' then in 'route[X]' is just processed each separate branch instead of all branches together as occurs in main route.

A route can return a set of values, that can later be retrieved from the route's calling context using the [`$return`](https://docs.opensips.org/manual/devel/script-corevar#return) variable.
A route can return a set of values, that can later be retrieved from the route's calling context using the [`$return`](./Script-CoreVar.md#return-value---return) variable.

Example of passing values:
```opensips
Expand Down Expand Up @@ -198,7 +198,7 @@ onreply_route[global] {

## error_route

The error route is executed automatically when a parsing error occurs during SIP request processing, or when a script [assert](https://docs.opensips.org/manual/devel/script-corefunctions#assert) fails. It allows the administrator to decide what to do in such error cases.
The error route is executed automatically when a parsing error occurs during SIP request processing, or when a script [assert](./Script-CoreFunctions.md#assertstatement-description) fails. It allows the administrator to decide what to do in such error cases.

> [!IMPORTANT]
> as this is triggered ONLY for SIP request, OpenSIPS has to be able to correctly parse the first line of the SIP message. So any syntax error in the first line will NOT trigger this route (as OpenSIPS will not be able to tell if a reply or request).
Expand Down
8 changes: 4 additions & 4 deletions docs/manual/Script-Syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ The OpenSIPS scripting language supports the following data types:
* Max value: +2,147,483,647 == 2 ^ 31 - 1
* Min value: -2,147,483,648 == - 2 ^ 31
* *string* (unlimited size)
* note that some functions which use strings may have internal buffers which limit the maximum size of the strings (e.g. the [xlog()](https://docs.opensips.org/manual/devel/script-corefunctions#socket_belongs_to_bond) function's output buffer is configurable via [xlog_buf_size](https://docs.opensips.org/manual/devel/script-coreparameters#udp_workers))
* note that some functions which use strings may have internal buffers which limit the maximum size of the strings (e.g. the [xlog()](./Script-CoreFunctions.md#xloglog_level-format_string) function's output buffer is configurable via [xlog_buf_size](./Script-CoreParameters.md#xlog_buf_size))
* *double* (packed as string), through the **[mathops](../../modules/mathops/README.md)** module

### Complex

* *list* via the **[`$avp` variable](https://docs.opensips.org/manual/devel/script-corevar#avp_variables)**
* *map* via the **[`$json`](../../modules/json/README.md#pv_json)** and **[`$xml`](../../modules/xml/README.md#pv_xml)** variables
* *list* via the **[`$avp` variable](./Script-CoreVar.md#avp-variables)**
* *map* via the **[`$json`](../../modules/json/README.md#jsonid)** and **[`$xml`](../../modules/xml/README.md#xmlpath)** variables

## Function Calling Conventions
All OpenSIPS [core](https://docs.opensips.org/manual/devel/script-corefunctions) and [module](https://docs.opensips.org/manual/devel/function-index) functions internally share the same function interface, such that they benefit from the following calling convention:
All OpenSIPS [core](./Script-CoreFunctions.md) and [module](./Function-Index.md) functions internally share the same function interface, such that they benefit from the following calling convention:



Expand Down
2 changes: 1 addition & 1 deletion modules/aaa_radius/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The left-hand side of the assignment must be an attribute name known by the RADI


The right-hand side of the assignment must be a script pseudo variable or
a script AVP. For more information about them see [CookBooks - Scripting Variables](https://docs.opensips.org/manual/devel/script-corevar/).
a script AVP. For more information about them see [CookBooks - Scripting Variables](../../docs/manual/Script-CoreVar.md).


```opensips title="Set sets parameter"
Expand Down
2 changes: 1 addition & 1 deletion modules/call_center/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ provisioning purposes - the *cc_flows* and
[DB schema](https://docs.opensips.org/manual/devel/install-dbschema/).
Data is loaded at startup and cached into memory ; runtime reload is
possible via the MI commands (see the *call_center:reload*
command in [exported mi functions](#exported_mi_functions)).
command in [exported mi functions](#exported-mi-functions)).


Additionally there is a table *cc_cdrs* for writing
Expand Down
Loading
Loading