Back to back UserAgent (b2b)

Description

Role that organizes switching between SIP devices by creating two-way dialogs.
Performs routing and calling of the corresponding devices, organizing a media stream between them through the mgc and mg roles.

Made redundant and scaled in Active-Active mode.

Services:
- Organization and servicing of SIP dialogs
- Management of media context business logic.
- Routing in the internal number plan.
- Calculation of subscriber representation.
- Forking (calling several registered devices or in several directions).
- Subscriber features: forwarding, group number, pickup, intercom, barge-in, transfer, leg replacement, multiple calls…​
- Boss-secretary groups.
- CDR event generation.
- SIP call authorization.
- Registration servicing.
- Subscription servicing (BLF, voicemail) and notification sending.
- SIP service balancer.
- …​

Table 1. System characteristics

Code

b2b

Operation mode

Service

Redundancy mode

Active-Active

Site types

Any

Layer

Business logic

Placement

Internal

State preservation and recovery on restart

No

Application

era_sip

Parameters

Table 2. Parameters
Name Type Default Description

name

str

required

Name. May consist of Latin letters and digits and must start with a letter.

roletype

str

required

Role type. Possible values: "b2b".

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.

limit_of_cores

int

empty

Limit on the number of CPU logical cores used. Default: 0 - unlimited.

logging_default_level

int

empty

Default logging level set specifically for the role instance (microservice type). More

allow_divergence

bool

false

Flag allowing parameter differences in roles of the same group. Default: false - not allowed.

roleid

int

required

Role identifier.
Unique across the entire system, regardless of site or server. Cannot be changed.
An integer from 1 to 9999.

separate

bool

required

Flag indicating whether the role is allocated to a separate node.

udp

int

required

Local UDP port for SIP. The same port also handles TCP.
For example: 5090.
Used for internal interaction with other system microservices over SIP.
Listens only on the local interface to which the node is bound.
Must not be used by other microservices running on the same server.

tcp

int

required

Local TCP port for SIP. If a value different from UDP is specified, it is opened additionally.
For example: 5090.
Used for internal interaction with other system microservices over SIP.
Listens only on the local interface to which the node is bound.
Must not be used by other microservices running on the same server.

log_cdr

bool

true

Switch for logging events to the cdr log.

log_closure

bool

true

Switch for logging Call-ID closures of different legs/dialogs to build sequence diagrams. When this log is enabled, the retention time of links in node memory (sip_stat_timeout_closure) can be reduced to save memory: volume estimate.

log_media

bool

true

Switch for logging media functions to the media log.

log_mgct

bool

true

Switch for logging the MGC controller interaction protocol to the mgct log.

log_sip

bool

true

Switch for logging the dialog state machine trace to the sip log.

log_trn

bool

true

Switch for logging SIP traffic to the trn log.

use_srtp

bool

false

By default, when initiating calls to addresses connected over TLS, an SDP offer for unencrypted media (RTP) is sent. This parameter can enable initiation of an SDP offer with an encrypted media stream for TLS addresses.

use_srtp_setup_timeout

bool

true

Switch for monitoring TLS connection establishment.
The timer is started for any SRTP leg when both local and remote SDP have been passed to the media gateway.
The timeout is set by the media gateway parameter srtpsetuptimeoutms, default 3000 ms.

Changing the default settings may be required, for example, if a softphone does not initialize the media connection upon receiving a preliminary 183 response with SDP.
The enabled option terminates the connection and ends the dialog after 3 seconds, preventing dialogs where subscribers cannot hear each other.
The disabled option allows the dialog to continue even though the softphone subscriber will not hear early media.
A similar result can be achieved by significantly increasing the timeout in media gateway settings.

allow_ac_set

bool

true

Switch for sending a set of codecs in responses to INVITE.

  • false – the response contains at most one codec from those received in the Offer SDP.

  • true – the response may contain a subset of codecs from those received in the Offer SDP.

save_rtp_stat

bool

false

