From 6101102f7ce4232ea6a848d38b05bf17f83aa479 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sun, 2 Feb 2025 14:18:06 +0200 Subject: [PATCH 1/2] fixes --- en/data-retention/index.rst | 8 +- en/database-tuning.rst | 36 ++- en/installation/installation-1.13/sems.rst | 2 +- en/web-interface/cdr/cdr-history.rst | 327 ++++++++++++++------- en/yeti-client/index.rst | 2 - 5 files changed, 261 insertions(+), 114 deletions(-) diff --git a/en/data-retention/index.rst b/en/data-retention/index.rst index 09cb9c4..0b5e957 100644 --- a/en/data-retention/index.rst +++ b/en/data-retention/index.rst @@ -4,7 +4,7 @@ Data retention ~~~~~~~~~~~~~~ -Data retention should be configured for heavy loaded production systems. Yeti has built-in tools to remove historical data from databases. Such tools can be configured via **/opt/yeti-web/config/yeti_web.yml** configuration file:: +Data retention should be configured for production systems. Yeti has built-in tools to remove historical data from databases. Such tools can be configured via **/opt/yeti-web/config/yeti_web.yml** configuration file:: partition_remove_delay: @@ -17,5 +17,11 @@ Data retention should be configured for heavy loaded production systems. Yeti ha This configuration defines how many historical **partitions** should be saved in database for each table. +To apply configuration - restart **yeti-scheduler** service: + +.. code-block:: console + + # systemctl restart yeti-scheduler + Admin WEB interface views :ref:`CDR -> CDR Partitions ` and :ref:`Logs -> Log partitions ` allows to see existing partitions in CDRs and Routing databases. diff --git a/en/database-tuning.rst b/en/database-tuning.rst index 9eb4730..b72f413 100644 --- a/en/database-tuning.rst +++ b/en/database-tuning.rst @@ -5,9 +5,15 @@ .. _database_tuning: -============================ -Databases performance tuning -============================ +===================== +Databases Maintenance +===================== + +Yeti switch using two postgresql databases to store routing data and CDRs. This document describes some maintenance procedures. + + +Performance tuning +================== By default PostgreSQL RDBMS configured to consume minimal system resources. This approach allows PostgreSQL to start on any server after installation. YETI as well as any other system uses PostgreSQL requires changing default configuration in order to archive best performance. @@ -30,8 +36,30 @@ When configuration changed you should restart your PostgreSQL instance using `se +Dump and Restore +================ - +.. TODO: Explain why we need it + +See https://github.com/markokr/skytools/blob/master/doc/faq.txt#L50 for details + +To get know your cluster epoch, connect to database using **psql** and run: + +.. code-block:: psql + + cdr=# SELECT (txid_current() >> 32) as epoch; + epoch + ------- + 0 + (1 row) + + +To change PostgreSQL cluster epoch - shutdown cluster and use **pg_resetwal** tool: + +.. code-block:: console + # su - postgres + $ /usr/lib/postgresql/16/bin/pg_resetwal -e 1 /var/lib/postgresql/16/cdr +Where **1** is new epoch - it should be greater then epoch of old instance diff --git a/en/installation/installation-1.13/sems.rst b/en/installation/installation-1.13/sems.rst index 7e5e90c..03ba365 100644 --- a/en/installation/installation-1.13/sems.rst +++ b/en/installation/installation-1.13/sems.rst @@ -252,7 +252,7 @@ Launch configured traffic switch instance: .. code-block:: console - # systemctl sems start + # systemctl start sems In case of errors it's useful to use **sems -E -D3** command which will launch daemon in foreground with debug logging level diff --git a/en/web-interface/cdr/cdr-history.rst b/en/web-interface/cdr/cdr-history.rst index b727bd3..e9d1e8b 100644 --- a/en/web-interface/cdr/cdr-history.rst +++ b/en/web-interface/cdr/cdr-history.rst @@ -10,114 +10,229 @@ CDR History Storage of Call Detail Records (CDR) for all calls (or call attempts) what are passed via Yeti. Yeti save CDR for every call termination attempt, so one received call on legA can cause multiple CDRs in case of rerouting. All CDRs related to one call will have same values of **Orig Call Id** and **Local tag**, **routing attempt** value indicates sequence number of CDR withing same call. -.. seealso:: There is built-in tool to provide RTP statistics retention, see :ref:`Data retention ` documentation. - -**CDR**'s attributes: -````````````````````` - Id - Unique CDR's id. - Time Start - Date and time of call starting. - Time Connect - Date and time of receiving 200OK response. - Time End - Date and time of receiving Bye. - Customer - Value of the :ref:`*Name* ` attribute of the Customer Contractor for the call. - Vendor - Value of the :ref:`*Name* ` attribute of the Vendor Contractor for the call. - Customer Auth - Value of the :ref:`*Name* ` attribute of the Customer Auth. - Src Prefix Routing - Prefix of the source number (A-number) that was used for routing for the call. - Src Area - Source :ref:`Area ` for the call (if any). - Dst Prefix Routing - Prefix of the destination number (B-number) that was used for routing for the call - Dst Area - Destination :ref:`Area ` for the call (if any). - Dst Country - :ref:`Country ` that was associated (via :ref:`Network Prefixes ` table) with the destination number (B-number) for the call. - Status - Status of the call regarding its :ref:`Disconnect Code `. Could be **SUCCESS** (if "Success" flag is enabled for :ref:`Disconnect Code ` that was applied to the call) or **FAILURE** (otherwise). - Duration - Duration of the call in seconds. - Is Last CDR - This field should be "yes" ("true") for last routing attempt for the call ("no"("false") otherwise). - Dump Level - Level of capturing of call to PCAP (Packet Capture) files that was chosen in the :ref:`Dump Level ` attribute of :ref:`Customers Auth ` that is related to this call: |br| - **Capture nothing** - Information didn't capture to pcap-file for this call. |br| - **Capture signaling traffic** - Only signaling information had been captured to pcap-file for this call. |br| - **Capture rtp traffic** - Only RTP traffic had been captured to pcap-file for this call. |br| - **Capture all traffic** - Only signaling information & RTP traffic had been captured to pcap-file for this call. |br| - - Orig GW - Value of the :ref:`*Name* ` attribute of Gateway that was used as Originator for the call. - Term GW - Value of the :ref:`*Name* ` attribute of Gateway that was used as Terminator for the call. - Routing Plan - :ref:`Routing plan ` that was used for the call. - Routing Group - :ref:`Routing Group ` that was used for the call. - Routing Tag - :ref:`Routing Tag ` that was used for the call. - Rateplan - :ref:`Rateplan ` that was used for the call. - Internal Disconnect Code - Internal :ref:`Disconnect Code ` for the call. - Lega Disconnect Code - :ref:`Disconnect Code ` for interconnection between Yeti and Gateway that was used as Originator for the call. - Lega Disconnect Reason - Disconnect Reason for interconnection between Yeti and Gateway that was used as Originator for the call. - Legb Disconnect Code - :ref:`Disconnect Code ` for interconnection between Yeti and Gateway that was used as Terminator for the call. - Legb Disconnect Reason - Disconnect Reason for interconnection between Yeti and Gateway that was used as Terminator for the call. - Src Prefix In - Source number (A-number) that was received from Gateway that was used as Originator for the call. - Dst Prefix In - Destination number (B-number) that was received from Gateway that was used as Originator for the call. - Src Prefix Out - Source number (A-number) that was sent to Gateway that was used as Terminator for the call. - Dst Prefix Out - Destination number (B-number) that was sent to Gateway that was used as Terminator for the call. - LRN - Routing number that was received from LNP database (in case of requesting) for the call. - Diversion In - Value of SIP Diversion header that was received from Gateway that was used as Originator for the call. - Diversion Out - Value of SIP Diversion header that was sent to Gateway that is used as Terminator for the call. - Src Name In - Name of caller that was received in the "From" field of SIP header from :ref:`Gateway ` that was used as Originator for the call. - Src Name Out - Name of caller that was sent in the "From" field of SIP header to Gateway that was used as Terminator for the call. - Node - :ref:`Node ` (independent installation of YETI-SEMS) that was used for the call. - PoP - :ref:`Point of Presence ` that was received the call. - Local Tag - Internal session ID for call legA - LebB Local Tag - Internal session ID for call legB - Orig Call - Unique ID of the call that was received ( in the Call-ID header) from :ref:`Gateway ` that was used as Originator for the call. - Term Call - Unique ID of the call that was generated by Yeti and was used in communication (in the Call-ID header) between Yeti and from :ref:`Gateway ` that was used as Terminator for the call. - Routing Attempt +.. seealso:: There is built-in tool to provide CDR data retention, see :ref:`Data retention ` documentation. + +CDR attributes +``````````````` + +Id + Unique CDR identifier. + +UUID + Unique CDR identifier. + +Time Start + Date and time of call starting. +Time Connect + Date and time of receiving 200OK response. +Time End + Date and time of receiving Bye. +Duration + Duration of the call in seconds. + +Internal Disconnect Code + Internal :ref:`Disconnect Code ` for the call. +Lega Disconnect Code + :ref:`Disconnect Code ` for interconnection between Yeti and Gateway that was used as Originator for the call. +Lega Disconnect Reason + Disconnect Reason for interconnection between Yeti and Gateway that was used as Originator for the call. + +LegA Q850 Cause + Q.850 cause code received on call legA in **Reason** header. + +LegA Q850 Text + Q.850 text received on call legA in **Reason** header. + +LegA Q850 Params + Q.850 parameters received on call legA in **Reason** header. + +Legb Disconnect Code + :ref:`Disconnect Code ` for interconnection between Yeti and Gateway that was used as Terminator for the call. +Legb Disconnect Reason + Disconnect Reason for interconnection between Yeti and Gateway that was used as Terminator for the call. + +LegB Q850 Cause + Q.850 cause code received on call legB in **Reason** header. + +LegB Q850 Text + Q.850 text received on call legB in **Reason** header. + +LegB Q850 Params + Q.850 parameters received on call legB in **Reason** header. + + +Customer + Value of the :ref:`*Name* ` attribute of the Customer Contractor for the call. +Vendor + Value of the :ref:`*Name* ` attribute of the Vendor Contractor for the call. +Customer Auth + Value of the :ref:`*Name* ` attribute of the Customer Auth. + + +Src Area + Source :ref:`Area ` for the call (if any). +Dst Area + Destination :ref:`Area ` for the call (if any). + +Dst Country + Destination Country name detected by :ref:`Network Prefixes ` table +Dst Network + Destination Network name detected by :ref:`Network Prefixes ` table +Dst Network Type + Destination Network Type name detected by :ref:`Network Prefixes ` table + +Src Country + Source Country name detected by :ref:`Network Prefixes ` table +Src Network + Source Network name detected by :ref:`Network Prefixes ` table +Src Network Type + Source Network Type name detected by :ref:`Network Prefixes ` table + +Status + Status of the call regarding its :ref:`Disconnect Code `. Could be **SUCCESS** (if "Success" flag is enabled for :ref:`Disconnect Code ` that was applied to the call) or **FAILURE** (otherwise). + +Is Last CDR + This field should be "yes" ("true") for last routing attempt for the call ("no"("false") otherwise). + +Dump Level + Level of capturing of call to PCAP (Packet Capture) files that was chosen in the :ref:`Dump Level ` attribute of :ref:`Customers Auth ` that is related to this call: |br| + **Capture nothing** - Information didn't capture to pcap-file for this call. |br| + **Capture signaling traffic** - Only signaling information had been captured to pcap-file for this call. |br| + **Capture rtp traffic** - Only RTP traffic had been captured to pcap-file for this call. |br| + **Capture all traffic** - Only signaling information & RTP traffic had been captured to pcap-file for this call. |br| + +Orig GW + Value of the :ref:`*Name* ` attribute of Gateway that was used as Originator for the call. +Term GW + Value of the :ref:`*Name* ` attribute of Gateway that was used as Terminator for the call. +Routing Plan + :ref:`Routing plan ` that was used for the call. +Routing Group + :ref:`Routing Group ` that was used for the call. +Routing Tags + :ref:`Routing Tags ` associased with the call. +Rateplan + :ref:`Rateplan ` that was used for the call. + +Src Name In + Name of caller that was received in the "From" field of SIP header from :ref:`Gateway ` that was used as Originator for the call. +Src Prefix In + Source number (A-number) that was received from Gateway that was used as Originator for the call. +Dst Prefix In + Destination number (B-number) that was received from Gateway that was used as Originator for the call. + +Src Prefix Routing + Source number (A-number) that was used for routing for the call. +Dst Prefix Routing + Destination number (B-number) that was used for routing for the call. +LRN + Routing number that was received from LNP database (in case of requesting) for the call. + +Src Prefix Out + Source number (A-number) that was sent to Gateway that was used as Terminator for the call. +Dst Prefix Out + Destination number (B-number) that was sent to Gateway that was used as Terminator for the call. +Src Name Out + Name of caller that was sent in the "From" field of SIP header to Gateway that was used as Terminator for the call. + + + +LegA Remote socket + Protocol, Source IP address and Source Port of initial INVITE request received on Yeti node. + +LegA Local socket + Destination IP address and Destination Port of initial INVITE request received on Yeti node. + +LegA Originator address + Protocol, Source IP address and Source Port of initial INVITE request received from call originator(legA) on Load balancer or Yeti node. + + +LegB Remote socket + Protocol, Destination IP address and Destinaion Port of initial INVITE request sent by Yeti on legB. This field may be empty if no responce received for initial INVITE. + +LegB Local socket + Source IP address and Source Port of initial INVITE request sent by Yeti on legB. This field may be empty if no responce received for initial INVITE. + +LegB Ruri + R-URI of initial INVITE request sent by Yeti on legB. + +Is Redirected + Will be true if call leg B was redirected using 3xx SIP response or REFER request. + +Pai In + Value of **P-Asserted-Identity** header received from origination gateway in initial INVITE on legA. + +Pai Out + Value of **P-Asserted-Identity** header sent by Yeti to termination gateway in initial INVITE on legB. + +Ppi In + Value of **P-Preferred-Identity** header received from origination gateway in initial INVITE on legA. + +Ppi Out + Value of **P-Preferred-Identity** header sent by Yeti to termination gateway in initial INVITE on legB. + +Rpid In + Value of **Remote-Party-ID** header received from origination gateway in initial INVITE on legA. + +Rpid Out + Value of **Remote-Party-ID** header sent by Yeti to termination gateway in initial INVITE on legB. + +Rpid Privacy In + Value of **RPID-Privacy** header received from origination gateway in initial INVITE on legA. + +Rpid Privacy Out + Value of **RPID-Privacy** header sent by Yeti to termination gateway in initial INVITE on legB. + +Privacy In + Value of **Privacy** header received from origination gateway in initial INVITE legA. + +Privacy Out + Value of **Pricacy** header sent by Yeti to termination gateway in initial INVITE on legB. + +Diversion In + Value of SIP Diversion header that was received from Gateway that was used as Originator for the call. +Diversion Out + Value of SIP Diversion header that was sent to Gateway that is used as Terminator for the call. + +P Charge Info In + Value of **P-Charge-Info** header received from origination gateway in initial INVITE on legA. Yeti doesn't validate P-Charge-Info header format and accept any value even not in URI format. + +Node + Node that processed call +PoP + Location of node processed call + +Local Tag + Internal session ID for call legA +LebB Local Tag + Internal session ID for call legB +Orig Call + Value on **Call-Id** header received from origination gateway. +Term Call + Value on **Call-Id** header sent to termination gateway. + +Routing Attempt Number of attempt to route this call to destination. - Customer Price +Customer Price Price that was used for changing balance of Customer's :ref:`Account ` (in case of success call). - Vendor Price +Vendor Price Price that was used for changing balance of Vendors's :ref:`Account ` (in case of success call). - Vendor Invoice - :ref:`Invoice ` with billing information about changing balance of Vendors's :ref:`Account ` (in case of success call). - Customer Invoice - :ref:`Invoice ` with billing information about changing balance of Customer's :ref:`Account ` (in case of success call). - Routing Delay - Delay (in seconds) between receiving call by Yeti (from Originator) and sending it to termination gateway. - PDD - Post Dial Delay (PDD) for this call ( time between the start of the call and the moment the phone of the called party starts ringing) in seconds. - RTT - Round-trip time (RTT) for this call. + +Routing Delay + Delay (in seconds) between receiving call by Yeti (from Originator) and sending it to termination gateway. +PDD + Post Dial Delay (PDD) for this call ( time between the start of the call and the moment the phone of the called party starts ringing) in seconds. +RTT + Round-trip time (RTT) for this call. + +Yeti version + Versions of SEMS core and Yeti module that handled call + +Lega User Agent + Values of **User-Agent** and **Server** headers received from origination gateway on legA. + +Legb User Agent + Values of **User-Agent** and **Server** headers received from termination gateway on legB. + diff --git a/en/yeti-client/index.rst b/en/yeti-client/index.rst index 87c9be1..4306096 100644 --- a/en/yeti-client/index.rst +++ b/en/yeti-client/index.rst @@ -5,8 +5,6 @@ Customer Portal YETI Customer portal is `SPA `_ that act as YETI Customer API client. It allow operator who runs YETI to create interface for his customer to fetch customer-specific data like Account information, Rates, CDRs, Call Statistics. -.. warning:: Currently YETI Customer Portal in alpha state so it can't be used in production. But it can use it as example during development your own Customer API clients. - Demo Customer portal instance located at ``_, current login/password is **test/test**. .. note:: Any admin user of demo instance can change login/password at ``_ From 6a89777ffc0e8cff9624c13be534d86c24c58b62 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sun, 2 Feb 2025 14:24:30 +0200 Subject: [PATCH 2/2] fixes --- en/web-interface/cdr/cdr-history.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/en/web-interface/cdr/cdr-history.rst b/en/web-interface/cdr/cdr-history.rst index e9d1e8b..7436b9e 100644 --- a/en/web-interface/cdr/cdr-history.rst +++ b/en/web-interface/cdr/cdr-history.rst @@ -110,7 +110,7 @@ Routing Plan Routing Group :ref:`Routing Group ` that was used for the call. Routing Tags - :ref:`Routing Tags ` associased with the call. + :ref:`Routing Tags ` associated with the call. Rateplan :ref:`Rateplan ` that was used for the call. @@ -148,10 +148,10 @@ LegA Originator address LegB Remote socket - Protocol, Destination IP address and Destinaion Port of initial INVITE request sent by Yeti on legB. This field may be empty if no responce received for initial INVITE. + Protocol, Destination IP address and Destination Port of initial INVITE request sent by Yeti on legB. This field may be empty if no response received for initial INVITE. LegB Local socket - Source IP address and Source Port of initial INVITE request sent by Yeti on legB. This field may be empty if no responce received for initial INVITE. + Source IP address and Source Port of initial INVITE request sent by Yeti on legB. This field may be empty if no response received for initial INVITE. LegB Ruri R-URI of initial INVITE request sent by Yeti on legB.