Back to back UserAgent (b2b)

Description

A role that organizes switching between SIP devices by creating two-way dialogs.
Performs routing and calling of relevant devices with media flow organization between them via roles mgc and mg.

Reserved and scaled in mode Active-Active.

Services:
- Organization and maintenance of SIP-dialogs
- Managing the business logic of media context.
- Routing in the internal numbering plan.
- Calculation of subscriber representation.
- Forking (calling multiple registered devices or in multiple directions).
- Subscriber features: call forwarding, group number, intercept, intercom, intrusion, transfer, shoulder swap, multiple call…​.
- Chief-Secretary type groups.
- CDR Event Generation.
- Authorization of SIP calls.
- Maintenance of registrations.
- Maintenance of subscriptions (BLF, voicemail) and sending notifications.
- SIP service balancer.
- …​

Table 1. System Characteristics

Code

b2b

Mode of operation

Service

Backup mode

Active-Active

Types of sites

Any

Layer

Business logic

Placement

Internal

Saving and restoring state on reboot

No

appendix

era_sip

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and numbers, must begin with a letter.

roletype

str

required

Role Type. Possible values: "b2b".

iface

str

required

The alias of the server network interface on which the roles will interact internally with each other.

ext

json

empty

Additional role options. Contains a json object or list.

enabled

bool

empty

Role activity flag. When set to false, the role does not participate in validation and is not started.

roleid

int

required

Role ID.
Unique for the entire system, regardless of the site or server. Cannot be changed.
Integer from 1 to 9999.

separate

bool

required

An indication that the role has been allocated to a separate node.

udp

int

required

Local UDP port for SIP. The same port handles both TCP.
For example: 5090.
Used for internal communication with other microservices of the system via protocol SIP.
Raised only on the local interface to which the node is bound.
Should not be used by other microservices executing on the same server.

tcp

int

required

Local TCP port for SIP. If a value other than UDP is specified, it will be raised additionally.
For example: 5090.
Used for internal communication with other microservices of the system via protocol SIP.
Raised only on the local interface to which the node is bound.
Should not be used by other microservices executing on the same server.

log_cdr

bool

true

Switch for logging events to log cdr.

log_media

bool

true

Media function logging switch media.

log_mgct

bool

true

Switch for logging the communication protocol with the MGC controller to the logger mgct.

log_sip

bool

true

Switch for logging dialog state machine trace to logs sip.

log_trn

bool

true

SIP traffic logging switch to log trn.

use_srtp

bool

false

By default, SDP-offer for unencrypted media stream (rtp) is sent to TLS-connected addresses when initiating calls. You can use the parameter to enable SDP-offer initiation with encrypted media stream for TLS addresses.

allow_ac_set

bool

true

Codec set sending mode switch in responses to INVITE.

  • false – no more than one codec is sent in the response from the codecs received in the Offer SDP.

  • true – a subset of codecs from the list of codecs received in the Offer SDP.

save_rtp_stat

bool

false

Place statistics on RTP packets in the call termination event

send_reinvite_on_ack

bool

false

Switch for sending re-INVITE to the call initiator immediately after the dialog is established (SIP confirmation request received) ACK).
Can be used to update the data on the display in case the devices do not process the SIP header Remote-Party-Id.
It can also be used to align codecs to increase the probability of direct traffic transmission without transcoding.

check_by_options_on_limit

bool

false

Switches the device verification mode by sending SIP request OPTIONS when a REGISTER request exceeding the license limit is received.

  • false – deregister;

  • true – check the availability of registered devices, and if unavailability is detected, automatically replace the registration.

payloads_audio_offer

array<str>

["PCMA/8000", "PCMU/8000","telephone-event/8000"]

List of audio codec names used for call initiation (shoulder call).

As value - a list containing names of audio codecs in format "Name/Freq".
The following codecs are supported (case-sensitive):

  • telephone-event/8000,

  • PCMU/8000,

  • PCMA/8000,

  • GSM/8000,

  • G722/8000,

  • G729/8000,

  • CN/8000,

  • speex/8000,

  • speex/16000,

  • speex/32000,

  • G726-16/8000,

  • G726-24/8000,

  • G726-32/8000,

  • G726-40/8000,

  • iLBC/8000,

  • opus/48000/2.

The three basic formats, PCMA/8000, PCMU/8000 and telephone-event/8000 are automatically added to initiated calls at any field value.

payloads_video_offer

array<str>

empty

List of video codec names used to initiate a call (shoulder call).

As a value - a list containing video codec names in the following format "Name/Freq".
The following codecs are supported (case-sensitive):

  • H263/90000,

  • H263-1998/90000,

  • H264/90000,

  • VP8/90000,

  • VP9/90000.

use_video_transcoding

bool

false

Utilize video transcoding.

  • false – all video codecs from the SDP INVITE request received from the initiator are translated unchanged into SDP INVITE requests to the called devices. In this case, the system does not apply either its knowledge of codecs or transcoding, and the codec is unknown to the system, direct transfer is nevertheless still possible.

  • true – all video codecs are listed according to the video codecs known to the system, the system offers all known codecs to the called party (with a filter from payloads_video_offer), and if the codecs selected by the devices do not match, transcoding is performed on the video stream.

record_ivr

bool

false

Dialog recording switch with IVR.
When false is specified, media traffic of calls in the IVR, including queues, is not forcibly recorded, regardless of the settings of recording rules.

record_conf

bool

false

Conference dialog recording switch.
When false is specified, media traffic on conference room calls is not forcibly recorded, regardless of the settings of the recording rules.

record_prompt

bool

false

A switch to record eavesdropping and prompter dialogs.
When false is specified, media traffic of eavesdropping and suffocation calls is not forcibly recorded, regardless of the settings of recording rules.

fwd_headers

array<object>

empty

Headline Trolling.
B2B serves calls in such a way that a separate shoulder is created for each participant with a unique Call-ID.
When forming an outgoing INVITE request B2B by default does not add custom headers from the incoming INVITE request.
To ensure that certain custom headers from an incoming INVITE request are added to the outgoing INVITE request, a list of their names must be provided.

Format:
["X-Header-1", "header-2", ...]

The default is blank.

local_mg_lower_priority

bool

true

Switch to downgrade the priority of local MG media gateways located on the same server as the currently active signaling server.
During shutdown, local media gateways participate equally with other media gateways.
Enabled by default - local media gateways are used only if no other media gateways are found capable of serving the new context.
It is used in multi-server systems to preferentially disperse the responsibility for handling a call across different servers.
If a media gateway server serving media traffic goes down, the conversation can be saved only if all servers serving call signaling remain available.

Configuration example

The configuration is managed in an application available to master domain administrators. The application hides the full content of the configuration, but it is nevertheless accessible via the API.

The configuration contains a section to describe all instances of all roles. Parameters are defined for each specific role instance.

Example node
{
    "name": "b2b1",
    "roletype": "b2b",
    "iface": "eth0",

    "roleid": 11240,
    "separate": true,
    "udp": 5090,
    "tcp": 5090,

    "send_reinvite_on_ack": false,
    "allow_ac_set": false,
    "check_by_options_on_limit": true,
    "record_conf": false,
    "record_ivr": false,

    "log_cdr": true,
    "log_trn": true,
    "log_sip": true,
    "log_media": true,
    "log_mgct": true,

    "fwd_headers": [
        "X-Header-1",
        "X-Header-2"
    ],

    "payloads_audio_offer": [
        "PCMU/8000", "CN/8000", "G722/8000"
    ]
 }

See also