SIP-user (sipuser)

Description

Internal telephony subscriber account. It is used for registration, authentication, routing, call parameters definition, queuing. Each SIP user account has an internal number in the domain, dialing which causes all devices registered under that account to be called.

Allows you to register multiple devices under one account. In this case, all devices registered under this account are called up at once by account number. The number of devices that can be registered simultaneously is determined by the parameter 'lic.devices'. When a new registration is received, when all licensed connections have been exhausted, the availability of the registered devices is checked by sending an OPTIONS request. If a non-responsive device is detected, a replacement device is registered. Devices can register under an account using either the same or different credentials (login and password).

The primary login for authentication is the same as the logical username of the account (the 'login' field) and a primary password is applied to them (field 'pwd'). If necessary, additional authentication data can be set in the field 'credentials'.

Limitations

  • The collection is not available in the master domain.

  • If the license field in the database is changed after a domain reload, the object will not be loaded, the check by hash.

  • Licensed by a quantitative parameter: the license is consumed by the number of devices simultaneously registered under the account.

Fields

Entity structure
{
  "id": uuid,
  "name": str,
  "login": str,
  "pwd": str,
  "credentials": array<object>,
  "phonenumber": str,
  "reg": intbool,
  "devices": array<object>,
  "iduser": uuid,
  "timezone": float | "default",
  "lic": object,
  "opts": {
    "title": str,
    "comment": str,
    "ap_device_model": str,
    "ap_mac_address": str,
    "calltimesec": int,
    "modextout": str,
    "modextin": str,
    "trunks": int,
    "minexpires": int,
    "maxexpires": int,
    "dlgtimesec": int
  },
  "ext": {
    "ct": date,
    "lwt": date
  }
}
Table 1. Fields
Specification Description

Field: id
Mode: inout
Type: uuid
Default: generated

Identifier. Can be specified at creation, otherwise generated by the system.

Field: login
Mode: in
Type: str
Default: required

Logical username and primary login for authorization.
Substituted into the username URI of the To and From headers in SIP requests.
Can be applied for Digest-authorization together with the password in the field 'pwd'.
May contain the characters A-Za-z0-9_-.~!. The length must not be more than 100 characters.

Field: pwd
Mode: in
Type: str
Default: required

Password for main login.
Used for Digest-authorization together with the main login from the field 'login'.
Can contain any characters.

Field: credentials
Mode: in
Type: array<object>
Default: '[]'

Additional authentication credentials.
May be used for the purpose of:

  • separation of the logical username and the login used for authorization,

  • separation of authorization data for different devices registering under the same account.

Used exclusively for Digest authorization.
Defined in the form of a list of objects:

[
  {
    "login": ...
    "pwd": ...
  },  ...
]

Values are subject to requirements similar to the 'login' and 'pwd' fields of the main entity.

To use specific authorization data when configuring the device, enter both the basic logical name in the appropriate field and the specific login and password in the authorization data fields.

Field: name
Mode: in
Type: str
Default: required

Displayed Name. Substituted in username URI of From header in SIP requests.
May contain the characters A-Za-z0-9_-.~!. The length must not be more than 1000 characters.

It is allowed to specify modifier DisplayName,
more.

Field: phonenumber
Mode: in
Type: str
Default: empty

Telephone number of the subscriber within the domain.
May contain the characters 0-9, *, and # up to a maximum of 100.

If the phone number is empty, the account cannot be called in any way.
It is possible to make an outgoing call from the device if the filters of routing rules do not block the possibility of making a call by a subscriber with an empty number.

Accounts with empty numbers can be used for Hot-Desking.
When logging out using the built-in Hot Desk service, the account is also assigned a blank number.

Field: reg
Mode: in
Type: intbool
Default: 1

Registration Mode:
true – with registration,
false – without registration, it is additionally required to specify the list of devices in the field devices.

Field: devices
Mode: in
Type: array<object>
Default: '[]'

List of unregistered devices and their connection points, read more.
Only required to be filled in if reg = false, in which case the value must contain at least one device.

Field: iduser
Mode: in
Type: uuid
Default: empty

ID system user. One user can have multiple accounts sipuser.

Linking a user to a device account can be done either statically or as part of a subscriber function Hot-Desking.

Field: timezone
Mode: in
Type: float | "default"
Default: "default"`", "User’s time zone.
From `-12
to 12, such as 3.5, or default to apply the server’s time zone.
They are used in building call forwarding, building call routing, etc.

Field: lic
Mode: in
Type: object
Default: empty

Set of licenses transferred from the domain. Among the parameters the number of allowed devices for registration is expected, e.g. {"devices":5}.

Field: opts
Mode: in
Type: object
Composite field

