<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kolmisoft.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ricardass</id>
	<title>Kolmisoft Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kolmisoft.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ricardass"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php/Special:Contributions/Ricardass"/>
	<updated>2026-06-03T07:18:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=System.conf&amp;diff=31543</id>
		<title>System.conf</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=System.conf&amp;diff=31543"/>
		<updated>2026-05-07T11:58:24Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Kamailio */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This file is in /etc/m2/system.conf and describes some values for the M4 systems.&lt;br /&gt;
&lt;br /&gt;
=== Database settings ===&lt;br /&gt;
&lt;br /&gt;
* '''dbname''' - MySQL database name.&lt;br /&gt;
* '''dbuser''' - MySQL database user.&lt;br /&gt;
* '''dbhost''' - MySQL database host.&lt;br /&gt;
* '''dbsecret''' - MySQL database password.&lt;br /&gt;
* '''dbport''' - MySQL database port.&lt;br /&gt;
* '''db_startup_retry''' - number of database connection attempts on Radius startup. If after N attempts, connection to the database is not established, Radius will exit. Default 10 retries.&lt;br /&gt;
* '''db_startup_retry_delay''' - how many seconds to wait before each database connection attempt. Default 10 seconds.&lt;br /&gt;
&lt;br /&gt;
=== Basic settings ===&lt;br /&gt;
&lt;br /&gt;
* '''global_call_timeout''' - the maximum length of call (default 7200 seconds)&lt;br /&gt;
* '''balance_check_period''' – how often to recalculate the total price for the user's concurrent calls. The calculated price is compared with the user's balance and if the total price is lower than the balance limit, all user's calls will be terminated. The default value is 0 (in seconds) - disabled.&lt;br /&gt;
* '''active_calls_check_period''' – how often to update active calls. The default value is 5 (in seconds)&lt;br /&gt;
* '''start_timeout''' - timeout between call initiation and answer/hangup. The default value is 240 seconds. If the call is not answered or hangup in this period of time, M4 will drop the call with 314 HGC.&lt;br /&gt;
* '''stop_timeout''' - timeout between call answer and hang up. The default value is 7200 seconds. If the call is answered but the hangup is not received in this period of time, M4 will drop the call with 315 HGC.&lt;br /&gt;
* '''server_id''' - current server id (should match Maintenance -&amp;gt; Servers)&lt;br /&gt;
* '''billsec_round_function''' - how billsec should be rounded? Allowed values are '''ceil''', '''round''' and '''floor'''. Ceil will round to a higher value (1.1 will be rounded to 2), round will round to the closest value (1.4 will be rounded to 1 and 1.5 will be rounded to 2), floor will round to the lower value (1.9 will be rounded to 1). By default, ceil is used to round billsec.&lt;br /&gt;
* '''mysql_ping''' - Default 0 (disabled). If the value is greater than 0, then M4 Core will periodically ping the MySQL server to keep connections alive. Value (in seconds) defines how often to ping the MySQL server.&lt;br /&gt;
* '''prefix_handle''' - controls which prefix is saved to the database (statistics depend on prefixes so this variable changes how statistics are presented). Accepted values are ''default'', ''originator'', ''terminator''. The default value is ''default'' which tells the core to save the longest prefix from both Originator's and Terminator's tariffs. Value ''originator'' tells core to save prefix that was used from Originator's Tariff (statistics will be presented from Originator's perspective). The value ''terminator'' tells core to save the prefix that was used from Terminator's Tariff (statistics will be presented from Terminator's perspective).&lt;br /&gt;
* '''dial_peers_by_originator_prefix''' - Default 0. If 1, then Dial Peers will be searched by selected prefix from the originator tariff. If 0, then Dial Peers are searched by the longest matching prefix.&lt;br /&gt;
* '''non_blocking_balance''' - Default 0. If &amp;gt; 0, then it activates the new balance update mechanics which updates the User's balance every X seconds, where X is the value of this setting. Eg. non_blocking_balance = 10, will update balances every 10s. Setting can help with high system load when Concurrent Calls &amp;gt; 4000 / CPS &amp;gt; 150. With a lower load on the server, this setting will not be useful.&lt;br /&gt;
* '''disable_advanced_routing''' - Default 0. If 1 - the core will not calculate quality statistics for Quality Routing. Disable this option if you are not using Quality Routing.&lt;br /&gt;
* '''show_entity_names''' - default 0. Shows entity names in the core log if enabled. Tariffs, DPs, TPs, OPs, RGs. Good for easier/faster troubleshooting. Slightly decreases core performance.&lt;br /&gt;
&lt;br /&gt;
=== Cache ===&lt;br /&gt;
&lt;br /&gt;
* '''cp_index_update_period''' - Default 60. How often to refresh Users/Connection Points cache. Min value 10.&lt;br /&gt;
* '''tariff_update_period''' - Default 60. How often to refresh Tariffs cache. Min value 10.&lt;br /&gt;
* '''dp_cache_update_period''' - Default 60. How often to refresh Dial Peers cache. Min value 10.&lt;br /&gt;
* '''dids_update_period''' - Default 60. How often to refresh DIDs cache. Min value 10.&lt;br /&gt;
* '''flatrates_update_period''' - Default 60. How often to refresh Flat-Rates cache. Min value 10.&lt;br /&gt;
* '''subscriptions_update_period''' - Default 60. How often to refresh Subscriptions cache. Min value 10.&lt;br /&gt;
* '''balance_update_period''' - Default 5. How often to update User Balances to database.&lt;br /&gt;
&lt;br /&gt;
=== Billing ===&lt;br /&gt;
&lt;br /&gt;
* '''cli_groups_recursive_match''' - If enabled (value 1), CLI groups will be searched and matched recursively. For example, if longest matching destination prefix is 3706, but there is no CLI match for this destination, then shorter destination prefix 370 will be checked for CLI match. If disabled (value 0), then only longest destination prefix will be checked for CLI match. If there is no CLI match for longest destination prefix, rate will not be found. Default 0.&lt;br /&gt;
&lt;br /&gt;
=== Radius Log ===&lt;br /&gt;
&lt;br /&gt;
* '''show_debug''' = default 0. If 0, then DEBUG messages will not be written in /var/log/radius/radiusd.log&lt;br /&gt;
* '''show_notice''' = default 1. If 0, then NOTICEmessages will not be written in /var/log/radius/radiusd.log&lt;br /&gt;
* '''show_warning''' = default 1. If 0, then WARNING messages will not be written in /var/log/radius/radiusd.log&lt;br /&gt;
* '''show_error''' =  default 1. If 0, then ERROR messages will not be written in /var/log/radius/radiusd.log&lt;br /&gt;
* '''show_sql''' =  default 0. If 1, then full SQLs will be written in /var/log/radius/radiusd.log (used in debugging)&lt;br /&gt;
* '''show_slow_sql''' =  default 1. If 0, then slow SQLs will not be written in /var/log/radius/radiusd.log&lt;br /&gt;
* '''no_uniqueid_in_log''' - Default 0. If 1, then no unique id will be written into radius.log. Used in development to save screen space.&lt;br /&gt;
&lt;br /&gt;
=== CDR ===&lt;br /&gt;
&lt;br /&gt;
* '''cdr_batch_size''' – after the call end, cdr is stored in a buffer and when that buffer is full, all CDRs are flushed to the database. This variable defines how many CDRs are buffered before flushing to the database. The default value is 30 (after 30 calls all CDRs will be flushed to the database). The Max value is 100.&lt;br /&gt;
* '''cdr_flush_time''' – cdr buffer is periodically flushed to the database. This variable defines how often to flush the cdr buffer to the database (value is in seconds). The default value is 60 seconds (after 60 seconds, all CDRs will be flushed to the database, no matter how many calls are buffered)&lt;br /&gt;
* '''do_not_log_cached_cdrs''' - Default 1. If 1, then M4 will not log CDRs refused by the [[M4 Caching | cache]]. This is the recommended setting because there is no need to write all the failed CDRs to DB when one is enough to identify the cause of call failure. &lt;br /&gt;
* '''do_not_log_system_cdrs''' - Default 0. If 1, then M4 will not write FAILED CDRs with HGC &amp;gt;= 300. Use this option if you don't need such CDRs, it will slightly improve system performance.&lt;br /&gt;
* '''do_not_log_failed_cdrs''' - Default 0. If 1, then M4 will not write FAILED CDRs to the database. Use this option if you don't need FAILED CDRs, it will slightly improve system performance.&lt;br /&gt;
* '''log_only_last_cdr''' - Default 0. If 1, then M4 logs only the last CDR for the Call. M4 will not log failed attempts to terminators until the call goes over the last one. Only one CDR is logged for the call. It can be used to improve system performance.&lt;br /&gt;
&lt;br /&gt;
=== HGC ===&lt;br /&gt;
&lt;br /&gt;
* '''enforced_global_hgc''' – set specific hangup cause for all failed, busy, and no-answer calls. Only answered calls will return default 16 hangup cause. For example ''enforced_global_hgc = 34'' will return ''503 Service Unavailable'' to the originator for all non-answered calls.&lt;br /&gt;
* '''reroute_stop_hgc''' - List of hangup cause codes (ISDN codes for M4, SIP codes for M4) that should stop rerouting through other terminators. If the terminator returns a code that is specified in the reroute_stop_hgc setting, the core will skip other terminators in the routing list. Multiple causes can be specified by separating them with a comma separator, for example, reroute_stop_hgc = 1,2,3 (for M4) or reroute_stop_hgc = 408,500,603 (for M4)&lt;br /&gt;
* '''change_failed_16_to''' - allows to change FAILED(16) hangup cause to another hangup cause, for example FAILED(34). Accepted values are between 1 and 127 (ISDN codes).&lt;br /&gt;
&lt;br /&gt;
=== MNP ===&lt;br /&gt;
&lt;br /&gt;
* '''mnp_enabled''' - Default 0. If 1, then MNP will be enabled in the core.&lt;br /&gt;
* '''mnp_update_period''' - Default 120. How often to update MNP settings (DB configs, Prefixes)&lt;br /&gt;
* '''mnp_down_continue_call''' - Default 1. Should we continue calling if MNP fails?&lt;br /&gt;
* '''mnp_timeout_count_before_hold''' - Default 3. How many timeouts should we receive before pausing the MNP check&lt;br /&gt;
* '''mnp_hold_time''' - Default 30. For how long should we stop MNP checks after N timeouts&lt;br /&gt;
* '''db_mnp_connections''' - How many MySQL connections will be created for the MNP database. The default number of connections is the number of CPU core count&lt;br /&gt;
* '''db_mnp_connections_timeout''' - Timeout for MNP database connections. Default 1 sec.&lt;br /&gt;
&lt;br /&gt;
=== Destination DDoS protection ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Global settings'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Global Destination DDoS settings will apply to all Users.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dst_ddos_check_enabled''' - Default 0. If set to 1, enables or disables DDoS protection for destination numbers. Set to 1 to enable. When enabled, the system temporarily blocks a destination number if it receives '''dst_ddos_calls''' calls within '''dst_ddos_check_period''' seconds. The block lasts for '''dst_ddos_reject_time''' seconds (block the number for X seconds if more than Y call attempts within Z seconds). Blocking is applied globally.&lt;br /&gt;
* '''dst_ddos_calls''' - Default 10. The number of calls within the check period ('''dst_ddos_check_period''') that triggers the DDoS protection block.&lt;br /&gt;
* '''dst_ddos_check_period''' - Default 60. The time window (in seconds) during which the number of calls is monitored for DDoS protection.&lt;br /&gt;
* '''dst_ddos_reject_time''' - Default 60. The duration (in seconds) for which a destination number is blocked after the DDoS protection is triggered. After this time, calls to the destination number are allowed again.&lt;br /&gt;
* '''dst_ddos_number_pool_id''' - Default 0. Number pool id which is used to store blocked numbers permanently.&lt;br /&gt;
* '''dst_ddos_reuse_cli''' - Default 0. If set to 1, enables to reuse the same CLI (that was sent to TP) for all successive calls to the same destination number. Reused CLI is reset after '''dst_ddos_check_period'''. This option can be useful when using ''Random CallerID from Number Pool'' feature as it &amp;quot;assigns&amp;quot; the same CLI (that was initially picked randomly) for all calls to the same destination number during '''dst_ddos_check_period'''.&lt;br /&gt;
* '''dst_ddos_reset_cli_on_answer''' - Default 0. If set to 1, adds an additional condition for resetting CLI in option '''dst_ddos_reuse_cli'''. When both '''dst_ddos_reuse_cli''' and '''dst_ddos_reset_cli_on_answer''' are enabled, reused CLI is reset either when '''dst_ddos_check_period''' ends or when the call is '''answered'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Specific Destination DDoS profiles'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Different Destination DDoS profiles can be created and assigned to specific User or Users by adding settings with '''_profile_X_''':&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''dst_ddos_profile_X_users''' - comma separated list of User IDs (for example dst_ddos_profile_X_users = 1, 25, 33). This Destination DDoS profile will apply only to Users listed in this setting. Global Destination DDoS settings will not apply to Users in this list, only this specific profile will be used.&lt;br /&gt;
* '''dst_ddos_profile_X_check_enabled''' - Description in global settings.&lt;br /&gt;
* '''dst_ddos_profile_X_calls''' - Description in global settings.&lt;br /&gt;
* '''dst_ddos_profile_X_check_period''' - Description in global settings.&lt;br /&gt;
* '''dst_ddos_profile_X_reject_time''' - Description in global settings.&lt;br /&gt;
* '''dst_ddos_profile_X_number_pool_id''' - Description in global settings.&lt;br /&gt;
* '''dst_ddos_profile_X_reuse_cli''' - Description in global settings.&lt;br /&gt;
* '''dst_ddos_profile_X_reset_cli_on_answer''' - Description in global settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Here '''X''' is a number between 1 and 99 (max 99 profiles can be created). For example, to create two different profiles, add:&lt;br /&gt;
&lt;br /&gt;
 # Comment - profile 1 for users 1, 2, 3 that reuses CLI and allows 10 calls before reject&lt;br /&gt;
 dst_ddos_profile_1_users = 1, 2, 3&lt;br /&gt;
 dst_ddos_profile_1_check_enabled = 1&lt;br /&gt;
 dst_ddos_profile_1_calls = 10&lt;br /&gt;
 dst_ddos_profile_1_reuse_cli = 1&lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 # Comment - profile 2 for users 25, 450 that allows 30 calls before reject&lt;br /&gt;
 dst_ddos_profile_2_users = 25, 450&lt;br /&gt;
 dst_ddos_profile_2_check_enabled = 1&lt;br /&gt;
 dst_ddos_profile_2_calls = 30&lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 # Comment - profile 3 to exclude user 4 from global Destination DDoS settings (when global ''dst_ddos_check_enabled'' is enabled) - no checks will be performed for this user&lt;br /&gt;
 dst_ddos_profile_3_users = 4&lt;br /&gt;
 dst_ddos_profile_3_check_enabled = 0&lt;br /&gt;