Place RTP packet statistics in the conversation completion event.
Data appears in the 'callevents.dlg_end' and 'callevents.dlg_stop' events ('astat' and 'bstat' fields) and in the 'ccsevents.connection_delete' event ('a_stat' and 'b_stat' fields).

For the data to be placed in dialog history archives (the callcenter/connections/ArchiveConnections collection), enable the 'callcenter.ccs.rtpStat.store' option in the product layer of the corresponding domain.

send_reinvite_on_ack

bool

false

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

check_by_options_on_limit

bool

false

Switch for checking devices by sending a SIP OPTIONS request when a REGISTER request exceeds the license limit.

  • false – reject registration;

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

payloads_audio_offer

array<str>

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

List of audio codec names used to initiate a call (leg call).

The value is a list of audio codec names in "Name/Freq" format.
The following codecs are supported (case-insensitive):

  • 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.

Codecs are offered in list order. The base PCMU/8000, PCMA/8000, and telephone-event/8000, if not listed, are added after the listed ones. The - prefix excludes a codec from those added (-PCMU/8000; - — all unlisted base codecs); the -- prefix additionally excludes it from the SDP of the incoming call passed to the other leg (-- — all unlisted incoming codecs; the offer is built in list order). CN/8000 and telephone-event/8000 are placed at the end. For example, ["G722/8000", "PCMA/8000", "-PCMU/8000"] — G722, PCMA, telephone-event; ["PCMA/8000", "-*"] — only PCMA. See Codecs and media negotiation.

payloads_video_offer

array<str>

empty

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

The value is a list of video codec names in "Name/Freq" format.
The following codecs are supported (case-insensitive):

  • H263/90000,

  • H263-1998/90000,

  • H264/90000,

  • VP8/90000,

  • VP9/90000.

use_video_transcoding

bool

false

Use video transcoding.

  • false – all video codecs from the SDP of the INVITE request received from the initiator are forwarded unchanged in the SDP of INVITE requests to the called devices. In this case the system applies neither its codec knowledge nor transcoding; even if a codec is unknown to the system, direct forwarding remains possible.

  • true – all video codecs are brought into line with the video codecs known to the system; the system offers the called side all codecs it knows (filtered by payloads_video_offer), and if the codecs selected by the devices do not match, the video stream is transcoded.

record_ivr

bool

false

Switch for recording dialogs with IVR.
When set to false, media traffic of calls to IVR, including queues, is forcibly not recorded, regardless of recording rules.

record_conf

bool

false

Switch for recording dialogs with conferences.
When set to false, media traffic of calls to conference rooms is forcibly not recorded, regardless of recording rules.

record_prompt

bool

false

Switch for recording listening and whispering dialogs.
When set to false, media traffic of listening and whispering calls is forcibly not recorded, regardless of recording rules.

fwd_headers

array<object>

empty

Header forwarding.
B2B services calls so that a separate leg with a unique Call-ID is created for each participant.
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 the incoming INVITE request are added to the outgoing INVITE request, provide a list of their names.

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

Empty by default.

local_mg_lower_priority

bool

true

Switch for lowering the priority of local MG media gateways located on the same server as the currently active signaling server.
When disabled, local media gateways participate on an equal basis with others.
Enabled by default: local media gateways are used only if no others capable of serving a new context are found.
Used in multi-server systems to primarily distribute call service responsibility across different servers.
If a server with a media gateway serving media traffic fails, the conversation can be preserved only if all servers serving the call signaling remain available.

mg_postfix, str, def, "Filter of media gateways used for calls by type: def — mg media gateways, bg — any bgmg.

sip_internal_port

int

empty

Additional local SIP port (UDP/TCP) for interaction with other system microservices. The listener is raised if the value differs from the udp and tcp options.

Configuration example

Configuration management is performed in an application available to master domain administrators. The application hides the full configuration content, but it is still available through the API.

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

Node example
{
    "name": "b2b1",
    "roletype": "b2b",

    "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