Field: opts.title
Mode: in
Type: str
Default: empty

Arbitrary header

Field: opts.comment
Mode: in
Type: str
Default: empty

Arbitrary comment

Field: opts.ap_devices
Mode: in
Type: array(obj)
Default: []

Connected devices for conducting autoprovision.
It is a list alternative to fields
* opts.ap_mac_address
* opts.ap_device_model
* ext.ap_blf
* ext.ap_override

Object fields in the list:
* mac - MAC address string (12*HEX).
* device_model - string with the device model (e.g, "Yealink SIP-T21 E2").
* blf - list of objects, each of which defines one subscription element. Fields correspond to the model template "*.blf".
* override - list of "key = value" strings that should replace or supplement the template (text or xml).

Each element is a separate device with a unique MAC address and additional settings for service operation autoprovision.

Field: opts.ap_mac_address
Mode: in
Type: str
Default: str

MAC address of the device to conduct the autoprovision.
When a TFTP or PNP request is received, the device model is detected, a template (masterdomain.settings.ap_options.masks) is searched, populated with values from the account based on the paths specified in the template, and returned to the device for autoconfiguration.
The combination of the fields opts.ap_mac_address, opts.ap_device_model, ext.ap_blf, ext.ap_override is used to configure one specific device that has the mac address specified here. An alternative is to specify a list field opts.ap_devices.

Field: opts.ap_device_model
Mode: in
Type: str
Default: str

Device model for template definition autoprovision.
Applies when a TFTP request is received.
The combination of the fields opts.ap_mac_address, opts.ap_device_model, ext.ap_blf, ext.ap_override is used to configure one specific device that has the mac address specified here. An alternative is to specify a list field opts.ap_devices.

Field: opts.calltimesec
Mode: in
Type: int
Default: 30

Account call duration in seconds when a call is received to the account

Field: opts.dlgtimesec
Mode: in
Type: int
Default: 0

Maximum call duration in seconds. 0 - no individual limit is set

Field: opts.trunks
Mode: in
Type: int
Default: -1

Maximum number of simultaneous calls. Affects the ability to make a call to this account if there are other active calls.

  • -1 – no restriction has been set,

  • 0 – no incoming calls,

  • 1 – incoming is only allowed if the account is not busy in another call,

  • 2, 3, etc. - incoming is allowed only if the number of active conversations involving the account is less than the specified value.

Field: opts.minexpires
Mode: in
Type: int
Default: 30

Minimum allowable registration time

Field: opts.maxexpires
Mode: in
Type: int
Default: 3600

Maximum allowable registration time

Field: opts.modextin
Mode: in
Type: str
Default: empty

Modifier-calculator extension before accepting the call into processing.
Applies when you accept a call from an account.
Calculates the extension of the call initiator to undergo further routing and presentation.
The username value from the Contact:, From: header of the SIP request or from the phonenumber field of the account under which the incoming call is authorized is submitted for modification.
Read More.

Field: opts.modextout
Mode: in
Type: str
Default: empty

Modifier extension for outgoing call.
Applies when a call is sent to an account during the application of a routing rule with type "insidepbx". The connected device is treated as a PBX with many subscribers behind it.
The modification is applied to the value obtained as the remainder of the number dialed by the initiator after removing from its beginning the number of the called SIP-user account, which in turn is detected based on the longest occurrence of its number in the number dialed by the initiator.
Read More.

Field: opts.parallel
Mode: in
Type: array<str | object>
Default: empty

List of parallel call numbers.
Any call to an account number results in a simultaneous call to the specified concurrent numbers.
Any is direct, group, translated, forwarded, from a script.
In case an account number is used as a parallel number in functional group, the application of its parallel numbers depends on the cascading property of the functional group.

Each number can be specified as an object with number and calltimesec fields (optional), or as a string with a number.
If the call timeout of a parallel number is not set, the timeout of the main account of the called subscriber is set for it.

Applies when sending a call to an account, provided that absolute forwarding has not worked.
If the device is not registered, the number set as a forwarding number due to non-registration will also be called simultaneously with the parallel numbers.

The following types of numbers are allowed as parallel numbers:
* externals,* internal user numbers,* internal group numbers,* internal numbers behind the PBX,* service numbers like ivr (IVR scripts), voicemail_send (voice mail placement), hunt (hunt groups).
Other types of numbers are filtered out.
The parallel IVR script call eliminates the application of the record_ivr option from the role’s configuration settings.
If it is necessary to call another service function in parallel, forwarding should be used (due to equivalence because of the instantaneous response of all other service functions).

The cascade mode when deploying parallel numbers is disabled.

When parallel numbers are called in CDR and Remote-Party, information about the primary account is entered in CDR and Remote-Party. The primary account number is also used in the calculation of recording and shorthand rules.