&lt;br /&gt;
=== Scripts ===&lt;br /&gt;
&lt;br /&gt;
* '''invoice_generate_wait_time''' - how many hours the system should wait before the Invoice is generated automatically. The default value is 6 hours. Acceptable values are 0 - 23. Since CDRs are created after the call ends, we need to wait some time before generating an Invoice. For example, if the call starts at 23:55:00 and lasts more than 5 minutes, we cannot generate an invoice at midnight because this call will not be included in the Invoice. Wait time allows postponing Invoice generate event.&lt;br /&gt;
* '''invoice_subscriptions_by_billing_period''' - Default 0. If set to 1, subscriptions are included in the invoice by their billing period instead of the charge date. This helps when a subscription was charged later than expected, for example, if the user didn’t have enough balance at the time of the original charge. More details [https://wiki.kolmisoft.com/index.php/M4_Subscriptions#Invoices here]&lt;br /&gt;
* '''show_invoice_lines''' - Default 0. If set to 1, more detailed information is shown in invoices log.&lt;br /&gt;
* '''skip_missing_invoices''' - Default 0. If set to 1, invoices script will not try to find gaps and generate missing invoices (only for User who have Generate Invoices automatically option enabled).&lt;br /&gt;
* '''terminator_check_bind_ip''' - bind on specific IP when checking Terminator availability.&lt;br /&gt;
* '''calls_archiving_report_inconsistencies''' - should we report inconsistencies in CDR archiving via email? Default 1. &lt;br /&gt;
* '''calls_archiving_report_inconsistencies_email''' - email where to send CDR archiving inconsistencies. Default support@kolmisoft.com.&lt;br /&gt;
&lt;br /&gt;
=== Kamailio ===&lt;br /&gt;
&lt;br /&gt;
* '''kamailio_disable_full_lr''' - Default 0. If set to 1, then &amp;quot;;lr&amp;quot; instead of &amp;quot;;lr=on&amp;quot; will be used when generating SIP Record header.&lt;br /&gt;
* '''reject_duplicate_calls''' - Default 0. If set to 1, then duplicate calls will be rejected (simultaneous calls from the same source number to the same destination number).&lt;br /&gt;
* '''duplicate_call_id_check''' - Default 1. If set to 1, then duplicate Call-ID (SIP header) check is enabled. If another call with the same Call-ID comes to system within 60 seconds, it will be rejected. If set to 0, this check is disabled, and duplicate Call-ID headers are allowed.&lt;br /&gt;
* '''kamailio_media_servers''' - By default this variable is not present and all active media servers set in GUI MAINTENANCE-&amp;gt; Servers are included in the Kamailio config. If you want to restrict Kamailio config for specific RTPE servers, add RTPE server ids in this variable. For example, with '''kamailio_media_servers''' = 3, 4 only RTPE servers with ids 3 and 4 will be included (if they exist in DB) in the Kamailio config.&lt;br /&gt;
* '''kamailio_disable_rtcp''' - Default 0. If set to 1, disables RTCP (a=rtcp:xxxx line in SDP).&lt;br /&gt;
* '''kamailio_allow_asymmetric_codecs''' - Default 0. If set to 1, mismatched SDP payload type numbers are accepted and honoured. For example, when OP send telephone-event with payload type 96 and TP answers with telephone-event payload 101, M4 sends telephone-event with payload type 101 back to OP, when this setting is enabled. If this setting is not enabled, then M4 handles these codecs as non matching and no telephone-event is send back to OP. This applies to all dynamic payload types (like OPUS), not just telephone-event.&lt;br /&gt;
* '''kamailio_nat_flags''' - Decimal representation of NAT check flags (https://kamailio.org/docs/modules/5.0.x/modules/nathelper.html#nathelper.f.nat_uac_test). Default 1 (only private IP in Contact header is checked). Value must be decimal, for example value &amp;quot;23&amp;quot; stands for flags 1, 2, 4 and 16. Works only for Connection Points with &amp;quot;Fix NAT'ed Contact&amp;quot; option enabled.&lt;br /&gt;
* '''kamailio_force_auth_for_unknown_ips''' - Default 0. If set to 1, then kamailio forces digest authentication for requests that come from IPs not configured as OP with static IP (IP auth OPs). This can be useful if dynamic OP constantly changes IP address and/or when dynamic OP does not send username in SIP From or Contact headers.&lt;br /&gt;
* '''kamailio_rtpengine_geo_enabled''' - Default 0. If set to 1, then enabled [https://wiki.kolmisoft.com/index.php/M4_RTPEngine_GeoIP RTPEngine GeoIP] media routing based on region.&lt;br /&gt;
* '''kamailio_tp_call_limits_check ''' - Default 0. If set to 1, then Kamailio will be responsible for TP capacity and TP CPS limits. By default, Radius is responsible for these limits but in some cases it can be inaccurate. Enforcing limit check on Kamailio can help to improve accuracy. This option must be enabled on Radius and Kamailio servers.&lt;br /&gt;
&lt;br /&gt;
=== SEMS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- http://trac.kolmisoft.com/trac/ticket/17911 --&amp;gt;&lt;br /&gt;
*'''sems_kolmisoft_ack_fix''' - Default no. If set to yes, a fix will be applied to certain scenarios when ACK is not forwarded to TP. Previous variable name kolmisoft_ack_fix.&lt;br /&gt;
*'''sems_kolmisoft_no_sdp_fix''' - Default no. It set to yes, a fix will be applied to certain scenarios when 200 OK without SDP is not forwarded to TP. Previous variable name kolmisoft_no_sdp_fix.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Make sure that the format is:&lt;br /&gt;
 variable = value&lt;br /&gt;
Note that there are spaces around = symbol&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;When settings are changed, the core needs to be reloaded using the following command:&lt;br /&gt;
&lt;br /&gt;
 m2 reload&lt;br /&gt;
&lt;br /&gt;
'''Note:''' for Kamailio specific settings, Kamailio reconfigure and restart is required (this will drop live calls on this Kamailio server!)&lt;br /&gt;
  &lt;br /&gt;
 /usr/src/m4/kamailio/kamailio_cfg_update.sh&lt;br /&gt;
 systemctl restart kamailio&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Providers&amp;diff=31540</id>
		<title>Providers</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Providers&amp;diff=31540"/>
		<updated>2026-04-29T09:13:41Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* For SIP/IAX2 providers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description =&lt;br /&gt;
&lt;br /&gt;
In the old PSTN world, Providers were called Trunks. Providers are your route out of your VoIP network to the outside world.&lt;br /&gt;
&lt;br /&gt;
Providers can be one of several types: ZAP, SIP, IAX2, and H323. The type determines which technology is used to connect to the Provider.&lt;br /&gt;
&lt;br /&gt;
At the very start, you need to create a Provider through which you will dial out to PSTN or other VoIP networks.&lt;br /&gt;
&lt;br /&gt;
Every Provider will charge you for calling a destination through his service (although the rate might be zero). The rate to every destination is different. Because of this, we need to have a Tariff (or Price List) for each Provider. This Tariff will tell our billing what price we will pay to a destination when using this Provider's services. In other words, this will be our Selfcost.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''SETTINGS –&amp;gt; Billing –&amp;gt; Providers'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:providers_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see a list of all Providers:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:providers_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Click [[image:add.png]] '''New Provider''' to create new Provider, enter the Name for a new Provider, select its Technology, Tariff, Asterisk server which should be used for this provider and click Create.&lt;br /&gt;
* Click [[image:icon_edit.png]] icon to change settings for old Provider.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
* Click [[Image:icon_check.png]] icon to disable Provider and it will not be used while it is cross in Active column. It affects only outgoing calls. Incoming calls from this provider will be accepted.&lt;br /&gt;
* Click [[Image:icon_cross.png]] icon to enable Provider if you want to use it again. &lt;br /&gt;
* Click [[Image:icon_vcard.png]] icon to access [[Provider Contact Info]].&lt;br /&gt;
* Click [[Image:icon_list.png]] icon to access [[Provider assigned to LCRs list]].&lt;br /&gt;
NOTE: &lt;br /&gt;
* You can't create a new Provider if there are no Tariffs available for Providers.&lt;br /&gt;
* A Provider is also able to send calls, not just receive them. More info [[Configure Provider which can make calls | here]]. In case you want to sell services to a provider you have to create such a provider.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Settings ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Prov addon.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Name''' – a name for the provider, for informational purposes.&lt;br /&gt;
* '''Technology''' – out of SIP/IAX2/ZAP/H323, choose which technology your provider uses - that is, the way you connect to the provider.&lt;br /&gt;
* '''DTMF Mode''' – the available options are inband, info, RFC2833, and auto. Choose the one used by your provider.&lt;br /&gt;
* '''Location''' – which Localization rules are set to apply to INCOMING calls COMING FROM this provider.&lt;br /&gt;
* '''Automatic Number Identification''' - used in a special case explained here: [[Provider with ANI]]&lt;br /&gt;
* '''Ringing Timeout''' – this setting lets you set for how long this provider should be dialed before giving up. The default value is 60 seconds, and the minimum value is 30 seconds.&lt;br /&gt;
* '''Call Timeout''' – this setting lets you set the duration of the whole call: ringing and the period after connection. &lt;br /&gt;
* '''Device ID''' – informational data. &lt;br /&gt;
* '''Call limit''' – explained here: [[Simultaneous call limitation]].&lt;br /&gt;
* '''Hidden?''' – [[Hide_provider|hide/unhide provider]]&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
* '''Balance''' – provider balance. Provider balance increases when calls are made via that provider. Currently it is not available to decrease provider's balance. You can read more about [[Provider Billing Addon|Provider Billing Addon here]].&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x4---&amp;gt;&lt;br /&gt;
* '''Balance limit''' – this is the limit of balance that can be reached by the provider. After he reaches the specified balance, calls aren't sent through this provider anymore.  Balance limit value of zero means that balance is unlimited.&lt;br /&gt;
* '''Responsible Accountant''' – dropdown to choose Provider's responsible accountant.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tariffs ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_prov_tariffs.png]]&lt;br /&gt;
* '''Default Tariff''' – the list of rates the provider charges you.&lt;br /&gt;
* '''Use Tariffs by CLIs''' – disabled by default. When enabling this option, the system asks to choose tariff and number pool. If CLI is found in the number pool, the provider tariff will be changed to the chosen one.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Authentication ===&lt;br /&gt;
&lt;br /&gt;
==== For ZAP providers ====&lt;br /&gt;
&lt;br /&gt;
* '''Channel''' – which channel (or channel group) to use on a PRI/BRI/PSTN card. Channels and groups should be configured in zapata.conf.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== For SIP/IAX2 providers ====&lt;br /&gt;
&lt;br /&gt;
* '''Login''' – username if your provider asks for it.&lt;br /&gt;
* '''Password''' – password used for authentication by your provider (characters '''@ : /''' are not allowed when Register option is enabled)&lt;br /&gt;
* '''Authenticate by IP''' – just check the checkbox (Login/Password can be left empty).&lt;br /&gt;
** Make sure you put the correct Hostname/[[IP address]]!&lt;br /&gt;
* '''Register''' – should we register MOR to the provider? (option is not visible when '''Dynamic''' is selected in '''Network related''' section)&lt;br /&gt;
* '''Register extension''' – if the provider asks to use an extension for registration (usually they don't), enter it here.&lt;br /&gt;
* '''Expiration''' - only in PJSIP Providers. Expiration time for registrations in seconds.&lt;br /&gt;
&lt;br /&gt;
Explanation of how registration works:&lt;br /&gt;
&lt;br /&gt;
If you want to register '''MOR to the provider''', then enter Login/Password provided by the provider and press the '''Register'''.&lt;br /&gt;
&lt;br /&gt;
If you want to register '''Provider to the MOR''', then enter Login/Password which you will provide to the provider, and select '''Dynamic''' in network settings.&amp;lt;br&amp;gt;&lt;br /&gt;
More details on how to configure Dynamic Provider can be found [[Configure Provider with dynamic IP | here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Provider CallerID ===&lt;br /&gt;
&lt;br /&gt;
'''CallerID''' – consists of two parts: Name and Number. The &amp;quot;Number&amp;quot; part is transferred by default on all technologies (GSM, PSTN, SIP etc), but the &amp;quot;Name&amp;quot; part only on some. The number you see on your mobile phone when someone is calling you is the &amp;quot;Number&amp;quot; part.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:provider_callerid.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Name''' – the &amp;quot;Name&amp;quot; part of CallerID. Works only on incoming calls.&lt;br /&gt;
* '''Number''' – the &amp;quot;Number&amp;quot; part of CallerID. Works only on incoming calls.&lt;br /&gt;
* '''Random Number from Number Pool''' – the &amp;quot;Number&amp;quot; part of CallerID selected from [[Number Pool]]&lt;br /&gt;
#Random - Send random CallerID.&lt;br /&gt;
#Pseudorandom with Deviation. Range can vary from 0 to 9999999. If 0 is chosen, then all numbers will be chosen same amount of times. If 9999999 is set, then numbers will be completely random.&lt;br /&gt;
* '''Set PAI from CallerID''' – creates PAI header from CallerID and sends to Provider. Also, '''Privacy: id''' header is added. Example:&lt;br /&gt;
 P-Asserted-Identity: &amp;lt;sip:CallerID@host;user=phone&amp;gt;&lt;br /&gt;
 Privacy: id&lt;br /&gt;
* '''Set RPID from CallerID''' – creates RPID header from CallerID and sends to Provider. Also, '''RPID-Privacy: full''' header is added. Example:&lt;br /&gt;
 Remote-Party-ID: &amp;lt;sip:CallerID@host:5060&amp;gt;;privacy=off;screen=yes&lt;br /&gt;
 RPID-Privacy: full&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Network related ===&lt;br /&gt;
&lt;br /&gt;
* '''Hostname''' – hostname of the provider.&lt;br /&gt;
* '''Server IP''' – the provider's IPv4 or IPv6. The value can be &amp;quot;dynamic&amp;quot;, which means that provider can change its IP. To discover this value, do ping to the provider's hostname. Use command &amp;quot;''dig +short''&amp;quot;. Example ''dig +short google.com''.&lt;br /&gt;
* '''Port''' – port used to connect to the provider (default: 5060 for SIP, 4569 for IAX2, 1720 for H323).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
====H323 specific network settings====&lt;br /&gt;
&lt;br /&gt;
* '''Fast Start''' – an option specific to H323; it is either on or off.&lt;br /&gt;
* '''h245 Tunneling''' – an option specific to H323; it is either on or of&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
====SIP specific network settings====&lt;br /&gt;
&lt;br /&gt;
* '''Media control''' – canreinvite/transfer. Do you want your server to stay in the media path between your clients and your provider? Disable if you have a lot of 1-second answered calls.&lt;br /&gt;
* '''NAT''' – the available options are: yes, no, never, and route. For a detailed explanation of these settings, refer to [http://www.voip-info.org/wiki-Asterisk+sip+nat here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
====IAX2 specific network settings====&lt;br /&gt;
&lt;br /&gt;
* '''IAX2 Trunking Mode''' – enable/disable trunking mode, which allows multiple voice streams to share a single &amp;quot;trunk&amp;quot; to another server, reducing overhead created by IP packets. More details [http://wiki.kolmisoft.com/index.php/Trunks here]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
====SIP and IAX2 specific network settings====&lt;br /&gt;
&lt;br /&gt;
* '''Qualify''' – how often to &amp;quot;ask&amp;quot; the provider about availability. More details [http://www.voip-info.org/wiki/view/Asterisk+sip+qualify here] for SIP providers and [http://www.voip-info.org/wiki/view/Asterisk+iax+qualify here] for IAX2 providers.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Blacklist/Whitelist ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:MOR_provider_blacklist_whitelist.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Enable static Source - enables a static Blacklist or a Whitelist for source (CallerID).&lt;br /&gt;
* '''No''' - use neither a Blacklist nor a Whitelist.&lt;br /&gt;
* '''Blacklist''' - set a [[Number Pool]] which is used to block a Provider from receiving specific Source Numbers. When a Source Number (RPID and PAI headers included) is found within a selected [[Number Pool]] this Provider is skipped with a Hangupcause Code ''272''.&lt;br /&gt;
* '''Whitelist''' - set a [[Number Pool]] which is used to allow a Provider to receive only specific Source numbers. When a Source Number (RPID and PAI headers included) is NOT found within a selected [[Number Pool]] this Provider is skipped with a Hangupcause Code ''273''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Enable static Destination - enables a static Blacklist or a Whitelist for Destination.&lt;br /&gt;
* '''No''' - use neither a Blacklist nor a Whitelist.&lt;br /&gt;
* '''Blacklist''' - set a [[Number Pool]] which is used to block a Provider from sending to specific Destination. When a Destination Number is found within a selected [[Number Pool]] this Provider is skipped with a Hangupcause Code ''281''.&lt;br /&gt;
* '''Whitelist''' - set a [[Number Pool]] which is used to allow a Provider to send only specific Destination. When a Destination Number is NOT found within a selected [[Number Pool]] this Provider is skipped with a Hangupcause Code ''282''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Servers ===&lt;br /&gt;
Allows to select on which Asterisk servers this provider should be used. It affects outgoing calls only.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Codecs ===&lt;br /&gt;
&lt;br /&gt;
Choose the codecs your provider uses.&lt;br /&gt;
&lt;br /&gt;
NOTE: When no fields are checked, all codecs are available. ([[Image:asterisk_icon.png]] For example, settings in sip.conf or iax.conf are effective).&lt;br /&gt;
&lt;br /&gt;
* '''Enforce same codec as on Leg A''' - only in SIP Providers. this option takes effect only when Device/Provider is used as Terminator. When this option is enabled, system checks what codec is used on Leg A. Then if Leg A codec matches one of codec enabled on Codecs list, system enforces callee to use that codec, by offering only that single codec in SDP data.&lt;br /&gt;
* '''Incoming Call Codec preference''' - only in PSJIP Providers. Codec preference for incoming calls. [https://wiki.kolmisoft.com/index.php/PJSIP_Codec_negotiation More info].&lt;br /&gt;
* '''Outgoing Call Codec preference''' - only in PSJIP Providers. Codec preference for outgoing calls. [https://wiki.kolmisoft.com/index.php/PJSIP_Codec_negotiation More info].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
&lt;br /&gt;
* '''Grace time''' – if call duration is less than &amp;lt;i&amp;gt;Grace Time&amp;lt;/i&amp;gt;, it will not be accounted.&lt;br /&gt;
* Progressinband:&lt;br /&gt;
**yes – when &amp;quot;RING&amp;quot; event is requested, always send 180 Ringing (if it hasn't been sent yet) followed by 183 Session Progress and in-band audio.&lt;br /&gt;
**no – send 180 Ringing if 183 has not yet been sent, establishing an audio path. If the audio path is established already (with 183), then send in-band ringing (this is the way Asterisk historically behaved because of buggy phones like Polycom's).&lt;br /&gt;
**never – whenever ringing occurs, send &amp;quot;180 ringing&amp;quot; as long as &amp;quot;200 OK&amp;quot; has not yet been sent. This is the default behavior of Asterisk.&lt;br /&gt;
* '''Video support''' – does your provider support Video over IP? More info [http://www.voip-info.org/wiki/view/Asterisk+video here].&lt;br /&gt;
* '''[[Duplicate call prevention | Allow duplicate calls]]''' – the default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Interpret NO ANSWER as FAILED''' – default option is no (This will change the provider in LCR like it is failed, in last calls you will see&lt;br /&gt;
the real hangupcause – no answer)&lt;br /&gt;
* '''Interpret BUSY as FAILED''' – default option is no (This will change the provider in LCR like it is failed, in last calls you will see&lt;br /&gt;
the real hangupcause – busy)&lt;br /&gt;
* '''Fake Ring''' – should system generate Fake Ring or not? Use only if your Device/Provider has bad protocol implementation and does not send the RING signal properly.&lt;br /&gt;
* '''Common Use''' – Provider can be used by Resellers which are able to create their own Providers. The reseller will be billed using this Provider. If the provider is marked as common use and is used in one of reseller's LCR or is in Terminators list - admin is not allowed to delete this provider or remove common use option.&lt;br /&gt;
* '''Anti-resale (Auto-answer)''' – when the option is set to YES, MOR answers the call before sending it to the provider in order to generate FAS. Work only when the provider is the originator of the call. This option does not affect billing.&lt;br /&gt;
* '''Anti-resale (Auto-answer) Sound file''' - this setting is visible when the Anti-resale (Auto-answer) is set to '''Yes''' only.&lt;br /&gt;
* '''Transport''' – lets you choose protocol(s) for data transfer. If TCP is used, it has to be [[How_to_enable_TCP_for_Asterisk |enabled in Asterisk]]. In PJSIP providers, protocol applies to outbound calls only. When 'auto' is selected, Asterisk chooses protocol automatically based on registered contact.&lt;br /&gt;
* '''Time limit per day''' - Total time available for provider per day. When limit is reached, call fails with HGC &amp;quot;238 - Provider used its daily call time limit&amp;quot; and another provider in LCR is used (total time is calculated after rounding rules and minimal time adjustment, so if your provider tariff has increment higher than 1 or minimal time set, then total provider time may be different than actual call time). Only available with Provider Billing addon. '''Used minutes are calculated using the server timezone'''.&lt;br /&gt;
* '''Time limit per month''' - Total time available for provider per month in minutes. You can also set day of limit reset (default is 1st day of the month). When limit is reached, call fails with HGC &amp;quot;285 - Provider used its monthly call time limit&amp;quot; and another provider in LCR is used (total time is calculated after rounding rules and minimal time adjustment, so if your provider tariff has increment higher than 1 or minimal time set, then total provider time may be different than actual call time). Only available with Provider Billing addon. '''Used minutes are calculated using the server timezone'''.&lt;br /&gt;
* '''Limit up to X, during Y seconds''' – you can set a limit how many calls (X) can be done in some interval of seconds (Y). [[Last Calls]] will show '''FAILED([[Hangupcause Codes |243]])'''.&lt;br /&gt;
* '''Execute AGI script''' - Execute custom AGI script. More info [http://wiki.kolmisoft.com/index.php/Provider_AGI_script here].&lt;br /&gt;
* '''STIR/SHAKEN Attestation''' - [https://wiki.kolmisoft.com/index.php/MOR_STIR/SHAKEN#Device/Provider_configuration STIR/SHAKEN] attestation level when calling to this Provider. Only available in PJSIP Providers.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Recordings===&lt;br /&gt;
&lt;br /&gt;
This section is available when [[Recordings Addon]] is installed in the system.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SIP Specific ===&lt;br /&gt;
&lt;br /&gt;
* '''Fromuser''' – [http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+fromuser  more details]&lt;br /&gt;
* '''Fromdomain''' – [http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+fromuser  more details]&lt;br /&gt;
* '''Trustrpid''' – This defines whether or not Remote-Party-ID is trusted. It's defined in http://tools.ietf.org/id/draft-ietf-sip-privacy-04.txt&lt;br /&gt;
* '''Sendrpid''' – defines whether a Remote-Party-ID SIP header should be sent. It defaults to &amp;quot;No&amp;quot;. This field is often used by wholesale VoIP providers to provide calling party identity regardless of the privacy settings (the From SIP header). &lt;br /&gt;
* '''Insecure''' – [http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+insecure  more details]&lt;br /&gt;
* '''T.38 Support''' – should we support T.38 pass-through?&lt;br /&gt;
* '''SIP Session Timers''' - SIP Session Timers provide an end-to-end keep-alive mechanism for active SIP sessions (more info [http://doxygen.asterisk.org/trunk/sip_session_timers.html here]). Possible values are &amp;quot;accept&amp;quot;, &amp;quot;originate&amp;quot;, &amp;quot;refuse&amp;quot;:&lt;br /&gt;
** '''originate''' - request and run session-timers always.&lt;br /&gt;
** '''accept''' - run session-timers only when requested by other UA.&lt;br /&gt;
** '''refuse''' - do not run session timers in any case.&lt;br /&gt;
* '''SIP Session Refresher''' - The session refresher (uac|uas). Defaults to 'uas'.&lt;br /&gt;
** '''uac''' - default to the caller initially refreshing when possible.&lt;br /&gt;
** '''uas''' - default to the callee initially refreshing when possible.&lt;br /&gt;
* '''SIP Session Expires''' - maximum session refresh interval in seconds. Defaults to 1800 secs. &lt;br /&gt;
* '''SIP Min Session''' - minimum session refresh interval in seconds. Defaults to 90 secs.&lt;br /&gt;
* '''[[SIP 302 Reinvite Support]]''' – turns this SIP feature on or off. &lt;br /&gt;
* '''P-Asserted-Identity usage''' – The P-Asserted-Identity header field can be used to convey the proven identity of the originator of a request within a trusted network. If pass_pai =0 in [http://wiki.kolmisoft.com/index.php/Mor.conf Mor.conf] and PAI usage in provider settings =1, then core will add PAI header.&lt;br /&gt;
* '''Periodic check''' - if enabled, periodic SIP OPTIONS requests will be sent to Provider to check if it is reachable. If Periodic Check is enabled and Provider does not respond to OPTIONS request then Provider will be marked as unreachable and will be skipped when making Calls. Once Provider starts to respond to OPTIONS request it will be marked as reachable and Calls will be routed through this Provider. Providers are checked every 5 minutes. Options packets are sent from IP address defined in /etc/asterisk/sip.conf. Some Providers may not respond to OPTIONS even they are Online. If you are getting HGC 247 on attempts to call a Provider that is online, disable this option.&lt;br /&gt;
* '''[http://wiki.kolmisoft.com/index.php/Mobile_Number_Portability_Addon#MNP_tags_in_SIP_INVITE Enable MNP tags]''' - adds MNP tags in SIP INVITE requests (if MNP is configured).&lt;br /&gt;
* '''Localize PAI''' - applies [[MOR_Provider_Rules#CallerID_Rules|Provider rules Source]] on PAI header for calls that are terminated by this Provider.&lt;br /&gt;
* '''Pass PAI''' - available options are 'Global', 'Yes', 'No'. Global (default value) means use value from  pass_pai in [[mor.conf]] file. More information available in table [[P-Asserted-Identity#How_P-Asserted-Identity_.28PAI.29_is_handled_in_MOR_X11_and_later_versions|here]].&lt;br /&gt;
* '''PAI Transformation''' - PAI Transformation. More info [https://wiki.kolmisoft.com/index.php/MOR_SIP_Header_Transformations here].&lt;br /&gt;
* '''Usereqphone''' - Yes or No. The default setting is &amp;quot;No&amp;quot;. Option adds ;user=phone in From, To, INVITE and PAI headers.&lt;br /&gt;
* '''Custom SIP Header''' - adds custom header to SIP request. Format is '''header: value''' (for example '''x-My-Custom-Header: my value''')&lt;br /&gt;
* '''Custom Destination Header''' - allows to read Destination number from specific SIP header (for example x-DID: 123) instead of SIP URI.&lt;br /&gt;
* '''Privacy CallerID''' - allows to change CallerID (From: &amp;lt;sip:'''xxxxxx'''@yyyyyyy&amp;gt;) when originator sends '''Privacy: id''' or '''Privacy: header'''. If originator does not send '''Privacy: id''' or '''Privacy: header''' or '''Privacy CallerID''' is empty, then SIP From header will not be modified. This option would only work on outbound calls terminated by this Provider.&lt;br /&gt;
* '''Privacy From Domain''' - allows to change Domain (From: &amp;lt;sip:xxxxxx@'''yyyyyyy'''&amp;gt;) when originator sends '''Privacy: id''' or '''Privacy: header'''. If originator does not send '''Privacy: id''' or '''Privacy: header''' or '''Privacy From Domain''' is empty, then SIP From header will not be modified.&lt;br /&gt;
* '''Playback before dial''' - allows to play selected sound file to originator before dialing to Provider. Select 'none' to disable this feature.&lt;br /&gt;
* '''Playback before dial mode''' - controls how '''Playback before dial''' handles media.&lt;br /&gt;
** '''Early media''' - uses '''183 Session Progress''' to send audio to originator. This is preferred way of sending media to originator since it does not require legA call to be answered. One drawback is that not all providers resend SIP 183 early media correctly. In those cases originator will hear silence.&lt;br /&gt;
** '''Answer and play''' - if this mode is selected, then '''MOR will answer legA''' and play media to originator. This way originator should always hear media but there are various drawbacks since legA is already answered. One of drawbacks is that MOR will generate false answer if Provider rejects call. Use this mode only if you know what you are doing.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VIDEO: How to create Provider ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;iframe width=&amp;quot;640&amp;quot; height=&amp;quot;360&amp;quot; src=&amp;quot;https://www.youtube.com/embed/S7DHLOOMBUs&amp;quot; frameborder=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/iframe&amp;gt; &lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[H323 Provider settings]]&lt;br /&gt;
* [[Quick Providers changes]]&lt;br /&gt;
* [[Providers Statistics]]&lt;br /&gt;
* [[NO ANSWER/BUSY interpretation for providers]]&lt;br /&gt;
* [[I have a problem with Provider]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31534</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31534"/>
		<updated>2026-04-24T07:01:21Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' if '''PAI Transformation''' is set on Provider, option '''P-Asserted-Identity usage''' must be disabled.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; only if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is missing (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is already present (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31533</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31533"/>
		<updated>2026-04-24T07:01:08Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' if PAI Transformations is set on Provider, option '''P-Asserted-Identity usage''' must be disabled.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; only if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is missing (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is already present (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31532</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31532"/>
		<updated>2026-04-24T07:00:49Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Note:''' if PAI Transformations is set on Provider, option '''P-Asserted-Identity usage''' must be disabled.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; only if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is missing (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is already present (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31531</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31531"/>
		<updated>2026-04-24T07:00:34Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
Note: if PAI Transformations is set on Provider, option '''P-Asserted-Identity usage''' must be disabled.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; only if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is missing (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is already present (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31530</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31530"/>
		<updated>2026-04-24T06:56:02Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; only if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is missing (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is already present (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31529</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31529"/>
		<updated>2026-04-24T06:55:29Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; only if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is already present (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is missing (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31522</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31522"/>
		<updated>2026-04-14T09:52:47Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; only if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is missing (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:${src}@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:CURRENT_CALLERID@myhost.sip&amp;gt; even if the header is already present (current localized CallerID will be used in place of ${src})&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31521</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31521"/>
		<updated>2026-04-14T09:50:42Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; only if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; even if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; even if the header is already present&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31520</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31520"/>
		<updated>2026-04-14T09:50:25Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; if header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; even if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; even if the header is already present&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31519</id>
		<title>MOR SIP Header Transformations</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_SIP_Header_Transformations&amp;diff=31519"/>
		<updated>2026-04-14T09:49:55Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;MOR SIP Header Transformations allow advanced manipulation of SIP headers like P-Asserted-Identity (PAI).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Currently, only '''PAI Transformation''' in Provider and Device settings allow transformations.&lt;br /&gt;
&lt;br /&gt;
[[File:mor_pai_transformation.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Transformation format=&lt;br /&gt;
&lt;br /&gt;
'''/match_expression/replacement_expression/flags'''&lt;br /&gt;
&lt;br /&gt;
* match_expression - POSIX regular expression&lt;br /&gt;
* replacement_expression - replacement expression with back references to matched tokes: \1, \2, …, \9&lt;br /&gt;
* flags (optional):&lt;br /&gt;
** i - match ignore case&lt;br /&gt;
** g - replace all matches&lt;br /&gt;
** d - delete header on match&lt;br /&gt;
** D - delete header on no-match&lt;br /&gt;
** c - search for header in Custom SIP Header or incoming SIP header (priority for Custom SIP Header)&lt;br /&gt;
** C - search for header only in Custom SIP Header&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Match Expression==&lt;br /&gt;
&lt;br /&gt;
POSIX regular expression (regex) matching is done on '''full SIP header''' (for example: &amp;lt;nowiki&amp;gt;&amp;quot;name&amp;quot; &amp;lt;sip:number@host&amp;gt;;params&amp;lt;/nowiki&amp;gt;). This allows to match and modify any part of the header (name, number, host, parameters).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Replacement Expression==&lt;br /&gt;
&lt;br /&gt;
If the regex match is successful, then the portion which was matched is replaced with a replacement. &lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:00370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;sip:370123456789@example.sip&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we match '''&amp;lt;nowiki&amp;gt;sip:00&amp;lt;/nowiki&amp;gt;''' in the original header and replace it with '''sip:'''. If the original header did not contain a number starting with 00, then regex would not match and nothing would be replaced.&lt;br /&gt;
&lt;br /&gt;
Additionally, the replacement can contain '''\n''' (n is a number from 1 to 9, inclusive) references, which refer to the portion of the match which is contained between parentheses '''( )'''. References are numbered by counting their opening parentheses from left to right.&lt;br /&gt;
&lt;br /&gt;
A regex:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
&lt;br /&gt;
would produce the following references:&lt;br /&gt;
&lt;br /&gt;
* \1 - &amp;quot;John&amp;quot;&lt;br /&gt;
* \2 - 00370123456789&lt;br /&gt;
* \3 - example.sip&lt;br /&gt;
* \4 - ;user=phone&lt;br /&gt;
&lt;br /&gt;
Using these references you can construct your own header:&lt;br /&gt;
&lt;br /&gt;
A Transformation:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/(.*) &amp;lt;sip:(.*)@(.*)&amp;gt;(.*)/\2 &amp;lt;sip:\2@myhost.sip&amp;gt;\4/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applied on a header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;quot;John&amp;quot; &amp;lt;sip:00370123456789@example.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
would result in:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;00370123456789 &amp;lt;sip:00370123456789@myhost.sip&amp;gt;;user=phone&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we construct a new header and set the '''name''' part to '''\2''' (which, in our case, is a number) and set static text as a '''host'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Regexp and Replacement Expressions accept dynamic variables, either Asterisk channel variables or MOR custom variables in the format:&lt;br /&gt;
&lt;br /&gt;
 ${variable}&lt;br /&gt;
&lt;br /&gt;
or when a substring of variable is required:&lt;br /&gt;
&lt;br /&gt;
 ${variables:offset:length}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Asterisk variables==&lt;br /&gt;
&lt;br /&gt;
Asterisk channel variables can be used in transformations. As an example, let's replace the URI number part in a header with a dialed extension:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:.*@/sip:${EXTEN}@/&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://docs.asterisk.org/Configuration/Dialplan/Variables/Channel-Variables/Asterisk-Standard-Channel-Variables/ More on Asterisk channel variables]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MOR custom variables==&lt;br /&gt;
&lt;br /&gt;
Custom MOR variables can also be used in transformations:&lt;br /&gt;
&lt;br /&gt;
* ${src} - current source number&lt;br /&gt;
* ${dst} - current destination number&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Special Keywords=&lt;br /&gt;
&lt;br /&gt;
'''_empty_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match non existing header. Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered only when the header does not exist (keyword _empty_ is used in match_expression). A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''_any_'''&lt;br /&gt;
&lt;br /&gt;
Allows to match any header (even if the header is not present at all). Can be used only in '''match_expression'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  /_any_/&amp;lt;sip:123@host.sip&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
This Transformation will be triggered always, even if the header is not present. If the header was present before, this transformations overwrites it. A new header will added with the value &amp;lt;sip:123@host.sip&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
Before putting Transformations to production, it is advisable to test them on various values. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in Linux console====&lt;br /&gt;
&lt;br /&gt;
Execute '''sed''' command (add s before transformation '''s'''/regex/replacement/flags):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo '&amp;lt;sip:00370123456789@myhost.sip&amp;gt;' | sed -E 's/sip:00/sip:/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Test in online sed live editor====&lt;br /&gt;
&lt;br /&gt;
If you do not have access to the Linux console, use https://sed.js.org/ (or any other online sed editor).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Validate regex====&lt;br /&gt;
&lt;br /&gt;
The Regex part of a Transformation can be validated using https://regexr.com/ (or any other online regex editor).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Quick notes=&lt;br /&gt;
&lt;br /&gt;
* Header must be present to apply Transformations (unless _empty_ match keyword is used)&lt;br /&gt;
* In case of error, no changes will be applied&lt;br /&gt;
* Only POSIX regex is allowed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;font-family: monospace; font-size: 13px&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Transformation''' || '''Original header''' || '''Modified header''' || '''Comment'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:00/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut + (here + is escaped by \ since it is special regex symbol)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+370/sip:86/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:861234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix +370, add prefix 86&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:\+?(.*)/sip:+\1/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:+3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add + if it is not present already&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(\+|00)/sip:/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:003701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:3701234567@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Cut prefix 00 or +&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/sip:(.*)@/sip:0\1123@/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:0XXXXXXXX123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || Add 0 in front and 123 at the end&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_empty_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; if header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;&amp;lt;sip:XXXXXXXX@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; even if the header is missing&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;/_any_/&amp;lt;sip:123@host.sip&amp;gt;/&amp;lt;/nowiki&amp;gt; ||  ||  &amp;lt;nowiki&amp;gt;&amp;lt;sip:123@myhost.sip&amp;gt;&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;Add header with value &amp;lt;sip:123@myhost.sip&amp;gt; even if header is already present&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Examples=&lt;br /&gt;
&lt;br /&gt;
Transformations provide the ability to design advanced scenarios through the use of flags and dynamic data.&lt;br /&gt;
&lt;br /&gt;
Let's take this scenario as an example:&lt;br /&gt;
&lt;br /&gt;
 Set the number in the PAI header to the number of incoming From header if the incoming source number matches the pattern in a Custom SIP Header field or remove the PAI header if the source number does not match a pattern in Custom SIP Header&lt;br /&gt;
&lt;br /&gt;
For this example, a Custom SIP Header is set on a Device:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the same Device, a PAI Transformation is set to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;/sip:${src:0:3}@/sip:${src}@/CD&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #1====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The PAI Transformation will produce the following PAI header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''C''' flag in the Transformation forces the PAI header to be searched in the Custom SIP Header, which in our case is '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;'''. Then, Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' (here ${src:0:3} was set to a length of 3 because our Custom PAI header has a length of 3). Regexp '''&amp;lt;nowiki&amp;gt;sip:370@&amp;lt;/nowiki&amp;gt;''' matches Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and is replaced by '''&amp;lt;nowiki&amp;gt;sip:${src}@&amp;lt;/nowiki&amp;gt;''' (which translates to '''&amp;lt;nowiki&amp;gt;sip:37064123456@&amp;lt;/nowiki&amp;gt;'''). The final PAI header will be:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:37064123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scenario #2====&lt;br /&gt;
&lt;br /&gt;
When an incoming call has SIP From header:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;From: &amp;lt;sip:37164123456@host&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, the Custom PAI header will be deleted.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Explanation:'''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regexp '''&amp;lt;nowiki&amp;gt;sip:${src:0:3}@&amp;lt;/nowiki&amp;gt;''' will be translated to '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;'''. Final Regexp '''&amp;lt;nowiki&amp;gt;sip:371@&amp;lt;/nowiki&amp;gt;''' does not match Custom PAI header '''&amp;lt;nowiki&amp;gt;P-Asserted-Identity: &amp;lt;sip:370@host&amp;gt;&amp;lt;/nowiki&amp;gt;''' and since the flag D (delete header on no-match) is set in the Transformation, Custom PAI header will be removed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Device settings]]&lt;br /&gt;
* [[Providers]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31489</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31489"/>
		<updated>2026-03-25T12:09:19Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - Alert trigger type, either &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''alert_name''' - Alert name.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;alert_name&amp;quot;: &amp;quot;Test&amp;quot;,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31488</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31488"/>
		<updated>2026-03-25T12:09:09Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP/HHTPS POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - Alert trigger type, either &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''alert_name''' - Alert name.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;alert_name&amp;quot;: &amp;quot;Test&amp;quot;,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31487</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31487"/>
		<updated>2026-03-25T10:41:19Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - Alert trigger type, either &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''alert_name''' - Alert name.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;alert_name&amp;quot;: &amp;quot;Test&amp;quot;,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31486</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31486"/>
		<updated>2026-03-25T10:40:57Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - Alert trigger type, either &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''alert_name''' - Alert name.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;alert_name&amp;quot;: &amp;quot;Test&amp;quot;,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[M4 Alert Contacts]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31485</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31485"/>
		<updated>2026-03-25T10:36:08Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''alert_name''' - Alert name.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;alert_name&amp;quot;: &amp;quot;Test&amp;quot;,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[M4 Alert Contacts]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31484</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31484"/>
		<updated>2026-03-25T10:35:08Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[M4 Alert Contacts]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31483</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31483"/>
		<updated>2026-03-25T10:34:47Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example Device&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alert_Groups&amp;diff=31282</id>
		<title>Alert Groups</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alert_Groups&amp;diff=31282"/>
		<updated>2026-02-27T08:30:05Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
Alert Groups allow you to create groups and add contacts to them, which will receive alert messages at predefined schedules.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alert Groups'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_groups_menu.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see all the Alert Groups you have created and as create new ones or edit them. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_groups.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In order to make an Alert Group, you must have at least one predefined [[Alert Schedules|Alert Schedule]]. &lt;br /&gt;
Once you created at least one [[Alert Schedules|Alert Schedule]], you can create new Alert Group by pressing add [[Image:icon_add.png]] button.&lt;br /&gt;
When creating a new Alert Group, these settings will be available to you:&lt;br /&gt;
* '''Active''' - enables/disables this Group.&lt;br /&gt;
* '''Group name''' - name of the Group.&lt;br /&gt;
* '''Contacts''' - Alert Contacts assigned to this Group.&lt;br /&gt;
* '''Schedule''' - Alert Schedule that will be used to send alert Email notifications.&lt;br /&gt;
* '''Comment''' - comment for this Group.&lt;br /&gt;
Once you created a group, you can add contacts to it, by pressing the [[Image:Icon_vcard.png]] button.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_groups_contacts.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To add a contact, simply select one of the contacts from the dropdown menu, and press [[Image:icon_add.png]] button.&lt;br /&gt;
&lt;br /&gt;
In order to edit a group, simply go back to the main Alert Groups page, and press the [[Image:icon_edit.png]] button.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
*[[Alerts]]&lt;br /&gt;
*[[Alert Contacts]]&lt;br /&gt;
*[[Alert Schedules]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alert_Contacts&amp;diff=31274</id>
		<title>M4 Alert Contacts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alert_Contacts&amp;diff=31274"/>
		<updated>2026-02-26T09:53:31Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
This page is dedicated to creating all Contacts whom have to be sent notifications of [[M4 Alerts]]. To get notifications, contacts should be assigned, at least, to one of the Alert Groups.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''SECURITY –&amp;gt; Alerts –&amp;gt; Contacts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:m2_alert_contacts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you will see list of all Alert Contacts&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:M4_alerts_contacts.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Insert data and click on [[Image:icon_add.png]] icon to create a contact or click [[image:icon_edit.png]] icon to change existing contact data.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Active''' - enable/disable this Contact.&lt;br /&gt;
* '''Contact Name''' - name of this Contact.&lt;br /&gt;
* '''Time Zone''' - time zone that will be used in Alert Schedules.&lt;br /&gt;
* '''Email''' - email that will be used when sending Alert notifications.&lt;br /&gt;
* '''Webhook''' - HTTP/HTTPS URL that will be used to send Alert webhooks. URL can contain dynamic variables '''&amp;lt;%= alert_id %&amp;gt;''' (ID of the triggered Alert), '''&amp;lt;%= alert_name %&amp;gt;''' (name of the triggered Alerts) and '''&amp;lt;%= alert_status %&amp;gt;''' (status of the triggered Alert, either 'ALERT' or 'CLEAR'). For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
*  '''Comment''' - comment for this Contact.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[M4 Alerts]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alert_Contacts&amp;diff=31273</id>
		<title>Alert Contacts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alert_Contacts&amp;diff=31273"/>
		<updated>2026-02-26T09:53:13Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
This page dedicated to create all Contacts to whom have to be sent notifications of [[Alerts]]. To get notifications, contacts should be assigned, at least, to one of [[Alert Groups]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alert Contacts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alert_contacts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you will see list of all Alert Contacts&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_contacts.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Insert data and click on [[Image:icon_add.png]] icon to create a contact or click [[image:icon_edit.png]] icon to change existing contact data.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Active''' - enable/disable this Contact.&lt;br /&gt;
* '''Contact Name''' - name of this Contact.&lt;br /&gt;
* '''Time Zone''' - time zone that will be used in Alert Schedules.&lt;br /&gt;
* '''Email''' - email that will be used when sending Alert notifications.&lt;br /&gt;
* '''Webhook''' - HTTP/HTTPS URL that will be used to send Alert webhooks. URL can contain dynamic variables '''&amp;lt;%= alert_id %&amp;gt;''' (ID of the triggered Alert), '''&amp;lt;%= alert_name %&amp;gt;''' (name of the triggered Alerts) and '''&amp;lt;%= alert_status %&amp;gt;''' (status of the triggered Alert, either 'ALERT' or 'CLEAR'). For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
*  '''Comment''' - comment for this Contact.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alerts]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Schedules]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alert_Contacts&amp;diff=31272</id>
		<title>Alert Contacts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alert_Contacts&amp;diff=31272"/>
		<updated>2026-02-26T09:52:40Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
This page dedicated to create all Contacts to whom have to be sent notifications of [[Alerts]]. To get notifications, contacts should be assigned, at least, to one of [[Alert Groups]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alert Contacts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alert_contacts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you will see list of all Alert Contacts&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_contacts.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Insert data and click on [[Image:icon_add.png]] icon to create a contact or click [[image:icon_edit.png]] icon to change existing contact data.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Active''' - enable/disable this Contact.&lt;br /&gt;
* '''Contact Name''' - name of this Contact.&lt;br /&gt;
* '''Time Zone''' - time zone that will be used in Alert Schedules.&lt;br /&gt;
* '''Email''' - email that will be used when sending Alert notifications.&lt;br /&gt;
* '''Webhook''' - URL that will be used when sending Alert webhooks. URL can contain dynamic variables '''&amp;lt;%= alert_id %&amp;gt;''' (ID of the triggered Alert), '''&amp;lt;%= alert_name %&amp;gt;''' (name of the triggered Alerts) and '''&amp;lt;%= alert_status %&amp;gt;''' (status of the triggered Alert, either 'ALERT' or 'CLEAR'). For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
*  '''Comment''' - comment for this Contact.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alerts]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Schedules]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alert_Contacts&amp;diff=31271</id>
		<title>M4 Alert Contacts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alert_Contacts&amp;diff=31271"/>
		<updated>2026-02-26T09:52:16Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
This page is dedicated to creating all Contacts whom have to be sent notifications of [[M4 Alerts]]. To get notifications, contacts should be assigned, at least, to one of the Alert Groups.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''SECURITY –&amp;gt; Alerts –&amp;gt; Contacts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:m2_alert_contacts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you will see list of all Alert Contacts&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:M4_alerts_contacts.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Insert data and click on [[Image:icon_add.png]] icon to create a contact or click [[image:icon_edit.png]] icon to change existing contact data.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Active''' - enable/disable this Contact.&lt;br /&gt;
* '''Contact Name''' - name of this Contact.&lt;br /&gt;
* '''Time Zone''' - time zone that will be used in Alert Schedules.&lt;br /&gt;
* '''Email''' - email that will be used when sending Alert notifications.&lt;br /&gt;
* '''Webhook''' - URL that will be used when sending Alert webhooks. URL can contain dynamic variables '''&amp;lt;%= alert_id %&amp;gt;''' (ID of the triggered Alert), '''&amp;lt;%= alert_name %&amp;gt;''' (name of the triggered Alerts) and '''&amp;lt;%= alert_status %&amp;gt;''' (status of the triggered Alert, either 'ALERT' or 'CLEAR'). For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
*  '''Comment''' - comment for this Contact.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[M4 Alerts]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alert_Contacts&amp;diff=31270</id>
		<title>M4 Alert Contacts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alert_Contacts&amp;diff=31270"/>
		<updated>2026-02-26T09:52:06Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
This page is dedicated to creating all Contacts whom have to be sent notifications of [[M4 Alerts]]. To get notifications, contacts should be assigned, at least, to one of the Alert Groups.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''SECURITY –&amp;gt; Alerts –&amp;gt; Contacts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:m2_alert_contacts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you will see list of all Alert Contacts&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:M4_alerts_contacts.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Insert data and click on [[Image:icon_add.png]] icon to create a contact or click [[image:icon_edit.png]] icon to change existing contact data.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Active''' - enable/disable this Contact.&lt;br /&gt;
* '''Contact Name''' - name of this Contact.&lt;br /&gt;
* '''Time Zone''' - time zone that will be used in Alert Schedules.&lt;br /&gt;
* '''Email''' - email that will be used when sending Alert notifications.&lt;br /&gt;
* '''Webhook''' - URL that will be used when sending Alert webhooks. URL can contain dynamic variables '''&amp;lt;%= alert_id %&amp;gt;''' (ID of the triggered Alert), '''&amp;lt;%= alert_name %&amp;gt;''' (name of the triggered Alerts) and '''&amp;lt;%= alert_status %&amp;gt;''' (status of the triggered Alert, either 'ALERT' or 'CLEAR'). For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
*  '''Comment''' - comment for this Contact.&lt;br /&gt;
&lt;br /&gt;
*'''Emails this Hour''' - how many emails are already sent this hour.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[M4 Alerts]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alert_Contacts&amp;diff=31269</id>
		<title>M4 Alert Contacts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alert_Contacts&amp;diff=31269"/>
		<updated>2026-02-26T09:49:43Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
This page is dedicated to creating all Contacts whom have to be sent notifications of [[M4 Alerts]]. To get notifications, contacts should be assigned, at least, to one of the Alert Groups.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''SECURITY –&amp;gt; Alerts –&amp;gt; Contacts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:m2_alert_contacts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you will see list of all Alert Contacts&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:M4_alerts_contacts.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Insert data and click on [[Image:icon_add.png]] icon to create a contact or click [[image:icon_edit.png]] icon to change existing contact data.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:m2_alert_contacts_edit.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Emails this Hour''' - how many emails are already sent this hour.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[M4 Alerts]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=File:M4_alerts_contacts.png&amp;diff=31268</id>
		<title>File:M4 alerts contacts.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=File:M4_alerts_contacts.png&amp;diff=31268"/>
		<updated>2026-02-26T09:49:35Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31267</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31267"/>
		<updated>2026-02-26T09:45:46Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contain dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[M4 Alert Contacts]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31265</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31265"/>
		<updated>2026-02-26T09:42:15Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Clear */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contain dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=File:M4_alerts_edit_clear.png&amp;diff=31264</id>
		<title>File:M4 alerts edit clear.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=File:M4_alerts_edit_clear.png&amp;diff=31264"/>
		<updated>2026-02-26T09:42:00Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31263</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31263"/>
		<updated>2026-02-26T09:40:42Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Alert */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' - when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contain dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31262</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31262"/>
		<updated>2026-02-26T09:40:14Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Alert */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contain dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=File:M4_alerts_edit_alert.png&amp;diff=31261</id>
		<title>File:M4 alerts edit alert.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=File:M4_alerts_edit_alert.png&amp;diff=31261"/>
		<updated>2026-02-26T09:40:08Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31260</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31260"/>
		<updated>2026-02-26T07:05:47Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example Device&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contain dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31259</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31259"/>
		<updated>2026-02-26T07:05:34Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contain dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31258</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31258"/>
		<updated>2026-02-26T07:05:22Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contact dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31257</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31257"/>
		<updated>2026-02-26T07:05:07Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example Device&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contact dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31255</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31255"/>
		<updated>2026-02-26T06:10:42Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M4_alerts_edit_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contact dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alerts.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=File:M4_alerts_edit_general.png&amp;diff=31254</id>
		<title>File:M4 alerts edit general.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=File:M4_alerts_edit_general.png&amp;diff=31254"/>
		<updated>2026-02-26T06:10:28Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31253</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31253"/>
		<updated>2026-02-26T06:07:09Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M4 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contact dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alerts.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31252</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31252"/>
		<updated>2026-02-26T06:06:07Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M2 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M2 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example OP&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contact dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alerts.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31251</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31251"/>
		<updated>2026-02-26T06:05:06Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Clear */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M2 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M2 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify On Clear via Email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
* '''Notify On Clear via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31250</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31250"/>
		<updated>2026-02-26T06:04:24Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Alert */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M2 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M2 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify On Alert via Email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify on Alert via email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31249</id>
		<title>M4 Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Alerts&amp;diff=31249"/>
		<updated>2026-02-26T06:03:57Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Alert */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Alerts is located under '''SECURITY -&amp;gt; Alerts'''&lt;br /&gt;
&lt;br /&gt;
Alerts functionality is dedicated to taking action about your system issues that may cause a problem. For example, you may block a User, disable Origination/Termination Point or simply send a notification to a specified [[Alert Groups|Group]] of [[M4 Alert Contacts|Contacts]]. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Parameters==&lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls billsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (ABSOLUTE) – Number of calls terminated with this [[M2 Hangupcause Codes|HGC]].&lt;br /&gt;
* HGC (PERCENT) – Percentage of calls terminated with this [[M2 Hangupcause Codes|HGC]].&lt;br /&gt;
&lt;br /&gt;
And it is possible to take action for these types of M4 Objects or send a notification about it:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Object Types ==&lt;br /&gt;
&lt;br /&gt;
* [[M4 Users|Client]]&lt;br /&gt;
** All&lt;br /&gt;
** One Client (User)&lt;br /&gt;
* [[M4 Termination Points | Termination Points]]&lt;br /&gt;
** All Termination Points&lt;br /&gt;
** One Termination Point for a specific User&lt;br /&gt;
* [[M4 Origination Points | Origination Points]]&lt;br /&gt;
** All Origination  Points&lt;br /&gt;
** One Origination  Point for a specific User&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by a prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706%, and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Primary and Secondary Object==&lt;br /&gt;
&lt;br /&gt;
If the Primary Object is an Origination or Termination point, it is possible to select a Secondary Object. The secondary Object's Type can be only Destination or Destination Group. This allows selecting only a specific Destination or Destination Group for a particular Termination/Origination Point.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==User to Notify==&lt;br /&gt;
&lt;br /&gt;
When the Object Type is a ''' Client''' you have the option to Notify User(s) by email.&lt;br /&gt;
An email goes to one of the preset email addresses: &lt;br /&gt;
&lt;br /&gt;
* Usually email is sent to '''NOC email''' address. &lt;br /&gt;
* If '''NOC email''' address is not set, email is sent to '''Main email''' address. &lt;br /&gt;
* If '''Main email''' address is not set, email is sent to '''Billing email''' address. &lt;br /&gt;
* If '''Billing email''' address is not set, email is sent to '''Rates email''' address. &lt;br /&gt;
* If none of the NOC, Main, Billing, or Rates email is set, no Alert notification email will be sent.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Settings=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==General==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_general.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert Name''' – name of Alert.&lt;br /&gt;
* '''Primary Object''' - Primary Object to observe. All alerts must have a Primary Object.&lt;br /&gt;
* '''Object Type''' – select [[M4_Alerts#Object_Types|Object Type]] to observe for Primary Object.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Primary Object (fields depend on selected Object Type)&lt;br /&gt;
* '''Secondary Object''' - Secondary Object to observe. Only Available if Primary Object's Type is Termination Point or Origination Point. Secondary Object act as the Destination/Destination Group filter for the Primary Object.&lt;br /&gt;
* '''Object Type''' – select Object Type to observe for Secondary Object. Available types are Destination and Destination Group.&lt;br /&gt;
* '''Object Name''' – specify name/prefix of Secondary Object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Check last''' – the time period to check.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, and Parameter cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;lt;= – indicate calls sum when the system should ignore Alert if calls sum in one hour is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls (in 1 h)''' &amp;gt;= – indicate calls sum when the system should ignore Alert if calls sum one hour is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when the Alert object type is Client or Origination/Termination Point. Check if you want to notify the User on Alert. More information available [[M4_Alerts#User_to_Notify|here]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Alert==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_alert.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' - triggers the alert when the observed parameter drops below the given value.&lt;br /&gt;
* '''Alert if &amp;gt;=''' - triggers the alert when the observed parameter raises above the given value.&lt;br /&gt;
* '''Disable Primary Object''' - disables the observed primary object when an alert is triggered. NOT available for Destinations and Destination Group-type objects.&lt;br /&gt;
* '''Disable TP in Dial Peer''' - disables the selected Termination Point when an alert is triggered (only available when observing the Termination Point object). This option does not have any effect when &amp;quot;Disable Primary Object&amp;quot; is enabled.&lt;br /&gt;
*''' Routing Group''' - sets the provided Routing Group for the observed object (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Deactivate DP in RG:''' - deactivates selected [[M4 Dial Peers|Dial Peer]] in Origination Point's Routing Group (only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Notify on Alert via email''' - sends a notification email when an alert is triggered.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/M4_Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clear==&lt;br /&gt;
&lt;br /&gt;
[[File:M2_alert_clear.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Disable Clear''' - disables clearing indefinitely. The changes triggered by the alert can be changed manually.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' - clears the alert when the observed parameter drops below the given value.&lt;br /&gt;
** '''Clear if &amp;gt;=''' - clears the alert when the observed parameter rises above the given value.&lt;br /&gt;
*''' Clear on time basis'''&lt;br /&gt;
** '''Clear after''' - clears the alert after a given period of time. (The period is set once the alert is triggered)&lt;br /&gt;
** '''Clear on Date''' - clears the alert on the given date.&lt;br /&gt;
* '' 'Enable Primary Object''' - enables the Primary Object once the alert is cleared. Only available if '''Disable Primary Object''' is selected in the Alerts section.&lt;br /&gt;
* '''Enable TP in Dial Peer''' - enables Termination Point to be used again in the corresponding Dial Peer (only available when observing Termination Point object).&lt;br /&gt;
* '''Routing Group''' - sets the provided Routing Group for the observed object(only available when observing [[M4 Origination Points | Origination Points]])&lt;br /&gt;
* '''Activate DP in RG:''' - activates Dial Peer in Routing Group (the one disabled in '''Deactivate DP in RG:''' setting on Alert section). Only available when observing [[M4 Origination Points | Origination Points]].&lt;br /&gt;
* '''Notify on Alert via email''' - sends a notification email when an alert is cleared.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Block Termination Point for 1 hour if ACD during last 24h drops below 120 seconds===&lt;br /&gt;
&lt;br /&gt;
Primary Object, Object Type: Termination Point&lt;br /&gt;
&lt;br /&gt;
Object name: select a specific Termination Point&lt;br /&gt;
&lt;br /&gt;
Parameter: ACD&lt;br /&gt;
&lt;br /&gt;
Check Last: 24h&lt;br /&gt;
&lt;br /&gt;
Ignore if Calls (in 24 h) &amp;lt;=: 50&lt;br /&gt;
&lt;br /&gt;
Alert if ASR &amp;lt;=: 120&lt;br /&gt;
&lt;br /&gt;
Disable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
Disable Clear: unchecked&lt;br /&gt;
&lt;br /&gt;
Clear on a time basis, Clear after 60 minutes&lt;br /&gt;
&lt;br /&gt;
Enable Primary Object: checked&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31248</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31248"/>
		<updated>2026-02-26T06:01:02Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID.&lt;br /&gt;
* '''alert_id''' - Alert ID.&lt;br /&gt;
* '''object_id''' - ID of checked Object.&lt;br /&gt;
* '''object_name''' - human-readable Object name.&lt;br /&gt;
* '''cause''' - Alert type.&lt;br /&gt;
* '''value''' - current value.&lt;br /&gt;
* '''count''' - data count.&lt;br /&gt;
* '''timestamp''' - timestamp when Alert/Clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example Device&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contact dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alerts.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31247</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31247"/>
		<updated>2026-02-26T06:00:16Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Webhook notifications */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID (integer).&lt;br /&gt;
* '''alert_id''' - Alert ID (integer).&lt;br /&gt;
* '''object_id''' - ID of checked Object (integer).&lt;br /&gt;
* '''object_name''' - human-readable Object name (string).&lt;br /&gt;
* '''cause''' - Alert type (string).&lt;br /&gt;
* '''value''' - current value (number).&lt;br /&gt;
* '''count''' - data count (integer).&lt;br /&gt;
* '''timestamp''' - timestamp when alert/clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example Device&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Webhook URL may also contact dynamic variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= alert_id %&amp;gt;''' - ID of the triggered Alert.&lt;br /&gt;
* '''&amp;lt;%= alert_name %&amp;gt;''' - name of the triggered Alerts.&lt;br /&gt;
* '''&amp;lt;%= alert_status %&amp;gt;''' - status of the triggered Alert (either 'ALERT' or 'CLEAR').&lt;br /&gt;
&lt;br /&gt;
For example: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://example.com/hook?aid=&amp;lt;%= alert_id %&amp;gt;&amp;amp;name=&amp;lt;%= alert_name %&amp;gt;&amp;amp;status=&amp;lt;%= alert_status %&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31246</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31246"/>
		<updated>2026-02-26T05:58:08Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL. More info [https://wiki.kolmisoft.com/index.php/Alerts#Webhook_notifications here].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID (integer).&lt;br /&gt;
* '''alert_id''' - Alert ID (integer).&lt;br /&gt;
* '''object_id''' - ID of checked Object (integer).&lt;br /&gt;
* '''object_name''' - human-readable Object name (string).&lt;br /&gt;
* '''cause''' - Alert type (string).&lt;br /&gt;
* '''value''' - current value (number).&lt;br /&gt;
* '''count''' - data count (integer).&lt;br /&gt;
* '''timestamp''' - timestamp when alert/clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example Device&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31245</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31245"/>
		<updated>2026-02-26T05:57:08Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Webhook notifications =&lt;br /&gt;
&lt;br /&gt;
When an alert is raised or cleared and options '''Notify On Alert via Webhook''' or '''Notify On Clear via Webhook''' in the Alert are enabled, a HTTP request will be sent to each Contact in the Alert Group that has '''Webhook''' URL set. The request uses HTTP POST with JSON payload (Content-Type: application/json).&lt;br /&gt;
&lt;br /&gt;
JSON Payload:&lt;br /&gt;
&lt;br /&gt;
* '''type''' - &amp;quot;ALERT&amp;quot; or &amp;quot;CLEAR&amp;quot;.&lt;br /&gt;
* '''group_id''' - Alert Group ID (integer).&lt;br /&gt;
* '''alert_id''' - Alert ID (integer).&lt;br /&gt;
* '''object_id''' - ID of checked Object (integer).&lt;br /&gt;
* '''object_name''' - human-readable Object name (string).&lt;br /&gt;
* '''cause''' - Alert type (string).&lt;br /&gt;
* '''value''' - current value (number).&lt;br /&gt;
* '''count''' - data count (integer).&lt;br /&gt;
* '''timestamp''' - timestamp when alert/clear triggered.&lt;br /&gt;
&lt;br /&gt;
Example payload:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;ALERT&amp;quot;,&lt;br /&gt;
   &amp;quot;group_id&amp;quot;: 12,&lt;br /&gt;
   &amp;quot;alert_id&amp;quot;: 42,&lt;br /&gt;
   &amp;quot;object_id&amp;quot;: 123,&lt;br /&gt;
   &amp;quot;object_name&amp;quot;: &amp;quot;Example Device&amp;quot;,&lt;br /&gt;
   &amp;quot;cause&amp;quot;: &amp;quot;CALLS TOTAL&amp;quot;,&lt;br /&gt;
   &amp;quot;value&amp;quot;: 150.0,&lt;br /&gt;
   &amp;quot;count&amp;quot;: 150,&lt;br /&gt;
   &amp;quot;timestamp&amp;quot;: &amp;quot;2026-02-26 12:34:56&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31244</id>
		<title>Alerts</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Alerts&amp;diff=31244"/>
		<updated>2026-02-26T05:44:43Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Alerts functionality is dedicated to taking actions about your system issues which may cause a problem. You may block User, disable Provider, change LCR for User or simply send a notification to specified [[Alert Groups|Group]] of [[Alert Contacts|Contacts]]. &lt;br /&gt;
&lt;br /&gt;
You are able to follow these parameters:&lt;br /&gt;
&lt;br /&gt;
* [[ASR/ACD|ASR]] – Answer-Seizure Ratio (percent)&lt;br /&gt;
* [[ASR/ACD|ACD]] – Average Call Duration (in seconds)&lt;br /&gt;
* PDD – Average Post Dial Delay. The time between punching in the last digit of a telephone number and receiving a ring or busy signal (in seconds)&lt;br /&gt;
* TTC (Time to Connect)(DURATION-BILLSEC) – Average time between receiving a ring signal and answer to the call (in seconds)&lt;br /&gt;
* BILLSEC – Sum of calls bilsec (in seconds)&lt;br /&gt;
* TOTAL CALLS – Sum of all calls.&lt;br /&gt;
* TOTAL OUTGOING CALLS – Sum of outgoing calls.&lt;br /&gt;
* ANSWERED CALLS – Sum of answered calls.&lt;br /&gt;
* NOT ANSWERED CALLS – Sum of not answered calls (FAILED, BUSY, NO ANSWER).&lt;br /&gt;
* SIMULTANEOUS CALLS – Number of simultaneous calls (only applies to users and providers).&lt;br /&gt;
* PRICE SUM – Sum of calls price (only applies to users and providers).&lt;br /&gt;
* HGC (absolute) – Sum of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* HGC (percent) – Percent of calls, which ended with a specific [[Hangupcause_Codes | Hangupcause code]]. The HGC has to be set in the ''HGC'' field (it appears once ''Parameter: HGC'' is chosen).&lt;br /&gt;
* REGISTRATION - Device registration status (either registered or not).&lt;br /&gt;
And it is possible to make actions for these types of MOR Objects or send notification about it:&lt;br /&gt;
&lt;br /&gt;
* [[Users]]&lt;br /&gt;
** All&lt;br /&gt;
** Postpaid&lt;br /&gt;
** Prepaid&lt;br /&gt;
** One User&lt;br /&gt;
* [[Providers]]&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Directions and Destinations | Destinations]]&lt;br /&gt;
** One Destination by prefix.&lt;br /&gt;
** Few Destinations by prefix and % sign. Eg. 93%, 3706% and so on.&lt;br /&gt;
* [[Destinations Groups]]&lt;br /&gt;
* System&lt;br /&gt;
** Any call made will be assigned to System object (even unauthenticated calls). Useful for general System monitoring.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Monitorings –&amp;gt; Alerts'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all created Alerts and their main information like is Alert active? When it was Raised/Cleared last time? What value was at Alert/Clear...&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:alerts_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[Image:icon_add.png]]'''Add new Alert''' link to create an Alert or click on [[image:icon_edit.png]] icon to change settings of existing Alert.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_alerts_edit_4.png|right]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''General'''&lt;br /&gt;
&lt;br /&gt;
* '''Name''' – Alert name.&lt;br /&gt;
* '''Object Type''' – select which Object you want to follow.&lt;br /&gt;
* '''Object Name''' – pecify name/prefix of Object.&lt;br /&gt;
* '''Parameter''' – choose which parameter should be followed.&lt;br /&gt;
* '''Alert Type''' – ABS means that absolute data values will be taken from specified time period.&lt;br /&gt;
'''NOTE''': Object Type, Object Name, Parameter, Alert Type cannot be changed once Alert is created. &lt;br /&gt;
* '''Ignore if Calls''' &amp;lt;= – indicate calls sum when system should ignore Alert if calls sum is less than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Ignore if Calls''' &amp;gt;= – indicate calls sum when system should ignore Alert if calls sum is more than written (if 0, Alert will not be ignored). &lt;br /&gt;
* '''Group to Notify''' – select [[Alert Groups|Group]] of [[Alert Contacts|Contacts]] who should be informed about Alert/clear.&lt;br /&gt;
* '''Notify to User''' – it is available only when Alert object type is User or Device. Check if you want to notify User on Alert.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Alert'''&lt;br /&gt;
&lt;br /&gt;
* '''Alert if &amp;lt;=''' – indicate Parameter value when system should raise Alert if value is less than written. &lt;br /&gt;
* '''Alert if &amp;gt;=''' – indicate Parameter value when system should raise Alert if value is more than written. &lt;br /&gt;
* '''Disable Object''' – check if you want to disable selected Object on Alert.&lt;br /&gt;
* '''Disable Provider in LCR'''  – indicate LCR where Provider should be disabled.&lt;br /&gt;
* '''LCR on Alert''' – select LCR which one should be used after Alert&lt;br /&gt;
* '''Notify On Alert via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Alerts.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Clear'''&lt;br /&gt;
&lt;br /&gt;
* '''Disable Clear''' – when alert is raised, it will never be cleared.&lt;br /&gt;
* '''Clear on Condition'''&lt;br /&gt;
** '''Clear if &amp;lt;=''' – indicate Parameter value when system should Clear Alert if value is less than written. &lt;br /&gt;
** '''Clear if &amp;gt;=''' – indicate Parameter value when system should Clear Alert if value is more than written. &lt;br /&gt;
* '''Clear on time basis'''&lt;br /&gt;
** '''Clear after''' – indicate time value after which system should Clear Alert&lt;br /&gt;
** '''Clear on Date''' – indicate specific date and time when system should Clear Alert (After clear, selection will be reset)&lt;br /&gt;
* '''Enable Object''' – check if you want to enable selected(in Alert configuration) Object on Clear.&lt;br /&gt;
* '''Enable Provider in LCR''' – check if you want to enable selected(in Alert configuration) Provider on Clear.&lt;br /&gt;
* '''LCR on Clear''' – select LCR which one should be used after Clear.&lt;br /&gt;
* '''Notify On Clear via Email''' – check if you want that specified [[Alert Groups|Group]] will receive an email notifications about Clear.&lt;br /&gt;
* '''Notify On Alert via Webhook''' – when set, the alert will send a webhook to all Contacts in Alert Group that have non-empty Webhook URL.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' one of '''Clear on Condition''' options and both '''Clear on time basis''' options can be selected at one time. System will clear alert if at least one of conditions will be true, it means that alert will be cleared on condition which first will appear. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Period'''&lt;br /&gt;
&lt;br /&gt;
You can select different time periods for each alert. This period defines time period which activity have to be checked. &lt;br /&gt;
&lt;br /&gt;
Note: period has no effect when parameter SIMULTANEOUS CALLS is chosen.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Comment''' – additional notes. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Alert vs Clear =&lt;br /&gt;
&lt;br /&gt;
Example with CPU Load just to demonstrate what is Alert and what is Clear and proper usage of them.&lt;br /&gt;
&lt;br /&gt;
[[File:alert_graph.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
===Send notification and change LCR on Alert===&lt;br /&gt;
&lt;br /&gt;
Parameter: TOTAL CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: Prepaid &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 300 &amp;lt;br&amp;gt;&lt;br /&gt;
Clear if &amp;lt;=: 200 &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on alert: secondary LCR &amp;lt;br&amp;gt;&lt;br /&gt;
LCR on clear: Restore Original &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: support group &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Period: 1h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors all Calls done by Prepaid Users. If a Prepaid User makes more than 300 Calls during one hour period, his LCR will be changed to secondary LCR and Email notification will be sent to every contact on support group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If User's Call count drops below 200 calls during one hour period, his LCR will be restored to original LCR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user when simultaneous calls are detected===&lt;br /&gt;
&lt;br /&gt;
Parameter: SIMULTANEOUS CALLS &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alert if &amp;gt;=: 2 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This Alert monitors simultaneous calls done by all Users. If a User makes more than (or equal to) 2 simultaneous Calls to the same destination, his account will be suspended and Email notification will be sent to every contact on administration group.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This alert will no be cleared automatically and user will stay suspended even if no more simultaneous calls are present.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Block user if it spends more than 50EUR in 24h===&lt;br /&gt;
&lt;br /&gt;
Parameter: PRICE SUM &amp;lt;br&amp;gt;&lt;br /&gt;
Object Type: User &amp;lt;br&amp;gt;&lt;br /&gt;
Object Name: All &amp;lt;br&amp;gt;&lt;br /&gt;
Alerf if &amp;gt;= 50 &amp;lt;br&amp;gt;&lt;br /&gt;
Group to Notify: administration &amp;lt;br&amp;gt;&lt;br /&gt;
Notify on Alert via Email: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Object: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Disable Clear: checked &amp;lt;br&amp;gt;&lt;br /&gt;
Check last: 24 h &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Alerts triggered by other Alerts===&lt;br /&gt;
&lt;br /&gt;
Administrators are able to create alerts that depend on other alerts. What that means is, that you are able to create an alert that is triggered by a set or a subset of other alerts.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
* Alert 1 is triggered when a specific user's ACD drops below ten seconds.&lt;br /&gt;
* Alert 2 is triggered when a the same user's Device's ASR drops below 50%.&lt;br /&gt;
* Alert 3 is triggered when both Alert 1 and Alert 2 is triggered, so that the technicians are notified.&lt;br /&gt;
&lt;br /&gt;
In order to set up such a chain of events, you should first create Alert 1 and Alert 2.&lt;br /&gt;
&lt;br /&gt;
Then, you should set up Alert 3.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_parameter.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Configure your alert as usual, but instead of a specific parameter choose GROUP.&lt;br /&gt;
* Then, add the alert dependencies using the shown interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_alert.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Set a number of alerts, that, when reached will trigger the alert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Alert_group_clear.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Finally set up a number of alerts that will clear your alert.&lt;br /&gt;
&lt;br /&gt;
These alerts can also be nested, without worrying about circular-dependencies, '''MOR''' simply will not let you make them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Alert Schedules]]&lt;br /&gt;
* [[Alert Groups]]&lt;br /&gt;
* [[Alert Contacts]]&lt;br /&gt;
* [[ASR/ACD]]&lt;br /&gt;
* [[How to resolve long PDD]]&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=File:Mor_alerts_edit_4.png&amp;diff=31243</id>
		<title>File:Mor alerts edit 4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=File:Mor_alerts_edit_4.png&amp;diff=31243"/>
		<updated>2026-02-26T05:44:25Z</updated>

		<summary type="html">&lt;p&gt;Ricardass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ricardass</name></author>
	</entry>
</feed>