Field: opts.redirect_allowed_masks
Mode: in
Type: array<str>
Default: ["/default"]

List of number masks allowed to be set in the device as a forwarding number.
If a 3xx forwarding to an unauthorized number is configured in the device, it is not processed by the server. The information is logged in the logfile.
There is a special mask - "/default", the specification of which leads to the application of masks configured in the domain properties (the parameter of the same name 'redirect_allowed_masks').

The mask can be used as a mask:

  • constants. For example, "414".

  • preset mask "*" - any number, works effectively.

  • special characters. For example "12XX", "8843*".

  • ranges. For example "/dia/1240+10".

  • regular expressions. For example "/reg/^(7|8)[0-8].*$".

Calculating a large number of regular expressions reduces overall system performance.

Field: ext
Mode: inout
Type: object
Compound field

Allows you to extend the compound with arbitrary keys and values

Field: ext.ct
Mode: out
Type: date
Default: generated

Object creation time

Field: ext.lwt
Mode: out
Type: date
Default: generated

Time of last modification of the object

Field: ext.ap_blf
Mode: in
Type: array(object)
Default: generated

Parameters to be substituted in the BLF section of the configuration auto-provisioned.
The combination of the fields opts.ap_mac_address, opts.ap_device_model, ext.ap_blf, ext.ap_override is used to configure one specific device that has the mac address specified here. An alternative is to specify a list field opts.ap_devices.

Example:

[
  {
    "key": 1,
    "label": "asdf",
    "pickup": "**",
"value": "AsDf"
  },
  {
    "key": 2,
    "label": "qwer",
    "module": 2,
"value": "QwEr"
  }
]

Field: ext.ap_override
Mode: in
Type: str
Default: generated

Modes of operation of modifiers DisplayName

Table 2. Modes of operation of modifiers DisplayName
Mode Description

Posymbolic

The initial value is posymbolic with accumulation passes through the specified modifier.
The following special characters and combinations are allowed:

  • {D} – substitute the original DisplayName from the incoming request.

  • {d} – same in lowercase.

  • {U} – substitute the original UserName from the incoming request.

  • {u} – same in lowercase.

  • {N} and {n} - substitute the generated full number of the request initiator (glued numbers of sipuser and extension).

  • {A} - substitute displayname from account addressbook contact found by full initiator number with extension. If the contact is not found, a void is substituted. Implemented by task #366.

  • {a} - same in lowercase.

  • {E} – to fill in the blank.

  • any other character is captured in the result at its corresponding position.

For example,- significance: "123456"
- From username: "SIP011"
- AddressBook contact displayname: "Walter White"
- modifier: "a - {u} - {A}"
- result: "a - sip011 - Walter White".

Regex

The Pattern pattern with Opts options is applied to the original value and the detected block(s) are replaced with the pattern Replace.
The result can be fed again to the next Regex-modification operation, and so on a finite number of times.

The general structure of the regex modifier value:
/reg/Pattern1/Replace1/Opts1 /reg/Pattern2/Replace2/Opts2 …​.

Options may be omitted, or may contain any combination of characters:

  • i – case-insensitive

  • g – global.

For example,- significance: "qwerty,qwerty"
- modifier: "/reg/t/E/g /reg/qwer/a/"
- Result: "aEy,qwerEy".

When forming Pattern and Replace patterns, all standard regular expression rules can be applied, including capture groups, backward lookup, substitution of named groups, etc.

Modes of operation of modifiers Extension

Table 3. Modes of operation of modifiers Extension
Mode Description

Posymbolic

The initial value is posymbolic with accumulation passes through the specified modifier.
The following special characters and combinations are allowed:

  • ? – grab the current character;

  • * – capture all remaining characters;

  • X – grab the current character;

  • / in combination with ? or X - exclude the current character from the result, e.g. /XXX/ excludes 3 current characters;

  • [ in combination with ] - include in the result the service character between the brackets, e.g. [X];

  • {U} – substitute the original UserName from the incoming request.

  • {u} – same in lowercase.

  • {N} and {n} - substitute the generated full number of the request initiator (glued numbers of sipuser and extension).

  • {F} and {f} - include username value from From: SIP request header in the result INVITE;

  • {C} and {c} - include username value from Contact: SIP request header in the result INVITE;

  • {E} and {e} - include an empty value in the result;

  • any other character is captured in the result at its corresponding position.

For example,- significance: "123456"
- modifier: "00/XXX/XXX"
- Result: "00456".

Regex

Identical to the "Regex" mode of the DisplayName modifier above

See also

Logical roles

  • b2b conducts routing and account application to organize forks to associated devices.