<?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=Nerijuss</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=Nerijuss"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php/Special:Contributions/Nerijuss"/>
	<updated>2026-05-19T17:54:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_Provider_Rules&amp;diff=31465</id>
		<title>MOR Provider Rules</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_Provider_Rules&amp;diff=31465"/>
		<updated>2026-03-19T06:19:00Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Replacement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description =&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;'''Provider Rules transforms an E.164-compatible number to any number format the Provider requires.'''&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Different providers expect different number formats from you. You can send them whatever they want using Provider Rules.&lt;br /&gt;
&lt;br /&gt;
Provider Rules can be reached by clicking the [[Image:rules.png]] icon next to a provider in the Providers window:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:provrules1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We see a similar window as the one in Localization. The rules to manage Provider Rules are identical to those for Localization management, which are covered [[MOR Number Manipulation | here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Destination Rules =&lt;br /&gt;
&lt;br /&gt;
Let's say our provider expects to get a number with the technical prefix 89765#. We can do this in following way:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:provrules2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
That's it – very simple. Now every number that is sent to this provider will be transformed by adding our created tech. prefix.&lt;br /&gt;
&lt;br /&gt;
For example, if 37063042438 should be sent to this provider, this rule will be activated and the number 89765#37063042438 will be sent to provider.&lt;br /&gt;
&lt;br /&gt;
'''REMINDER''': You can check whether Provider Rules are applied correctly in [[Call Tracing]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Special cases == &lt;br /&gt;
&lt;br /&gt;
=== Cut everything till Hash ===&lt;br /&gt;
&lt;br /&gt;
With rule '''Cut: *#''' it is possible to cut everything till # (# included) in the dialed destination:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:provider_rules_cuttillhash.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
* Dialed number:  999#37063042439.&lt;br /&gt;
* After transformation: 37063042439.&lt;br /&gt;
&lt;br /&gt;
This function can be used in fancy MNP (Mobile Number Portability) schemes and perhaps elsewhere.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: ''Add'' value still can be used to add any value after ''Cut'' is used on the Destination.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Destination same as received ===&lt;br /&gt;
&lt;br /&gt;
If you want to send a number to a Provider exactly as it was received, set Cut = '-' (minus sign as shown in the screenshot).&lt;br /&gt;
&lt;br /&gt;
That way, the same number that comes to MOR also leaves MOR:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:prov_rules_dst_as_received.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Replacement===&lt;br /&gt;
&lt;br /&gt;
If you want to replace one prefix with another you have to ''Cut'' the original prefix and ''Add' the new one. For example:&lt;br /&gt;
&lt;br /&gt;
If the number is 306936525113 and you want to replace 30 with 6516 this is how the rule should look:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Provrules replace.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Only one rule is be applied, the one that fits the number the best (longest matching Cut pattern).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Suffix===&lt;br /&gt;
&lt;br /&gt;
Add anything to destination number.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Provrules_suffix.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If the dialed number is 37012345678, then ''TEXT'' will be added to it and destination number became 37012345678TEXT. Example:&lt;br /&gt;
 INVITE sip:37012345678TEXT@sip.provider.com:5060 SIP/2.0&lt;br /&gt;
 To: &amp;lt;sip:37012345678TEXT@sip.provider.com:5060&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CallerID Rules =&lt;br /&gt;
&lt;br /&gt;
Source Rules manages CallerID which is sent to this particular Provider.&lt;br /&gt;
&lt;br /&gt;
In the example bellow we will add international prefix to every CallerID sent to this Test Provider:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Provider_src_rules_1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Special Case ==&lt;br /&gt;
&lt;br /&gt;
=== CallerID transform Name part ===&lt;br /&gt;
&lt;br /&gt;
If Name part of CallerID should be transformed as well, then check '''Change CallerID name''' checkbox.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if CallerID is &amp;quot;00123456789&amp;quot; &amp;lt;00123456789&amp;gt;, then after transformation (given bellow) CallerID will look like &amp;quot;123456789&amp;quot; &amp;lt;123456789&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Provider_src_rules_3.png]]&lt;br /&gt;
&lt;br /&gt;
=== CallerID overwrite for Provider ===&lt;br /&gt;
&lt;br /&gt;
Sometimes Providers only accept calls with CallerID.&lt;br /&gt;
&lt;br /&gt;
It is possible to overwrite any CallerID before sending a call to such a Provider.&lt;br /&gt;
&lt;br /&gt;
In [[MOR Provider Rules]] (for this Provider) set up the Rule:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Provider_src_rules_2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In this example, all calls going to this Provider will have CallerID = 37063033333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Change Tariff =&lt;br /&gt;
&lt;br /&gt;
Provider Rules allow to change Provider's Tariff based on Source or Destination number&lt;br /&gt;
&lt;br /&gt;
[[Image:Provider_src_rules_change_tariff.png]]&lt;br /&gt;
&lt;br /&gt;
= Copy Rules to Provider =&lt;br /&gt;
&lt;br /&gt;
At the top of Provider Rules page you can find '''Copy Rules to Provider''' button which allows to copy Provider Rules to any other Provider. This is convenient when you have a lot of rules which need to be applied to several providers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Copy_provider_rules.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Set PAI =&lt;br /&gt;
&lt;br /&gt;
Set CallerID to Anonymous. PAI will contain modified CallerID by Provider rule.&lt;br /&gt;
&lt;br /&gt;
[[Image:Provider_src_rules_pai.png]]&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[MOR Number Manipulation]]&lt;br /&gt;
** [[MOR Localization]]&lt;br /&gt;
** [[MOR Device Rules]]&lt;br /&gt;
** [[DID handling by Localization]]&lt;br /&gt;
** [[MOR Number Manipulation Examples]]&lt;br /&gt;
* [[Work flow to setup Localization and Provider Rules]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_CDR_Export_Templates&amp;diff=31457</id>
		<title>M4 CDR Export Templates</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_CDR_Export_Templates&amp;diff=31457"/>
		<updated>2026-03-13T12:08:24Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Available columns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CDR Export Templates allow the creation of templates with specific columns for CSV files. These templates can be used to export CDRs from Last Calls.&lt;br /&gt;
&lt;br /&gt;
==How to download CDR by template==&lt;br /&gt;
&lt;br /&gt;
Go to '''Billing -&amp;gt; CDR -&amp;gt; Export -&amp;gt; Templates''' and create a new template with columns that you want to export.&lt;br /&gt;
&lt;br /&gt;
[[File:M4_cdr_export_templates.png]]&lt;br /&gt;
&lt;br /&gt;
Now, if you go to Calls List, you should be able to see '''Export to Template''' button:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:M4_cdr_export_templates2.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;By pressing '''Export''', all CDRs by specified filters will be exported to a CSV file, and only columns fromthe CDR Template will be included.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''CDR CSV archive will be sent via email to System administrator'''.&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE:''' archive size is limited to 10MB! If the CDR archive is larger, then the archive will not be sent back.&lt;br /&gt;
&lt;br /&gt;
==Available columns==&lt;br /&gt;
&lt;br /&gt;
* '''Answer Time''' - date and time when the call was answered (empty if the call was not answered);&lt;br /&gt;
* '''Billsec''' - billable duration (from the answer to hangup) excluding minimal time and increment;&lt;br /&gt;
* '''Call ID''' - call id in the system;&lt;br /&gt;
* '''Called From''' - Originator's number (CallerID), for example, &amp;quot;John Smith&amp;quot; &amp;lt;123456789&amp;gt;;&lt;br /&gt;
* '''Called To''' - localized destination number;&lt;br /&gt;
* '''Date''' - date and time when the call was started (first INVITE packet);&lt;br /&gt;
* '''Destination''' - Direction and Destination name of dialed destination;&lt;br /&gt;
* '''Destination Name''' - only Destination name (without Direction name);&lt;br /&gt;
* '''Destination Number''' - original destination number (including technical prefixes);&lt;br /&gt;
* '''Direction Name''' - only Direction name (without Destination name);&lt;br /&gt;
* '''Disposition''' - call disposition (ANSWERED, BUSY, NO ANSWER, or FAILED);&lt;br /&gt;
* '''Duration''' - call duration from first INVITE to BYE;&lt;br /&gt;
* '''End Time''' - date and time when call ended;&lt;br /&gt;
* '''Hangup Cause''' - reason why call ended (Disposition + Hangup Cause Code, for example ANSWERED(16));&lt;br /&gt;
* '''Hangup Cause Code''' - the reason why the call ended (only numeric value, for example, 16);&lt;br /&gt;
* '''Originator''' - name of Originator User (Client);&lt;br /&gt;
* '''Originator Billsec''' - billable duration (from the answer to hangup) including Originator's increment and minimal time;&lt;br /&gt;
* '''Originator ID''' - ID of Originator in the system;&lt;br /&gt;
* '''Originator IP''' - Originator's IP address;&lt;br /&gt;
* '''Originator Price''' - call price by Originator's Tariff;&lt;br /&gt;
* '''Originator Rate''' - call rate by Originator's Tariff;&lt;br /&gt;
* '''Originator User ID''' - ID of Originator's User in the system (Client ID);&lt;br /&gt;
* '''PDD''' - PDD in seconds;&lt;br /&gt;
* '''Prefix''' - prefix used to find rate;&lt;br /&gt;
* '''Real Billsec''' - same as Billsec but in decimal (more precise);&lt;br /&gt;
* '''Real Duration''' - same as Duration but in decimal (more precise);&lt;br /&gt;
* '''Server ID''' - ID of the server that was used to make calls;&lt;br /&gt;
* '''Source Number''' - Originator's number part of CalleID;&lt;br /&gt;
* '''Terminated by''' - shows who hangs up the call (unknown, system, originator, terminator);&lt;br /&gt;
* '''Terminator''' - name of Terminator User (Supplier);&lt;br /&gt;
* '''Terminator Billsec''' - billable duration (from the answer to hangup) including Terminator's increment and minimal time;&lt;br /&gt;
* '''Terminator ID''' - ID of Terminator in the system;&lt;br /&gt;
* '''Terminator IP''' - Terminator's IP address;&lt;br /&gt;
* '''Terminator Price''' - call price by Terminator's Tariff;&lt;br /&gt;
* '''Terminator Rate''' - call rate by Terminator's Tariff;&lt;br /&gt;
* '''Terminator Signaling IP''' - IP of the Termination Point;&lt;br /&gt;
* '''Terminator Source''' - CallerID sent to TP;&lt;br /&gt;
* '''Terminator User ID''' - ID of Terminator's User in the system (Supplier ID);&lt;br /&gt;
* '''Unique ID''' - uniqueid of call in the system;&lt;br /&gt;
* '''User First Name/Company Name''' - the value is taken from User settings, section Details;&lt;br /&gt;
* '''User Last Name''' - the value is taken from User settings, section Details;&lt;br /&gt;
* '''User Company/Personal ID''' - the value is taken from User settings, section Details;&lt;br /&gt;
* '''User Agreement Number''' - the value is taken from User settings, section Details;&lt;br /&gt;
* '''User Accounting Number''' - the value is taken from User settings, section Details.&lt;br /&gt;
&lt;br /&gt;
Note: depending on the database structure, some columns may not be displayed (this includes ''terminated by, pdd, originator id, answer time, end time'')&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Email Templates==&lt;br /&gt;
&lt;br /&gt;
If the archive is sent successfully, the System administrator should receive a success email, which can be customized in [[Emails]] settings. CDR archive will be attached.&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;
* [[M4_Automatic_CDR_Export | Automatic CDR Export]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_subscription_create&amp;diff=31454</id>
		<title>MOR API subscription create</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_subscription_create&amp;diff=31454"/>
		<updated>2026-03-12T15:14:54Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Deescription=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x5---&amp;gt;&lt;br /&gt;
[[MOR API]] Create subscription&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* Call: /api/subscription_create&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* user_id - User ID . '''Required'''.&lt;br /&gt;
* service_id - Service ID. '''Required'''.&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&lt;br /&gt;
* u - username for authentication (admin, reseller, accountant). '''Required'''.&lt;br /&gt;
* subscription_start_period_day - Start Period on the day, possible values between 1 and 31, default 1.&lt;br /&gt;
* subscription_start_period_month - Start Period on the month, possible values between 1 and 12, default 1.&lt;br /&gt;
* subscription_charge_balance_on - Charge Balance on, possible values are 1,2,3 (where 1: Period Start, 2: Period End, 3: Every Day), default 1 (daily and one-time fee subscriptions inserted in the database as 3).&lt;br /&gt;
* subscription_activation_start - Unix timestamp of Subscription activation start. &lt;br /&gt;
* subscription_activation_end - Unix timestamp of Subscription activation end. &lt;br /&gt;
* subscription_memo - memo of Subscription. &lt;br /&gt;
* subscription_until_canceled - subscription is until canceled (0 - off, 1 - on, default - off). &lt;br /&gt;
* subscription_no_expiration_at_the_end_of_a_month - subscription has no expiration at the end of the month. (0 - off, 1 - on, default - off). '''Only for Flat Rate''' and '''Dynamic Flat-Rate'''. &lt;br /&gt;
* ignore_balance - for Prepaid user subscription will be applied even if Prepaid User does not have sufficient balance (0 - off, 1 - on, default - off). If ignore_balance is ON and Prepaid User balance is not sufficient to pay for the subscription, then '''User balance goes below 0'''.&lt;br /&gt;
* subscription_discount_percent - Subscription Discount Percent. Possible values are from 0 to 100.&lt;br /&gt;
* subscription_charge_for_past - Charge for past, possible values are 0, 1 (where 0: no, 1: yes), default 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE'''. When Flat-Rate Service is subscribed Subscription will be created for a full month.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
We have service_id = 10, user_id = 2, subscription_memo = acc_one, API Secret Key = 456789.&lt;br /&gt;
&lt;br /&gt;
We send:&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/subscription_create?u=admin&amp;amp;service_id=10&amp;amp;user_id=2&amp;amp;subscription_memo=acc_one&amp;amp;hash=e0f93111f867ca5d424c0f0ebb6b678159086d00&lt;br /&gt;
&lt;br /&gt;
'''* Note that username are not included in hash'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;page&amp;gt;&lt;br /&gt;
    &amp;lt;status&amp;gt;&lt;br /&gt;
      &amp;lt;success&amp;gt;Subscription was successfully created&amp;lt;/success&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;231&amp;lt;/id&amp;gt;&lt;br /&gt;
    &amp;lt;/status&amp;gt;&lt;br /&gt;
  &amp;lt;/page&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
'''Errors'''&lt;br /&gt;
* &amp;lt;error&amp;gt;Access Denied&amp;lt;/error&amp;gt; - user does not exist or cannot use this functionality. &lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorised to use this functionality&amp;lt;/error&amp;gt; - accountant does not have Manage Subscription permission.&lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.&lt;br /&gt;
* &amp;lt;error&amp;gt;Service was not found&amp;lt;/error&amp;gt; - Service with specified service_id was not found.&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;
* [[MOR API]]&lt;br /&gt;
* [[MOR API subscription delete]]&lt;br /&gt;
* [[MOR API Subscriptions get]]&lt;br /&gt;
* [[MOR API subscription update]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_subscription_create&amp;diff=31451</id>
		<title>MOR API subscription create</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_subscription_create&amp;diff=31451"/>
		<updated>2026-03-09T12:56:47Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Deescription=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x5---&amp;gt;&lt;br /&gt;
[[MOR API]] Create subscription&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* Call: /api/subscription_create&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* user_id - User ID . '''Required'''.&lt;br /&gt;
* service_id - Service ID. '''Required'''.&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&lt;br /&gt;
* u - username for authentication (admin, reseller, accountant). '''Required'''.&lt;br /&gt;
* subscription_start_period_day - Start Period on the day, possible values between 1 and 31, default 1.&lt;br /&gt;
* subscription_start_period_month - Start Period on the month, possible values between 1 and 12, default 1.&lt;br /&gt;
* subscription_charge_balance_on - Charge Balance on, possible values are 1,2,3 (where 1: Period Start, 2: Period End, 3: Every Day), default 1 (daily and one-time fee subscriptions inserted in the database as 3).&lt;br /&gt;
* subscription_activation_start - Unix timestamp of Subscription activation start. &lt;br /&gt;
* subscription_activation_end - Unix timestamp of Subscription activation end. &lt;br /&gt;
* subscription_memo - memo of Subscription. &lt;br /&gt;
* subscription_until_canceled - subscription is until canceled (0 - off, 1 - on, default - off). &lt;br /&gt;
* subscription_no_expiration_at_the_end_of_a_month - subscription has no expiration at the end of the month. (0 - off, 1 - on, default - off). '''Only for Flat Rate''' and '''Dynamic Flat-Rate'''. &lt;br /&gt;
* ignore_balance - for Prepaid user subscription will be applied even if Prepaid User does not have sufficient balance (0 - off, 1 - on, default - off).&lt;br /&gt;
* subscription_discount_percent - Subscription Discount Percent. Possible values are from 0 to 100.&lt;br /&gt;
* subscription_charge_for_past - Charge for past, possible values are 0, 1 (where 0: no, 1: yes), default 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE'''. When Flat-Rate Service is subscribed Subscription will be created for a full month.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
We have service_id = 10, user_id = 2, subscription_memo = acc_one, API Secret Key = 456789.&lt;br /&gt;
&lt;br /&gt;
We send:&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/subscription_create?u=admin&amp;amp;service_id=10&amp;amp;user_id=2&amp;amp;subscription_memo=acc_one&amp;amp;hash=e0f93111f867ca5d424c0f0ebb6b678159086d00&lt;br /&gt;
&lt;br /&gt;
'''* Note that username are not included in hash'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;page&amp;gt;&lt;br /&gt;
    &amp;lt;status&amp;gt;&lt;br /&gt;
      &amp;lt;success&amp;gt;Subscription was successfully created&amp;lt;/success&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;231&amp;lt;/id&amp;gt;&lt;br /&gt;
    &amp;lt;/status&amp;gt;&lt;br /&gt;
  &amp;lt;/page&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
'''Errors'''&lt;br /&gt;
* &amp;lt;error&amp;gt;Access Denied&amp;lt;/error&amp;gt; - user does not exist or cannot use this functionality. &lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorised to use this functionality&amp;lt;/error&amp;gt; - accountant does not have Manage Subscription permission.&lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.&lt;br /&gt;
* &amp;lt;error&amp;gt;Service was not found&amp;lt;/error&amp;gt; - Service with specified service_id was not found.&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;
* [[MOR API]]&lt;br /&gt;
* [[MOR API subscription delete]]&lt;br /&gt;
* [[MOR API Subscriptions get]]&lt;br /&gt;
* [[MOR API subscription update]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=DID_Management&amp;diff=30778</id>
		<title>DID Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=DID_Management&amp;diff=30778"/>
		<updated>2026-01-08T10:00:36Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* DIDs Call Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description =&lt;br /&gt;
&lt;br /&gt;
DID is an external number to have incoming calls to your VoIP network reach a particular device.&lt;br /&gt;
&lt;br /&gt;
'''VERY IMPORTANT RULE: DIDs in MOR MUST be in E.164 format.'''&lt;br /&gt;
&lt;br /&gt;
You can reach window, with list of all DIDs, in '''SETTINGS –&amp;gt; Billing –&amp;gt; DIDs''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Dids updated.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
User/Dial Plan and Device show who will answer when dialing this DID.&lt;br /&gt;
&lt;br /&gt;
Clicking on User or Device brings you to their settings. If you click on the [[Image:callflow.png]] icon, you will go to the device's [[Call Flow]] window.&lt;br /&gt;
&lt;br /&gt;
In this page you can &lt;br /&gt;
*[[DID_Management#Add_new_DID(s) | Add new DID(s)]]&lt;br /&gt;
*Reach [[DID_Management#DID_bulk_management | Bulk management]]&lt;br /&gt;
*Export DIDs to CSV&lt;br /&gt;
*Reach page to change DID [[DID Billing | Rates]]&lt;br /&gt;
*Update DID [[DID_Management#Settings | settings]]&lt;br /&gt;
*Search only by DID Owner, when using search field called ''Owner'', or search by either DID Owner or DID Reseller at once, when using search field called ''User''.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X5---&amp;gt;&lt;br /&gt;
*Hide Terminated DIDs. When option &amp;quot;Hide Terminated DIDs&amp;quot; is checked, terminated dids will be hidden until option is unchecked. Clear search button or relogin will not clear the checked option.&lt;br /&gt;
* Search by User type.&lt;br /&gt;
* Search by inclusive Balance range (only for Owners).&lt;br /&gt;
* Search by User status (only for Owners).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Special cases =&lt;br /&gt;
&lt;br /&gt;
Single DIDs can be added with a-z or A-Z values.&lt;br /&gt;
&lt;br /&gt;
DID must consist only of 0-9, a-z, A-Z, and begin with a number.&lt;br /&gt;
&lt;br /&gt;
Example DID: 0B69847249887528&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' when number contains letters and you do not want to cut destination, enable '''clean_destination = 0''' in '''/etc/asterisk/mor.conf'''.&amp;lt;br&amp;gt;&lt;br /&gt;
More information [[Mor.conf]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Status =&lt;br /&gt;
[[Image:dids2.png|right]]&lt;br /&gt;
Status is very important. For every just-created DID, the status is Free.&lt;br /&gt;
&lt;br /&gt;
A DID can have several statuses:&lt;br /&gt;
&lt;br /&gt;
* '''Free''' – this status means that the DID is free to be reserved for any user/device. You can also Terminate it.&lt;br /&gt;
* '''Reserved''' – the DID is reserved but NOT actually used for a user. &amp;quot;Reserved&amp;quot; is useful at the negotiation stage before signing a contract. When a user decides to sign up, we Activate the DID. We can also make the DID Free.&lt;br /&gt;
* '''Active''' – the DID is assigned to a Device and is functional. We can Close it.&lt;br /&gt;
* '''Closed''' – the DID is no longer functional, so that all calls going to this DID will get Hangup. One important feature of this state: when a DID is Closed, it will be closed for a set time (the default is 90 days) in case the user changes his mind and decides to use this DID again. This is useful when a user is not paying for services, as we can suspend the DID by using Closed. MOR will make it Free after the Closed period runs out. You can manually make it Free or Terminate this DID.&lt;br /&gt;
* '''Terminated''' – the DID is no longer used in MOR. It remains only for historical purposes. You can make it Free if you want.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Add new DID(s) =&lt;br /&gt;
&lt;br /&gt;
In the main DIDs window, if you want to add new DID(s), click on [[Image:add.png]] '''New DID''':&lt;br /&gt;
&lt;br /&gt;
[[Image:dids5.png]]&lt;br /&gt;
&lt;br /&gt;
In this window you can:&lt;br /&gt;
&lt;br /&gt;
# Select DID(s) [[DID_Management#Details | details]]&lt;br /&gt;
# Add one DID or series of DIDs&lt;br /&gt;
# [[ DID_Import_from_CSV | Import DID(s) from CSV file]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE:''' You should select the Provider which sold you this DID. DID Provider is ONLY for informational purposes. If you do not know which Provider to assign - create dummy Provider to represent company from which you buy DID. If this is fake DID - assign any Provider you want. If your DID Provider has several IP addresses (as DIDWW) and you configured several Providers in MOR - assign ANY configured Provider.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== VIDEO: How to create a DID ==&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/SVJS_stEgBQ&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;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&lt;br /&gt;
*'''Provider''' – DID Provider is ONLY for informational purposes. If you do not know which Provider to assign - create dummy Provider to represent company from which you buy DID. If this is fake DID - assign any Provider you want. If your DID Provider has several IP addresses (as DIDWW) and you configured several Providers in MOR - assign ANY configured Provider.&lt;br /&gt;
&lt;br /&gt;
*'''Language''' – option to set language for voice prompts in the Asterisk Dial Plan&lt;br /&gt;
&lt;br /&gt;
*'''Call limit''' – describes how many simultaneous calls DID can '''receive'''. 0 (zero) means that calls are unlimited.&lt;br /&gt;
&lt;br /&gt;
*'''Max Call Duration (Timeout)''' – a number of seconds before a Call via DID is terminated ('''NOTE:''' due to a global safeguard Calls are terminated ~3 sec. earlier than this setting).&lt;br /&gt;
&lt;br /&gt;
*'''Comment''' – option to save some notes about DID.&lt;br /&gt;
&lt;br /&gt;
*'''[[Sound files | Sound file]]''' – here you can add [[IVR Greeting for DID]]. There are two options:&lt;br /&gt;
# Answer and play.&lt;br /&gt;
# Early media.&lt;br /&gt;
*'''PIN''' – a numeric PIN code to secure a DID.&lt;br /&gt;
&lt;br /&gt;
*'''PIN retries''' – a number of allowed attempts to enter a PIN code.&lt;br /&gt;
&lt;br /&gt;
*'''[[Sound files | Sound file]] to reenter PIN''' – a Sound File that is played before the next attempt to enter a PIN Code.&lt;br /&gt;
&lt;br /&gt;
*'''MOH instead of Ringing''' – if [[Music on Hold|MOH]] is selected, Music on Hold will be played instead of ringing when DID number is dialled. &lt;br /&gt;
&lt;br /&gt;
*'''[[IVR_system | IVR]] if PIN fails''' – an IVR the Call is transferred to when all attempts to enter a PIN Code fail. '''NOTE:''' when all PIN attempts fail and '''IVR if PIN fails''' is None, a Call is terminated with a [[Hangupcause_Codes|Hangupcause Code]] '''275'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
*'''Grace Time''' – if call duration is less than Grace Time, it will not be accounted, for example: '''Grace Time''' = 3s, call duration &amp;lt;= 3s, then price for the call = 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
*'''Timeout Digit''' – the maximum amount of time permitted between digits when the user is typing in a number. When this timeout expires after the user has started to type in a number, the number will be considered complete, and will be interpreted (sent to the system). Works both with entering destination and ANI/PIN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
*'''Timeout Response''' – the maximum amount of time permitted for user to START entering a number. If the user does not begin typing a number in this amount of time, system will notify that nothing was entered. Once the user begins to type a number, system will wait for &amp;lt;b&amp;gt;Digit Timeout&amp;lt;/b&amp;gt; to be reached, and &amp;lt;b&amp;gt;Response Timeout&amp;lt;/b&amp;gt; has no effect no more. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 11---&amp;gt;&lt;br /&gt;
*'''CallerID Name Prefix''' – option to add a CallerID Name prefix to the incoming CallerID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
*'''Tone zone''' – option to set tone zones. Tone zone is a different ring tone depending on destination (country).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
*'''Tariff for Calling Card''' – option to set a tariff for DID which will be applied for a calling card. It will not be important what tariff is assigned for that card's group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X11---&amp;gt;&lt;br /&gt;
*'''Active from''' – DID will become active from this date. If DID is not active yet, call is routed like there is no matching DID number.&lt;br /&gt;
&lt;br /&gt;
*'''Active till''' – DID will be active till this date. Expiration does not change DID status, call is routed like there is no matching DID number.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X13---&amp;gt;&lt;br /&gt;
* '''Blacklist Source Number Pool''' - this will set [[Number Pool]] for Blacklist Source. When calling this DID, if Source Number match number in this pool, call will be rejected with '''HGC 283 - Source number is in DID blacklist'''.&lt;br /&gt;
&lt;br /&gt;
* '''Send call anonymously''' - default no. Ability to show Anonymous on incoming call.&lt;br /&gt;
&lt;br /&gt;
* '''Send CallerID in UUI header''' - default no. The ability to show the caller ID on all calls in Sip UUI messaging.&lt;br /&gt;
Header example:&lt;br /&gt;
 User-to-User: hexCallerid;pd=XX;encoding=hex;purpose=isdn-uui;content=isdn-uui&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= DID Wildcard =&lt;br /&gt;
&lt;br /&gt;
It is possible to use Wildcard '''*''' to match several DID numbers.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, DID '''37088888*''' would match 37088888'''81''' 37088888'''72''' 37088888'''93''' 37088888'''5555555''', etc. &amp;lt;br&amp;gt;&lt;br /&gt;
'''IMPORTANT''' DID numbers without a Wildcard have higher priority.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Did wildcard.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Settings = &lt;br /&gt;
&lt;br /&gt;
If you want to edit a DID's settings, click on the [[Image:edit.png]] icon. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dids4.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The above window is for Free DID. You can:&lt;br /&gt;
&lt;br /&gt;
# Change [[DID_Management#Details | details]]&lt;br /&gt;
# [[DID_Management#Reserve_DID_for_User | Reserve DID for User]].&lt;br /&gt;
# [[DID_Management#Assign_to_Dial_Plan | Assign to Dial Plan]].&lt;br /&gt;
# Terminate a DID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reserve DID for User==&lt;br /&gt;
&lt;br /&gt;
When a DID is assigned to a Device (Reserve for User first), you have a few different choices:&lt;br /&gt;
&lt;br /&gt;
[[File:DidAssign5.png]]&lt;br /&gt;
&lt;br /&gt;
Here you can:&lt;br /&gt;
&lt;br /&gt;
# Change [[DID_Management#Details | details]].&lt;br /&gt;
# Assign DID to device. Here you can select different Devices for the same user. For select Trunk Device is next section.&lt;br /&gt;
# Assign DID to Trunk. Here you can select different Trunk Devices for the same user.&lt;br /&gt;
# Stop a DID subscription and reserve the DID for 90 days (by default) to this user in case he changes his mind and wants to get the DID back.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assign to Dial Plan==&lt;br /&gt;
&lt;br /&gt;
When DID is assigned to [[Dial_Plans | Dial Plan]], in DID settings you can:&lt;br /&gt;
# Change [[DID_Management#Details | details]].&lt;br /&gt;
# Make DID free.&lt;br /&gt;
&lt;br /&gt;
When you have [[Quickforwards_rules | Quickforward Rule]] for this DID, in DID edit you will see additional notice:&lt;br /&gt;
&lt;br /&gt;
[[Image:DID_edit_collisions_with_qf_rule.png‎]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Delete DID = &lt;br /&gt;
&lt;br /&gt;
At first, mark it as &amp;quot;not used&amp;quot; (Free). Then terminate it. When you do, you will see [[Image:delete.png]] next to the DID in the main DID window. By clicking on it, you can delete the DID.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' you cannot delete DIDs that are associated with calls. You can only Terminate these DIDs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DID bulk management =&lt;br /&gt;
In the main DIDs window, click [[Image:edit.png]] Bulk Management and you will be able to perform various actions either on:&lt;br /&gt;
*'''DIDs interval''' - this will apply action on selected DID interval,&lt;br /&gt;
*'''DIDs pattern''' - this will apply action on selected pattern. Supported wildcard symbols in pattern:&lt;br /&gt;
** '''%'''  matches any symbols, for example '''370%''' will match any number starting with '''370'''&lt;br /&gt;
** '''_'''  matches one symbol, for example '''370_1334455''' will match numbers in format '''370x1334455''', where '''x''' is any number.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dids6.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can choose which DIDs to update and what to do:&lt;br /&gt;
*'''Update''' - option to change some of DID details, Reserve DID for User (only free DIDs can be reserved) or Make DID free.&lt;br /&gt;
*'''Delete''' - option to delete DIDs by Provider or make DIDs Free/Terminated/Closed.&lt;br /&gt;
*'''Manage rates''' - option to change Rates for [[DID Billing]].&lt;br /&gt;
*'''[[Assign DID to Trunk]]'''.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
*'''Reserve for User''' - option to reserve DID for User (only free DIDs can be reserved).&lt;br /&gt;
*'''Assign Dial Plan''' - option for Assign DID to [[Dial_Plans | Dial Plan]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Allowing Users to route their DIDs =&lt;br /&gt;
Since '''MOR X5''' users are able to route their DID to a Device or an External Server . &lt;br /&gt;
This functionality can be enabled in '''SETTINGS -&amp;gt; Setup -&amp;gt; Visual''' by checking the 'Allow User to assign DID to Device:' setting.&lt;br /&gt;
&lt;br /&gt;
Once the functionality is enabled, the user will be able to see an Edit icon, in his DIDs list.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Dids_list_with_did_routing.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By pressing the icon, the user will be redirected to a page where he will be able to route his DID either to one of his MOR Devices, or to a Device on an external server (eg. SIP/370xxxxxx@123.123.123.123).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Did_routing_panel.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Reseller's DID list permissions are independent from Resellers' User, this means that Resellers' User can view DID list (if permissions are enabled for them) even when Resellers cannot.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DIDs Call Flow =&lt;br /&gt;
&lt;br /&gt;
DID Call Flows allow you to add a call flow on a specific DID.&lt;br /&gt;
&lt;br /&gt;
Available from '''MOR X18''' with the PBX Addon enabled.&lt;br /&gt;
&lt;br /&gt;
An Accountant needs to have permissions: manage DID and manage PBX functions.&lt;br /&gt;
&lt;br /&gt;
Reseller needs to have a DID assigned to him or his user.&lt;br /&gt;
&lt;br /&gt;
A simple user needs to have DIDs permission enabled and a DID assigned to him.&lt;br /&gt;
&lt;br /&gt;
DID call flow only works with DIDs that are linked to a device.&lt;br /&gt;
&lt;br /&gt;
If call flow is set on both DID and DID Device, then DID call flow will have higher priority - DID Device call flows will be ignored. It does not provide two levels of Call Flow, either only DID Call Flow works (if there is Action on '''any''' State), or only Device Call Flow works (if there is nothing set on DID).&lt;br /&gt;
&lt;br /&gt;
[[File:DIDs_call_flow.png‎]]&lt;br /&gt;
&lt;br /&gt;
A call has several States as:&lt;br /&gt;
&lt;br /&gt;
* '''Before Call'''  – call has not reached device.&lt;br /&gt;
* '''Call''' – call to device is in progress.&lt;br /&gt;
* '''Answered''' – call was answered.&lt;br /&gt;
* '''No Answer''' – call was not answered and ended after timeout.&lt;br /&gt;
* '''Busy''' – callee was busy.&lt;br /&gt;
* '''Failed''' – call to device failed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The possible actions are:&lt;br /&gt;
&lt;br /&gt;
* '''Empty'''&lt;br /&gt;
* '''Forward'''&lt;br /&gt;
* '''Voicemail'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Actions ==&lt;br /&gt;
&lt;br /&gt;
=== Empty ===&lt;br /&gt;
&lt;br /&gt;
Empty – means no action should be taken.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Forward ===&lt;br /&gt;
&lt;br /&gt;
'''Forward to'''&lt;br /&gt;
&lt;br /&gt;
Call can be forwarded to Local device or External number:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DIDs_call_flow_forward.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the &amp;quot;forward&amp;quot; action, it is easy to implement:&lt;br /&gt;
&lt;br /&gt;
* '''Unconditional forward''' – when forward is used in the Before Call state.&lt;br /&gt;
* '''Forward on no answer/busy/failed''' – when forward is used in No Answer, Busy, or Failed states.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''CallerID options'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available to manage CallerID for a forwarded call:&lt;br /&gt;
&lt;br /&gt;
* '''From device''' - puts CallerID from the Device that is forwarding the call (Device assigned to the DID).&lt;br /&gt;
* '''Same as comes - unchanged''' - leaves the CallerID as it comes from the original caller.&lt;br /&gt;
* '''Same as comes - with Diversion''' - leaves the CallerID as it comes from the original caller and additionally adds SIP header Diversion from the initial URI (SIP To).&lt;br /&gt;
* '''Custom''' - enters any CallerID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Voicemail ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DIDs_call_flow_voicemail.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The ''Voicemail Action'' sends the Call directly to the [[Voicemail]]. The Action can be set on ''Before Call'', ''No Answer'', ''Busy'' and/or ''Failed'' states of Callflow.&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;
*[[DID Billing]]&lt;br /&gt;
*[[DIDs Usage]]&lt;br /&gt;
*[[MOR_API_did_create | Create DID through API]]&lt;br /&gt;
*[[MOR_API_did_device_assign | Assign Device to DID through API]]&lt;br /&gt;
*[[MOR_API_did_device_unassign | Unassign Device from DID through API]]&lt;br /&gt;
*[[Providers#Provider_Grace_Time|Provider Grace Time]]&lt;br /&gt;
*[[Grace_time|Device Grace Time]]&lt;br /&gt;
*[[Example - Configuring DID to ring some Device]]&lt;br /&gt;
*[[DID is not working]]&lt;br /&gt;
*[[ DID_Import_from_CSV | Import DID(s) from CSV file]]&lt;br /&gt;
*[[Number Pool]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=DID_Management&amp;diff=30777</id>
		<title>DID Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=DID_Management&amp;diff=30777"/>
		<updated>2026-01-08T10:00:09Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* DIDs Call Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description =&lt;br /&gt;
&lt;br /&gt;
DID is an external number to have incoming calls to your VoIP network reach a particular device.&lt;br /&gt;
&lt;br /&gt;
'''VERY IMPORTANT RULE: DIDs in MOR MUST be in E.164 format.'''&lt;br /&gt;
&lt;br /&gt;
You can reach window, with list of all DIDs, in '''SETTINGS –&amp;gt; Billing –&amp;gt; DIDs''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Dids updated.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
User/Dial Plan and Device show who will answer when dialing this DID.&lt;br /&gt;
&lt;br /&gt;
Clicking on User or Device brings you to their settings. If you click on the [[Image:callflow.png]] icon, you will go to the device's [[Call Flow]] window.&lt;br /&gt;
&lt;br /&gt;
In this page you can &lt;br /&gt;
*[[DID_Management#Add_new_DID(s) | Add new DID(s)]]&lt;br /&gt;
*Reach [[DID_Management#DID_bulk_management | Bulk management]]&lt;br /&gt;
*Export DIDs to CSV&lt;br /&gt;
*Reach page to change DID [[DID Billing | Rates]]&lt;br /&gt;
*Update DID [[DID_Management#Settings | settings]]&lt;br /&gt;
*Search only by DID Owner, when using search field called ''Owner'', or search by either DID Owner or DID Reseller at once, when using search field called ''User''.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X5---&amp;gt;&lt;br /&gt;
*Hide Terminated DIDs. When option &amp;quot;Hide Terminated DIDs&amp;quot; is checked, terminated dids will be hidden until option is unchecked. Clear search button or relogin will not clear the checked option.&lt;br /&gt;
* Search by User type.&lt;br /&gt;
* Search by inclusive Balance range (only for Owners).&lt;br /&gt;
* Search by User status (only for Owners).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Special cases =&lt;br /&gt;
&lt;br /&gt;
Single DIDs can be added with a-z or A-Z values.&lt;br /&gt;
&lt;br /&gt;
DID must consist only of 0-9, a-z, A-Z, and begin with a number.&lt;br /&gt;
&lt;br /&gt;
Example DID: 0B69847249887528&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' when number contains letters and you do not want to cut destination, enable '''clean_destination = 0''' in '''/etc/asterisk/mor.conf'''.&amp;lt;br&amp;gt;&lt;br /&gt;
More information [[Mor.conf]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Status =&lt;br /&gt;
[[Image:dids2.png|right]]&lt;br /&gt;
Status is very important. For every just-created DID, the status is Free.&lt;br /&gt;
&lt;br /&gt;
A DID can have several statuses:&lt;br /&gt;
&lt;br /&gt;
* '''Free''' – this status means that the DID is free to be reserved for any user/device. You can also Terminate it.&lt;br /&gt;
* '''Reserved''' – the DID is reserved but NOT actually used for a user. &amp;quot;Reserved&amp;quot; is useful at the negotiation stage before signing a contract. When a user decides to sign up, we Activate the DID. We can also make the DID Free.&lt;br /&gt;
* '''Active''' – the DID is assigned to a Device and is functional. We can Close it.&lt;br /&gt;
* '''Closed''' – the DID is no longer functional, so that all calls going to this DID will get Hangup. One important feature of this state: when a DID is Closed, it will be closed for a set time (the default is 90 days) in case the user changes his mind and decides to use this DID again. This is useful when a user is not paying for services, as we can suspend the DID by using Closed. MOR will make it Free after the Closed period runs out. You can manually make it Free or Terminate this DID.&lt;br /&gt;
* '''Terminated''' – the DID is no longer used in MOR. It remains only for historical purposes. You can make it Free if you want.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Add new DID(s) =&lt;br /&gt;
&lt;br /&gt;
In the main DIDs window, if you want to add new DID(s), click on [[Image:add.png]] '''New DID''':&lt;br /&gt;
&lt;br /&gt;
[[Image:dids5.png]]&lt;br /&gt;
&lt;br /&gt;
In this window you can:&lt;br /&gt;
&lt;br /&gt;
# Select DID(s) [[DID_Management#Details | details]]&lt;br /&gt;
# Add one DID or series of DIDs&lt;br /&gt;
# [[ DID_Import_from_CSV | Import DID(s) from CSV file]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE:''' You should select the Provider which sold you this DID. DID Provider is ONLY for informational purposes. If you do not know which Provider to assign - create dummy Provider to represent company from which you buy DID. If this is fake DID - assign any Provider you want. If your DID Provider has several IP addresses (as DIDWW) and you configured several Providers in MOR - assign ANY configured Provider.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== VIDEO: How to create a DID ==&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/SVJS_stEgBQ&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;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&lt;br /&gt;
*'''Provider''' – DID Provider is ONLY for informational purposes. If you do not know which Provider to assign - create dummy Provider to represent company from which you buy DID. If this is fake DID - assign any Provider you want. If your DID Provider has several IP addresses (as DIDWW) and you configured several Providers in MOR - assign ANY configured Provider.&lt;br /&gt;
&lt;br /&gt;
*'''Language''' – option to set language for voice prompts in the Asterisk Dial Plan&lt;br /&gt;
&lt;br /&gt;
*'''Call limit''' – describes how many simultaneous calls DID can '''receive'''. 0 (zero) means that calls are unlimited.&lt;br /&gt;
&lt;br /&gt;
*'''Max Call Duration (Timeout)''' – a number of seconds before a Call via DID is terminated ('''NOTE:''' due to a global safeguard Calls are terminated ~3 sec. earlier than this setting).&lt;br /&gt;
&lt;br /&gt;
*'''Comment''' – option to save some notes about DID.&lt;br /&gt;
&lt;br /&gt;
*'''[[Sound files | Sound file]]''' – here you can add [[IVR Greeting for DID]]. There are two options:&lt;br /&gt;
# Answer and play.&lt;br /&gt;
# Early media.&lt;br /&gt;
*'''PIN''' – a numeric PIN code to secure a DID.&lt;br /&gt;
&lt;br /&gt;
*'''PIN retries''' – a number of allowed attempts to enter a PIN code.&lt;br /&gt;
&lt;br /&gt;
*'''[[Sound files | Sound file]] to reenter PIN''' – a Sound File that is played before the next attempt to enter a PIN Code.&lt;br /&gt;
&lt;br /&gt;
*'''MOH instead of Ringing''' – if [[Music on Hold|MOH]] is selected, Music on Hold will be played instead of ringing when DID number is dialled. &lt;br /&gt;
&lt;br /&gt;
*'''[[IVR_system | IVR]] if PIN fails''' – an IVR the Call is transferred to when all attempts to enter a PIN Code fail. '''NOTE:''' when all PIN attempts fail and '''IVR if PIN fails''' is None, a Call is terminated with a [[Hangupcause_Codes|Hangupcause Code]] '''275'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
*'''Grace Time''' – if call duration is less than Grace Time, it will not be accounted, for example: '''Grace Time''' = 3s, call duration &amp;lt;= 3s, then price for the call = 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
*'''Timeout Digit''' – the maximum amount of time permitted between digits when the user is typing in a number. When this timeout expires after the user has started to type in a number, the number will be considered complete, and will be interpreted (sent to the system). Works both with entering destination and ANI/PIN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
*'''Timeout Response''' – the maximum amount of time permitted for user to START entering a number. If the user does not begin typing a number in this amount of time, system will notify that nothing was entered. Once the user begins to type a number, system will wait for &amp;lt;b&amp;gt;Digit Timeout&amp;lt;/b&amp;gt; to be reached, and &amp;lt;b&amp;gt;Response Timeout&amp;lt;/b&amp;gt; has no effect no more. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 11---&amp;gt;&lt;br /&gt;
*'''CallerID Name Prefix''' – option to add a CallerID Name prefix to the incoming CallerID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
*'''Tone zone''' – option to set tone zones. Tone zone is a different ring tone depending on destination (country).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
*'''Tariff for Calling Card''' – option to set a tariff for DID which will be applied for a calling card. It will not be important what tariff is assigned for that card's group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X11---&amp;gt;&lt;br /&gt;
*'''Active from''' – DID will become active from this date. If DID is not active yet, call is routed like there is no matching DID number.&lt;br /&gt;
&lt;br /&gt;
*'''Active till''' – DID will be active till this date. Expiration does not change DID status, call is routed like there is no matching DID number.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X13---&amp;gt;&lt;br /&gt;
* '''Blacklist Source Number Pool''' - this will set [[Number Pool]] for Blacklist Source. When calling this DID, if Source Number match number in this pool, call will be rejected with '''HGC 283 - Source number is in DID blacklist'''.&lt;br /&gt;
&lt;br /&gt;
* '''Send call anonymously''' - default no. Ability to show Anonymous on incoming call.&lt;br /&gt;
&lt;br /&gt;
* '''Send CallerID in UUI header''' - default no. The ability to show the caller ID on all calls in Sip UUI messaging.&lt;br /&gt;
Header example:&lt;br /&gt;
 User-to-User: hexCallerid;pd=XX;encoding=hex;purpose=isdn-uui;content=isdn-uui&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= DID Wildcard =&lt;br /&gt;
&lt;br /&gt;
It is possible to use Wildcard '''*''' to match several DID numbers.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, DID '''37088888*''' would match 37088888'''81''' 37088888'''72''' 37088888'''93''' 37088888'''5555555''', etc. &amp;lt;br&amp;gt;&lt;br /&gt;
'''IMPORTANT''' DID numbers without a Wildcard have higher priority.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Did wildcard.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Settings = &lt;br /&gt;
&lt;br /&gt;
If you want to edit a DID's settings, click on the [[Image:edit.png]] icon. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dids4.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The above window is for Free DID. You can:&lt;br /&gt;
&lt;br /&gt;
# Change [[DID_Management#Details | details]]&lt;br /&gt;
# [[DID_Management#Reserve_DID_for_User | Reserve DID for User]].&lt;br /&gt;
# [[DID_Management#Assign_to_Dial_Plan | Assign to Dial Plan]].&lt;br /&gt;
# Terminate a DID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reserve DID for User==&lt;br /&gt;
&lt;br /&gt;
When a DID is assigned to a Device (Reserve for User first), you have a few different choices:&lt;br /&gt;
&lt;br /&gt;
[[File:DidAssign5.png]]&lt;br /&gt;
&lt;br /&gt;
Here you can:&lt;br /&gt;
&lt;br /&gt;
# Change [[DID_Management#Details | details]].&lt;br /&gt;
# Assign DID to device. Here you can select different Devices for the same user. For select Trunk Device is next section.&lt;br /&gt;
# Assign DID to Trunk. Here you can select different Trunk Devices for the same user.&lt;br /&gt;
# Stop a DID subscription and reserve the DID for 90 days (by default) to this user in case he changes his mind and wants to get the DID back.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assign to Dial Plan==&lt;br /&gt;
&lt;br /&gt;
When DID is assigned to [[Dial_Plans | Dial Plan]], in DID settings you can:&lt;br /&gt;
# Change [[DID_Management#Details | details]].&lt;br /&gt;
# Make DID free.&lt;br /&gt;
&lt;br /&gt;
When you have [[Quickforwards_rules | Quickforward Rule]] for this DID, in DID edit you will see additional notice:&lt;br /&gt;
&lt;br /&gt;
[[Image:DID_edit_collisions_with_qf_rule.png‎]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Delete DID = &lt;br /&gt;
&lt;br /&gt;
At first, mark it as &amp;quot;not used&amp;quot; (Free). Then terminate it. When you do, you will see [[Image:delete.png]] next to the DID in the main DID window. By clicking on it, you can delete the DID.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' you cannot delete DIDs that are associated with calls. You can only Terminate these DIDs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DID bulk management =&lt;br /&gt;
In the main DIDs window, click [[Image:edit.png]] Bulk Management and you will be able to perform various actions either on:&lt;br /&gt;
*'''DIDs interval''' - this will apply action on selected DID interval,&lt;br /&gt;
*'''DIDs pattern''' - this will apply action on selected pattern. Supported wildcard symbols in pattern:&lt;br /&gt;
** '''%'''  matches any symbols, for example '''370%''' will match any number starting with '''370'''&lt;br /&gt;
** '''_'''  matches one symbol, for example '''370_1334455''' will match numbers in format '''370x1334455''', where '''x''' is any number.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dids6.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can choose which DIDs to update and what to do:&lt;br /&gt;
*'''Update''' - option to change some of DID details, Reserve DID for User (only free DIDs can be reserved) or Make DID free.&lt;br /&gt;
*'''Delete''' - option to delete DIDs by Provider or make DIDs Free/Terminated/Closed.&lt;br /&gt;
*'''Manage rates''' - option to change Rates for [[DID Billing]].&lt;br /&gt;
*'''[[Assign DID to Trunk]]'''.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
*'''Reserve for User''' - option to reserve DID for User (only free DIDs can be reserved).&lt;br /&gt;
*'''Assign Dial Plan''' - option for Assign DID to [[Dial_Plans | Dial Plan]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Allowing Users to route their DIDs =&lt;br /&gt;
Since '''MOR X5''' users are able to route their DID to a Device or an External Server . &lt;br /&gt;
This functionality can be enabled in '''SETTINGS -&amp;gt; Setup -&amp;gt; Visual''' by checking the 'Allow User to assign DID to Device:' setting.&lt;br /&gt;
&lt;br /&gt;
Once the functionality is enabled, the user will be able to see an Edit icon, in his DIDs list.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Dids_list_with_did_routing.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By pressing the icon, the user will be redirected to a page where he will be able to route his DID either to one of his MOR Devices, or to a Device on an external server (eg. SIP/370xxxxxx@123.123.123.123).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Did_routing_panel.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Reseller's DID list permissions are independent from Resellers' User, this means that Resellers' User can view DID list (if permissions are enabled for them) even when Resellers cannot.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DIDs Call Flow =&lt;br /&gt;
&lt;br /&gt;
DID Call Flows allow you to add a call flow on a specific DID.&lt;br /&gt;
&lt;br /&gt;
Available from '''MOR X18''' with the PBX Addon enabled.&lt;br /&gt;
&lt;br /&gt;
An Accountant needs to have permissions: manage DID and manage PBX functions.&lt;br /&gt;
&lt;br /&gt;
Reseller needs to have a DID assigned to him or his user.&lt;br /&gt;
&lt;br /&gt;
A simple user needs to have DIDs permission enabled and a DID assigned to him.&lt;br /&gt;
&lt;br /&gt;
DID call flow only works with DIDs that are linked to a device.&lt;br /&gt;
&lt;br /&gt;
If call flow is set on both DID and DID Device, then DID call flow will have higher priority - DID Device call flows will be ignored. It does not provide two levels of Call Flow, either only DID Call Flow works (if there is Action on '''any''' State set), or only Device Call Flow works (if there is nothing set on DID).&lt;br /&gt;
&lt;br /&gt;
[[File:DIDs_call_flow.png‎]]&lt;br /&gt;
&lt;br /&gt;
A call has several States as:&lt;br /&gt;
&lt;br /&gt;
* '''Before Call'''  – call has not reached device.&lt;br /&gt;
* '''Call''' – call to device is in progress.&lt;br /&gt;
* '''Answered''' – call was answered.&lt;br /&gt;
* '''No Answer''' – call was not answered and ended after timeout.&lt;br /&gt;
* '''Busy''' – callee was busy.&lt;br /&gt;
* '''Failed''' – call to device failed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The possible actions are:&lt;br /&gt;
&lt;br /&gt;
* '''Empty'''&lt;br /&gt;
* '''Forward'''&lt;br /&gt;
* '''Voicemail'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Actions ==&lt;br /&gt;
&lt;br /&gt;
=== Empty ===&lt;br /&gt;
&lt;br /&gt;
Empty – means no action should be taken.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Forward ===&lt;br /&gt;
&lt;br /&gt;
'''Forward to'''&lt;br /&gt;
&lt;br /&gt;
Call can be forwarded to Local device or External number:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DIDs_call_flow_forward.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the &amp;quot;forward&amp;quot; action, it is easy to implement:&lt;br /&gt;
&lt;br /&gt;
* '''Unconditional forward''' – when forward is used in the Before Call state.&lt;br /&gt;
* '''Forward on no answer/busy/failed''' – when forward is used in No Answer, Busy, or Failed states.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''CallerID options'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available to manage CallerID for a forwarded call:&lt;br /&gt;
&lt;br /&gt;
* '''From device''' - puts CallerID from the Device that is forwarding the call (Device assigned to the DID).&lt;br /&gt;
* '''Same as comes - unchanged''' - leaves the CallerID as it comes from the original caller.&lt;br /&gt;
* '''Same as comes - with Diversion''' - leaves the CallerID as it comes from the original caller and additionally adds SIP header Diversion from the initial URI (SIP To).&lt;br /&gt;
* '''Custom''' - enters any CallerID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Voicemail ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DIDs_call_flow_voicemail.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The ''Voicemail Action'' sends the Call directly to the [[Voicemail]]. The Action can be set on ''Before Call'', ''No Answer'', ''Busy'' and/or ''Failed'' states of Callflow.&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;
*[[DID Billing]]&lt;br /&gt;
*[[DIDs Usage]]&lt;br /&gt;
*[[MOR_API_did_create | Create DID through API]]&lt;br /&gt;
*[[MOR_API_did_device_assign | Assign Device to DID through API]]&lt;br /&gt;
*[[MOR_API_did_device_unassign | Unassign Device from DID through API]]&lt;br /&gt;
*[[Providers#Provider_Grace_Time|Provider Grace Time]]&lt;br /&gt;
*[[Grace_time|Device Grace Time]]&lt;br /&gt;
*[[Example - Configuring DID to ring some Device]]&lt;br /&gt;
*[[DID is not working]]&lt;br /&gt;
*[[ DID_Import_from_CSV | Import DID(s) from CSV file]]&lt;br /&gt;
*[[Number Pool]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=DID_Management&amp;diff=30776</id>
		<title>DID Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=DID_Management&amp;diff=30776"/>
		<updated>2026-01-08T09:58:27Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* DIDs Call Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description =&lt;br /&gt;
&lt;br /&gt;
DID is an external number to have incoming calls to your VoIP network reach a particular device.&lt;br /&gt;
&lt;br /&gt;
'''VERY IMPORTANT RULE: DIDs in MOR MUST be in E.164 format.'''&lt;br /&gt;
&lt;br /&gt;
You can reach window, with list of all DIDs, in '''SETTINGS –&amp;gt; Billing –&amp;gt; DIDs''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Dids updated.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
User/Dial Plan and Device show who will answer when dialing this DID.&lt;br /&gt;
&lt;br /&gt;
Clicking on User or Device brings you to their settings. If you click on the [[Image:callflow.png]] icon, you will go to the device's [[Call Flow]] window.&lt;br /&gt;
&lt;br /&gt;
In this page you can &lt;br /&gt;
*[[DID_Management#Add_new_DID(s) | Add new DID(s)]]&lt;br /&gt;
*Reach [[DID_Management#DID_bulk_management | Bulk management]]&lt;br /&gt;
*Export DIDs to CSV&lt;br /&gt;
*Reach page to change DID [[DID Billing | Rates]]&lt;br /&gt;
*Update DID [[DID_Management#Settings | settings]]&lt;br /&gt;
*Search only by DID Owner, when using search field called ''Owner'', or search by either DID Owner or DID Reseller at once, when using search field called ''User''.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X5---&amp;gt;&lt;br /&gt;
*Hide Terminated DIDs. When option &amp;quot;Hide Terminated DIDs&amp;quot; is checked, terminated dids will be hidden until option is unchecked. Clear search button or relogin will not clear the checked option.&lt;br /&gt;
* Search by User type.&lt;br /&gt;
* Search by inclusive Balance range (only for Owners).&lt;br /&gt;
* Search by User status (only for Owners).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Special cases =&lt;br /&gt;
&lt;br /&gt;
Single DIDs can be added with a-z or A-Z values.&lt;br /&gt;
&lt;br /&gt;
DID must consist only of 0-9, a-z, A-Z, and begin with a number.&lt;br /&gt;
&lt;br /&gt;
Example DID: 0B69847249887528&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' when number contains letters and you do not want to cut destination, enable '''clean_destination = 0''' in '''/etc/asterisk/mor.conf'''.&amp;lt;br&amp;gt;&lt;br /&gt;
More information [[Mor.conf]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Status =&lt;br /&gt;
[[Image:dids2.png|right]]&lt;br /&gt;
Status is very important. For every just-created DID, the status is Free.&lt;br /&gt;
&lt;br /&gt;
A DID can have several statuses:&lt;br /&gt;
&lt;br /&gt;
* '''Free''' – this status means that the DID is free to be reserved for any user/device. You can also Terminate it.&lt;br /&gt;
* '''Reserved''' – the DID is reserved but NOT actually used for a user. &amp;quot;Reserved&amp;quot; is useful at the negotiation stage before signing a contract. When a user decides to sign up, we Activate the DID. We can also make the DID Free.&lt;br /&gt;
* '''Active''' – the DID is assigned to a Device and is functional. We can Close it.&lt;br /&gt;
* '''Closed''' – the DID is no longer functional, so that all calls going to this DID will get Hangup. One important feature of this state: when a DID is Closed, it will be closed for a set time (the default is 90 days) in case the user changes his mind and decides to use this DID again. This is useful when a user is not paying for services, as we can suspend the DID by using Closed. MOR will make it Free after the Closed period runs out. You can manually make it Free or Terminate this DID.&lt;br /&gt;
* '''Terminated''' – the DID is no longer used in MOR. It remains only for historical purposes. You can make it Free if you want.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Add new DID(s) =&lt;br /&gt;
&lt;br /&gt;
In the main DIDs window, if you want to add new DID(s), click on [[Image:add.png]] '''New DID''':&lt;br /&gt;
&lt;br /&gt;
[[Image:dids5.png]]&lt;br /&gt;
&lt;br /&gt;
In this window you can:&lt;br /&gt;
&lt;br /&gt;
# Select DID(s) [[DID_Management#Details | details]]&lt;br /&gt;
# Add one DID or series of DIDs&lt;br /&gt;
# [[ DID_Import_from_CSV | Import DID(s) from CSV file]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE:''' You should select the Provider which sold you this DID. DID Provider is ONLY for informational purposes. If you do not know which Provider to assign - create dummy Provider to represent company from which you buy DID. If this is fake DID - assign any Provider you want. If your DID Provider has several IP addresses (as DIDWW) and you configured several Providers in MOR - assign ANY configured Provider.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== VIDEO: How to create a DID ==&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/SVJS_stEgBQ&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;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&lt;br /&gt;
*'''Provider''' – DID Provider is ONLY for informational purposes. If you do not know which Provider to assign - create dummy Provider to represent company from which you buy DID. If this is fake DID - assign any Provider you want. If your DID Provider has several IP addresses (as DIDWW) and you configured several Providers in MOR - assign ANY configured Provider.&lt;br /&gt;
&lt;br /&gt;
*'''Language''' – option to set language for voice prompts in the Asterisk Dial Plan&lt;br /&gt;
&lt;br /&gt;
*'''Call limit''' – describes how many simultaneous calls DID can '''receive'''. 0 (zero) means that calls are unlimited.&lt;br /&gt;
&lt;br /&gt;
*'''Max Call Duration (Timeout)''' – a number of seconds before a Call via DID is terminated ('''NOTE:''' due to a global safeguard Calls are terminated ~3 sec. earlier than this setting).&lt;br /&gt;
&lt;br /&gt;
*'''Comment''' – option to save some notes about DID.&lt;br /&gt;
&lt;br /&gt;
*'''[[Sound files | Sound file]]''' – here you can add [[IVR Greeting for DID]]. There are two options:&lt;br /&gt;
# Answer and play.&lt;br /&gt;
# Early media.&lt;br /&gt;
*'''PIN''' – a numeric PIN code to secure a DID.&lt;br /&gt;
&lt;br /&gt;
*'''PIN retries''' – a number of allowed attempts to enter a PIN code.&lt;br /&gt;
&lt;br /&gt;
*'''[[Sound files | Sound file]] to reenter PIN''' – a Sound File that is played before the next attempt to enter a PIN Code.&lt;br /&gt;
&lt;br /&gt;
*'''MOH instead of Ringing''' – if [[Music on Hold|MOH]] is selected, Music on Hold will be played instead of ringing when DID number is dialled. &lt;br /&gt;
&lt;br /&gt;
*'''[[IVR_system | IVR]] if PIN fails''' – an IVR the Call is transferred to when all attempts to enter a PIN Code fail. '''NOTE:''' when all PIN attempts fail and '''IVR if PIN fails''' is None, a Call is terminated with a [[Hangupcause_Codes|Hangupcause Code]] '''275'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
*'''Grace Time''' – if call duration is less than Grace Time, it will not be accounted, for example: '''Grace Time''' = 3s, call duration &amp;lt;= 3s, then price for the call = 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
*'''Timeout Digit''' – the maximum amount of time permitted between digits when the user is typing in a number. When this timeout expires after the user has started to type in a number, the number will be considered complete, and will be interpreted (sent to the system). Works both with entering destination and ANI/PIN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
*'''Timeout Response''' – the maximum amount of time permitted for user to START entering a number. If the user does not begin typing a number in this amount of time, system will notify that nothing was entered. Once the user begins to type a number, system will wait for &amp;lt;b&amp;gt;Digit Timeout&amp;lt;/b&amp;gt; to be reached, and &amp;lt;b&amp;gt;Response Timeout&amp;lt;/b&amp;gt; has no effect no more. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 11---&amp;gt;&lt;br /&gt;
*'''CallerID Name Prefix''' – option to add a CallerID Name prefix to the incoming CallerID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
*'''Tone zone''' – option to set tone zones. Tone zone is a different ring tone depending on destination (country).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
*'''Tariff for Calling Card''' – option to set a tariff for DID which will be applied for a calling card. It will not be important what tariff is assigned for that card's group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X11---&amp;gt;&lt;br /&gt;
*'''Active from''' – DID will become active from this date. If DID is not active yet, call is routed like there is no matching DID number.&lt;br /&gt;
&lt;br /&gt;
*'''Active till''' – DID will be active till this date. Expiration does not change DID status, call is routed like there is no matching DID number.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X13---&amp;gt;&lt;br /&gt;
* '''Blacklist Source Number Pool''' - this will set [[Number Pool]] for Blacklist Source. When calling this DID, if Source Number match number in this pool, call will be rejected with '''HGC 283 - Source number is in DID blacklist'''.&lt;br /&gt;
&lt;br /&gt;
* '''Send call anonymously''' - default no. Ability to show Anonymous on incoming call.&lt;br /&gt;
&lt;br /&gt;
* '''Send CallerID in UUI header''' - default no. The ability to show the caller ID on all calls in Sip UUI messaging.&lt;br /&gt;
Header example:&lt;br /&gt;
 User-to-User: hexCallerid;pd=XX;encoding=hex;purpose=isdn-uui;content=isdn-uui&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= DID Wildcard =&lt;br /&gt;
&lt;br /&gt;
It is possible to use Wildcard '''*''' to match several DID numbers.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, DID '''37088888*''' would match 37088888'''81''' 37088888'''72''' 37088888'''93''' 37088888'''5555555''', etc. &amp;lt;br&amp;gt;&lt;br /&gt;
'''IMPORTANT''' DID numbers without a Wildcard have higher priority.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Did wildcard.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Settings = &lt;br /&gt;
&lt;br /&gt;
If you want to edit a DID's settings, click on the [[Image:edit.png]] icon. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dids4.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The above window is for Free DID. You can:&lt;br /&gt;
&lt;br /&gt;
# Change [[DID_Management#Details | details]]&lt;br /&gt;
# [[DID_Management#Reserve_DID_for_User | Reserve DID for User]].&lt;br /&gt;
# [[DID_Management#Assign_to_Dial_Plan | Assign to Dial Plan]].&lt;br /&gt;
# Terminate a DID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reserve DID for User==&lt;br /&gt;
&lt;br /&gt;
When a DID is assigned to a Device (Reserve for User first), you have a few different choices:&lt;br /&gt;
&lt;br /&gt;
[[File:DidAssign5.png]]&lt;br /&gt;
&lt;br /&gt;
Here you can:&lt;br /&gt;
&lt;br /&gt;
# Change [[DID_Management#Details | details]].&lt;br /&gt;
# Assign DID to device. Here you can select different Devices for the same user. For select Trunk Device is next section.&lt;br /&gt;
# Assign DID to Trunk. Here you can select different Trunk Devices for the same user.&lt;br /&gt;
# Stop a DID subscription and reserve the DID for 90 days (by default) to this user in case he changes his mind and wants to get the DID back.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assign to Dial Plan==&lt;br /&gt;
&lt;br /&gt;
When DID is assigned to [[Dial_Plans | Dial Plan]], in DID settings you can:&lt;br /&gt;
# Change [[DID_Management#Details | details]].&lt;br /&gt;
# Make DID free.&lt;br /&gt;
&lt;br /&gt;
When you have [[Quickforwards_rules | Quickforward Rule]] for this DID, in DID edit you will see additional notice:&lt;br /&gt;
&lt;br /&gt;
[[Image:DID_edit_collisions_with_qf_rule.png‎]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Delete DID = &lt;br /&gt;
&lt;br /&gt;
At first, mark it as &amp;quot;not used&amp;quot; (Free). Then terminate it. When you do, you will see [[Image:delete.png]] next to the DID in the main DID window. By clicking on it, you can delete the DID.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' you cannot delete DIDs that are associated with calls. You can only Terminate these DIDs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DID bulk management =&lt;br /&gt;
In the main DIDs window, click [[Image:edit.png]] Bulk Management and you will be able to perform various actions either on:&lt;br /&gt;
*'''DIDs interval''' - this will apply action on selected DID interval,&lt;br /&gt;
*'''DIDs pattern''' - this will apply action on selected pattern. Supported wildcard symbols in pattern:&lt;br /&gt;
** '''%'''  matches any symbols, for example '''370%''' will match any number starting with '''370'''&lt;br /&gt;
** '''_'''  matches one symbol, for example '''370_1334455''' will match numbers in format '''370x1334455''', where '''x''' is any number.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dids6.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can choose which DIDs to update and what to do:&lt;br /&gt;
*'''Update''' - option to change some of DID details, Reserve DID for User (only free DIDs can be reserved) or Make DID free.&lt;br /&gt;
*'''Delete''' - option to delete DIDs by Provider or make DIDs Free/Terminated/Closed.&lt;br /&gt;
*'''Manage rates''' - option to change Rates for [[DID Billing]].&lt;br /&gt;
*'''[[Assign DID to Trunk]]'''.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
*'''Reserve for User''' - option to reserve DID for User (only free DIDs can be reserved).&lt;br /&gt;
*'''Assign Dial Plan''' - option for Assign DID to [[Dial_Plans | Dial Plan]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Allowing Users to route their DIDs =&lt;br /&gt;
Since '''MOR X5''' users are able to route their DID to a Device or an External Server . &lt;br /&gt;
This functionality can be enabled in '''SETTINGS -&amp;gt; Setup -&amp;gt; Visual''' by checking the 'Allow User to assign DID to Device:' setting.&lt;br /&gt;
&lt;br /&gt;
Once the functionality is enabled, the user will be able to see an Edit icon, in his DIDs list.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Dids_list_with_did_routing.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By pressing the icon, the user will be redirected to a page where he will be able to route his DID either to one of his MOR Devices, or to a Device on an external server (eg. SIP/370xxxxxx@123.123.123.123).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Did_routing_panel.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Reseller's DID list permissions are independent from Resellers' User, this means that Resellers' User can view DID list (if permissions are enabled for them) even when Resellers cannot.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DIDs Call Flow =&lt;br /&gt;
&lt;br /&gt;
DID Call Flows allow you to add a call flow on a specific DID.&lt;br /&gt;
&lt;br /&gt;
Available from '''MOR X18''' with the PBX Addon enabled.&lt;br /&gt;
&lt;br /&gt;
An Accountant needs to have permissions: manage DID and manage PBX functions.&lt;br /&gt;
&lt;br /&gt;
Reseller needs to have a DID assigned to him or his user.&lt;br /&gt;
&lt;br /&gt;
A simple user needs to have DIDs permission enabled and a DID assigned to him.&lt;br /&gt;
&lt;br /&gt;
DID call flow only works with DIDs that are linked to a device.&lt;br /&gt;
&lt;br /&gt;
If call flow is set on both DID and DID Device, then DID call flow will have higher priority - DID Device call flows will be ignored. It does not provide two levels of Call Flow, either only DID Call Flow works (if there is ANY State set), or only Device Call Flow works (if there is nothing set on DID).&lt;br /&gt;
&lt;br /&gt;
[[File:DIDs_call_flow.png‎]]&lt;br /&gt;
&lt;br /&gt;
A call has several States as:&lt;br /&gt;
&lt;br /&gt;
* '''Before Call'''  – call has not reached device.&lt;br /&gt;
* '''Call''' – call to device is in progress.&lt;br /&gt;
* '''Answered''' – call was answered.&lt;br /&gt;
* '''No Answer''' – call was not answered and ended after timeout.&lt;br /&gt;
* '''Busy''' – callee was busy.&lt;br /&gt;
* '''Failed''' – call to device failed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The possible actions are:&lt;br /&gt;
&lt;br /&gt;
* '''Empty'''&lt;br /&gt;
* '''Forward'''&lt;br /&gt;
* '''Voicemail'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Actions ==&lt;br /&gt;
&lt;br /&gt;
=== Empty ===&lt;br /&gt;
&lt;br /&gt;
Empty – means no action should be taken.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Forward ===&lt;br /&gt;
&lt;br /&gt;
'''Forward to'''&lt;br /&gt;
&lt;br /&gt;
Call can be forwarded to Local device or External number:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DIDs_call_flow_forward.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the &amp;quot;forward&amp;quot; action, it is easy to implement:&lt;br /&gt;
&lt;br /&gt;
* '''Unconditional forward''' – when forward is used in the Before Call state.&lt;br /&gt;
* '''Forward on no answer/busy/failed''' – when forward is used in No Answer, Busy, or Failed states.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''CallerID options'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available to manage CallerID for a forwarded call:&lt;br /&gt;
&lt;br /&gt;
* '''From device''' - puts CallerID from the Device that is forwarding the call (Device assigned to the DID).&lt;br /&gt;
* '''Same as comes - unchanged''' - leaves the CallerID as it comes from the original caller.&lt;br /&gt;
* '''Same as comes - with Diversion''' - leaves the CallerID as it comes from the original caller and additionally adds SIP header Diversion from the initial URI (SIP To).&lt;br /&gt;
* '''Custom''' - enters any CallerID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Voicemail ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DIDs_call_flow_voicemail.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The ''Voicemail Action'' sends the Call directly to the [[Voicemail]]. The Action can be set on ''Before Call'', ''No Answer'', ''Busy'' and/or ''Failed'' states of Callflow.&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;
*[[DID Billing]]&lt;br /&gt;
*[[DIDs Usage]]&lt;br /&gt;
*[[MOR_API_did_create | Create DID through API]]&lt;br /&gt;
*[[MOR_API_did_device_assign | Assign Device to DID through API]]&lt;br /&gt;
*[[MOR_API_did_device_unassign | Unassign Device from DID through API]]&lt;br /&gt;
*[[Providers#Provider_Grace_Time|Provider Grace Time]]&lt;br /&gt;
*[[Grace_time|Device Grace Time]]&lt;br /&gt;
*[[Example - Configuring DID to ring some Device]]&lt;br /&gt;
*[[DID is not working]]&lt;br /&gt;
*[[ DID_Import_from_CSV | Import DID(s) from CSV file]]&lt;br /&gt;
*[[Number Pool]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=DID_Management&amp;diff=30775</id>
		<title>DID Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=DID_Management&amp;diff=30775"/>
		<updated>2026-01-08T09:52:55Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* DIDs Call Flow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description =&lt;br /&gt;
&lt;br /&gt;
DID is an external number to have incoming calls to your VoIP network reach a particular device.&lt;br /&gt;
&lt;br /&gt;
'''VERY IMPORTANT RULE: DIDs in MOR MUST be in E.164 format.'''&lt;br /&gt;
&lt;br /&gt;
You can reach window, with list of all DIDs, in '''SETTINGS –&amp;gt; Billing –&amp;gt; DIDs''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Dids updated.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
User/Dial Plan and Device show who will answer when dialing this DID.&lt;br /&gt;
&lt;br /&gt;
Clicking on User or Device brings you to their settings. If you click on the [[Image:callflow.png]] icon, you will go to the device's [[Call Flow]] window.&lt;br /&gt;
&lt;br /&gt;
In this page you can &lt;br /&gt;
*[[DID_Management#Add_new_DID(s) | Add new DID(s)]]&lt;br /&gt;
*Reach [[DID_Management#DID_bulk_management | Bulk management]]&lt;br /&gt;
*Export DIDs to CSV&lt;br /&gt;
*Reach page to change DID [[DID Billing | Rates]]&lt;br /&gt;
*Update DID [[DID_Management#Settings | settings]]&lt;br /&gt;
*Search only by DID Owner, when using search field called ''Owner'', or search by either DID Owner or DID Reseller at once, when using search field called ''User''.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X5---&amp;gt;&lt;br /&gt;
*Hide Terminated DIDs. When option &amp;quot;Hide Terminated DIDs&amp;quot; is checked, terminated dids will be hidden until option is unchecked. Clear search button or relogin will not clear the checked option.&lt;br /&gt;
* Search by User type.&lt;br /&gt;
* Search by inclusive Balance range (only for Owners).&lt;br /&gt;
* Search by User status (only for Owners).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Special cases =&lt;br /&gt;
&lt;br /&gt;
Single DIDs can be added with a-z or A-Z values.&lt;br /&gt;
&lt;br /&gt;
DID must consist only of 0-9, a-z, A-Z, and begin with a number.&lt;br /&gt;
&lt;br /&gt;
Example DID: 0B69847249887528&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' when number contains letters and you do not want to cut destination, enable '''clean_destination = 0''' in '''/etc/asterisk/mor.conf'''.&amp;lt;br&amp;gt;&lt;br /&gt;
More information [[Mor.conf]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Status =&lt;br /&gt;
[[Image:dids2.png|right]]&lt;br /&gt;
Status is very important. For every just-created DID, the status is Free.&lt;br /&gt;
&lt;br /&gt;
A DID can have several statuses:&lt;br /&gt;
&lt;br /&gt;
* '''Free''' – this status means that the DID is free to be reserved for any user/device. You can also Terminate it.&lt;br /&gt;
* '''Reserved''' – the DID is reserved but NOT actually used for a user. &amp;quot;Reserved&amp;quot; is useful at the negotiation stage before signing a contract. When a user decides to sign up, we Activate the DID. We can also make the DID Free.&lt;br /&gt;
* '''Active''' – the DID is assigned to a Device and is functional. We can Close it.&lt;br /&gt;
* '''Closed''' – the DID is no longer functional, so that all calls going to this DID will get Hangup. One important feature of this state: when a DID is Closed, it will be closed for a set time (the default is 90 days) in case the user changes his mind and decides to use this DID again. This is useful when a user is not paying for services, as we can suspend the DID by using Closed. MOR will make it Free after the Closed period runs out. You can manually make it Free or Terminate this DID.&lt;br /&gt;
* '''Terminated''' – the DID is no longer used in MOR. It remains only for historical purposes. You can make it Free if you want.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Add new DID(s) =&lt;br /&gt;
&lt;br /&gt;
In the main DIDs window, if you want to add new DID(s), click on [[Image:add.png]] '''New DID''':&lt;br /&gt;
&lt;br /&gt;
[[Image:dids5.png]]&lt;br /&gt;
&lt;br /&gt;
In this window you can:&lt;br /&gt;
&lt;br /&gt;
# Select DID(s) [[DID_Management#Details | details]]&lt;br /&gt;
# Add one DID or series of DIDs&lt;br /&gt;
# [[ DID_Import_from_CSV | Import DID(s) from CSV file]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE:''' You should select the Provider which sold you this DID. DID Provider is ONLY for informational purposes. If you do not know which Provider to assign - create dummy Provider to represent company from which you buy DID. If this is fake DID - assign any Provider you want. If your DID Provider has several IP addresses (as DIDWW) and you configured several Providers in MOR - assign ANY configured Provider.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== VIDEO: How to create a DID ==&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/SVJS_stEgBQ&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;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&lt;br /&gt;
*'''Provider''' – DID Provider is ONLY for informational purposes. If you do not know which Provider to assign - create dummy Provider to represent company from which you buy DID. If this is fake DID - assign any Provider you want. If your DID Provider has several IP addresses (as DIDWW) and you configured several Providers in MOR - assign ANY configured Provider.&lt;br /&gt;
&lt;br /&gt;
*'''Language''' – option to set language for voice prompts in the Asterisk Dial Plan&lt;br /&gt;
&lt;br /&gt;
*'''Call limit''' – describes how many simultaneous calls DID can '''receive'''. 0 (zero) means that calls are unlimited.&lt;br /&gt;
&lt;br /&gt;
*'''Max Call Duration (Timeout)''' – a number of seconds before a Call via DID is terminated ('''NOTE:''' due to a global safeguard Calls are terminated ~3 sec. earlier than this setting).&lt;br /&gt;
&lt;br /&gt;
*'''Comment''' – option to save some notes about DID.&lt;br /&gt;
&lt;br /&gt;
*'''[[Sound files | Sound file]]''' – here you can add [[IVR Greeting for DID]]. There are two options:&lt;br /&gt;
# Answer and play.&lt;br /&gt;
# Early media.&lt;br /&gt;
*'''PIN''' – a numeric PIN code to secure a DID.&lt;br /&gt;
&lt;br /&gt;
*'''PIN retries''' – a number of allowed attempts to enter a PIN code.&lt;br /&gt;
&lt;br /&gt;
*'''[[Sound files | Sound file]] to reenter PIN''' – a Sound File that is played before the next attempt to enter a PIN Code.&lt;br /&gt;
&lt;br /&gt;
*'''MOH instead of Ringing''' – if [[Music on Hold|MOH]] is selected, Music on Hold will be played instead of ringing when DID number is dialled. &lt;br /&gt;
&lt;br /&gt;
*'''[[IVR_system | IVR]] if PIN fails''' – an IVR the Call is transferred to when all attempts to enter a PIN Code fail. '''NOTE:''' when all PIN attempts fail and '''IVR if PIN fails''' is None, a Call is terminated with a [[Hangupcause_Codes|Hangupcause Code]] '''275'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
*'''Grace Time''' – if call duration is less than Grace Time, it will not be accounted, for example: '''Grace Time''' = 3s, call duration &amp;lt;= 3s, then price for the call = 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
*'''Timeout Digit''' – the maximum amount of time permitted between digits when the user is typing in a number. When this timeout expires after the user has started to type in a number, the number will be considered complete, and will be interpreted (sent to the system). Works both with entering destination and ANI/PIN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
*'''Timeout Response''' – the maximum amount of time permitted for user to START entering a number. If the user does not begin typing a number in this amount of time, system will notify that nothing was entered. Once the user begins to type a number, system will wait for &amp;lt;b&amp;gt;Digit Timeout&amp;lt;/b&amp;gt; to be reached, and &amp;lt;b&amp;gt;Response Timeout&amp;lt;/b&amp;gt; has no effect no more. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 11---&amp;gt;&lt;br /&gt;
*'''CallerID Name Prefix''' – option to add a CallerID Name prefix to the incoming CallerID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
*'''Tone zone''' – option to set tone zones. Tone zone is a different ring tone depending on destination (country).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
*'''Tariff for Calling Card''' – option to set a tariff for DID which will be applied for a calling card. It will not be important what tariff is assigned for that card's group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X11---&amp;gt;&lt;br /&gt;
*'''Active from''' – DID will become active from this date. If DID is not active yet, call is routed like there is no matching DID number.&lt;br /&gt;
&lt;br /&gt;
*'''Active till''' – DID will be active till this date. Expiration does not change DID status, call is routed like there is no matching DID number.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X13---&amp;gt;&lt;br /&gt;
* '''Blacklist Source Number Pool''' - this will set [[Number Pool]] for Blacklist Source. When calling this DID, if Source Number match number in this pool, call will be rejected with '''HGC 283 - Source number is in DID blacklist'''.&lt;br /&gt;
&lt;br /&gt;
* '''Send call anonymously''' - default no. Ability to show Anonymous on incoming call.&lt;br /&gt;
&lt;br /&gt;
* '''Send CallerID in UUI header''' - default no. The ability to show the caller ID on all calls in Sip UUI messaging.&lt;br /&gt;
Header example:&lt;br /&gt;
 User-to-User: hexCallerid;pd=XX;encoding=hex;purpose=isdn-uui;content=isdn-uui&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= DID Wildcard =&lt;br /&gt;
&lt;br /&gt;
It is possible to use Wildcard '''*''' to match several DID numbers.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, DID '''37088888*''' would match 37088888'''81''' 37088888'''72''' 37088888'''93''' 37088888'''5555555''', etc. &amp;lt;br&amp;gt;&lt;br /&gt;
'''IMPORTANT''' DID numbers without a Wildcard have higher priority.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Did wildcard.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Settings = &lt;br /&gt;
&lt;br /&gt;
If you want to edit a DID's settings, click on the [[Image:edit.png]] icon. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dids4.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The above window is for Free DID. You can:&lt;br /&gt;
&lt;br /&gt;
# Change [[DID_Management#Details | details]]&lt;br /&gt;
# [[DID_Management#Reserve_DID_for_User | Reserve DID for User]].&lt;br /&gt;
# [[DID_Management#Assign_to_Dial_Plan | Assign to Dial Plan]].&lt;br /&gt;
# Terminate a DID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reserve DID for User==&lt;br /&gt;
&lt;br /&gt;
When a DID is assigned to a Device (Reserve for User first), you have a few different choices:&lt;br /&gt;
&lt;br /&gt;
[[File:DidAssign5.png]]&lt;br /&gt;
&lt;br /&gt;
Here you can:&lt;br /&gt;
&lt;br /&gt;
# Change [[DID_Management#Details | details]].&lt;br /&gt;
# Assign DID to device. Here you can select different Devices for the same user. For select Trunk Device is next section.&lt;br /&gt;
# Assign DID to Trunk. Here you can select different Trunk Devices for the same user.&lt;br /&gt;
# Stop a DID subscription and reserve the DID for 90 days (by default) to this user in case he changes his mind and wants to get the DID back.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assign to Dial Plan==&lt;br /&gt;
&lt;br /&gt;
When DID is assigned to [[Dial_Plans | Dial Plan]], in DID settings you can:&lt;br /&gt;
# Change [[DID_Management#Details | details]].&lt;br /&gt;
# Make DID free.&lt;br /&gt;
&lt;br /&gt;
When you have [[Quickforwards_rules | Quickforward Rule]] for this DID, in DID edit you will see additional notice:&lt;br /&gt;
&lt;br /&gt;
[[Image:DID_edit_collisions_with_qf_rule.png‎]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Delete DID = &lt;br /&gt;
&lt;br /&gt;
At first, mark it as &amp;quot;not used&amp;quot; (Free). Then terminate it. When you do, you will see [[Image:delete.png]] next to the DID in the main DID window. By clicking on it, you can delete the DID.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' you cannot delete DIDs that are associated with calls. You can only Terminate these DIDs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DID bulk management =&lt;br /&gt;
In the main DIDs window, click [[Image:edit.png]] Bulk Management and you will be able to perform various actions either on:&lt;br /&gt;
*'''DIDs interval''' - this will apply action on selected DID interval,&lt;br /&gt;
*'''DIDs pattern''' - this will apply action on selected pattern. Supported wildcard symbols in pattern:&lt;br /&gt;
** '''%'''  matches any symbols, for example '''370%''' will match any number starting with '''370'''&lt;br /&gt;
** '''_'''  matches one symbol, for example '''370_1334455''' will match numbers in format '''370x1334455''', where '''x''' is any number.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dids6.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can choose which DIDs to update and what to do:&lt;br /&gt;
*'''Update''' - option to change some of DID details, Reserve DID for User (only free DIDs can be reserved) or Make DID free.&lt;br /&gt;
*'''Delete''' - option to delete DIDs by Provider or make DIDs Free/Terminated/Closed.&lt;br /&gt;
*'''Manage rates''' - option to change Rates for [[DID Billing]].&lt;br /&gt;
*'''[[Assign DID to Trunk]]'''.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
*'''Reserve for User''' - option to reserve DID for User (only free DIDs can be reserved).&lt;br /&gt;
*'''Assign Dial Plan''' - option for Assign DID to [[Dial_Plans | Dial Plan]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Allowing Users to route their DIDs =&lt;br /&gt;
Since '''MOR X5''' users are able to route their DID to a Device or an External Server . &lt;br /&gt;
This functionality can be enabled in '''SETTINGS -&amp;gt; Setup -&amp;gt; Visual''' by checking the 'Allow User to assign DID to Device:' setting.&lt;br /&gt;
&lt;br /&gt;
Once the functionality is enabled, the user will be able to see an Edit icon, in his DIDs list.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Dids_list_with_did_routing.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By pressing the icon, the user will be redirected to a page where he will be able to route his DID either to one of his MOR Devices, or to a Device on an external server (eg. SIP/370xxxxxx@123.123.123.123).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Did_routing_panel.png‎]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Reseller's DID list permissions are independent from Resellers' User, this means that Resellers' User can view DID list (if permissions are enabled for them) even when Resellers cannot.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= DIDs Call Flow =&lt;br /&gt;
&lt;br /&gt;
DID Call Flows allow you to add a call flow on a specific DID.&lt;br /&gt;
&lt;br /&gt;
Available from '''MOR X18''' with the PBX Addon enabled.&lt;br /&gt;
&lt;br /&gt;
An Accountant needs to have permissions: manage DID and manage PBX functions.&lt;br /&gt;
&lt;br /&gt;
Reseller needs to have a DID assigned to him or his user.&lt;br /&gt;
&lt;br /&gt;
A simple user needs to have DIDs permission enabled and a DID assigned to him.&lt;br /&gt;
&lt;br /&gt;
DID call flow only works with DIDs that are linked to a device.&lt;br /&gt;
&lt;br /&gt;
If call flow is set on both DID and DID Device, then DID call flow will have higher priority - DID Device call flows will be ignored. It does not provide two levels of Call Flow, either only DID Call Flow works, or only Device Call Flow works.&lt;br /&gt;
&lt;br /&gt;
[[File:DIDs_call_flow.png‎]]&lt;br /&gt;
&lt;br /&gt;
A call has several States as:&lt;br /&gt;
&lt;br /&gt;
* '''Before Call'''  – call has not reached device.&lt;br /&gt;
* '''Call''' – call to device is in progress.&lt;br /&gt;
* '''Answered''' – call was answered.&lt;br /&gt;
* '''No Answer''' – call was not answered and ended after timeout.&lt;br /&gt;
* '''Busy''' – callee was busy.&lt;br /&gt;
* '''Failed''' – call to device failed.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The possible actions are:&lt;br /&gt;
&lt;br /&gt;
* '''Empty'''&lt;br /&gt;
* '''Forward'''&lt;br /&gt;
* '''Voicemail'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Actions ==&lt;br /&gt;
&lt;br /&gt;
=== Empty ===&lt;br /&gt;
&lt;br /&gt;
Empty – means no action should be taken.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Forward ===&lt;br /&gt;
&lt;br /&gt;
'''Forward to'''&lt;br /&gt;
&lt;br /&gt;
Call can be forwarded to Local device or External number:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DIDs_call_flow_forward.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the &amp;quot;forward&amp;quot; action, it is easy to implement:&lt;br /&gt;
&lt;br /&gt;
* '''Unconditional forward''' – when forward is used in the Before Call state.&lt;br /&gt;
* '''Forward on no answer/busy/failed''' – when forward is used in No Answer, Busy, or Failed states.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''CallerID options'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following options are available to manage CallerID for a forwarded call:&lt;br /&gt;
&lt;br /&gt;
* '''From device''' - puts CallerID from the Device that is forwarding the call (Device assigned to the DID).&lt;br /&gt;
* '''Same as comes - unchanged''' - leaves the CallerID as it comes from the original caller.&lt;br /&gt;
* '''Same as comes - with Diversion''' - leaves the CallerID as it comes from the original caller and additionally adds SIP header Diversion from the initial URI (SIP To).&lt;br /&gt;
* '''Custom''' - enters any CallerID.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Voicemail ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DIDs_call_flow_voicemail.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The ''Voicemail Action'' sends the Call directly to the [[Voicemail]]. The Action can be set on ''Before Call'', ''No Answer'', ''Busy'' and/or ''Failed'' states of Callflow.&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;
*[[DID Billing]]&lt;br /&gt;
*[[DIDs Usage]]&lt;br /&gt;
*[[MOR_API_did_create | Create DID through API]]&lt;br /&gt;
*[[MOR_API_did_device_assign | Assign Device to DID through API]]&lt;br /&gt;
*[[MOR_API_did_device_unassign | Unassign Device from DID through API]]&lt;br /&gt;
*[[Providers#Provider_Grace_Time|Provider Grace Time]]&lt;br /&gt;
*[[Grace_time|Device Grace Time]]&lt;br /&gt;
*[[Example - Configuring DID to ring some Device]]&lt;br /&gt;
*[[DID is not working]]&lt;br /&gt;
*[[ DID_Import_from_CSV | Import DID(s) from CSV file]]&lt;br /&gt;
*[[Number Pool]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Configuration_from_GUI&amp;diff=30773</id>
		<title>Configuration from GUI</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Configuration_from_GUI&amp;diff=30773"/>
		<updated>2025-12-31T06:35:14Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* SFTP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Where I can find this settings menu?=&lt;br /&gt;
&lt;br /&gt;
You can find this menu in '''SETTINGS –&amp;gt; Setup –&amp;gt; Settings'''&lt;br /&gt;
&lt;br /&gt;
[[File:Settings_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Global ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; [[Global_Settings | Global]]'''&lt;br /&gt;
&lt;br /&gt;
* '''Company''' – name of the company.&lt;br /&gt;
* '''Company email''' – email address of the company.&lt;br /&gt;
* '''Version''' – version number.&lt;br /&gt;
* '''Copyright Title''' – copyright title supports html text format.&lt;br /&gt;
* '''Browser Title''' – browser title for MOR GUI.&lt;br /&gt;
* '''Front Page Text''' – some text to place on front page.&lt;br /&gt;
* '''Login Page Text''' – some text to place on login page&lt;br /&gt;
* '''Show logo on first page''' - untick to hide logo on the start page&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
&lt;br /&gt;
* '''Show Calls statistics to User for last''' – number of Calls statistics to show in days. For example, if you enter 5 days, users will only see 5 days old calls, they will not be able to check older calls.&lt;br /&gt;
* '''Show user_billsec for Users instead of billsec''' – shows user_billsec instead of billsec in Users invoices and last calls. Notice that Billsec shows real Call duration, user_billsec shows Call duration after minimal time or increment applied. For example, if user tariff has 60 sec minimal time and user made a Call for 20 sec, then billsec will show 20 sec and user_billsec will show 60 sec (minimal time is applied).&lt;br /&gt;
* '''Hide device passwords for users''' – do not display device passwords for users.&lt;br /&gt;
* ''' Hide Device username for Users'''  – do not display device username for users.&lt;br /&gt;
* '''Hide payment options for postpaid users''' - will hide the payment option for all postpaid users (including Resellers if they are postpaid).&lt;br /&gt;
* '''Hide non-completed payments for user''' – hides non-completed payments (the ones which are started in MOR, but are not completed in a payment gateway website).&lt;br /&gt;
* '''Hide Recordings for all users''' – hides recordings for all system users from menu and device settings.&lt;br /&gt;
* '''Allow User to assign DID to Device''' – lets User to assign DID to Device.&lt;br /&gt;
* '''Allow User to assign DID to Trunk''' – lets User to Assign DID to Trunk.&lt;br /&gt;
* '''Do not allow users to change their email addresses'''&lt;br /&gt;
* '''Do not allow users to change their Personal Details'''&lt;br /&gt;
* '''Change ANSWER to FAILED if HGC not equal to 16 for Users''' – changes the Hangupcause for users in call reports from Answered to Failed if Hangupcause is not 16.&lt;br /&gt;
* '''Do not allow PREPAID User balance drop below zero (block them instead)'''&lt;br /&gt;
* '''Do not block POSTPAID User when balance goes bellow zero on subscription count'''&lt;br /&gt;
* '''Allow identical email addresses to different Users''' – allows creating Users or registering users with identical email addresses. After checking this setting you will be not able to check.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
* '''Device PIN length''' – length for automatically generated PIN codes for devices.&lt;br /&gt;
* '''Device range MIN''' – from which extension automatic extension assigning starts.&lt;br /&gt;
* '''Device range MAX''' – till which extension automatic extension assigning goes.&lt;br /&gt;
** For example, from this interval: [Device range MIN, Device range MAX] MOR will select extensions for newly created Devices.&lt;br /&gt;
* '''Random Device Extension''' – when creating device, random number from '''Device Range''' will be taken.&lt;br /&gt;
* '''Enable &amp;quot;Allowed addresses&amp;quot; option for Devices:'''  – allows [[Device_settings#Allowed_Addresses | Allowed Addresses]] functionality in Devices settings.&lt;br /&gt;
* '''Do not allow duplicate device user names'''&lt;br /&gt;
* '''Inform when Devices are created or updated''' – check to get an email about every newly created or updated Device.&lt;br /&gt;
* '''Allow same IP and Port combinations in multiple Devices''' – allows creating Devices with the same IP and Port combination.&lt;br /&gt;
* '''Show Hostname/IP in Device list'''&lt;br /&gt;
* '''Change dahdi''' – Sometimes this is used to change &amp;quot;Zap&amp;quot; to something else in GUI, e.g. to &amp;quot;PSTN&amp;quot;, mainly because not everybody knows what Zap stands for. PSTN is more common.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Registration ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Registration'''&lt;br /&gt;
&lt;br /&gt;
* '''Enabled?''' – do we want to let users [[Online registration | register online]] automatically?&lt;br /&gt;
* '''Hide registration link in Login page?''' – tick this option if you do not want users to be able to register online.&lt;br /&gt;
* '''Default country'''&lt;br /&gt;
* '''Asterisk server IP''' – what IP should user connect his softphone/server to?&lt;br /&gt;
* '''Send Email to User after registration''' – just yes or no.&lt;br /&gt;
* '''Send Email to Admin after registration''' – just yes or no.&lt;br /&gt;
* '''Send Email To User after User was created''' – just yes or no.&lt;br /&gt;
* '''Send Email To Admin after User was created''' – just yes or no.&lt;br /&gt;
* '''[[ReCAPTCHA]] configuration'''&lt;br /&gt;
* '''[[User_Agreement|Terms and conditions]]'''&lt;br /&gt;
* '''Allow to create user and device with matching username and password''' – just yes or no. If this setting is not enabled - username and password from MOR GUI will have to be different than device's username and password.&lt;br /&gt;
* '''Enable VAT checking for EU companies''' – you can choose whether to check '''TAX Registration Number:''' during the [[Online registration]] or not. Done over [http://ec.europa.eu/taxation_customs/vies/?locale=lt EU page].&lt;br /&gt;
* '''Allow blank VAT for EU companies''' – allows to leave blank '''TAX Registration Number:''' field during the [[Online registration]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
* [[Default user]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Invoices ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Invoices'''&lt;br /&gt;
&lt;br /&gt;
Invoice configuration is divided into '''Prepaid''' and '''Postpaid'''. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Settings ===&lt;br /&gt;
&lt;br /&gt;
* '''Number start''' – how the invoice number should start.&lt;br /&gt;
* '''Number length''' – the length in digits AFTER Number Start – e.g. Number Start is not counted into this length. This value is active only for first number type.&lt;br /&gt;
* '''Number type''' – select more appropriate number format.&lt;br /&gt;
* '''Invoice period start''' – when invoices are issued, default is first day of the month.&lt;br /&gt;
* '''Show calls in detailed invoice''' – yes or no.&lt;br /&gt;
* '''[[Outstanding balance(Debt) | Show balance line]]''' – shows balance line in Invoice PDF files when Invoice is generated from first day of month till last one. &lt;br /&gt;
* '''Round finals to 2 decimals''' – round or not total in Invoices to 2 decimals.&lt;br /&gt;
* '''Use short file name'''&lt;br /&gt;
* '''Group Subscriptions''' - User's subscriptions will be grouped by service (only applies to PDF and XLSX invoice).&lt;br /&gt;
* '''Show Quantity''' - Show quantity of each service (only applies to PDF invoice).&lt;br /&gt;
* '''Invoice Page Limit:''' – invoice will be generated till this page limit. Additional page is added with an explanation that page limit was reached. &lt;br /&gt;
* ''' Rename 'DID owner cost' label in detailed PDF invoice:''' – text which will be used instead of '''DID owner cost''' in detailed PDF invoice.&lt;br /&gt;
* ''' Hide 'DID owner cost' line in detailed PDF invoice:''' – checkbox, which control whether or not DID owner cost should be shown in detailed PDF invoice.&lt;br /&gt;
* ''' Show Destination with Prefix in Detailed Invoice:''' - checkbox, if enabled, destination will be shown as '''Destination Name (prefix)'''.&lt;br /&gt;
* ''' Rename red 'INVOICE' label in Simplified PDF Invoice:''' &lt;br /&gt;
* ''' Rename red 'INVOICE' label in Detailed PDF Invoice:'''&lt;br /&gt;
* ''' Rename red 'INVOICE' label in PDF Invoice by CallerID:'''&lt;br /&gt;
* ''' Use rounded Invoice Details Prices to calculate Totals''' - use rounded sub-totals to calculate Invoice Total price. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Details ===&lt;br /&gt;
&lt;br /&gt;
* '''Address format''' – changes field positioning in the invoice for the address. You must select it in order to show address in the invoice. &lt;br /&gt;
* '''Address line 1-4''' – address info.&lt;br /&gt;
* '''Bank details line 1-5''' – bank details info.&lt;br /&gt;
* '''Invoice balance line''' – line for balance (e.g. &amp;quot;Your current balance is&amp;quot;)&lt;br /&gt;
* '''Invoice to pay Line'''&lt;br /&gt;
* '''End title''' – a title for the end of your invoice.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
* '''Add Average rate in detailed invoice''' – adds average rate in detailed invoice.&lt;br /&gt;
* '''Show Time in Minute''' – shows time in mm:ss instead of hh:mm:ss, for example, not 02:13:42 but 133:42.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional ===&lt;br /&gt;
&lt;br /&gt;
* '''Show additional details on separate page''' – enables additional custom page at the end of the invoice.&lt;br /&gt;
* '''Additional details''' – the information to be displayed in a custom page at the end of the invoice.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
&lt;br /&gt;
* '''Invoice allow recalculate after send''' – allows recalculating invoices after being sent. This setting also allows to delete sent invoices.&lt;br /&gt;
* '''Do not generate Invoices for blocked Users''' - if enabled Invoices will not be generated for blocked Users.&lt;br /&gt;
* '''Rename &amp;quot;Calls&amp;quot; label''' - changes 'Calls' name for Simplified Invoices and new Invoice XLSX. If you want to apply new 'Calls' name for old XLSX, you should go to Settings &amp;gt; Invoices &amp;gt; XLSX and mark 'New XLSX template apply for old Invoices'&lt;br /&gt;
* '''Start value for Invoice numbers''' - defines number from which Invoices numeration should start.&lt;br /&gt;
* '''Duration Format:''' - time format in invoice. This setting applies for XLSX type invoices (and PDF invoices generated from XLSX invoice) and Invoice Details page. Available options - 'H:M:S', 'H:M', 'M'. When option 'M' is used, sub option Decimal places appear, where you can select precision.&lt;br /&gt;
* '''Invoice Group By: Prefix / Destination'''&lt;br /&gt;
* '''Show Rates:No / Yes'''&lt;br /&gt;
* '''Show Calls in CID Invoice (CSV)''' - if enabled, then CSV Invoice by CallerID will show a list of calls.&lt;br /&gt;
* '''Show Subscriptions total Selfcost in Invoices List CSV''' - enables additional columns at the Invoice List, when using Export to CSV: Agreement Number, Issue date, Subscriptions total Selfcost. Columns are enabled for Admin and Resellers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XLSX ===&lt;br /&gt;
* '''XLSX Template''' - choose XLSX Template for Invoices.&lt;br /&gt;
* '''Send XLSX Invoices converted to PDF''' – If enabled XLSX invoices will be converted to PDF before sending over [[Invoices#Send_invoices_by_email_.28manual.29|Email]] or [[Cron_actions#Generate_Invoices_and_send_by_Email|using cron action]]&lt;br /&gt;
* '''Group regular Calls by Destination''' - Groups regular Calls be destination&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;
* [[Invoices]]&lt;br /&gt;
* [[Invoice configuration]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Emails ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Emails'''&lt;br /&gt;
&lt;br /&gt;
* ''' 	Sending globally enabled''' – if this is checked, you will be able to use Mass Mailing and the system will send emails upon user registration.&lt;br /&gt;
* ''' 	Add recipient first name and last name''' – if this is checked, it will show the user's first name and last name if they are entered in the User Settings.&lt;br /&gt;
* '''SMTP server''' – hostname of the server.&lt;br /&gt;
* '''Port''' – port of SMTP server.&lt;br /&gt;
* '''Login''' – username to your SMTP server.&lt;br /&gt;
* '''Password''' – password to your SMTP server.&lt;br /&gt;
* '''Batch size''' – value for Mass Mailing, or how many emails to send at once.&lt;br /&gt;
* '''From''' – email address to put into From: field in email. Acceptable formats are: '''example@email.com''' or '''John Smith &amp;lt;example@email.com&amp;gt;'''.&lt;br /&gt;
* '''Test email sending''' – save settings and press this to test email sending. Do not forget to save settings first!&lt;br /&gt;
* '''TLS''' – '''Auto''', '''Yes''' or '''No'''. Default '''Auto'''.&lt;br /&gt;
&lt;br /&gt;
'''P.S. Remember to set admin's e-mail in admin's personal settings. Without this test email sending will not work!'''&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;
* [[Emails|Mass Emails]]&lt;br /&gt;
* [[Email variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Various ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Various'''&lt;br /&gt;
&lt;br /&gt;
* '''Allow login by email''' - allow users to log in by email instead of a username.&lt;br /&gt;
* '''Logout link''' – a user will be redirected to this link after pressing &amp;quot;Logout&amp;quot;&lt;br /&gt;
* '''Agreement number length''' – number length in digits.&lt;br /&gt;
* '''Google Maps API key''' - the setting is necessary for using the Google Maps functionality. For more on how to configure this key please check [[Get Google Maps key]].&lt;br /&gt;
* '''Chanspy is disabled globally'''&lt;br /&gt;
*'''Send Recordings space warning Email''' - sends Email to Admin once a day if recordings exceed space limit.&lt;br /&gt;
*'''Delete Tariff Jobs older than''' - deletes tariff jobs older than set days.&lt;br /&gt;
*'''Delete Automatic Tariff Import Inbox Messages older than''' - deletes automatic tariff import inbox messages older than set days.&lt;br /&gt;
* '''Server free space limit''' – indicator when system should inform admin about low [[Multi_Server_support|Server]] space. By default 20%. Notice will appear in [[Integrity Check]] and every hour will send an email &amp;quot;Low Disk Space Alert&amp;quot;. Which template can be found and edited on [[Emails]] page. Information about the Server and the remaining free space will be provided.&lt;br /&gt;
* '''Days for DID to close''' – how long to keep DID closed before making it free.&lt;br /&gt;
* '''DID for Unassigned DID''' - this feature is used for calls coming from providers to system DIDs. Allows redirecting call to specific DID if client dials nonexistent DID. If empty, then this feature is disabled and a call will be terminated with [http://wiki.kolmisoft.com/index.php/207_Not_clear_who_should_receive_call 207 Not clear who should receive call] hangup code.&lt;br /&gt;
* '''Play IVR for unauthenticated call'''&lt;br /&gt;
* '''Banned CLIs default IVR''' – default IVR to route banned numbers.&lt;br /&gt;
* '''Default Music On Hold''' - allows to select Default Music On Hold.&lt;br /&gt;
* '''Use Extension in CallerID for Local Calls''' - overwrites original CallerID with Device Extension when making local calls. Outside calls are not affected by this setting.&lt;br /&gt;
* '''Call Forwarding CallerID (via call)''' - allows to manage CallerID when [http://wiki.kolmisoft.com/index.php/Call_Flow#Change_Forward_action_by_Call forwarding is set by call].&lt;br /&gt;
* '''Force Users to use forwarding CallerID (via GUI)''' – possible options: '''Empty''' (the user will have all options available), '''From Device, Same as comes, Sames as comes - with Diversion'''. &lt;br /&gt;
* '''Enable &amp;quot;Allowed addresses&amp;quot; option for Providers:''' – allows Allowed Addresses functionality in Providers settings.&lt;br /&gt;
*'''Allow forward from Resellers''' - enables advanced device option: Allow forward from Resellers. More information about option in [https://wiki.kolmisoft.com/index.php/Device_settings#Advanced device settings].&lt;br /&gt;
&lt;br /&gt;
== Tax ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Tax'''&lt;br /&gt;
&lt;br /&gt;
Settings are explained here: [[Multi-Tax system]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Backups ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Backups'''&lt;br /&gt;
&lt;br /&gt;
Configuration is explained here: [[Backup system]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; API'''&lt;br /&gt;
&lt;br /&gt;
* '''Allow API''' – enable/disable API.&lt;br /&gt;
* '''Allow GET API''' – enable/disable GET in API - use only for testing!&lt;br /&gt;
* '''API Secret Key''' – secret key for API. This will be used as a password for signing queries to MOR API, check [[MOR_API | MOR API documentation]] for more information&lt;br /&gt;
* '''XML API Extension''' – .NET does not follow standards (surprise!); enable this setting if you are using it to get XML starting with HTTP tags.&lt;br /&gt;
* '''Allow API Login Redirect''' – enable/disable&lt;br /&gt;
* '''API allow registration''' – enable/disable registration through API&lt;br /&gt;
* '''API allow Payments''' – enable/disable payments through API&lt;br /&gt;
* '''API Payment confirmation''' – enable/disable payments confirmation through API&lt;br /&gt;
* '''[[Balance_in_phone|Allow devices to check balance over HTTP]]''' – enable/disable device balance checking&lt;br /&gt;
* '''[[MOR_API_rate_get|Allow devices to check rate over HTTP]]''' – enable/disable device rate checking&lt;br /&gt;
* '''Disable hash checking''' – lets you skip hash parameter using API&lt;br /&gt;
* '''Uniquehash''' – shows your uniquehash &lt;br /&gt;
* '''Send Email To Admin after API/Manual Payment''' - sends Email  to Admin after API/Manual payment. Email Template name:  manual_payment_email &lt;br /&gt;
* '''Send Email to User after API/Manual Payment''' - sends Email to User after API/Manual payment. Email Template name:  manual_payment_email_for_user &lt;br /&gt;
* '''Send Email To Admin after API/Balance Update''' - sends Email to Admin after API/Balance Update. Email Template name:  balance_update_email &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
[[MOR API]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functionality ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Functionality'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===FAX===&lt;br /&gt;
&lt;br /&gt;
* '''Fax device enabled''' – enable/disable Fax device in MOR. When admin enables FAX, Functionality tab appears in Reseller's GUI configuration. He can then enable or disabled fax for his own users himself. &lt;br /&gt;
* '''Fax2Email From Sender''' – there is a field &amp;quot;From:&amp;quot; in an email form. When MOR sends Fax to Email, &amp;quot;Fax2Email From Sender&amp;quot; value is displayed in &amp;quot;From:&amp;quot; field.&lt;br /&gt;
* '''Allow Users to change FAX email''' - allow simple Users to add/remove/edit FAX emails in FAX Devices.&lt;br /&gt;
* '''Fax2Email Email Template''' - [[Emails|email template]] to be used for Fax2Email emails. &amp;quot;None&amp;quot; means the default Asterisk template.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CSV===&lt;br /&gt;
&lt;br /&gt;
* '''CSV Column Separator''' – how columns are separated in imported/exported CSV files.&lt;br /&gt;
* '''CSV Decimal Separator''' – how decimal parts in numbers are separated in imported/exported CSV files.&lt;br /&gt;
* ''' Archive CSV file when size reaches''' – if CSV file reaches a certain size, the system will archive it to save time to download it (0 means to archive always)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Active Calls===&lt;br /&gt;
&lt;br /&gt;
* '''How many maximum [[Active_Calls|Active Calls]] to show in GUI''' – how many [[Active_Calls| Active Calls]] to show in GUI&lt;br /&gt;
* '''[[Active_Calls| Active Calls]] refresh interval''' – [[Active_Calls|Active Calls]] refresh interval in seconds&lt;br /&gt;
* '''Show [[Active_Calls|Active Calls]] for Users''' – tick if you want to allow users to see [[Active_Calls|Active Calls]]&lt;br /&gt;
* '''Show Servers in [[Active_Calls|Active Calls]]'''&lt;br /&gt;
* '''Show DIDs in [[Active_Calls|Active Calls]]'''&lt;br /&gt;
* '''Show localized Source in [[Active_Calls|Active Calls]]''' - if set, [[Active_Calls|Active Calls]] will show callerid number after localisations (if any) have been applied.&lt;br /&gt;
* '''Show Originators' Device IP in [[Active_Calls|Active Calls]]'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Last Calls===&lt;br /&gt;
&lt;br /&gt;
* '''Limit PDF size in Last Calls to''' - limits how many pages can be exported from Last Calls to PDF. It takes a lot of system resources to generate PDF files therefore this limit should be low enough to prevent high load on system.&lt;br /&gt;
* '''Show Device and its CallerID in Last Calls'''  – shows additional column in [[Last Calls]] page with Device and its CallerID information. Click to reach that Device settings page.&lt;br /&gt;
* '''Show DID User instead of Device User in Last Calls''' - if enabled, always shows DID User name in Last Calls.&lt;br /&gt;
* '''Show Terminated by in Last Calls''' - show Terminated  By column in [[Last Calls]], calls CSV/PDF export, and adds the possibility to select this column in [[CDR Export Templates]].&lt;br /&gt;
* '''Show Usernames on PDF/CSV Export Files in Last Calls''' – if checked, when a particular User in the Last Calls page search is selected, the Last Calls PDF/CSV file name will be composed also of the Name of selected User. If you are looking for All Users, no User Name will be used. (Name of the User will be shown in Name of the CSV/PDF file).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tariffs/Rates===&lt;br /&gt;
&lt;br /&gt;
* '''Show rates for users''' – allows users to see rates&lt;br /&gt;
* '''Show rates without Tax''' – shows rates without TAX&lt;br /&gt;
* '''Show [[Advanced_Rates|Advanced Rates]] for users''' – allows users to see [[Advanced_Rates|Advanced Rates]]&lt;br /&gt;
* '''Show zero rates in LCR tariff export:''' – shows zero rates in LCR tariff exported file.&lt;br /&gt;
* '''Delete outdated Rates after''' - Delete outdated Rates after some dates.&lt;br /&gt;
* '''Show Ghost percent column in Tariffs:''' – if enabled, the Ghost percent column will be shown in the tariff. Default disabled.&lt;br /&gt;
NOTE: if [[Custom Rates]] and/or Tariff Rates are set for the user, only the custom rates will be shown in the details of destination rates. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Statement of Account===&lt;br /&gt;
* ''' PDF Settings ''' - allows to put Address lines of PDF file for Statement of Account.&lt;br /&gt;
*Address line 1: Street Address&lt;br /&gt;
*Address line 2: City, Country&lt;br /&gt;
*Address line 3: Phone, fax&lt;br /&gt;
*Address line 4: Web, email&lt;br /&gt;
*Bank details line 1&lt;br /&gt;
*Bank details line 2&lt;br /&gt;
*Bank details line 3&lt;br /&gt;
*Bank details line 4&lt;br /&gt;
*Bank details line 5&lt;br /&gt;
*Bank details line 6&lt;br /&gt;
*Bank details line 7&lt;br /&gt;
*Bank details line 8&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Privacy==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Privacy'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Privacy_to_hide_Destination_ends|Privacy to hide Destination ends]]'''&lt;br /&gt;
* '''[[GDPR]] Activated''' – hides User data with notification &amp;quot;Data hidden due GDPR. Press to show data (action will be logged)&amp;quot;. Valid for Admin, Accountant, Reseller and Partner.&lt;br /&gt;
&lt;br /&gt;
== Visual ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Visual'''&lt;br /&gt;
&lt;br /&gt;
* '''Items per page (Setting high value can cause performance issues)''' – the number of items to display per one page&lt;br /&gt;
* '''[[Global_date_format| Default date format]]''' – System default date format&lt;br /&gt;
* '''Default Time Format''' – System default time format&lt;br /&gt;
* '''Default Hour Format''' - System default hour format&lt;br /&gt;
* '''Default Number Decimal''' – with this option you can set default number decimal for all GUI&lt;br /&gt;
* '''Number digits''' – how many digits to display after a comma&lt;br /&gt;
* '''Hide Quick Stats in Start page''' – hide Quick stats from start page&lt;br /&gt;
* '''Hide &amp;quot;Information about this page&amp;quot; link''' – hide HELP banner in GUI&lt;br /&gt;
* '''Hide &amp;quot;I want to&amp;quot; help links'''&lt;br /&gt;
* '''[[Remove_Manual_link_from_admin_GUI|Hide &amp;quot;Manual&amp;quot; link]]''' – hides &amp;quot;Manual&amp;quot; link&lt;br /&gt;
*'''Hide Provider Payments from User Payment List''' - default off.&lt;br /&gt;
* '''Show Full Source (CallerID Name and Number)'''&lt;br /&gt;
* '''Use &amp;lt;&amp;gt; brackets in CDR export''' - changes brackets in CDR export&lt;br /&gt;
* '''Show only main page''' – this is a very advanced feature for those who want to hide default MOR menu tree on the left so that they could build their own menu using advanced techniques without modifying MOR GUI sources.&lt;br /&gt;
* '''Show forgot password''', because this functionality requires a unique email in the system. The setting can be unchecked if all emails are unique in the system. &lt;br /&gt;
** '''From Device''' - puts CallerID for the Device that is forwarding the call. If Device CallerID is empty, then the originator's CallerID will be used.&lt;br /&gt;
** '''Same as comes - unchanged''' - leaves the CallerID as it comes from the originator.&lt;br /&gt;
** '''Same as comes - with Diversion''' - leaves the CallerID as it comes from the original caller and additionally adds SIP header Diversion with CallerID from the Device that is forwarding the call (header will not be added if Device does not have CallerID set).&lt;br /&gt;
* '''Show forgot password''' – turns on '''[[MOR_forgot_user_password | Forgot password]]''' functionality.&lt;br /&gt;
* '''Show detailed Quick Stats''' - shows modified quick stats of first page.&lt;br /&gt;
* '''Show Replication Broken warning only for Admin''' - if enabled, shows Replication Broken warning message only for Admin account.&lt;br /&gt;
* '''Change LCR priority by using drag and drop'''&lt;br /&gt;
* '''New Menu Active''' - if enabled, changes main menu to the new structure.&lt;br /&gt;
* '''Dropdown field in User's subscriptions''' - enables old style Service selection in Subscription form.&lt;br /&gt;
* '''Show entered Destination only for Users''' - show the Destination numbers for Users that were entered by them and not Destination numbers after Localization.&lt;br /&gt;
* '''Show Company Name column in Users page''' - show &amp;quot;Company Name&amp;quot; column in Users list page.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Server load ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Server load'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Settings for GUI Server and Database Server&lt;br /&gt;
&lt;br /&gt;
* '''HDD utilisation higher than''' – Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device).&lt;br /&gt;
* '''CPU General Load higher than''' – CPU General load higher than – Percentage of the CPU for user processes.&lt;br /&gt;
* '''CPU Load Stats 1 higher than''' – average load per one minute on the system&lt;br /&gt;
* '''CPU MySQL process higher than''' –  Percentage of the CPU for MySQL process&lt;br /&gt;
* '''CPU Ruby process higher than''' –  Percentage of the CPU for Ruby process&lt;br /&gt;
* '''CPU Asterisk process (if present) higher than''' – Percentage of the CPU for Asterisk process&lt;br /&gt;
* '''Delete Server Load Stats older than''' – deletes internal servers load statistics older than defined number of days.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Calls ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Calls'''&lt;br /&gt;
* '''Retrieve PCAP files from the Proxy Server''' – default off. Works only when CCL module is activated.&lt;br /&gt;
&amp;lt;!--- from X18---&amp;gt;&lt;br /&gt;
* '''SQL Max Execution Time''' - max execution time in seconds for SQL query. The default time is 300 seconds (5 minutes). Used in Statistics pages (Calls List export and similar).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Archived calls]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FTP ==&lt;br /&gt;
Please fill up FTP server details if you want to store Archived calls or/and Backups to FTP server.&lt;br /&gt;
&lt;br /&gt;
* '''IP''' - Enter FTP server IP.&lt;br /&gt;
* '''Port''' - Enter FTP server Port.&lt;br /&gt;
* '''Username''' - Enter FTP server Username.&lt;br /&gt;
* '''Password''' - Enter FTP server Password.&lt;br /&gt;
* '''Path for Archived Calls''' - Enter Path for Archived Calls.&lt;br /&gt;
* '''Path for Backups''' - Enter path for Backups.&lt;br /&gt;
* '''Path for CDR Export''' - Enter path where to export CDRs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SFTP ==&lt;br /&gt;
Please fill up SFTP server details if you want to use SFTP for [[Automatic CDR Export]].&lt;br /&gt;
&lt;br /&gt;
* '''IP''' - IP of the SFTP server.&lt;br /&gt;
* '''Port''' - Port of the SFTP server.&lt;br /&gt;
* '''Username''' - Username to connect to SFTP server.&lt;br /&gt;
* '''Password''' - Password to connect to SFTP server. &lt;br /&gt;
* '''Use SSH key''' - Use SSH key configured as described [[Configure SSH connection between servers|here]].&lt;br /&gt;
* '''Path for CDR Export''' - Path in SFTP server where to export CDRs.&lt;br /&gt;
* '''Skip CA verification''' - skips SFPT servers CA verification. Try to enable it if the test passes, but if the upload fails. Adds the --insecure option as described here https://curl.se/docs/sslcerts.html&lt;br /&gt;
* '''Path to CA Certificate''' - optional. Allows specifying a custom CA store. Adds the --cacert [file] option as described here https://curl.se/docs/sslcerts.html&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
* '''Allow short passwords in devices'''&lt;br /&gt;
* '''Use strong passwords for users'''&lt;br /&gt;
* '''Admin login with approved IP only''' - security measure which allows to approve IP's that try to [[MOR_Login_with_approved_IP%27s|login with Admin Account]].&lt;br /&gt;
* '''Enable IP report warning on login failure''' - show [[MOR_Login_Failure_Report|warning]] on unsuccessful login attempts.&lt;br /&gt;
* '''Logout after password change''' - terminates all sessions of the User whose password is changed.&lt;br /&gt;
* '''Logout after closing browser window''' - terminates all sessions of the User after closing browser window.&lt;br /&gt;
* '''Do not logout on session IP change''' - do not logout from MOR GUI if IP is changed.&lt;br /&gt;
* '''2FA Enabled''' - Enables two factors authentication. Two factors authentication requires to enter emailed code during login to user account. '''2FA Enabled must be also enable on individual [[User_Details|User settings]] to make it work for that User.'''&lt;br /&gt;
** '''Email Template''' - [[Emails|email template]] used to send the code.&lt;br /&gt;
** '''Code length (digits)''' - code length.&lt;br /&gt;
** '''Code Enter Attempts Allowed''' - number of attempts to enter the code correctly. Code expires after this number of failed attempts.&lt;br /&gt;
** '''Code Enter Time Allowed''' - code is valid for this amount of time.&lt;br /&gt;
** '''Send Notification Email to Admin on Login''' - allows admin to get email notification on login.&lt;br /&gt;
*** '''Email Template''' - [[Emails|email template]] used to notify admin.&lt;br /&gt;
*** '''On Admin Login''' - get notification on login to Admin's account.&lt;br /&gt;
*** '''On User Login''' - get notification on login to User's accounts.&lt;br /&gt;
** '''Send Notification Email on Login''' - allows this mailbox to get email notification on login.&lt;br /&gt;
*** '''Email Template''' - [[Emails|email template]] used to notify.&lt;br /&gt;
*** '''On Admin Login''' - get notification on login to Admin's account.&lt;br /&gt;
*** '''On User Login''' - get notification on login to User's accounts.&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;
* [[Server is overloaded]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=LCR&amp;diff=30764</id>
		<title>LCR</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=LCR&amp;diff=30764"/>
		<updated>2025-12-12T09:02:57Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* LCR Time Periods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
LCR (Least Cost Routing) is a set of Providers that should be used to send a call when trying to dial any destination - for example, by the cheapest rate. &lt;br /&gt;
&lt;br /&gt;
The correct name for such a function is a Routing Table because the function supports other ways of routing, not just finding the cheapest route.&lt;br /&gt;
&lt;br /&gt;
By default LCR supports fail-over. That is, if one provider fails, the next one is dialed. This is completely invisible for the caller and lets you increase the chances of the user reaching his destination. If one Provider is not capable of delivering a call, the system will try to use the remaining [[How_to_add_Provider_to_LCR | Providers]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Fail-over explanation==&lt;br /&gt;
&lt;br /&gt;
=== Use only first Provider in the row ===&lt;br /&gt;
&lt;br /&gt;
This option can allow/deny failover for LCR.&lt;br /&gt;
&lt;br /&gt;
When it is enabled it only allows the first Provider in the Routing Table/LCR to be used.&lt;br /&gt;
&lt;br /&gt;
Please note that when using ANI Authentication, a second query is made to get LCR info.&lt;br /&gt;
If this option is set to &amp;quot;Yes&amp;quot; on the first query, the second query will not change it.&lt;br /&gt;
&lt;br /&gt;
In other words - if the first LCR denies Failover, the second ANI LCR can't enable Failover.&lt;br /&gt;
&lt;br /&gt;
This is by design to avoid situations where the misconfiguration can create loops in the call flow.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
With such configuration:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:lcr_fo_case1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
System will do following:&lt;br /&gt;
&lt;br /&gt;
* system tries to use &amp;quot;Kolmisoft PREMIUM&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* if above fails, system tries to use &amp;quot;Kolmisoft STANDARD&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* end.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With such configuration:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:lcr_fo_case2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
System will do following:&lt;br /&gt;
* system tries to use &amp;quot;Kolmisoft PREMIUM&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* end.&lt;br /&gt;
&lt;br /&gt;
NOTE: if the original User is being changed by ANI, and if the original User has &amp;quot;Use only first Provider in the row&amp;quot; set to YES on its LCR, then even if resulting User LCR has &amp;quot;Use only first Provider in the row&amp;quot; set to NO, the system will act as it is set to YES. (See description above why it is so)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With such configuration:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:lcr_fo_case3.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The system will do the following:&lt;br /&gt;
* system tries to use &amp;quot;Kolmisoft PREMIUM&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* if above fails, the system tries to use &amp;quot;Kolmisoft STANDARD&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* if above fails, the system tries to use provider &amp;quot;112&amp;quot; even if its rate is higher than User rate;&lt;br /&gt;
&lt;br /&gt;
* end.&lt;br /&gt;
&lt;br /&gt;
It is possible to change User's tariff when the Failover provider is used. By default, the current User's tariff is used.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:failover_provider_user_tariff.png]]&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 '''SETTINGS –&amp;gt; Billing –&amp;gt; LCR'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see the list off all LCRs&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_main.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Name – name of LCR.&lt;br /&gt;
* Order – type of routing mode.&lt;br /&gt;
* Providers – quantity of providers in LCR. Click on it to [[How_to_add_Provider_to_LCR | Add Providers to LCR]]&lt;br /&gt;
* [[Call_routing_per_destination_basis | By destination]]&lt;br /&gt;
* Usage Details – the list of Users and Card Groups where this LCR is used.&lt;br /&gt;
* [[LCR make tariff | Make Tariff from LCR Providers to CSV]] – feature that gets you a CSV with the MIN/MAX prices selected from the list of Providers in LCR. Click on the [[Image:excel.png]] icon and the download should start automatically. (De-activated provider will be taken into CSV. &amp;quot;by Destination&amp;quot; will not be taken into CSV)&lt;br /&gt;
* LCR copy – press on icon to make LCR copy.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Supported routing modes==&lt;br /&gt;
&lt;br /&gt;
* [[Call Routing by price|By Price]] - cheapest first (Least Cost Routing).&lt;br /&gt;
* [[Call Routing by priority (Manual LCR) | By priority]].&lt;br /&gt;
* [[Routing by Percent| By percent]] or Weight-based routing.&lt;br /&gt;
&lt;br /&gt;
The user has one base LCR, so that all his calls are routed by some preset rule.&lt;br /&gt;
&lt;br /&gt;
It is possible to route different destinations for a User using [[Call routing per destination basis]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Creation==&lt;br /&gt;
Press [[Image:icon_add.png]]'''New LCR''' to create LCR.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== VIDEO: How to create LCR ===&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/7sCaBH35hXc&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;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Additional Configuration==&lt;br /&gt;
&lt;br /&gt;
Go to LCRs list and press [[image:icon_edit.png]] icon. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_time_periods.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''First Providers percent limit''' - visible when order by Price is selected. If the following Providers will have higher prices by this percent compared to the first Provider, these Providers will be skipped. 0 value disables the use of this setting.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Minimal Rate Margin Percent''' - use only those Providers which generate profit (per minute) equal or higher than defined percentage value in this field. For example, if you pay to your Provider 1 EUR/min and your Minimal Rate Margin Percent is set to 50%, then only calls with a user rate equal to or higher than 1.5 EUR/min are allowed to call. After 1 min of call, you will pay 1 EUR to your provider, and the user will pay you 1.5 EUR. Your profit will be 0.5 EUR which is 50% more of what you paid to your Provider. If your Minimal Rate Margin is -30%, then you allow some losses in your calls. If you pay 1 EUR to your Provider after 1 minute of call, then the user should pay you 0.7 EUR or more. You will pay 1 EUR and you will get 0.7 EUR which is 30% less than what you paid.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===LCR Time Periods===&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Sometimes there is such demand to change LCR for some time period. This functionality gives you the ability to do that. In the LCR Edit page time periods can be set. &lt;br /&gt;
&lt;br /&gt;
The time period defines the exact time period LCR will be active. There is a limit of five periods in one LCR. The rest of the time will be used the main LCR.&lt;br /&gt;
&lt;br /&gt;
The timezone in Time Periods is in the Server's (Linux) timezone.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Examples'''&lt;br /&gt;
&lt;br /&gt;
# Select '''Date''' from 1 of January to 28 of February and choose '''Hour : Minute''' from 09:00 to 18:59. Selected LCR will be used from 1 of January till 28 of February at time from 09:00 till 18:59.&lt;br /&gt;
# Select just '''Hour : Minute''' from 19:00 to 08:59 and selected LCR will be used every day at time from 19:00 till 08:59.&lt;br /&gt;
# Select '''Weekday''' from Monday to Friday and choose '''Hour : Minute''' from 13:00 to 15:59. Selected LCR will be used  every week from Monday till Friday at time from 13:00 till 15:59.&lt;br /&gt;
# Select '''Date''' from 1 of January to 31 of January and '''Weekday''' from Monday to Monday. Selected LCR will be used every Monday in January.&lt;br /&gt;
&lt;br /&gt;
If two periods overlap, then it is an undefined condition. There is no algorithm to prioritize one line over another. Avoid the overlap to ensure that the right LCR is used.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCR Loss Calls===&lt;br /&gt;
It is possible to enable Loss Calls per LCR. The default setting - unchecked.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:LCR_loss_calls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This setting allows you to decide whether you want to allow users a provider if the provider's rate to a destination is higher than the user's rate.&lt;br /&gt;
&lt;br /&gt;
By allowing such a call, you will pay more to the provider than the user pays to you for it, which means that you will take a loss on the call.&lt;br /&gt;
&lt;br /&gt;
==Copying LCRs between resellers==&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
Sometimes you need to make a LCR which takes quite a long time to make. If you have made a similar one before you can just copy it and change appropriate details. &lt;br /&gt;
&lt;br /&gt;
Go to '''SETTINGS''' -&amp;gt; '''Billing''' -&amp;gt; '''LCR''' -&amp;gt; '''Copy LCR'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_copy_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You will see this window:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Choose ''Original LCR reseller'' and ''Cloned LCR reseller'' and click ''Clone'' button.&lt;br /&gt;
&lt;br /&gt;
Please note that LCR will not be allowed to copy if reseller B is not allowed to use Providers which are used by Reseller A.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[LCR Logic]]&lt;br /&gt;
* [[How to add Provider to LCR]]&lt;br /&gt;
* [[Call Routing by price]]&lt;br /&gt;
* [[Call Routing by priority (Manual LCR) | Call Routing by priority ]]&lt;br /&gt;
* [[Routing by Percent | Call Routing by percent]] or Weight-based routing&lt;br /&gt;
* [[Call routing per destination basis]]&lt;br /&gt;
* [[LCR/Tariff change based on call prefix]]&lt;br /&gt;
* [[Why call was not routed through other provider/trunk?|Why was a call not routed through another provider/trunk?]]&lt;br /&gt;
* [[LCR_make_tariff|Make Tariff from LCR Providers to CSV]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=LCR&amp;diff=30763</id>
		<title>LCR</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=LCR&amp;diff=30763"/>
		<updated>2025-12-12T08:56:15Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* LCR Time Periods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
LCR (Least Cost Routing) is a set of Providers that should be used to send a call when trying to dial any destination - for example, by the cheapest rate. &lt;br /&gt;
&lt;br /&gt;
The correct name for such a function is a Routing Table because the function supports other ways of routing, not just finding the cheapest route.&lt;br /&gt;
&lt;br /&gt;
By default LCR supports fail-over. That is, if one provider fails, the next one is dialed. This is completely invisible for the caller and lets you increase the chances of the user reaching his destination. If one Provider is not capable of delivering a call, the system will try to use the remaining [[How_to_add_Provider_to_LCR | Providers]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Fail-over explanation==&lt;br /&gt;
&lt;br /&gt;
=== Use only first Provider in the row ===&lt;br /&gt;
&lt;br /&gt;
This option can allow/deny failover for LCR.&lt;br /&gt;
&lt;br /&gt;
When it is enabled it only allows the first Provider in the Routing Table/LCR to be used.&lt;br /&gt;
&lt;br /&gt;
Please note that when using ANI Authentication, a second query is made to get LCR info.&lt;br /&gt;
If this option is set to &amp;quot;Yes&amp;quot; on the first query, the second query will not change it.&lt;br /&gt;
&lt;br /&gt;
In other words - if the first LCR denies Failover, the second ANI LCR can't enable Failover.&lt;br /&gt;
&lt;br /&gt;
This is by design to avoid situations where the misconfiguration can create loops in the call flow.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
With such configuration:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:lcr_fo_case1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
System will do following:&lt;br /&gt;
&lt;br /&gt;
* system tries to use &amp;quot;Kolmisoft PREMIUM&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* if above fails, system tries to use &amp;quot;Kolmisoft STANDARD&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* end.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With such configuration:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:lcr_fo_case2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
System will do following:&lt;br /&gt;
* system tries to use &amp;quot;Kolmisoft PREMIUM&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* end.&lt;br /&gt;
&lt;br /&gt;
NOTE: if the original User is being changed by ANI, and if the original User has &amp;quot;Use only first Provider in the row&amp;quot; set to YES on its LCR, then even if resulting User LCR has &amp;quot;Use only first Provider in the row&amp;quot; set to NO, the system will act as it is set to YES. (See description above why it is so)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With such configuration:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:lcr_fo_case3.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The system will do the following:&lt;br /&gt;
* system tries to use &amp;quot;Kolmisoft PREMIUM&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* if above fails, the system tries to use &amp;quot;Kolmisoft STANDARD&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* if above fails, the system tries to use provider &amp;quot;112&amp;quot; even if its rate is higher than User rate;&lt;br /&gt;
&lt;br /&gt;
* end.&lt;br /&gt;
&lt;br /&gt;
It is possible to change User's tariff when the Failover provider is used. By default, the current User's tariff is used.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:failover_provider_user_tariff.png]]&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 '''SETTINGS –&amp;gt; Billing –&amp;gt; LCR'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see the list off all LCRs&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_main.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* Name – name of LCR.&lt;br /&gt;
* Order – type of routing mode.&lt;br /&gt;
* Providers – quantity of providers in LCR. Click on it to [[How_to_add_Provider_to_LCR | Add Providers to LCR]]&lt;br /&gt;
* [[Call_routing_per_destination_basis | By destination]]&lt;br /&gt;
* Usage Details – the list of Users and Card Groups where this LCR is used.&lt;br /&gt;
* [[LCR make tariff | Make Tariff from LCR Providers to CSV]] – feature that gets you a CSV with the MIN/MAX prices selected from the list of Providers in LCR. Click on the [[Image:excel.png]] icon and the download should start automatically. (De-activated provider will be taken into CSV. &amp;quot;by Destination&amp;quot; will not be taken into CSV)&lt;br /&gt;
* LCR copy – press on icon to make LCR copy.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Supported routing modes==&lt;br /&gt;
&lt;br /&gt;
* [[Call Routing by price|By Price]] - cheapest first (Least Cost Routing).&lt;br /&gt;
* [[Call Routing by priority (Manual LCR) | By priority]].&lt;br /&gt;
* [[Routing by Percent| By percent]] or Weight-based routing.&lt;br /&gt;
&lt;br /&gt;
The user has one base LCR, so that all his calls are routed by some preset rule.&lt;br /&gt;
&lt;br /&gt;
It is possible to route different destinations for a User using [[Call routing per destination basis]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Creation==&lt;br /&gt;
Press [[Image:icon_add.png]]'''New LCR''' to create LCR.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== VIDEO: How to create LCR ===&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/7sCaBH35hXc&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;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Additional Configuration==&lt;br /&gt;
&lt;br /&gt;
Go to LCRs list and press [[image:icon_edit.png]] icon. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_time_periods.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''First Providers percent limit''' - visible when order by Price is selected. If the following Providers will have higher prices by this percent compared to the first Provider, these Providers will be skipped. 0 value disables the use of this setting.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Minimal Rate Margin Percent''' - use only those Providers which generate profit (per minute) equal or higher than defined percentage value in this field. For example, if you pay to your Provider 1 EUR/min and your Minimal Rate Margin Percent is set to 50%, then only calls with a user rate equal to or higher than 1.5 EUR/min are allowed to call. After 1 min of call, you will pay 1 EUR to your provider, and the user will pay you 1.5 EUR. Your profit will be 0.5 EUR which is 50% more of what you paid to your Provider. If your Minimal Rate Margin is -30%, then you allow some losses in your calls. If you pay 1 EUR to your Provider after 1 minute of call, then the user should pay you 0.7 EUR or more. You will pay 1 EUR and you will get 0.7 EUR which is 30% less than what you paid.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===LCR Time Periods===&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR X4---&amp;gt;&lt;br /&gt;
Sometimes there is such demand to change LCR for some time period. This functionality gives you the ability to do that. In the LCR Edit page time periods can be set. &lt;br /&gt;
&lt;br /&gt;
The time period defines the exact time period LCR will be active. There is a limit of five periods in one LCR. The rest of the time will be used the main LCR.&lt;br /&gt;
&lt;br /&gt;
The timezone in Time Periods is in the Server's (Linux) timezone.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Examples'''&lt;br /&gt;
&lt;br /&gt;
# Select '''Date''' from 1 of January to 28 of February and choose '''Hour : Minute''' from 09:00 to 18:59. Selected LCR will be used from 1 of January till 28 of February at time from 09:00 till 18:59.&lt;br /&gt;
# Select just '''Hour : Minute''' from 19:00 to 08:59 and selected LCR will be used every day at time from 19:00 till 08:59.&lt;br /&gt;
# Select '''Weekday''' from Monday to Friday and choose '''Hour : Minute''' from 13:00 to 15:59. Selected LCR will be used  every week from Monday till Friday at time from 13:00 till 15:59.&lt;br /&gt;
# Select '''Date''' from 1 of January to 31 of January and '''Weekday''' from Monday to Monday. Selected LCR will be used every Monday in January.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LCR Loss Calls===&lt;br /&gt;
It is possible to enable Loss Calls per LCR. The default setting - unchecked.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:LCR_loss_calls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This setting allows you to decide whether you want to allow users a provider if the provider's rate to a destination is higher than the user's rate.&lt;br /&gt;
&lt;br /&gt;
By allowing such a call, you will pay more to the provider than the user pays to you for it, which means that you will take a loss on the call.&lt;br /&gt;
&lt;br /&gt;
==Copying LCRs between resellers==&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
Sometimes you need to make a LCR which takes quite a long time to make. If you have made a similar one before you can just copy it and change appropriate details. &lt;br /&gt;
&lt;br /&gt;
Go to '''SETTINGS''' -&amp;gt; '''Billing''' -&amp;gt; '''LCR''' -&amp;gt; '''Copy LCR'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_copy_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You will see this window:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:lcr_copy.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Choose ''Original LCR reseller'' and ''Cloned LCR reseller'' and click ''Clone'' button.&lt;br /&gt;
&lt;br /&gt;
Please note that LCR will not be allowed to copy if reseller B is not allowed to use Providers which are used by Reseller A.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[LCR Logic]]&lt;br /&gt;
* [[How to add Provider to LCR]]&lt;br /&gt;
* [[Call Routing by price]]&lt;br /&gt;
* [[Call Routing by priority (Manual LCR) | Call Routing by priority ]]&lt;br /&gt;
* [[Routing by Percent | Call Routing by percent]] or Weight-based routing&lt;br /&gt;
* [[Call routing per destination basis]]&lt;br /&gt;
* [[LCR/Tariff change based on call prefix]]&lt;br /&gt;
* [[Why call was not routed through other provider/trunk?|Why was a call not routed through another provider/trunk?]]&lt;br /&gt;
* [[LCR_make_tariff|Make Tariff from LCR Providers to CSV]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=CDR_Export_Templates&amp;diff=30727</id>
		<title>CDR Export Templates</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=CDR_Export_Templates&amp;diff=30727"/>
		<updated>2025-12-02T13:25:13Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* How to download CDR by template */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Funcionality can be used '''only''' by system Administrator.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
CDR Export Templates allow to create templates with specific columns for CSV files. These templates can be used to export CDRs from Last Calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==How to download CDR by template==&lt;br /&gt;
&lt;br /&gt;
Go to '''SETTINGS -&amp;gt; Billing -&amp;gt; CDR -&amp;gt; Export -&amp;gt; Templates''' and create new template with columns that you want to export.&lt;br /&gt;
&lt;br /&gt;
[[File:Cdr_export_templates.png]]&lt;br /&gt;
&lt;br /&gt;
Now if you go to Last Calls, you should be able to see '''Export to Template''' button:&lt;br /&gt;
&lt;br /&gt;
[[File:Last calls cdr export template.png]]&lt;br /&gt;
&lt;br /&gt;
If the Export button is greyed out, it means that Email sending is not enabled or not configured correctly. In such a case, please  [[Configuration_from_GUI#Emails|configure email]].&lt;br /&gt;
&lt;br /&gt;
By pressing '''Export''', you will be able to specify who should receive CDR CSV archive:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Export to template email.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You may choose to send CDR to Admin (yourself) and/or specific User (CDR will be sent to User's email) and/or specific email/emails (additional emails can be added by separating them with ; for example john@email.com; smith@email.com). After specifying Emails, all CDRs by specified filters will be exported to CSV file and only columns from CDR Template will be included.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' archive size is limited to 10MB! If CDR archive is larger, then archive will not be sent back. [[Automatic_CDR_Export|Automatic CDR Export]] allows export to FTP or SFTP instead of an email, and it can be used for files over 10MB.&lt;br /&gt;
&lt;br /&gt;
===Available columns===&lt;br /&gt;
&lt;br /&gt;
* '''Accountcode''' - ID of Originator (Device ID);&lt;br /&gt;
* '''Anwser Time''' - answer time of the call;&lt;br /&gt;
* '''Billsec''' - billable duration (from answer to hangup) excluding minimal time and increment;&lt;br /&gt;
* '''Billsec after Flat Rates adjustment''' - billable duration (from answer to hangup) excluding minimal time and increment after Flat Rates adjustment;&lt;br /&gt;
* '''Call ID''' - call id in MOR system;&lt;br /&gt;
* '''Called From''' - Originator's number (CallerID), for example &amp;quot;John Smith&amp;quot; &amp;lt;123456789&amp;gt;;&lt;br /&gt;
* '''Called To''' - localized destination number;&lt;br /&gt;
* '''Card ID''' - Card ID;&lt;br /&gt;
* '''DID Billsec''' - DID billable duration;&lt;br /&gt;
* '''DID Device ID''' - ID of Device which received call;&lt;br /&gt;
* '''DID Incoming Billsec''' - DID Billsec rounded by DID Incoming Tariff increment;&lt;br /&gt;
* '''DID Incoming Price''' - DID price which is paid by the user who is dialing to that DID;&lt;br /&gt;
* '''DID Number''' - DID Number;&lt;br /&gt;
* '''DID Owner Billsec''' - DID Billsec rounded by DID Owner Rate increment;&lt;br /&gt;
* '''DID Price''' - DID price which is paid by the user who owns dialed DID;&lt;br /&gt;
* '''DID Provider ID''' - DID Provider ID;&lt;br /&gt;
* '''DID Provider Billsec''' - DID Billsec rounded by DID Provider's Rate increment;&lt;br /&gt;
* '''DID Provider Price''' - DID Provider Price;&lt;br /&gt;
* '''DID User ID''' - ID of User who received DID call;&lt;br /&gt;
* '''Date''' - date and time when call was started (first INVITE packet);&lt;br /&gt;
* '''Destination''' - Direction and Destination name of dialed destination;&lt;br /&gt;
* '''Destination Name''' - only Destination name (without Direction name);&lt;br /&gt;
* '''Destination Number''' - original destination number (including technical prefixes);&lt;br /&gt;
* '''Direction Name''' - only Direction name (without Destination name);&lt;br /&gt;
* '''Disposition''' - call disposition (ANSWERED, BUSY, NO ANSWER or FAILED);&lt;br /&gt;
* '''Duration''' - call duration from first INVITE to BYE;&lt;br /&gt;
* '''End Time''' - end time of the call&lt;br /&gt;
* '''Forwarded Call DID Number''' - if call has been forwarded, this field will show DID number (Leg A of call) which was dialed before call was forwarded.&lt;br /&gt;
* '''Hangup Cause''' - reason why call ended (Disposition + Hangup Cause Code, for example ANSWERED(16));&lt;br /&gt;
* '''Hangup Cause Code''' - reason why call ended (only numeric value, for example 16);&lt;br /&gt;
* '''Origin Country'''&lt;br /&gt;
* '''Originator Codec''' - Codec used by Originator;&lt;br /&gt;
* '''Originator IP''' - Originator's IP address;&lt;br /&gt;
* '''PAI Number''' - P-Asserted-Identity header's number part. This column available only if pai column exist in calls table;&lt;br /&gt;
* '''Partner Billsec''' - billable duration (from answer to hangup) including Partner's increment and minimal time;&lt;br /&gt;
* '''Partner ID''' - ID of Partner in MOR system;&lt;br /&gt;
* '''Partner Price''' - call price by Partner's Tariff;&lt;br /&gt;
* '''Partner Rate''' - call rate by Partner's Tariff;&lt;br /&gt;
* '''Prefix''' - prefix used to find rate;&lt;br /&gt;
* '''Profit''' - Admin's Profit;&lt;br /&gt;
* '''Provider''' - name of Provider;&lt;br /&gt;
* '''Provider Billsec''' - billable duration (from answer to hangup) including Provider's increment and minimal time;&lt;br /&gt;
* '''Provider ID''' - ID of Provider in MOR system;&lt;br /&gt;
* '''Provider Price''' - call price by Provider's Tariff;&lt;br /&gt;
* '''Provider Rate''' - call rate by Provider's Tariff;&lt;br /&gt;
* '''Real Billsec''' - same as Billsec but in decimal (more precise);&lt;br /&gt;
* '''Real Duration''' - same as Duration but in decimal (more precise);&lt;br /&gt;
* '''Reseller''' - name of Reseller;&lt;br /&gt;
* '''Reseller Billsec''' - ID of Reseller in MOR system;&lt;br /&gt;
* '''Reseller ID''' - billable duration (from answer to hangup) including Reseller's increment and minimal time;&lt;br /&gt;
* '''Reseller Price''' - call price by Reseller's Tariff;&lt;br /&gt;
* '''Reseller Rate''' - call rate by Reseller's Tariff;&lt;br /&gt;
* '''Server ID''' - ID of server which was used to make call;&lt;br /&gt;
* '''Source Number''' - Originator's number part of CalleID;&lt;br /&gt;
* '''Start Time''' - start time of the call;&lt;br /&gt;
* '''Terminator Codec''' - Codec used by Terminator;&lt;br /&gt;
* '''Terminator IP''' - Terminator's IP address;&lt;br /&gt;
* '''Unique ID''' - uniqueid of call in MOR system;&lt;br /&gt;
* '''User''' - name of User;&lt;br /&gt;
* '''User Billsec''' - billable duration (from answer to hangup) including User's increment and minimal time;&lt;br /&gt;
* '''User ID''' - ID of User in MOR system;&lt;br /&gt;
* '''User Price''' - call price by User's Tariff;&lt;br /&gt;
* '''User Rate''' - call rate by User's Tariff.&lt;br /&gt;
* '''DID Reseller ID''' - ID of a reseller.&lt;br /&gt;
* '''DID Reseller'''- name of a reseller.&lt;br /&gt;
* '''User First Name/Company Name''' - the value is taken from User settings, section Details.&lt;br /&gt;
* '''User Last Name''' - the value is taken from User settings, section Details.&lt;br /&gt;
* '''User Company/Personal ID''' - the value is taken from User settings, section Details.&lt;br /&gt;
* '''User Agreement Number''' - the value is taken from User settings, section Details.&lt;br /&gt;
* '''User Accounting Number''' - the value is taken from User settings, section Details.&lt;br /&gt;
&lt;br /&gt;
==Email Templates==&lt;br /&gt;
&lt;br /&gt;
If archive is sent successfully, System administrator should receive success email which can be customised in [[Emails]] settings. CDR archive will be attached.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= See also =&lt;br /&gt;
* [[How to export CDRs]]&lt;br /&gt;
* [[Automatic CDR Export]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_STIR/SHAKEN&amp;diff=30703</id>
		<title>MOR STIR/SHAKEN</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_STIR/SHAKEN&amp;diff=30703"/>
		<updated>2025-11-27T09:41:52Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=About=&lt;br /&gt;
&lt;br /&gt;
MOR supports STIR/SHAKEN authentication (construction of the SIP Identity header).&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
* '''MOR X19'''&lt;br /&gt;
** '''Rocky 9 OS'''&lt;br /&gt;
** '''Latest Asterisk 20''' (must be compiled after Mar 23, 2025)&lt;br /&gt;
** '''MOR Core 29.x.x'''&lt;br /&gt;
** '''PJSIP''' (STIR/SHAKEN works only with PJSIP Devices/Providers)&lt;br /&gt;
* '''Private key'''&lt;br /&gt;
* '''Public certificate''' (.pem file or URL to certificate)&lt;br /&gt;
&lt;br /&gt;
Kolmisoft does not provide private key and public certificate. STIR/SHAKEN public certificate must be acquired from STIR/SHAKEN authorities.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
==Global configuration==&lt;br /&gt;
&lt;br /&gt;
Global STIR/SHAKEN configuration is located in SETTINGS -&amp;gt; Setup -&amp;gt; STIR/SHAKEN.&lt;br /&gt;
&lt;br /&gt;
[[image:mor_stirshaken_global_conf.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Private Key''' - path to private key which was used to acquire STIR/SHAKEN certificate. Private key must be located in this path in all Asterisk servers.&lt;br /&gt;
* '''Certificate Location'''&lt;br /&gt;
** '''Local''' - STIR/SHAKEN certificate will be uploaded and hosted in MOR server (GUI server). SIP Identity header will contain URL to certificate: YOUR_HOSTNAME/billing/cert.pem&lt;br /&gt;
** '''External''' - external STIR/SHAKEN certificate URL will be used to construct SIP Identity header.&lt;br /&gt;
* '''Attestation A Number Pool''' - number pool to use as list of A attested CLI numbers. Calls from these numbers will have SIP Identity header with A attestation level.&lt;br /&gt;
* '''Attestation B Number Pool''' - number pool to use as list of B attested CLI numbers. Calls from these numbers will have SIP Identity header with B attestation level.&lt;br /&gt;
* '''Attestation C Number Pool''' - number pool to use as list of C attested CLI numbers. Calls from these numbers will have SIP Identity header with C attestation level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Note: wildcards are not supported in Attestation number pools. The only valid characters are the numbers 0-9, # and *.&lt;br /&gt;
&lt;br /&gt;
==Device/Provider configuration==&lt;br /&gt;
&lt;br /&gt;
STIR/SHAKEN attestation can be enabled in [https://wiki.kolmisoft.com/index.php/Device_settings Device] or [https://wiki.kolmisoft.com/index.php/Providers Provider] Advanced settings:&lt;br /&gt;
&lt;br /&gt;
[[image:mor_stirshaken_device_provider_settings.png]]&lt;br /&gt;
&lt;br /&gt;
* '''STIR/SHAKEN Attestation''' &lt;br /&gt;
** '''None''' - no STIR/SHAKEN attestation is performed.&lt;br /&gt;
** '''By Number''' - STIR/SHAKEN attestation will depend '''only''' on CLI numbers configured in global '''Attestation X Number Pool''' settings. All CLIs without a configured STIR/SHAKEN attestation level will be ignored - no SIP Identity header will be added (call will be routed normally).&lt;br /&gt;
** '''A''', '''B''', '''C''' - attestation level to use when CLI is not found in global '''Attestation X Number Pool'''.&lt;br /&gt;
&lt;br /&gt;
==Updating Certificate==&lt;br /&gt;
&lt;br /&gt;
STIR/SHAKEN certificates have an expiration date. When the new certificate is obtained, it must be either uploaded again to GUI server or external URL to this certificate updated.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
To test STIR/SHAKEN functionality, you can create self-signed certificate. '''This certificate will not be accepted by any service provider, use it for testing only.''' In production environment, proper STIR/SHAKEN certificate must be obtained from STIR/SHAKEN Certificate Authorities by following their instructions.&lt;br /&gt;
&lt;br /&gt;
Bellow are the steps to create self-signed STIR/SHAKEN certificate for testing purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Login to Asterisk server.&lt;br /&gt;
&lt;br /&gt;
2. Create directory for keys as certificate authority (CA):&lt;br /&gt;
&lt;br /&gt;
 mkdir /etc/asterisk/stir-shaken-ca&lt;br /&gt;
&lt;br /&gt;
3. Go to CA directory:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/asterisk/stir-shaken-ca&lt;br /&gt;
&lt;br /&gt;
4. Generate private key using Elliptic-Curve cryptography:&lt;br /&gt;
&lt;br /&gt;
 openssl ecparam -noout -name prime256v1 -genkey -out ca-key.pem&lt;br /&gt;
&lt;br /&gt;
5. Generate certificate (public key). When asked for input, just press ENTER to skip filling details:&lt;br /&gt;
&lt;br /&gt;
 openssl req -x509 -new -nodes -key ca-key.pem -sha256 -days 1825 -out ca-cert.pem&lt;br /&gt;
&lt;br /&gt;
6. Create directory for keys as service provider (SP):&lt;br /&gt;
&lt;br /&gt;
 mkdir /etc/asterisk/stir-shaken-sp&lt;br /&gt;
&lt;br /&gt;
7. Go to SP directory:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/asterisk/stir-shaken-sp&lt;br /&gt;
&lt;br /&gt;
8. Generate private key:&lt;br /&gt;
&lt;br /&gt;
 openssl ecparam -noout -name prime256v1 -genkey -out sp-key.pem&lt;br /&gt;
&lt;br /&gt;
9. Generate TNAuthList:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; TNAuthList.conf &amp;lt;&amp;lt; EOF &lt;br /&gt;
 asn1=SEQUENCE:tn_auth_list &lt;br /&gt;
 [tn_auth_list] &lt;br /&gt;
 field1=EXP:0,IA5:1001 &lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
10. Generate .der file:&lt;br /&gt;
&lt;br /&gt;
 openssl asn1parse -genconf TNAuthList.conf -out TNAuthList.der &lt;br /&gt;
&lt;br /&gt;
11. Generate openssl.conf:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; openssl.conf &amp;lt;&amp;lt; EOF &lt;br /&gt;
 [ req ] &lt;br /&gt;
 distinguished_name = req_distinguished_name &lt;br /&gt;
 req_extensions = v3_req &lt;br /&gt;
 [ req_distinguished_name ] &lt;br /&gt;
 commonName = &amp;quot;SHAKEN&amp;quot; &lt;br /&gt;
 [ v3_req ] &lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
12. Append hex-encoded TNAuthList to openssl.conf:&lt;br /&gt;
&lt;br /&gt;
 od -An -t x1 -w TNAuthList.der | sed -e 's/ /:/g' -e 's/^/1.3.6.1.5.5.7.1.26=DER/' &amp;gt;&amp;gt; openssl.conf &lt;br /&gt;
&lt;br /&gt;
13. Generate a Certificate Signing Request (CSR), which we will finally &amp;quot;submit&amp;quot; to our Certification Authority (CA):&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -key sp-key.pem -keyform PEM -subj '/C=US/ST=VA/L=Somewhere/O=MOR, Inc./OU=VOIP/CN=SHAKEN' -sha256 -config openssl.conf -out sp-csr.pem&lt;br /&gt;
&lt;br /&gt;
14. As the Certification Authority (CA), we accept the CSR, then generate and sign the STIR/SHAKEN certificate:&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -req -in sp-csr.pem -CA /etc/asterisk/stir-shaken-ca/ca-cert.pem -CAkey /etc/asterisk/stir-shaken-ca/ca-key.pem -CAcreateserial -days 825 -sha256 -extfile openssl.conf -extensions v3_req -out sp-cert.pem&lt;br /&gt;
&lt;br /&gt;
15. Copy certificate to GUI server's public directory /home/mor/public with the name cert.pem (or transfer via FTP if GUI is in another server):&lt;br /&gt;
&lt;br /&gt;
 cp -f /etc/asterisk/stir-shaken-sp/sp-cert.pem /home/mor/public/cert.pem&lt;br /&gt;
&lt;br /&gt;
16. Set private key '''/etc/asterisk/stir-shaken-sp/sp-key.pem''' in GUI Global STIR/SHAKEN settings and make sure &amp;quot;Certificate location&amp;quot; is set to &amp;quot;Local&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
17. If needed, configure Attestation Number Pools.&lt;br /&gt;
&lt;br /&gt;
18. In PJSIP Provider settings, set STIR/SHAKEN Attestation to &amp;quot;By Number&amp;quot; / &amp;quot;A&amp;quot; / &amp;quot;B&amp;quot; / &amp;quot;C&amp;quot;, depending on your scenario.&lt;br /&gt;
&lt;br /&gt;
19. Make a call to this Provider and using sngrep (or any other packet tracer), check the outgoing SIP INVITE, you should see SIP '''Identity''' header similar to this:&lt;br /&gt;
&lt;br /&gt;
 Identity: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cDovLzE5Mi4xNjguMC4xNS9iaWxsaW5nL2NlcnQucGVtIn0.eyJhdHRlc3QiOiJDIiwiZGVzdCI6eyJ0biI6WyIzNzAxMjM0NTY3OCJdfSwiaWF0IjoxNzUwNDU2MzcxLCJvcmlnIjp7InRuIjoiMzcwMDAwMDAwMDAifSwib3JpZ2lkIjoiZDVjNDFmNzMtYjZjZC00MmUzLTlkMDYtYzZmZTIxM2ZiMDdiIn0.z0Cj_0_yrSkPc55q7HEhIZrrNCidckF69Tn9gpLdntQsCJ6AW1T-bpI88lAfRC4-ItnV7MZkw8BJyewUdy52ag;info=&amp;lt;http://192.168.0.15/billing/cert.pem&amp;gt;;alg=ES256;ppt=shaken&lt;br /&gt;
&lt;br /&gt;
The most important part is JWT token:&lt;br /&gt;
&lt;br /&gt;
 eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cDovLzE5Mi4xNjguMC4xNS9iaWxsaW5nL2NlcnQucGVtIn0.eyJhdHRlc3QiOiJDIiwiZGVzdCI6eyJ0biI6WyIzNzAxMjM0NTY3OCJdfSwiaWF0IjoxNzUwNDU2MzcxLCJvcmlnIjp7InRuIjoiMzcwMDAwMDAwMDAifSwib3JpZ2lkIjoiZDVjNDFmNzMtYjZjZC00MmUzLTlkMDYtYzZmZTIxM2ZiMDdiIn0.z0Cj_0_yrSkPc55q7HEhIZrrNCidckF69Tn9gpLdntQsCJ6AW1T-bpI88lAfRC4-ItnV7MZkw8BJyewUdy52ag&lt;br /&gt;
&lt;br /&gt;
It consists of three base64url-encoded parts separated by a dot:&lt;br /&gt;
&lt;br /&gt;
 header.payload.signature&lt;br /&gt;
&lt;br /&gt;
Copy this JWT token to any online JWT decoder to see its contents:&lt;br /&gt;
&lt;br /&gt;
'''Decoded header'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;alg&amp;quot;: &amp;quot;ES256&amp;quot;,&lt;br /&gt;
   &amp;quot;ppt&amp;quot;: &amp;quot;shaken&amp;quot;,&lt;br /&gt;
   &amp;quot;typ&amp;quot;: &amp;quot;passport&amp;quot;,&lt;br /&gt;
   &amp;quot;x5u&amp;quot;: &amp;quot;http://192.168.0.15/billing/cert.pem&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''Decoded payload'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;attest&amp;quot;: &amp;quot;C&amp;quot;,&lt;br /&gt;
   &amp;quot;dest&amp;quot;: {&lt;br /&gt;
     &amp;quot;tn&amp;quot;: [&lt;br /&gt;
       &amp;quot;37012345678&amp;quot;&lt;br /&gt;
     ]&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;iat&amp;quot;: 1750456371,&lt;br /&gt;
   &amp;quot;orig&amp;quot;: {&lt;br /&gt;
     &amp;quot;tn&amp;quot;: &amp;quot;37000000000&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;origid&amp;quot;: &amp;quot;d5c41f73-b6cd-42e3-9d06-c6fe213fb07b&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the payload, we can see that source number '''37000000000''' to destination number '''37012345678''' was attested with '''C''' level.&lt;br /&gt;
&lt;br /&gt;
Decoded signature is omitted from this example.&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_STIR/SHAKEN&amp;diff=30702</id>
		<title>MOR STIR/SHAKEN</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_STIR/SHAKEN&amp;diff=30702"/>
		<updated>2025-11-27T09:38:19Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=About=&lt;br /&gt;
&lt;br /&gt;
MOR supports STIR/SHAKEN authentication (construction of the SIP Identity header).&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
* '''Rocky 9 OS'''&lt;br /&gt;
* '''Latest Asterisk 20''' (must be compiled after Mar 23, 2025)&lt;br /&gt;
* '''MOR X19'''&lt;br /&gt;
* '''MOR Core 29.x.x'''&lt;br /&gt;
* '''PJSIP''' (STIR/SHAKEN works only with PJSIP Devices/Providers)&lt;br /&gt;
* '''Private key'''&lt;br /&gt;
* '''Public certificate''' (.pem file or URL to certificate)&lt;br /&gt;
&lt;br /&gt;
Kolmisoft does not provide private key and public certificate. STIR/SHAKEN public certificate must be acquired from STIR/SHAKEN authorities.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
==Global configuration==&lt;br /&gt;
&lt;br /&gt;
Global STIR/SHAKEN configuration is located in SETTINGS -&amp;gt; Setup -&amp;gt; STIR/SHAKEN.&lt;br /&gt;
&lt;br /&gt;
[[image:mor_stirshaken_global_conf.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Private Key''' - path to private key which was used to acquire STIR/SHAKEN certificate. Private key must be located in this path in all Asterisk servers.&lt;br /&gt;
* '''Certificate Location'''&lt;br /&gt;
** '''Local''' - STIR/SHAKEN certificate will be uploaded and hosted in MOR server (GUI server). SIP Identity header will contain URL to certificate: YOUR_HOSTNAME/billing/cert.pem&lt;br /&gt;
** '''External''' - external STIR/SHAKEN certificate URL will be used to construct SIP Identity header.&lt;br /&gt;
* '''Attestation A Number Pool''' - number pool to use as list of A attested CLI numbers. Calls from these numbers will have SIP Identity header with A attestation level.&lt;br /&gt;
* '''Attestation B Number Pool''' - number pool to use as list of B attested CLI numbers. Calls from these numbers will have SIP Identity header with B attestation level.&lt;br /&gt;
* '''Attestation C Number Pool''' - number pool to use as list of C attested CLI numbers. Calls from these numbers will have SIP Identity header with C attestation level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Note: wildcards are not supported in Attestation number pools. The only valid characters are the numbers 0-9, # and *.&lt;br /&gt;
&lt;br /&gt;
==Device/Provider configuration==&lt;br /&gt;
&lt;br /&gt;
STIR/SHAKEN attestation can be enabled in [https://wiki.kolmisoft.com/index.php/Device_settings Device] or [https://wiki.kolmisoft.com/index.php/Providers Provider] Advanced settings:&lt;br /&gt;
&lt;br /&gt;
[[image:mor_stirshaken_device_provider_settings.png]]&lt;br /&gt;
&lt;br /&gt;
* '''STIR/SHAKEN Attestation''' &lt;br /&gt;
** '''None''' - no STIR/SHAKEN attestation is performed.&lt;br /&gt;
** '''By Number''' - STIR/SHAKEN attestation will depend '''only''' on CLI numbers configured in global '''Attestation X Number Pool''' settings. All CLIs without a configured STIR/SHAKEN attestation level will be ignored - no SIP Identity header will be added (call will be routed normally).&lt;br /&gt;
** '''A''', '''B''', '''C''' - attestation level to use when CLI is not found in global '''Attestation X Number Pool'''.&lt;br /&gt;
&lt;br /&gt;
==Updating Certificate==&lt;br /&gt;
&lt;br /&gt;
STIR/SHAKEN certificates have an expiration date. When the new certificate is obtained, it must be either uploaded again to GUI server or external URL to this certificate updated.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
&lt;br /&gt;
To test STIR/SHAKEN functionality, you can create self-signed certificate. '''This certificate will not be accepted by any service provider, use it for testing only.''' In production environment, proper STIR/SHAKEN certificate must be obtained from STIR/SHAKEN Certificate Authorities by following their instructions.&lt;br /&gt;
&lt;br /&gt;
Bellow are the steps to create self-signed STIR/SHAKEN certificate for testing purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Login to Asterisk server.&lt;br /&gt;
&lt;br /&gt;
2. Create directory for keys as certificate authority (CA):&lt;br /&gt;
&lt;br /&gt;
 mkdir /etc/asterisk/stir-shaken-ca&lt;br /&gt;
&lt;br /&gt;
3. Go to CA directory:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/asterisk/stir-shaken-ca&lt;br /&gt;
&lt;br /&gt;
4. Generate private key using Elliptic-Curve cryptography:&lt;br /&gt;
&lt;br /&gt;
 openssl ecparam -noout -name prime256v1 -genkey -out ca-key.pem&lt;br /&gt;
&lt;br /&gt;
5. Generate certificate (public key). When asked for input, just press ENTER to skip filling details:&lt;br /&gt;
&lt;br /&gt;
 openssl req -x509 -new -nodes -key ca-key.pem -sha256 -days 1825 -out ca-cert.pem&lt;br /&gt;
&lt;br /&gt;
6. Create directory for keys as service provider (SP):&lt;br /&gt;
&lt;br /&gt;
 mkdir /etc/asterisk/stir-shaken-sp&lt;br /&gt;
&lt;br /&gt;
7. Go to SP directory:&lt;br /&gt;
&lt;br /&gt;
 cd /etc/asterisk/stir-shaken-sp&lt;br /&gt;
&lt;br /&gt;
8. Generate private key:&lt;br /&gt;
&lt;br /&gt;
 openssl ecparam -noout -name prime256v1 -genkey -out sp-key.pem&lt;br /&gt;
&lt;br /&gt;
9. Generate TNAuthList:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; TNAuthList.conf &amp;lt;&amp;lt; EOF &lt;br /&gt;
 asn1=SEQUENCE:tn_auth_list &lt;br /&gt;
 [tn_auth_list] &lt;br /&gt;
 field1=EXP:0,IA5:1001 &lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
10. Generate .der file:&lt;br /&gt;
&lt;br /&gt;
 openssl asn1parse -genconf TNAuthList.conf -out TNAuthList.der &lt;br /&gt;
&lt;br /&gt;
11. Generate openssl.conf:&lt;br /&gt;
&lt;br /&gt;
 cat &amp;gt; openssl.conf &amp;lt;&amp;lt; EOF &lt;br /&gt;
 [ req ] &lt;br /&gt;
 distinguished_name = req_distinguished_name &lt;br /&gt;
 req_extensions = v3_req &lt;br /&gt;
 [ req_distinguished_name ] &lt;br /&gt;
 commonName = &amp;quot;SHAKEN&amp;quot; &lt;br /&gt;
 [ v3_req ] &lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
12. Append hex-encoded TNAuthList to openssl.conf:&lt;br /&gt;
&lt;br /&gt;
 od -An -t x1 -w TNAuthList.der | sed -e 's/ /:/g' -e 's/^/1.3.6.1.5.5.7.1.26=DER/' &amp;gt;&amp;gt; openssl.conf &lt;br /&gt;
&lt;br /&gt;
13. Generate a Certificate Signing Request (CSR), which we will finally &amp;quot;submit&amp;quot; to our Certification Authority (CA):&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -nodes -key sp-key.pem -keyform PEM -subj '/C=US/ST=VA/L=Somewhere/O=MOR, Inc./OU=VOIP/CN=SHAKEN' -sha256 -config openssl.conf -out sp-csr.pem&lt;br /&gt;
&lt;br /&gt;
14. As the Certification Authority (CA), we accept the CSR, then generate and sign the STIR/SHAKEN certificate:&lt;br /&gt;
&lt;br /&gt;
 openssl x509 -req -in sp-csr.pem -CA /etc/asterisk/stir-shaken-ca/ca-cert.pem -CAkey /etc/asterisk/stir-shaken-ca/ca-key.pem -CAcreateserial -days 825 -sha256 -extfile openssl.conf -extensions v3_req -out sp-cert.pem&lt;br /&gt;
&lt;br /&gt;
15. Copy certificate to GUI server's public directory /home/mor/public with the name cert.pem (or transfer via FTP if GUI is in another server):&lt;br /&gt;
&lt;br /&gt;
 cp -f /etc/asterisk/stir-shaken-sp/sp-cert.pem /home/mor/public/cert.pem&lt;br /&gt;
&lt;br /&gt;
16. Set private key '''/etc/asterisk/stir-shaken-sp/sp-key.pem''' in GUI Global STIR/SHAKEN settings and make sure &amp;quot;Certificate location&amp;quot; is set to &amp;quot;Local&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
17. If needed, configure Attestation Number Pools.&lt;br /&gt;
&lt;br /&gt;
18. In PJSIP Provider settings, set STIR/SHAKEN Attestation to &amp;quot;By Number&amp;quot; / &amp;quot;A&amp;quot; / &amp;quot;B&amp;quot; / &amp;quot;C&amp;quot;, depending on your scenario.&lt;br /&gt;
&lt;br /&gt;
19. Make a call to this Provider and using sngrep (or any other packet tracer), check the outgoing SIP INVITE, you should see SIP '''Identity''' header similar to this:&lt;br /&gt;
&lt;br /&gt;
 Identity: eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cDovLzE5Mi4xNjguMC4xNS9iaWxsaW5nL2NlcnQucGVtIn0.eyJhdHRlc3QiOiJDIiwiZGVzdCI6eyJ0biI6WyIzNzAxMjM0NTY3OCJdfSwiaWF0IjoxNzUwNDU2MzcxLCJvcmlnIjp7InRuIjoiMzcwMDAwMDAwMDAifSwib3JpZ2lkIjoiZDVjNDFmNzMtYjZjZC00MmUzLTlkMDYtYzZmZTIxM2ZiMDdiIn0.z0Cj_0_yrSkPc55q7HEhIZrrNCidckF69Tn9gpLdntQsCJ6AW1T-bpI88lAfRC4-ItnV7MZkw8BJyewUdy52ag;info=&amp;lt;http://192.168.0.15/billing/cert.pem&amp;gt;;alg=ES256;ppt=shaken&lt;br /&gt;
&lt;br /&gt;
The most important part is JWT token:&lt;br /&gt;
&lt;br /&gt;
 eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cDovLzE5Mi4xNjguMC4xNS9iaWxsaW5nL2NlcnQucGVtIn0.eyJhdHRlc3QiOiJDIiwiZGVzdCI6eyJ0biI6WyIzNzAxMjM0NTY3OCJdfSwiaWF0IjoxNzUwNDU2MzcxLCJvcmlnIjp7InRuIjoiMzcwMDAwMDAwMDAifSwib3JpZ2lkIjoiZDVjNDFmNzMtYjZjZC00MmUzLTlkMDYtYzZmZTIxM2ZiMDdiIn0.z0Cj_0_yrSkPc55q7HEhIZrrNCidckF69Tn9gpLdntQsCJ6AW1T-bpI88lAfRC4-ItnV7MZkw8BJyewUdy52ag&lt;br /&gt;
&lt;br /&gt;
It consists of three base64url-encoded parts separated by a dot:&lt;br /&gt;
&lt;br /&gt;
 header.payload.signature&lt;br /&gt;
&lt;br /&gt;
Copy this JWT token to any online JWT decoder to see its contents:&lt;br /&gt;
&lt;br /&gt;
'''Decoded header'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;alg&amp;quot;: &amp;quot;ES256&amp;quot;,&lt;br /&gt;
   &amp;quot;ppt&amp;quot;: &amp;quot;shaken&amp;quot;,&lt;br /&gt;
   &amp;quot;typ&amp;quot;: &amp;quot;passport&amp;quot;,&lt;br /&gt;
   &amp;quot;x5u&amp;quot;: &amp;quot;http://192.168.0.15/billing/cert.pem&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''Decoded payload'''&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;attest&amp;quot;: &amp;quot;C&amp;quot;,&lt;br /&gt;
   &amp;quot;dest&amp;quot;: {&lt;br /&gt;
     &amp;quot;tn&amp;quot;: [&lt;br /&gt;
       &amp;quot;37012345678&amp;quot;&lt;br /&gt;
     ]&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;iat&amp;quot;: 1750456371,&lt;br /&gt;
   &amp;quot;orig&amp;quot;: {&lt;br /&gt;
     &amp;quot;tn&amp;quot;: &amp;quot;37000000000&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;origid&amp;quot;: &amp;quot;d5c41f73-b6cd-42e3-9d06-c6fe213fb07b&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the payload, we can see that source number '''37000000000''' to destination number '''37012345678''' was attested with '''C''' level.&lt;br /&gt;
&lt;br /&gt;
Decoded signature is omitted from this example.&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Which_codecs_should_I_choose_for_devices&amp;diff=30701</id>
		<title>Which codecs should I choose for devices</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Which_codecs_should_I_choose_for_devices&amp;diff=30701"/>
		<updated>2025-11-25T12:18:33Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;mkmeta&amp;gt;Codec description and selection advices&amp;lt;/mkmeta&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''It depends.'''&lt;br /&gt;
&lt;br /&gt;
=What codecs are supported?=&lt;br /&gt;
&lt;br /&gt;
Audio:&lt;br /&gt;
&lt;br /&gt;
* '''G.711 A-law'''&lt;br /&gt;
* '''G.711 u-law'''&lt;br /&gt;
* G.723.1&lt;br /&gt;
* G.726&lt;br /&gt;
* '''G.729'''&lt;br /&gt;
* GSM&lt;br /&gt;
* iLBC&lt;br /&gt;
* LPC10&lt;br /&gt;
* Speex&lt;br /&gt;
* ADPCM&lt;br /&gt;
* 16 bit Signed Linear PCM&lt;br /&gt;
&lt;br /&gt;
Video:&lt;br /&gt;
&lt;br /&gt;
* H.261&lt;br /&gt;
* H.263&lt;br /&gt;
* H.263+&lt;br /&gt;
* H.264&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Audio codecs=&lt;br /&gt;
&lt;br /&gt;
Most commonly used are:&lt;br /&gt;
&lt;br /&gt;
* G711 &lt;br /&gt;
* G729&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==G711==&lt;br /&gt;
&lt;br /&gt;
PSTN quality codec which is supported in 99% of all devices/providers (but often disabled to save traffic).&lt;br /&gt;
&lt;br /&gt;
It has best quality but highest bandwidth (64kbps + ~20 kbps overhead ~= 84kbps to one direction).&lt;br /&gt;
&lt;br /&gt;
It comes in 2 flavours - G711u (ulaw) - used in USA, and G711a (alaw) - used mostly in Europe and other countries.&lt;br /&gt;
&lt;br /&gt;
Do not use this codec if you have [[Voice quality]] issues!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==G729==&lt;br /&gt;
&lt;br /&gt;
Little worse quality but is often used because it saves traffic (~8kbps + ~20kbps overhead ~= 28kbps to one direction).&lt;br /&gt;
&lt;br /&gt;
It takes a lot of CPU power to transcode so total call count on the server is greatly reduced using this codec.&lt;br /&gt;
&lt;br /&gt;
It needs to be [[G723/G729_Codec_installation | installed separately and it is not free]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==G722==&lt;br /&gt;
&lt;br /&gt;
* G.722 is a ITU-T standard 7 kHz wideband speech codec operating at 48, 56 and 64 kbit/s. 64 kbit/s (comprises 48, 56 or 64 kbit/s audio and 16, 8 or 0 kbit/s auxiliary data).&lt;br /&gt;
* HD VoIP in the Asterisk world involves selecting the G722 codec for VoIP calls.G722 is known as a wideband codec as opposed to g711 which is narrowband. &lt;br /&gt;
The nice thing about it is that it does not require any more bandwidth than G711. Both require 64kbit/s each way for a 2-way conversation.&lt;br /&gt;
* The difference is that G722 employs compression combined with a higher sample rate to obtain a practical acoustic bandwidth of 50 Hz-7000 Hz as opposed to G711 which has a practical acoustic bandwidth of 200-3000 Hz. &amp;lt;br&amp;gt;&lt;br /&gt;
The difference in voice quality is quite noticeable. Instead of sounding like you are talking into a tin can it now sounds like the other person is in the same room. &amp;lt;br&amp;gt;&lt;br /&gt;
You can hear more subtle nuances in the person’s voice and certain letters/syllables that are hard to distinguish on regular calls become much easier.&amp;lt;br&amp;gt;&lt;br /&gt;
* If one endpoint is using G722 and the other is using G711, the endpoint using G722 will hear better sound quality from the other end but the G711 end will not notice much if any difference.&amp;lt;br&amp;gt;&lt;br /&gt;
* Transcoding overhead between G722 and g711 is minimal. Roughly equivalent to half the transcoding overhead between G711 and GSM. G.722 patents have expired, so it is freely available.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==GSM==&lt;br /&gt;
&lt;br /&gt;
Acceptable codec for poor networks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Video=&lt;br /&gt;
&lt;br /&gt;
Read manual for your device to check which codec is supported on your device.&lt;br /&gt;
&lt;br /&gt;
H263/H264 are most popular.&lt;br /&gt;
&lt;br /&gt;
Make sure same codec is chosen between devices you are trying to communicate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Fax=&lt;br /&gt;
&lt;br /&gt;
If your system/provider/devices does not support T38 you should use G711 codec for fax transmitting/receiving. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
When no codecs are checked, then the system will enable and offer all the codecs.&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;
* [[Change Audio/Video Codecs priority | How to change Audio/Video Codecs priority?]]&lt;br /&gt;
* More about codecs: http://www.cisco.com/en/US/tech/tk652/tk698/technologies_tech_note09186a0080094ae2.shtml&lt;br /&gt;
* G711 vs G729: http://irockasterisk.blogspot.com.es/2011/02/g711-vs-g729-which-one-to-choose.html&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=30700</id>
		<title>Device settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=30700"/>
		<updated>2025-11-25T12:17:48Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Codecs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;mkmeta&amp;gt;MOR Device Settings Explained&amp;lt;/mkmeta&amp;gt;&lt;br /&gt;
=General=&lt;br /&gt;
&lt;br /&gt;
* '''Accountcode''' – the unique ID of the device in the system.&lt;br /&gt;
* '''Description''' – for informational purposes.&lt;br /&gt;
* '''PIN''' – device PIN for authentication/authorization.&lt;br /&gt;
* '''Device group''' – to which group the device belongs (not used most of the time).&lt;br /&gt;
* '''Type''' – what type of device it is. Device type '''cannot''' be changed once it is created.&lt;br /&gt;
* '''Extension''' – a short number by which this device can be reached; must be unique in the system.&lt;br /&gt;
* '''DTMF Mode''' – in which protocol phone button presses are sent over network. The available options are: inband, info, RFC2833, and auto. Choose which one your provider uses (RFC2833 is used most often). This setting applies to SIP, H.323 and IAX2 protocols. For ZAP devices edit the configuration files in /etc/asterisk.&lt;br /&gt;
* '''Location''' – the default is Global. Choose the appropriate location based on [[Localization]] needs.&lt;br /&gt;
* '''Ringing Timeout''' – allows to limit the ringing duration in seconds. Minimal value is 10 seconds. Option is designed for incoming calls.&lt;br /&gt;
* '''Call Timeout''' – allows to limit answered call billsec. Leave 0 for unlimited.&lt;br /&gt;
* '''[[Trunks | Trunk]]''' – No/ Yes/ Yes with ANI/ 3CX – Is this device Trunk with/without ANI, 3CX? The &amp;quot;3CX&amp;quot; option adds rinstance parameter to R-URI which is used on 3CX authentication. In general 3CX option sets R-URI with Contact URI (including all parameters, such as rinstance) but replaces user part with DID number. 3CX option only works for dynamic trunks. More details: https://www.3cx.com/docs/sip-trunk-registration-authentication/&lt;br /&gt;
* '''[[Multi_Server_support | Server]]''' – allows to choose server in multiple servers system. Choose '''''All''''' to assign all servers. Option '''All''' can be used and is shown only for IP Authenticated devices. (While Carrier Class Addon is active, all Virtual and Fax devices are auto-assigned to all present Asterisk servers and cannot be re-assigned. Disabling Carrier Class Addon all Virtual and Fax devices will be assigned to default Asterisk server chosen from Addons &amp;gt; Carrier Class &amp;gt; Settings dropdown).&lt;br /&gt;
* '''Balance''' – a balance of the device. Disabled by default. Balance is decreasing when the User makes calls. Payments does not affect device balance.&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 dahdi devices:===&lt;br /&gt;
&lt;br /&gt;
* '''Channel''' – which channel (or channel group) to use on 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, PJSIP, H323 and IAX2 Devices:===&lt;br /&gt;
&lt;br /&gt;
'''IP Authentication:'''&lt;br /&gt;
* '''Hostname''' – Device hostname. Use &amp;quot;IP Address&amp;quot; instead if you have problems with inbound calls.&lt;br /&gt;
* '''IP Address''' – Device IP address in one of the following formats: &lt;br /&gt;
** '''IP''' – understands simple IPv4 address, IPv4 address with it's Subnet Mask and IPv4 address with it's Range. For example ''192.168.0.1'', ''192.168.0.1/24'' and ''192.168.0.0-255''. Or IPv6 address without a Subnet Mask or Range.&lt;br /&gt;
* '''Accept calls from any port''' – this option lets you receive calls from different Ports. This option is just on SIP (when [[SIP balancer]] in use) and H323.&lt;br /&gt;
* '''Port''' – Device Port.&lt;br /&gt;
&lt;br /&gt;
'''Dynamic:'''&lt;br /&gt;
&lt;br /&gt;
* '''Username''' – username you enter in your Device.&lt;br /&gt;
* '''Password''' – password you enter in your Device.&lt;br /&gt;
* '''IP Address''' – shows Device IP address.&lt;br /&gt;
* '''Port''' – shows Device Port.&lt;br /&gt;
* '''Registration Status''' - available only for SIP  devices. If device is assigned to server A but registers to server B - status will not be shown (devices must register to the server they are assigned to). If no status is displayed - device has not tried to register or no one called to that device. Qualify must enabled if you want to monitor device status.&lt;br /&gt;
* '''UNREGISTER''' - last registration information will be deleted (ipaddr, port, fullcontact).&lt;br /&gt;
* '''Max Contacts''' - only in PJSIP Devices. How many different phones can register to this Device. This option is useful when 'Dial all Contacts' (see below) is enabled. If more phones try to register, then offline/unavailable contacts will be replaced with the new registration contact. Up to 10 contacts are allowed to register.&lt;br /&gt;
* '''Minimum expiration''' - only in PJSIP Devices. Minimum time (in seconds) for SIP registration to be active in MOR. Default value 60 seconds, minimum allowed value 60.&lt;br /&gt;
* '''Maximum expiration''' - only in PJSIP Devices. Maximum time (in seconds) for SIP registration to be active in MOR. Default value 7200 seconds, minimum allowed value 60.&lt;br /&gt;
* '''Dial all Contacts''' - only in PJSIP Devices. Dial all registered phones at once when calling to this Device. This works like a Ring Group - all phones will ring until one answers the call. All other phones will stop ringing once the call is answered elsewhere.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=CallerID=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:device_callerid.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
A CallerID consists of two parts: Name and Number. The &amp;quot;Number&amp;quot; part is transferred by default by all technologies (GSM, PSTN, SIP etc), but the &amp;quot;Name&amp;quot; part is transferred only by 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;
&lt;br /&gt;
* '''Name''' – the &amp;quot;Name&amp;quot; part of the CallerID.&lt;br /&gt;
* '''Number''' – the &amp;quot;Number&amp;quot; part of the CallerID. Only numerical values can be entered in this field. &lt;br /&gt;
&lt;br /&gt;
NOTE: if you leave these fields empty, the user can set the CallerID name by himself. Usually it is not advisable to allow the user do it on his own. If CallerID number field is empty, system will take device username as CallerID number (if device is username/password authenticated).&lt;br /&gt;
&lt;br /&gt;
* '''Number from DID''' - use the DID as the CallerID (only available when the device has DIDs), this option just sets CallerID Number to be equal to DID. Next time you will edit Device's settings, first option - Number will be checked&lt;br /&gt;
&lt;br /&gt;
* '''Control by DIDs (CID from DIDs)''' – only available when the device has DIDs and &amp;quot;Number&amp;quot; field is empty.&lt;br /&gt;
&lt;br /&gt;
This setting lets you control what a CID user can enter in his devices. CID numbers should be from the set of the device's DIDs. They are mainly used when the user's PBX is connected over Trunk and many DIDs are routed to this Trunk. Calls coming out from this PBX must have a CallerID Number from the set of DIDs assigned to this Trunk (PBX). If &amp;quot;CID from DIDs&amp;quot; is checked, the system checks whether the device's CID number is from DIDs assigned to this device. If no DIDs are assigned, this value is ignored. In order for this setting to be active, CID Name/Number fields must be empty to allow the user to enter any CID number he wants. If &amp;quot;CID from DIDs&amp;quot; is checked and user enters any CID (not from his DIDs), the system will change his CID to one of the DIDs assigned to this Device. Original (non Localized) CallerID is used for DID matching.&lt;br /&gt;
&lt;br /&gt;
* '''Control by CIDs'''  – system checks incoming CallerID (Device's [https://wiki.kolmisoft.com/index.php/CLIs_(Incoming_CallerIDs) CLIs], which are set on the Device). If CallerID matches one of the Device's CLIs - then such CallerID will be allowed. If it does not match - it will be changed to the selected CID.&lt;br /&gt;
&lt;br /&gt;
* '''Control by Destination''' – This is advanced option which works by such algorithm:&lt;br /&gt;
&lt;br /&gt;
# system checks Destination and checks DIDs assigned to calling Device. Then it finds 'nearest' DID to the Destination by subtracting DID from Destination in numerical form (Example, DID: 11111, Destination: 11112, |DID-Destination|=|1111-11112|=1) If Device has several DIDs - the lowest value is selected and this DID is set as CallerID.&lt;br /&gt;
#If Device has no DIDs - then User DIDs are used. &lt;br /&gt;
#If Device does not have DIDs and User has no DIDs, then CallerID set in Number field will be used. &lt;br /&gt;
#If nothing is set here - CallerID coming from Device will be used.&lt;br /&gt;
Note: behavior can be [http://wiki.kolmisoft.com/index.php/Mor.conf changed] to search for '''best matching''' DID instead of '''nearest''' DID &lt;br /&gt;
* '''Random Number from Number Pool''' – This functionality gives you an ability to send different caller number on each Call. Available from MOR X4. More information: [http://wiki.kolmisoft.com/index.php/Number_Pool 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;
&lt;br /&gt;
* '''Unknown''' - This option lets you set CallerID number to ''unknown'' and pass a custom CallerID in either RPID or PAI header:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Unknown_cid_rpid_pai.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Random Number from DIDs''' - use a random DID assigned to this device for CallerID.&lt;br /&gt;
* '''Copy Leg A Name to Leg B Number''' – Leg A name will be used as Leg B number.&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;
===For H323:===&lt;br /&gt;
&lt;br /&gt;
* '''Fast start''' – option for faster H.245.&lt;br /&gt;
* '''h245 Tunneling''' – use H.245 without opening a second TCP/IP channel.&lt;br /&gt;
More info you can find [http://toncar.cz/Tutorials/VoIP/VoIP_Protocols_H323_Call_Signalling_Optimizations.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===For SIP and IAX2===&lt;br /&gt;
&lt;br /&gt;
* '''Media control''' – can reinvite. Do you want your server to stay in media path between your clients and your provider? Please note that this option will work only if it is supported from both, device and provider, sides and it allows to handle SIP packets only. Moreover, no codec mismatch between device and provider is available. Default value is ''No''. '''WARNING''': This option can cause [[Call was billed incorrectly|incorrect billing]].&lt;br /&gt;
** canreinvite = yes &amp;quot;allow RTP media direct&amp;quot;&lt;br /&gt;
** canreinvite = no &amp;quot;deny re-invites&amp;quot;&lt;br /&gt;
** canreinvite = nonat &amp;quot;allow reinvite when local, deny reinvite when NAT&amp;quot;&lt;br /&gt;
** canreinvite = update &amp;quot;use UPDATE instead of INVITE&amp;quot;&lt;br /&gt;
** canreinvite = update,nonat &amp;quot;use UPDATE when local, deny when NAT&amp;quot;&lt;br /&gt;
* '''NAT''' – the available options are: yes, no, never, force_rport, comedia. For a detailed explanation of these settings, refer to [http://www.voip-info.org/wiki/view/Asterisk+sip+nat here].&lt;br /&gt;
* '''Qualify''' – how long to wait for a response to Qualify request. Yes / No. More details [http://www.voip-info.org/wiki/view/Asterisk+sip+qualify here] for SIP devices and [http://www.voip-info.org/wiki/view/Asterisk+iax+qualify here] for IAX2 devices.&lt;br /&gt;
**'''Qualify timeout''' – in milliseconds. If you have a lot of Devices in your system, set it to 9000ms or more.&lt;br /&gt;
**'''Qualify frequency''' – in seconds. Default value 60, minimum value 10. Available only for PJSIP devices.&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. Only on IAX2.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Groups=&lt;br /&gt;
&lt;br /&gt;
* [[What are callgroups and pickupgroups | Call Group]] – to which Call Group this device belongs.&lt;br /&gt;
* [[What are callgroups and pickupgroups | Pickup Group]] – which Call Groups this device can pick up.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Voicemail=&lt;br /&gt;
&lt;br /&gt;
* '''Email''' – where to send received Voicemail.&lt;br /&gt;
* '''Password''' – the digital password the user enters when he calls the Voicemail number to hear his messages.&lt;br /&gt;
Voicemail login details are required when the user access Voicemail from outside over DID.&lt;br /&gt;
* '''Enable MWI''' - In telephony, a Message Waiting Indicator (MWI) is a telephone calling feature that illuminates a LED on selected telephones to notify a user of waiting for voicemail messages. It works on most telephone networks and PBXs.&lt;br /&gt;
* '''Subscribe MWI''' - If set to 'no', then Asterisk will send notifications to the phone about new voicemails. If set to 'yes', then the Phone should subscribe to Asterisk to get messages. If MWI does not work on your phone, try to switch this setting on/off.&lt;br /&gt;
* '''Delete VoiceMail after sending it''' – If it is set to 'yes', the VoiceMail will be deleted after it is sent to email.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Language – (in Advanced settings) sets Voicemail language (and IVR language)&lt;br /&gt;
&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;
[[Which codecs should I choose for devices | Choose the codecs]] your provider uses.&lt;br /&gt;
&lt;br /&gt;
NOTES: &lt;br /&gt;
* When no fields are checked, then the system will enable and offer all the codecs.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
* '''Incoming Call Codec preference''' – only in PSJIP Devices. 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 Devices. Codec preference for outgoing calls. [https://wiki.kolmisoft.com/index.php/PJSIP_Codec_negotiation More info].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Allowed Addresses=&lt;br /&gt;
&lt;br /&gt;
Described [[Allowed Addresses | here]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Limits=&lt;br /&gt;
&lt;br /&gt;
Here is possible to set various limits for a device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_device_call_limits.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Separate concurrent Call Limits'''&lt;br /&gt;
**'''Outbound concurrent Call Limit''' - how many outbound simultaneous calls a Device can make?&lt;br /&gt;
**'''Inbound concurrent Call Limit''' - how many inbound simultaneous calls a Device can get?&lt;br /&gt;
*'''One concurrent Call Limit (Outbound + Inbound)''' - how many outbound simultaneous and inbound simultaneous together calls a Device can make?&lt;br /&gt;
*'''Time limit per day''' - Total time available for device per day. When the limit is reached call fails with HGC &amp;quot;239 - Device used its daily call time limit&amp;quot; (total time is calculated after rounding rules and minimal time adjustment, so if the user's tariff has increment higher than 1 or minimal time set, then the total device time may be different than actual call time).&lt;br /&gt;
*'''Time limit per month''' - Total time available for device per month. You can also set the day of the limit reset (the default is 1st day of a month). When the limit is reached, the call fails with HGC &amp;quot;286 - Device used its monthly call time limit&amp;quot; (total time is calculated after rounding rules and minimal time adjustment, so if the user's tariff has increment higher than 1 or minimal time set, then total device time may be different than actual call time).&lt;br /&gt;
*'''(CPS) Limit up to''' - allows setting calls per second limit in some period.&lt;br /&gt;
*'''Hangup Call if PDD is more than'''- set maximum PDD time (in seconds) before call hangup. Note that failover providers will not be used in this case. The call will be hung up completely and will not be passed to other providers in LCR.&lt;br /&gt;
&lt;br /&gt;
=Advanced=&lt;br /&gt;
&lt;br /&gt;
* '''Fromuser/Fromdomain''' – used when calling TO this peer FROM Asterisk. If you're using _register=&amp;gt;_ with another SIP proxy, this setting can come in handy since some SIP networks only allow users in the right domain with the correct user name. &lt;br /&gt;
* '''Trustrpid''' – 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. The default setting is &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;
* [http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+insecure Insecure]&lt;br /&gt;
** port: ignore the port number where the request came from. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
** invite: don't require authentication of incoming INVITEs. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
** port, invite: don't require initial INVITE to authenticate and ignore the port where the request came from. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
&lt;br /&gt;
Both of these settings are enabled by default for [[Authentication | IP Authenticated]] devices, but they can be changed, unless you are using Carrier Class Addon, which forces the device to ignore the port number and the authentication from an incoming request.&lt;br /&gt;
&lt;br /&gt;
Insecure Invite means that MOR will not challenge for a password, it means that anyone who knows extension can call without password, this is the reason why it is very insecure to use for username/password authenticated devices.&lt;br /&gt;
&lt;br /&gt;
Insecure Port means that MOR will allow INVITES from a different port than the one REGISTER packets come from. This could be used with username/password authenticated devices too. &lt;br /&gt;
&lt;br /&gt;
* '''Disable global pass_privacy''' - if set to yes, this option disables global [[mor.conf|pass_privacy_header]] variable for this device. If global pass_privacy_header variable is not set to yes, this option has no effect.&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. Only active for incoming calls. If the device is originator, please set '''Usereqphone''' in Provider settings.&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;
* '''[http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+progressinband Progressinband]''':&lt;br /&gt;
** yes – when the &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;
NOTE: if Progressinband does not work, add &amp;quot;prematuremedia=no&amp;quot; to sip.conf and reload 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;
* '''Language''' – sets IVR language&lt;br /&gt;
* '''Use ANI (if available) for CallerID:''' – When the call comes the information about who is calling is found in CallerID field. This field is used to determine who is calling. When the call comes through PRI/SS7 channels - then additional information is available who is calling in ANI field (in call's data channel) so sometimes CallerID might be empty or anonymous, but the caller can be found in ANI field. This option allows to use ANI field as CallerID to determine and recognize who is calling. &lt;br /&gt;
* '''Incoming Call CallerID Presentation''' – sets CallerID Presentation. Please note that this setting applies only for incoming calls. More information can be found [http://www.voip-info.org/wiki/view/Asterisk+cmd+SetCallerPres here] and [http://www.voip-info.org/wiki/view/Asterisk+cmd+CallingPres here] &lt;br /&gt;
* '''Change Failed Code To''' – if call fails change Hangup Cause Code to this value. This works only for outgoing calls from device. '''Not for Incoming'''&lt;br /&gt;
* '''Forward DID''' – it allows to forward call to DID which is assigned to Authorization by PIN or Calling Cards dial plan. After user enters PIN of any device or card, call gets connected with destination.&lt;br /&gt;
* '''Anti-resale (Auto-answer)''' – when option is set to YES, MOR answers the call before sending it to provider in order to generate FAS. This does not affect billing in MOR (User is not billed for extra time).&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 devices, protocol applies to outbound calls only. When 'auto' is selected, Asterisk chooses protocol automatically based on registered contact.&lt;br /&gt;
* '''T.38 Support''' – should T.38 pass-through be supported&lt;br /&gt;
* '''SRTP Encryption''' – should SRTP protocol be used for calls &lt;br /&gt;
* '''Block callerid if (number) simultaneous calls come from it''' – blocks CallerID if the entered number of simultaneous calls come from it&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x4---&amp;gt;&lt;br /&gt;
* '''Outbound Proxy''' – send outbound signaling to this proxy, not directly to the peer (Internal Asterisk option).&lt;br /&gt;
* '''SIP Session Timers''' - SIP Session Timers provide an end-to-end keep-alive mechanism for active SIP sessions. 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;
* '''Localize PAI''' - if set to 'yes' then MOR will localize originator's number from PAI (P-Asserted-Identity) by [[Localization | CallerID Localization Rules]]. Works only if '''pass_pai''' is set in [[Mor.conf|mor.conf]].&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;
* '''Use random Number when CallerID is invalid''' - if set to ''Yes'' then when CallerID is NOT found in a Number Pool set in '''Number Pool with valid CallerIDs''' then CalleID in FROM is changed to &amp;quot;anonymous&amp;quot; and random CallerID taken from '''Random Number from a Number Pool''' is set in PAI/RPID headers.&lt;br /&gt;
* '''Emergency CallerID''' - number from this field will be used as CallerID if Destination number matches any number from '''Emergency CallerID Number Pool''' (see below). Localization rules will be applied before checking Destination number in Number Pool. P-Asserted and/or Remote-party-ID will be overwritten with the same as CallerID. If Destination number (after localization applied) does not match any number in '''Emergency CallerID Number Pool''', then CallerID is handled as usual.&lt;br /&gt;
* '''Emergency CallerID Number Pool''' - Number Pool with numbers used for '''Emergency CallerID''' feature.&lt;br /&gt;
* '''Music On Hold to Device''' - what to play when this Device is made On Hold by other party. Feature named &amp;quot;mohinterpret&amp;quot; on Asterisk.&lt;br /&gt;
* '''Music On Hold from Device''' - what to play to other party, when this Device sets it On Hold. Feature named &amp;quot;mohsuggest&amp;quot; on Asterisk.&lt;br /&gt;
* '''Announcement to the Called Party''' - plays specified announcement to callee in the beginning of conversation, right after call is answered. For example you can play message like &amp;quot;This conversation will be recorded&amp;quot; before every call from this Device.&lt;br /&gt;
* ''' Allow forward from Resellers''' - If option is enabled, Reseller can forward call to this device from Reseller's User's Device Call-flow window. Username of the Device owner and Device extension will be visible from the Reseller account. Setting is active only when enabled at [https://wiki.kolmisoft.com/index.php/Configuration_from_GUI#Various Settings].&lt;br /&gt;
* '''100rel''' - only in PJSIP Devices. Indicate the support of reliable provisional responses and PRACK them if required by the peer. As UAS, if the incoming request contains 100rel in the Supported header but not in the Required header, send 1xx responses normally. If the incoming request contains 100rel in the Required header, send 1xx responses reliably. As UAC add 100rel to the Supported header and PRACK 1xx responses if required.&lt;br /&gt;
* '''Ignore 183 without SDP'''- only in PJSIP Devices. Do not forward 183 when it doesn't contain SDP.&lt;br /&gt;
* '''Send History-Info''' - only in PJSIP Devices. Send the History-Info header, conveying the diversion information to the called and calling user agents.&lt;br /&gt;
* '''Allow Transfer''' only in PJSIP Devices. Determines whether SIP REFER transfers are allowed for this Device.&lt;br /&gt;
* '''STIR/SHAKEN Attestation''' - only in PJSIP Devices. [https://wiki.kolmisoft.com/index.php/MOR_STIR/SHAKEN#Device/Provider_configuration STIR/SHAKEN] attestation level when calling to this Device.&lt;br /&gt;
* '''WebRTC''' - only in PJSIP Devices. Enable WebRTC support for this Device. WebRTC must be configured in Asterisk - [https://wiki.kolmisoft.com/index.php/WebRTC#WebRTC%2FWebSockets%2FWSS Enabling WebRTC].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Tell Options=&lt;br /&gt;
&lt;br /&gt;
* '''Tell rate before call''' - should MOR tell announce minute price (rounded to cents) before every call. Default value is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Tell balance before call''' – should MOR tell the user his balance every time he tries to dial?  The default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Tell time''' - should MOR tell the user his remaining time every time he tries to dial?  The default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
** Time is told in MINUTES only. Currently it is not possible to tell both in minutes and seconds.&lt;br /&gt;
* '''Tell remaining time when left''' – when some time is left, MOR will tell the remaining time to talk (in seconds).&lt;br /&gt;
* '''Repeat remaining time when left''' – repeats the remaining time when some time is left (in seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Debug=&lt;br /&gt;
&lt;br /&gt;
* [[SIP debug info|'''Process SIPCHANINFO''']] - shows SIP channel info in [[Asterisk CLI]] and saves this information on database.&lt;br /&gt;
NOTE: debug should be enabled only if you are experiencing any problems. It should be disable in any other cases, because it stores lot of information on database.&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;
=Comment=&lt;br /&gt;
&lt;br /&gt;
Devices can have Comments, which gives information about the Device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Grace_time | Grace time]]&lt;br /&gt;
* [[PAP_device_configuration | PAP device configuration]]&lt;br /&gt;
* [[H323 Device settings]]&lt;br /&gt;
* [[Hide Device username for Users]]&lt;br /&gt;
* [[What is PIN]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_Services_get&amp;diff=30583</id>
		<title>MOR API Services get</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_Services_get&amp;diff=30583"/>
		<updated>2025-10-21T13:39:12Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= NOTE: Available from MOR X5 =&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
[[MOR API]] Services get&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X5''' Call: '''/api/services_get'''&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parametres===&lt;br /&gt;
&lt;br /&gt;
* u - username for authentication. '''Required'''.&lt;br /&gt;
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
We have: API Secret Key = 123456&lt;br /&gt;
&lt;br /&gt;
We send:&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/services_get?u=admin&amp;amp;hash=7c4a8d09ca3762af61e59520943dc26494f8941b&lt;br /&gt;
'''NOTE that username is not included in hash'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
  &amp;lt;services&amp;gt;&lt;br /&gt;
    &amp;lt;service&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;1&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;Test_periodic_service&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;memo&amp;gt;Comment&amp;lt;/memo&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;periodic_fee&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;period&amp;gt;month&amp;lt;/period&amp;gt;&lt;br /&gt;
      &amp;lt;price&amp;gt;10.0&amp;lt;/price&amp;gt;&lt;br /&gt;
      &amp;lt;self_cost&amp;gt;0.0&amp;lt;/self_cost&amp;gt;&lt;br /&gt;
      &amp;lt;currency&amp;gt;USD&amp;lt;/currency&amp;gt;&lt;br /&gt;
      &amp;lt;quantity&amp;gt;1&amp;lt;/quantity&amp;gt;&lt;br /&gt;
      &amp;lt;continue_call&amp;gt;0&amp;lt;/continue_call&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
    &amp;lt;service&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;2&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;Test_one_time_fee_service&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;memo&amp;gt;Comment2&amp;lt;/memo&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;one_time_fee&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;period&amp;gt;&amp;lt;/period&amp;gt;&lt;br /&gt;
      &amp;lt;price&amp;gt;12.0&amp;lt;/price&amp;gt;&lt;br /&gt;
      &amp;lt;self_cost&amp;gt;0.0&amp;lt;/self_cost&amp;gt;&lt;br /&gt;
      &amp;lt;currency&amp;gt;USD&amp;lt;/currency&amp;gt;&lt;br /&gt;
      &amp;lt;quantity/&amp;gt;&lt;br /&gt;
      &amp;lt;continue_call&amp;gt;0&amp;lt;/continue_call&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
    &amp;lt;service&amp;gt;&lt;br /&gt;
      &amp;lt;id&amp;gt;3&amp;lt;/id&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;Test_flat_rate_service&amp;lt;/name&amp;gt;&lt;br /&gt;
      &amp;lt;memo&amp;gt;Comment3&amp;lt;/memo&amp;gt;&lt;br /&gt;
      &amp;lt;type&amp;gt;flat_rate&amp;lt;/type&amp;gt;&lt;br /&gt;
      &amp;lt;period&amp;gt;&amp;lt;/period&amp;gt;&lt;br /&gt;
      &amp;lt;price&amp;gt;1.0&amp;lt;/price&amp;gt;&lt;br /&gt;
      &amp;lt;self_cost&amp;gt;0.0&amp;lt;/self_cost&amp;gt;&lt;br /&gt;
      &amp;lt;currency&amp;gt;USD&amp;lt;/currency&amp;gt;&lt;br /&gt;
      &amp;lt;quantity&amp;gt;1&amp;lt;/quantity&amp;gt;&lt;br /&gt;
      &amp;lt;continue_call&amp;gt;1&amp;lt;/continue_call&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
  &amp;lt;/services&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Errors'''&lt;br /&gt;
* &amp;lt;error&amp;gt;No Services found&amp;lt;/error&amp;gt; - Service was not found using specified ID. Use correct ID.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to manage Services&amp;lt;/error&amp;gt; - Such username does not exist in the database or User does not have rights to manage Services.&lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - Hash was not correct. Check API_Secret_Key while concatenating hash_string.&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;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_Service_update&amp;diff=30582</id>
		<title>MOR API Service update</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_Service_update&amp;diff=30582"/>
		<updated>2025-10-21T13:36:46Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= NOTE: Available from MOR X5 =&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
[[MOR API]] Update Service&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X5''' Call: '''/api/service_update'''&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parametres===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
* service_id -  Service ID, which we want to delete. '''Required'''.&lt;br /&gt;
'''Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
* u - username for authentication. '''Required'''.&lt;br /&gt;
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&lt;br /&gt;
* service_name - name of Service. &lt;br /&gt;
* service_type - type of Service (periodic_fee, one_time_fee, flat-rate). &lt;br /&gt;
* service_sell_price - sell price of Service. &lt;br /&gt;
* service_self_cost - cost of Service.&lt;br /&gt;
* service_period - period of Service (month, day, by default month only for Periodic Fee type). &lt;br /&gt;
* service_minutes_per_month - how many minutes User is allowed to use Service (only for Flat Rate type).&lt;br /&gt;
* service_continue_call_when_minutes_expire - allowed values 1 or 0.&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
We have Service ID = 19, API Secret Key = secret&amp;lt;br&amp;gt;&lt;br /&gt;
We send:&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/service_update?u=admin&amp;amp;service_id=19&amp;amp;service_name=ddddddd&amp;amp;hash=38282ca5e65e63746498ef5b39a2fe71c6448df4&lt;br /&gt;
'''NOTE that username is not included in hash'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;page&amp;gt;&lt;br /&gt;
    &amp;lt;status&amp;gt;&lt;br /&gt;
      &amp;lt;success&amp;gt;Service successfully updated&amp;lt;/success&amp;gt;&lt;br /&gt;
    &amp;lt;/status&amp;gt;&lt;br /&gt;
  &amp;lt;/page&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Errors'''&lt;br /&gt;
* &amp;lt;error&amp;gt;Service Type is invalid&amp;lt;/error&amp;gt; - Service type is unknown. It should be periodic_fee or one_time_fee or flat-rate.&lt;br /&gt;
* &amp;lt;error&amp;gt;Quantity must be numeric&amp;lt;/error&amp;gt; - Quantity was not numeric.&lt;br /&gt;
* &amp;lt;error&amp;gt;Quantity must be greater than zero&amp;lt;/error&amp;gt; - Quantity is less than zero.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to use this functionality&amp;lt;/error&amp;gt; - User has no permissions to manage Services.&lt;br /&gt;
* &amp;lt;error&amp;gt;Access Denied&amp;lt;/error&amp;gt; - User can not Manage Services and can not get permissions to use it. &lt;br /&gt;
* &amp;lt;error&amp;gt;Service was not selected&amp;lt;/error&amp;gt; - service_id parameter was not passed.&lt;br /&gt;
* &amp;lt;error&amp;gt;Service was not found&amp;lt;/error&amp;gt; - Service with passed service_id parameter was not found.&lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - Hash was not correct. Check API_Secret_Key and order or parameters while concatenating hash_string.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
  &amp;lt;status&amp;gt;&lt;br /&gt;
    &amp;lt;error&amp;gt;Quantity must be numeric&amp;lt;/error&amp;gt;&lt;br /&gt;
  &amp;lt;/status&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;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;
* [[MOR API]]&lt;br /&gt;
* [[MOR_API_Service_delete | Services delete]]&lt;br /&gt;
* [[MOR_API_Service_create | Service create]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_Service_create&amp;diff=30581</id>
		<title>MOR API Service create</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_Service_create&amp;diff=30581"/>
		<updated>2025-10-21T13:36:09Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Parametres */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
[[MOR API]] Create Service&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* Call: /api/service_create&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parametres===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* new_service_name - name of the Service '''Required'''.&lt;br /&gt;
* new_service_type - periodic_fee, one_time_fee, dynamic_flat_rate or flat_rate. '''Required'''.&lt;br /&gt;
&lt;br /&gt;
'''Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* '''[[MOR API hash construction | hash]]''' - SHA1 hash constructed using '''parameters''' which are listed above. Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''u''' - username for authentication. '''Required'''.&lt;br /&gt;
* service_sell_price -  price of the Service.&lt;br /&gt;
* service_self_cost - self cost of the Service.&lt;br /&gt;
* service_period - month or day. For Periodic fee service type only. &lt;br /&gt;
* service_minutes_per_month - for Flat-Rate service type only.&lt;br /&gt;
* new_owner_id - Only for admin, id of owner of service, which is admin or reseller&lt;br /&gt;
* service_continue_call_when_minutes_expire - allowed values 1 or 0.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
We have u = admin, API Secret Key = secret&lt;br /&gt;
&lt;br /&gt;
We send:&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/service_create?u=admin&amp;amp;new_service_type=flat_rate&amp;amp;service_minutes_per_month=5&amp;amp;new_service_name=name&amp;amp;hash=38282ca5e65e63746498ef5b39a2fe71c6448df4&lt;br /&gt;
&lt;br /&gt;
*Now we can find this Service in GUI Services list.&lt;br /&gt;
&lt;br /&gt;
'''* Note that username and password are not included in hash'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
   &amp;lt;status&amp;gt;&lt;br /&gt;
     &amp;lt;success&amp;gt;Service successfully created&amp;lt;/success&amp;gt;&lt;br /&gt;
     &amp;lt;service&amp;gt;&lt;br /&gt;
       &amp;lt;id&amp;gt;3&amp;lt;/id&amp;gt;&lt;br /&gt;
     &amp;lt;/service&amp;gt;&lt;br /&gt;
   &amp;lt;/status&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Errors'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;Access Denied&amp;lt;/error&amp;gt; - user was not authorized or is simple user. Only admin, reseller or accounant can use this API method. &lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.&lt;br /&gt;
* &amp;lt;error&amp;gt;Service must have service type&amp;lt;/error&amp;gt; - type must be one of periodic_fee, one_time_fee or flat_rate.&lt;br /&gt;
* &amp;lt;error&amp;gt;Flat Rate Service must have quantity&amp;lt;/error&amp;gt; - Flat-Rate Service must have Minutes/month provided. &lt;br /&gt;
* &amp;lt;error&amp;gt;Quantity must be numeric&amp;lt;/error&amp;gt; - Minutes/month must be a number. &lt;br /&gt;
* &amp;lt;error&amp;gt;Quantity must be greater than zero&amp;lt;/error&amp;gt; &lt;br /&gt;
* &amp;lt;error&amp;gt;Service Price must be numeric&amp;lt;/error&amp;gt; &lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to use this functionality&amp;lt;/error&amp;gt; - User has no permissions to manage Services. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
  &amp;lt;status&amp;gt;&lt;br /&gt;
    &amp;lt;error&amp;gt;Quantity must be numeric&amp;lt;/error&amp;gt;&lt;br /&gt;
  &amp;lt;/status&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;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;
* [[MOR API]]&lt;br /&gt;
* [[MOR_API_Service_delete | Services delete]]&lt;br /&gt;
* [[MOR_API_Service_update | Service update]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=File:Dynamic_flat-rate_service_create.png&amp;diff=30580</id>
		<title>File:Dynamic flat-rate service create.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=File:Dynamic_flat-rate_service_create.png&amp;diff=30580"/>
		<updated>2025-10-21T13:23:05Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: Nerijuss uploaded a new version of File:Dynamic flat-rate service create.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=File:Flat-rate_service_create.png&amp;diff=30579</id>
		<title>File:Flat-rate service create.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=File:Flat-rate_service_create.png&amp;diff=30579"/>
		<updated>2025-10-21T13:22:26Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: Nerijuss uploaded a new version of File:Flat-rate service create.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Flat-Rates&amp;diff=30578</id>
		<title>Flat-Rates</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Flat-Rates&amp;diff=30578"/>
		<updated>2025-10-21T13:21:35Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Create */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Flat-Rates means a service plan under which a Client can dial a number of minutes to certain Destinations for a fixed amount (and optional additional connection fee not included in a fixed amount). After the user has used all his flat-rate minutes, all additional minutes are charged at the normal rate.&lt;br /&gt;
&lt;br /&gt;
For example, $5.00/mo with 200 minutes to USA/Canada.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
Go to '''SETTINGS –&amp;gt; Accounting –&amp;gt; Services''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:services-menu.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Create ==&lt;br /&gt;
&lt;br /&gt;
In Services list page click [[Image:icon_add.png]]'''New service'''&lt;br /&gt;
Select Service type: '''Flat-Rate'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:flat-rate_service_create.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Name''' - name of Flat Service (name will be shown in invoice),&lt;br /&gt;
* '''Memo''' - informational message about Flat-Rate (can be left empty)&lt;br /&gt;
* '''Sell Price''' - amount which User will be charged for service subscription (excluding connection fees if any),&lt;br /&gt;
* '''Self-Cost''' - self cost for service (for informational purposes only),&lt;br /&gt;
* '''Connection Fee''' - optional connection fee. If fee is higher than 0, it will be applied to every call and user will charged '''in addition''' to service fee.&lt;br /&gt;
* '''Minutes/month''' - how many minutes user can call using this service,&lt;br /&gt;
* '''Round by''' - how to round call duration (default by 1 second).&lt;br /&gt;
* '''Limit Max rate for Provider''' - Calls with a higher Provider Rate will be dropped.&lt;br /&gt;
* '''Continue call when minutes expire''' - by default, the call drops once Flat-Rate minutes are exceeded. This option allows to finish the call by charging User's balance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the Service by clicking ''Create'' button.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default freshly created service does not have any destination. To check and/or add/remove destinations, click the [[Image:destinations_icon.png]] icon.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:services_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Add destinations ==&lt;br /&gt;
&lt;br /&gt;
Clicking on the [[Image:destinations_icon.png]] icon will open Destinations window where you will be able to include/exclude destinations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:flat_rate_include_destinations.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have the following options to include/exclude destinations:&lt;br /&gt;
* '''Prefix''' - enter valid prefix. Prefix '''and all sub-prefixes''' will be included. For example, if you enter prefix 370, this flat-rate service will include 370 '''and all other prefixes''' starting with 370.&lt;br /&gt;
* '''Country/Prefix'''- this allows to choose specific country (direction) and specific prefix (destination) in that country. As in the previous example, prefix '''and all sub-prefixes''' will be included.&lt;br /&gt;
* '''Prefixes from Destination Group''' - this allows to choose specific Destination Group. Once you choose particular group, amount of prefixes will be displayed. If you hover mouse on Prefixes word, new window will display all available prefixed in that Destination Group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Included and Exluded Destinations ==&lt;br /&gt;
Once you will add some destinations by any method mentioned above, you will see overview of available destinations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Flat_rate_destinations_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see all active destinations for specific Country by clicking on '''Active Destinations Icon''' [[Image:Flat_rate_active_destinations_icon.png‎]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Acknowledgments = &lt;br /&gt;
&lt;br /&gt;
* Flat-Rates are calculated by seconds.&lt;br /&gt;
* Every month, the minutes available under Flat-Rates plans are reset to the initial value, which allows the client to use the same amount of minutes each new month. The clients' unused minutes for the previous month are lost. &lt;br /&gt;
&amp;lt;!--from X4--&amp;gt;&lt;br /&gt;
* When option '''No Expiration at the end of a Month''' is checked, Flat-Rates plans become one time Subscriptions and in the end of month minutes of Subscription will not be reset to the initial value. User can continue using his initially assigned minutes until all minutes will be finished. Note that subscription still becomes inactive after 'Activation end' date.&lt;br /&gt;
* A Service is applicable for a whole month - that is, the service cannot start/end in the middle of the month.&lt;br /&gt;
* User can have more than one Flat-Rate in this case will be used not expired Flat-Rate.&lt;br /&gt;
* Billsec show time billed without Flat-Rate. Real Billsec show time billed together with Flat-Rate.&lt;br /&gt;
* In XLSX invoices Flat Rate service will be shown as used/total time, for example, 00:08:54/00:10:00.&lt;br /&gt;
* Flat-Rate cannot be applied on Resellers traffic. Flat-Rate can be applied to the end Users that belong to Admin or Reseller.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Subscriptions priority =&lt;br /&gt;
If there are two subscriptions covering the same prefix, then the following algorithm is used:&lt;br /&gt;
&lt;br /&gt;
when the first call covered by subscription is made at the beginning of the month, the subscription with the highest amount of minutes is selected, and then this subscription is used until its minutes end;&lt;br /&gt;
&lt;br /&gt;
after that, the next subscription with the highest amount of minutes is selected.&lt;br /&gt;
&lt;br /&gt;
Therefore if a subscription with a higher amount of minutes is added in the middle of the month, the subscription that was selected at the beginning of the will still be used until no more minutes are left, and only then minutes from a newly added subscription will be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Services]]&lt;br /&gt;
* [[Dynamic Flat-Rates]]&lt;br /&gt;
* [[Subscriptions]]&lt;br /&gt;
* [[Accounting]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Dynamic_Flat-Rates&amp;diff=30577</id>
		<title>Dynamic Flat-Rates</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Dynamic_Flat-Rates&amp;diff=30577"/>
		<updated>2025-10-21T13:17:20Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Create */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!--- Avilable from MOR X6---&amp;gt;&lt;br /&gt;
Dynamic Flat-Rates same as simple [[Flat-Rates]] means a Service plan under which a Client can dial a certain amount of minutes to certain Destinations. After the User has used all his Flat-Rate minutes, all additional minutes are charged at the normal Rate. &lt;br /&gt;
&lt;br /&gt;
Difference between Dynamic Flat-Rates and simple [[Flat-Rates]] that Dynamic Flat-Rates Service allows you to choose a specific day of the month to start Subscription and simple [[Flat-Rates]] can start just at the first day of the month.&lt;br /&gt;
&lt;br /&gt;
For example, $5.00/mo with 200 minutes to USA/Canada.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
Go to '''SETTINGS –&amp;gt; Accounting –&amp;gt; Services''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:services-menu.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Create ==&lt;br /&gt;
&lt;br /&gt;
In Services list page click [[Image:icon_add.png]]'''New service'''&lt;br /&gt;
Select Service type: '''Dynamic Flat-Rate'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:dynamic_flat-rate_service_create.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Name''' - name of Flat Service (name will be shown in invoice),&lt;br /&gt;
* '''Memo''' - informational message about Flat-Rate (can be left empty)&lt;br /&gt;
* '''Sell Price''' - amount which User will be charged for service subscription (excluding connection fees if any),&lt;br /&gt;
* '''Self-Cost''' - self cost for service (for informational purposes only),&lt;br /&gt;
* '''Minutes/month''' - how many minutes user can call using this service,&lt;br /&gt;
* '''Round by''' - how to round call duration (default by 1 second).&lt;br /&gt;
* '''Limit Max rate for Provider''' - Calls with a higher Provider Rate will be dropped.&lt;br /&gt;
* '''Continue call when minutes expire''' - by default, the call drops once Flat-Rate minutes are exceeded. This option allows to finish the call by charging User's balance.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Set a Price and Self-Cost for this Service, set how many minutes the User can chat for at this Price and how should be rounded Call Duration.&amp;lt;br&amp;gt;&lt;br /&gt;
Create the Service by clicking ''Create''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the Services window near the just-created service, click the [[Image:destinations_icon.png]] icon.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:services_list_with_dynamic_flat-rates.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Add the Destinations to which this Service should be applied. Use Include/Exclude to create an exact list of the prefixes you want to use with this Service.&lt;br /&gt;
Add [[Subscriptions |Subscription]] to a user to use this Service.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Included Destinations ===&lt;br /&gt;
&lt;br /&gt;
If you add Destination with some prefix, it will include ALL Destinations with this prefix.&lt;br /&gt;
&lt;br /&gt;
Example: if you add prefix 370, ALL numbers which start with 370 will be included (370*).&lt;br /&gt;
&lt;br /&gt;
To see all Destinations which are included, please click the following icon:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:active_destinations_icon.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Acknowledgments = &lt;br /&gt;
&lt;br /&gt;
* Flat-Rates are calculated by seconds.&lt;br /&gt;
* Every month at specified day, the minutes available under Flat-Rates plans are reset to the initial value, which allows the client to use the same amount of minutes each new month. The clients' unused minutes for the previous month are lost. &lt;br /&gt;
* A Service is applicable for a whole month - that is, the service should end after a month. For example: if it starts on 2022-03-05, the Activation end date can be 2022-04-04, 2022-05-04, etc. The period is one month.&lt;br /&gt;
* When option '''No Expiration at the end of a Month''' is checked, Flat-Rates plans become one time Subscriptions and in the end of month minutes of Subscription will not be reset to the initial value. User can continue using his initially assigned minutes until all minutes will be finished. Note that subscription still becomes inactive after 'Activation end' date.&lt;br /&gt;
* User can have more than one Flat-Rate in this case will be used not expired Flat-Rate.&lt;br /&gt;
* Billsec show time billed without Flat-Rate. Real Billsec show time billed together with Flat-Rate.&lt;br /&gt;
* '''IMPORTANT: If a user is PREPAID, limit his Calls to 1, because otherwise a loss is possible. (Explanation: Calls will not be cut when Flat-Minutes will run out and small loss is possible till all Flat-Rate based Calls will finish. After that no more Calls will be possible)'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Subscriptions priority =&lt;br /&gt;
&lt;br /&gt;
If there are two subscriptions covering the same prefix, then the one with the highest amount of minutes left is used.&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;
* [[Services]]&lt;br /&gt;
* [[Flat-Rates]]&lt;br /&gt;
* [[Subscriptions]]&lt;br /&gt;
* [[Accounting]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_Device_Rules&amp;diff=30575</id>
		<title>MOR Device Rules</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_Device_Rules&amp;diff=30575"/>
		<updated>2025-10-21T11:37:33Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* CallerID Localization Rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;'''Device Rules transform an E.164-compatible number to any number format the Device requires.'''&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
Different Devices expect different number formats from you. You can send them whatever they want using Device Rules.&lt;br /&gt;
&lt;br /&gt;
Device Rules are only used when Device is reached over DID. Local calls between Devices will not use Device Rules.&lt;br /&gt;
&lt;br /&gt;
Device Rules can be reached by clicking the [[Image:rules.png]] icon next to a Device in the Devices window:&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT: Device Rules are applied ONLY to those devices which are accessible over DID!'''&lt;br /&gt;
&lt;br /&gt;
[[Image:dev_rules1.png]]&lt;br /&gt;
&lt;br /&gt;
We see a similar window as the one in Localization. The rules to manage Device Rules are identical to those for Localization management, which are covered [[Number Manipulation | here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Destination Rules =&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT: Rules only matter to the Trunks (Devices marked as Trunks). Simple Devices do not care about Destination.'''&lt;br /&gt;
&lt;br /&gt;
Let's say our device/trunk expects to get a number with the international prefix 00. We can do this in the following way:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_dst_rules_1.png]]&lt;br /&gt;
&lt;br /&gt;
That's it – very simple. Now every number that is sent to this Device will be transformed by adding our created int. prefix.&lt;br /&gt;
&lt;br /&gt;
For example, if 37063011111 should be sent to this Device, this rule will be activated and the number 0037063011111 will be sent to Device.&lt;br /&gt;
&lt;br /&gt;
== Special cases == &lt;br /&gt;
&lt;br /&gt;
=== Cut everything till Hash ===&lt;br /&gt;
&lt;br /&gt;
With rule '''Cut: *#''' it is possible to cut everything till # (# included) in the dialed destination:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_dst_rules_2.png]]&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
* Dialed number:  999#37063042439.&lt;br /&gt;
* After Localization: 37063042439.&lt;br /&gt;
&lt;br /&gt;
This function can be used in fancy MNP (Mobile Number Portability) schemes and perhaps elsewhere.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: '''Add''' value still can be used to add any value after '''Cut''' is used on the Destination.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Destination same as received ===&lt;br /&gt;
&lt;br /&gt;
If you want to send a number to a Device exactly as it was received, set Cut = '-' (minus sign as shown in the screenshot).&lt;br /&gt;
&lt;br /&gt;
That way, the same number that comes to MOR also leaves MOR:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_dst_rules_3.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Destination overwrite ===&lt;br /&gt;
&lt;br /&gt;
It is possible to overwrite any Destination before sending a call to such a Device. &lt;br /&gt;
&lt;br /&gt;
In Device Rules (for this Device) set up the Rule:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_rules_dst_overwrite.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, all calls going to this Device will have Destination = 37063033333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CallerID Rules =&lt;br /&gt;
&lt;br /&gt;
Source Rules manages CallerID which is sent to this particular Device.&lt;br /&gt;
&lt;br /&gt;
In the example bellow we will add international prefix to every CallerID sent to this Device:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_src_rules_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Special Case ==&lt;br /&gt;
&lt;br /&gt;
=== CallerID localize Name part ===&lt;br /&gt;
&lt;br /&gt;
If Name part of CallerID should be localized as well, then check '''Change CallerID name''' checkbox.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if CallerID is &amp;quot;00123456789&amp;quot; &amp;lt;00123456789&amp;gt;, then after localization (given bellow) CallerID will look like &amp;quot;123456789&amp;quot; &amp;lt;123456789&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Device_src_rules_3.png]]&lt;br /&gt;
&lt;br /&gt;
=== CallerID overwrite ===&lt;br /&gt;
&lt;br /&gt;
Sometimes Trunks only accept calls with special format CallerIDs.&lt;br /&gt;
&lt;br /&gt;
It is possible to overwrite any CallerID before sending a call to such a Device.&lt;br /&gt;
&lt;br /&gt;
In Device Rules (for this Device) set up the Rule:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_src_rules_2.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, all calls going to this Device will have CallerID = 37063033333&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;
* [[Number Manipulation]]&lt;br /&gt;
** [[Localization]]&lt;br /&gt;
** [[Provider Rules]]&lt;br /&gt;
** [[DID handling by Localization]]&lt;br /&gt;
** [[Number Manipulation Examples]]&lt;br /&gt;
** [[Device Rule Groups]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_Device_Rules&amp;diff=30574</id>
		<title>MOR Device Rules</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_Device_Rules&amp;diff=30574"/>
		<updated>2025-10-21T11:37:02Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Destination Localization Rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;'''Device Rules transform an E.164-compatible number to any number format the Device requires.'''&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
Different Devices expect different number formats from you. You can send them whatever they want using Device Rules.&lt;br /&gt;
&lt;br /&gt;
Device Rules are only used when Device is reached over DID. Local calls between Devices will not use Device Rules.&lt;br /&gt;
&lt;br /&gt;
Device Rules can be reached by clicking the [[Image:rules.png]] icon next to a Device in the Devices window:&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT: Device Rules are applied ONLY to those devices which are accessible over DID!'''&lt;br /&gt;
&lt;br /&gt;
[[Image:dev_rules1.png]]&lt;br /&gt;
&lt;br /&gt;
We see a similar window as the one in Localization. The rules to manage Device Rules are identical to those for Localization management, which are covered [[Number Manipulation | here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Destination Rules =&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT: Rules only matter to the Trunks (Devices marked as Trunks). Simple Devices do not care about Destination.'''&lt;br /&gt;
&lt;br /&gt;
Let's say our device/trunk expects to get a number with the international prefix 00. We can do this in the following way:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_dst_rules_1.png]]&lt;br /&gt;
&lt;br /&gt;
That's it – very simple. Now every number that is sent to this Device will be transformed by adding our created int. prefix.&lt;br /&gt;
&lt;br /&gt;
For example, if 37063011111 should be sent to this Device, this rule will be activated and the number 0037063011111 will be sent to Device.&lt;br /&gt;
&lt;br /&gt;
== Special cases == &lt;br /&gt;
&lt;br /&gt;
=== Cut everything till Hash ===&lt;br /&gt;
&lt;br /&gt;
With rule '''Cut: *#''' it is possible to cut everything till # (# included) in the dialed destination:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_dst_rules_2.png]]&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
* Dialed number:  999#37063042439.&lt;br /&gt;
* After Localization: 37063042439.&lt;br /&gt;
&lt;br /&gt;
This function can be used in fancy MNP (Mobile Number Portability) schemes and perhaps elsewhere.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: '''Add''' value still can be used to add any value after '''Cut''' is used on the Destination.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Destination same as received ===&lt;br /&gt;
&lt;br /&gt;
If you want to send a number to a Device exactly as it was received, set Cut = '-' (minus sign as shown in the screenshot).&lt;br /&gt;
&lt;br /&gt;
That way, the same number that comes to MOR also leaves MOR:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_dst_rules_3.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Destination overwrite ===&lt;br /&gt;
&lt;br /&gt;
It is possible to overwrite any Destination before sending a call to such a Device. &lt;br /&gt;
&lt;br /&gt;
In Device Rules (for this Device) set up the Rule:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_rules_dst_overwrite.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, all calls going to this Device will have Destination = 37063033333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CallerID Localization Rules =&lt;br /&gt;
&lt;br /&gt;
Source Rules manages CallerID which is sent to this particular Device.&lt;br /&gt;
&lt;br /&gt;
In the example bellow we will add international prefix to every CallerID sent to this Device:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_src_rules_1.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Special Case ==&lt;br /&gt;
&lt;br /&gt;
=== CallerID localize Name part ===&lt;br /&gt;
&lt;br /&gt;
If Name part of CallerID should be localized as well, then check '''Change CallerID name''' checkbox.&amp;lt;br&amp;gt;&lt;br /&gt;
For example, if CallerID is &amp;quot;00123456789&amp;quot; &amp;lt;00123456789&amp;gt;, then after localization (given bellow) CallerID will look like &amp;quot;123456789&amp;quot; &amp;lt;123456789&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Device_src_rules_3.png]]&lt;br /&gt;
&lt;br /&gt;
=== CallerID overwrite ===&lt;br /&gt;
&lt;br /&gt;
Sometimes Trunks only accept calls with special format CallerIDs.&lt;br /&gt;
&lt;br /&gt;
It is possible to overwrite any CallerID before sending a call to such a Device.&lt;br /&gt;
&lt;br /&gt;
In Device Rules (for this Device) set up the Rule:&lt;br /&gt;
&lt;br /&gt;
[[File:Device_src_rules_2.png]]&lt;br /&gt;
&lt;br /&gt;
In this example, all calls going to this Device will have CallerID = 37063033333&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;
* [[Number Manipulation]]&lt;br /&gt;
** [[Localization]]&lt;br /&gt;
** [[Provider Rules]]&lt;br /&gt;
** [[DID handling by Localization]]&lt;br /&gt;
** [[Number Manipulation Examples]]&lt;br /&gt;
** [[Device Rule Groups]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Currencies&amp;diff=30531</id>
		<title>Currencies</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Currencies&amp;diff=30531"/>
		<updated>2025-09-25T11:16:59Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Automatic Currency Update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
This page purpose is to manage currencies in your system. It is useful when your users use different currency. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;'''It is necessary to decide in which currency the software will operate and ask'''&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;&amp;lt;big&amp;gt;'''support team to set such currency as the default before starting to work with the software'''.&amp;lt;/big&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That means that all operations inside MOR will be done in this default currency.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
Go to '''SETTINGS''' -&amp;gt; '''Setup''' -&amp;gt; '''Settings''' -&amp;gt; '''Currencies'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:currencies_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In this window, we see a [[Currencies#Default_supported_currencies | list of currencies]].&lt;br /&gt;
* '''Exchange rate''' is equal to Default Currency DIVIDED BY some other currency, e.g. EUR Exchange rate when Default Currency is USD is equal (in 2009-03-24) 0.7351, e.g. USD/EUR.&lt;br /&gt;
* '''Last Update''' is for informational purposes.&lt;br /&gt;
* '''Active?''' - shows if this Currency is used in GUI (to create Tariffs, Payments, view Stats, etc).&lt;br /&gt;
* '''Update?''' - if checked, this currency (its exchange rate) will be updated from Kolmisoft server at midnight.&lt;br /&gt;
* '''Edit''' - this option is accessible when '''Update?''' is OFF. You can then enter '''Exchange Rate''' manually for this currency.&lt;br /&gt;
&lt;br /&gt;
* '''Update currencies from web''' - updates all currencies  marked as to be updated from the web.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE''' that MOR operates in one and only one currency. In other active currencies you can see just results of calculation inside MOR.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Default Currency ==&lt;br /&gt;
&lt;br /&gt;
Currency, which has 1.0 exchange rate, is always active and you cannot update it, is the Default and the most important Currency.  In the beginning Default system currency is USD. If you want to use other currency:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;'''It is very important to choose in which currency the software will operate and ask'''&amp;lt;/big&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;big&amp;gt;'''support team to set such currency as the default before starting to work with the software'''.&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Every financial data is stored in system's default currency and later is converted'''. &lt;br /&gt;
&lt;br /&gt;
Reports (like [[Last Calls]]) can be viewed in any other currency and if they are exported to PDF/CSV data matches the currency you are currently using to view that page.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Lastcalls currency.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Invoices]] for users are generated using the currency set in their user details. An invoice can be viewed in any currency.&lt;br /&gt;
&lt;br /&gt;
== Automatic Currency Update ==&lt;br /&gt;
&lt;br /&gt;
Currencies are automatically updated every midnight. Information is taken from Kolmisoft server. Kolmisoft server gets rates from https://currencylayer.com&lt;br /&gt;
&lt;br /&gt;
Only Currencies which have this option checked will be updated:&lt;br /&gt;
&lt;br /&gt;
'''Update?''' - if checked, this currency (its exchange rate) will be updated from Kolmisoft server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Supported currencies =&lt;br /&gt;
&lt;br /&gt;
Currencies are in MOR by default and can be updated automatically from Kolmisoft server.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:currencies.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Voicemail&amp;diff=30502</id>
		<title>Voicemail</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Voicemail&amp;diff=30502"/>
		<updated>2025-09-16T10:22:40Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Custom email server for Voicemail emails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description = &lt;br /&gt;
&lt;br /&gt;
Voicemail (or voice mail, voice-mail, vmail or VMS, sometimes called messagebank) is a centralized system of managing telephone messages for a large group of people. The term is also used more broadly, to denote any system of conveying voice messages, including the answering machine. (http://en.wikipedia.org/wiki/Voicemail)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Voicemail is automatically sent to a user's email if the email address is specified in the device details.&lt;br /&gt;
&lt;br /&gt;
An audio recording in WAV format is attached to the email.&lt;br /&gt;
&lt;br /&gt;
One minute of audio takes approx. 100 Kb.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
This section can be found in '''ADDONS –&amp;gt; PBX Functions –&amp;gt; External DIDs –&amp;gt; VoiceMail''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Voicemails_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Voicemails.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''VoiceMail Extension (local)''' - describes which local extensions a local user can dial to retrieve his voicemail (the system will ask him to enter his voicemail password, which can be set in the device's details).&lt;br /&gt;
&lt;br /&gt;
If you want to setup VoiceMail (VM) on a different server, then the following settings are important:&lt;br /&gt;
&lt;br /&gt;
* '''VoiceMail Server active''' - turns VM server on/off. When on, all VM requests will go to distant VM server; when off, VM will be handled locally on Asterisk.&lt;br /&gt;
* '''VoiceMail Server connection/device''' - describes connection to VM server.&lt;br /&gt;
* '''VoiceMail Retrieve Extension (local)''' - which extension to dial on a distant VM server to retrieve voicemail for an extension.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
* Let's say we have our server on IP 23.45.67.89 connected with SIP to our Asterisk. &lt;br /&gt;
* We create a separate user/device ('''vm_device''') to describe this connection. Device's type is SIP, IP = 23.45.67.89; set other settings also (codecs/etc).&lt;br /&gt;
* '''VoiceMail Retrieve Extension (local)''' = 999.&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;
===First action is when VM is recorded===&lt;br /&gt;
&lt;br /&gt;
So now when the VM server is ON and the user with device 201 gets a VM, the call is redirected like this:&lt;br /&gt;
&lt;br /&gt;
 Dial(SIP/vm_device/201)&lt;br /&gt;
&lt;br /&gt;
This means that the server on 23.45.67.89 will receive a call to extension 201. The server SHOULD BE configured so that it will process VM correctly when it receives such a call.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Second action - retrieving VM===&lt;br /&gt;
&lt;br /&gt;
When  user wants to retrieve his VM on a distant machine he dials '''VoiceMail Extension (local)'''.&lt;br /&gt;
&lt;br /&gt;
He is redirected like this:&lt;br /&gt;
&lt;br /&gt;
 Dial(SIP/vm_device/999#201)&lt;br /&gt;
&lt;br /&gt;
Again, the distant server should know how to process such a request.&lt;br /&gt;
&lt;br /&gt;
Let's say we have a distant VM server based on Asterisk.&lt;br /&gt;
&lt;br /&gt;
So in our example its configuration in '''/etc/asterisk/extensions.conf''' should look like this:&lt;br /&gt;
&lt;br /&gt;
 [incoming]&lt;br /&gt;
 # to retrieve VM&lt;br /&gt;
 exten =&amp;gt; _999#.,1,VoiceMailMain(${EXTEN:4})&lt;br /&gt;
 exten =&amp;gt; _999#.,2,Hangup&amp;lt;br&amp;gt;&lt;br /&gt;
 # to record VM&lt;br /&gt;
 exten =&amp;gt; _X.,1,VoiceMail(${EXTEN})&lt;br /&gt;
 exten =&amp;gt; _X.,2,Hangup&lt;br /&gt;
&lt;br /&gt;
= Retrieve VoiceMail from outside over DID =&lt;br /&gt;
&lt;br /&gt;
* In PBX functions create new function with type: check_voicemail.&lt;br /&gt;
* Assign this PBX Function to a DID by editing the DID number.&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;
= FROM string  =&lt;br /&gt;
&lt;br /&gt;
To change the Voicemail email sending FROM field, edit the /etc/asterisk/voicemail.conf file line:&lt;br /&gt;
&lt;br /&gt;
 ;fromstring=The Asterisk PBX&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 fromstring=SOME OTHER LINE&lt;br /&gt;
&lt;br /&gt;
... and reload Asterisk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Email sending when VM is received =&lt;br /&gt;
&lt;br /&gt;
* Go to [[Device_settings | Device settings]]&lt;br /&gt;
* Locate the Voicemail field&lt;br /&gt;
* Fill in Email – where to send received Voicemail.&lt;br /&gt;
* Fill in Password – the digital password the user enters when he calls the Voicemail number to hear his messages.&lt;br /&gt;
&lt;br /&gt;
End User can change email field if User have '''VoiceMail email edit''' and '''Devices''' [[User_Permissions|permissions]] enabled. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= serveremail =&lt;br /&gt;
&lt;br /&gt;
This setting can be used to identify the source of a voicemail notification message. &lt;br /&gt;
&lt;br /&gt;
  ;serveremail=asterisk&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
  serveremail=SOME OTHER LINE&lt;br /&gt;
&lt;br /&gt;
OR:&lt;br /&gt;
&lt;br /&gt;
  ;serveremail=asterisk@linux-support.net&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
  serveremail=YOUR COMPANY@YOUR COMPANY.net&lt;br /&gt;
&lt;br /&gt;
... and reload Asterisk.&lt;br /&gt;
&lt;br /&gt;
Leave only one of those settings, not both.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Change Email template =&lt;br /&gt;
&lt;br /&gt;
Email subject line and body text can be configured only globally in Asterisk configuration file /etc/asterisk/voicemail.conf directly.&lt;br /&gt;
Open this file with your favorite editor, and find the following lines:&lt;br /&gt;
 ;emailsubject=[PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX}&lt;br /&gt;
 ; The following definition is very close to the default, but the default shows&lt;br /&gt;
 ; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or &amp;quot;an unknown&lt;br /&gt;
 ; caller&amp;quot;, if they are both null.&lt;br /&gt;
 ;emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE},&lt;br /&gt;
  so you might\nwant to check it when you get a chance.  Thanks!\n\n\t\t\t\t--Asterisk\n&lt;br /&gt;
&lt;br /&gt;
Here you change template of Email subject line and Email body. Just uncomment (delete ; in the beginning of line) option name and change option content to your liking. After this is done reload voicemail settings with the following command:&lt;br /&gt;
 asterisk -rx 'voicemail reload'&lt;br /&gt;
&lt;br /&gt;
Asterisk variables related to Voicemail:&lt;br /&gt;
 ${VM_CATEGORY} - Sets voicemail category&lt;br /&gt;
 ${VM_NAME} * - Full name in voicemail&lt;br /&gt;
 ${VM_DUR} * - Voicemail duration&lt;br /&gt;
 ${VM_MSGNUM} * - Number of voicemail message in mailbox&lt;br /&gt;
 ${VM_CALLERID} * - Voicemail Caller ID (Person leaving vm)&lt;br /&gt;
 ${VM_CIDNAME} * - Voicemail Caller ID Name&lt;br /&gt;
 ${VM_CIDNUM} * - Voicemail Caller ID Number&lt;br /&gt;
 ${VM_DATE} * - Voicemail Date&lt;br /&gt;
 ${VM_MESSAGEFILE} * - Path to message left by caller&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;
= Voicemail timezone =&lt;br /&gt;
&lt;br /&gt;
To configure specific timezone for Voicemail box, set '''label''' in the Timezone field (max 10 characters):&lt;br /&gt;
&lt;br /&gt;
[[File:Voicemail tz.png]]&lt;br /&gt;
&lt;br /&gt;
Then configure this label in /etc/asterisk/voicemail.conf under [zonemessages]:&lt;br /&gt;
&lt;br /&gt;
 [zonemessages]&lt;br /&gt;
 central=America/Chicago|'vm-received' Q 'digits/at' IMp&lt;br /&gt;
 eastern=America/New_York|'vm-received' Q 'digits/at' IMp&lt;br /&gt;
 central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours'&lt;br /&gt;
 military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p'&lt;br /&gt;
 european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM&lt;br /&gt;
&lt;br /&gt;
Here '''central, eastern, central24, military, european''' are default labels. Set your custom label below and configure by these rules:&lt;br /&gt;
&lt;br /&gt;
 'filename'    filename of a soundfile (single ticks around the filename required)&lt;br /&gt;
 A or a        Day of week (Saturday, Sunday, ...)                      &lt;br /&gt;
 B or b or h   Month name (January, February, ...)                      &lt;br /&gt;
 d or e        numeric day of month (first, second, ..., thirty-first)  &lt;br /&gt;
 Y             Year                                                     &lt;br /&gt;
 I or l        Hour, 12 hour clock                                      &lt;br /&gt;
 H             Hour, 24 hour clock (single digit hours preceded by &amp;quot;oh&amp;quot;)&lt;br /&gt;
 k             Hour, 24 hour clock (single digit hours NOT preceded by &amp;quot;oh&amp;quot;)&lt;br /&gt;
 M             Minute, with 00 pronounced as &amp;quot;o'clock&amp;quot;                      &lt;br /&gt;
 N             Minute, with 00 pronounced as &amp;quot;hundred&amp;quot; (US military time)   &lt;br /&gt;
 P or p        AM or PM                                                     &lt;br /&gt;
 Q             &amp;quot;today&amp;quot;, &amp;quot;yesterday&amp;quot; or ABdY                        &lt;br /&gt;
 q             &amp;quot;&amp;quot; (for today), &amp;quot;yesterday&amp;quot;, weekday, or ABdY                       &lt;br /&gt;
 R             24 hour time, including minute&lt;br /&gt;
&lt;br /&gt;
After changes, restart Asterisk or execute command '''asterisk -rx 'voicemail reload''''&lt;br /&gt;
&lt;br /&gt;
Default timezone for all Voicemail boxes is central.&lt;br /&gt;
&lt;br /&gt;
More info on Asterisk Voicemails: https://www.voip-info.org/asterisk-config-voicemailconf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Change UNAVAILABLE message = &lt;br /&gt;
&lt;br /&gt;
Dial Voicemail access number (default *97) and press 01; then, after the signal, dictate your UNAVAILABLE message. UNAVAILABLE message is played when call to your device is forwarded to Voicemail by &amp;quot;Failed&amp;quot; or &amp;quot;No Answer&amp;quot; Call states in [[Call Flow]].&lt;br /&gt;
&lt;br /&gt;
UNAVAILABLE message can be only set by using method mentioned above.&lt;br /&gt;
&lt;br /&gt;
If default UNAVAILABLE message is changed, it is recommended to turn off intro message (http://wiki.kolmisoft.com/index.php/Call_Flow#Voicemail)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Change BUSY message = &lt;br /&gt;
&lt;br /&gt;
Dial Voicemail access number (default *97) and press 02; then, after the signal, dictate your BUSY message. BUSY message is played when call to your device is forwarded to Voicemail by &amp;quot;Busy&amp;quot; Call state in [[Call Flow]].&lt;br /&gt;
&lt;br /&gt;
BUSY message can be only set by using method mentioned above.&lt;br /&gt;
&lt;br /&gt;
If default BUSY message is changed, it is recommended to turn off intro message (http://wiki.kolmisoft.com/index.php/Call_Flow#Voicemail) &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= MWI - Message Waiting Indication =&lt;br /&gt;
''This option is available starting from [[MOR_9_documentation | MOR 9]]''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In telephony, a Message Waiting Indicator (MWI) is a telephone calling feature that illuminates a LED on selected telephones to notify a user of waiting voicemail messages. It works on most telephone networks and PBXs. ([http://en.wikipedia.org/wiki/Message-waiting_indicator Wikipedia])&lt;br /&gt;
&lt;br /&gt;
MWI is supported automatically starting from [[MOR 9 documentation | MOR 9]].&lt;br /&gt;
&lt;br /&gt;
Most phones support this feature. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Change encoding on voicemail emails =&lt;br /&gt;
&lt;br /&gt;
If you use, for e.g. Greek language in Voicemail text or in Users details in MOR you need to enable the UTF-8 Encoding.&lt;br /&gt;
&lt;br /&gt;
To do so, first of all enable it on Ast.Voicemail side. Edit '''/etc/asterisk/voicemail.conf''', uncomment '''charset''' and make it UTF-8 :&lt;br /&gt;
&lt;br /&gt;
 charset=UTF-8&lt;br /&gt;
&lt;br /&gt;
To apply changes reload the Voicemail in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; voicemail reload&lt;br /&gt;
&lt;br /&gt;
This will lead to send Voicemail emails in UTF-8 Encoding. However, if you have User with details which are in, for e.g. Greek language, Asterisk should read the data from DB using UTF-8 Encoding.&lt;br /&gt;
&lt;br /&gt;
For this, edit the '''/etc/asterisk/res_config_mysql.conf''', uncomment '''dbcharset''' and set it to UTF-8:&lt;br /&gt;
&lt;br /&gt;
 dbcharset = utf8&lt;br /&gt;
&lt;br /&gt;
Once changes are applied, reload Asterisk:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; reload&lt;br /&gt;
&lt;br /&gt;
Now, Asterisk will correctly send text in UTF-8 Encoding even if, for e.g., Greek text is used in Voicemail email text or in DB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Change Voicemail language = &lt;br /&gt;
&lt;br /&gt;
Set language in Device Edit window.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Delete Voicemail in mass = &lt;br /&gt;
You can delete unwanted voicemails directly from the server.&lt;br /&gt;
&lt;br /&gt;
The main directory where voicemails are saved is:&lt;br /&gt;
 /var/spool/asterisk/voicemail&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Maximum length of a voicemail message = &lt;br /&gt;
Uncomment variable maxsecs in /etc/asterisk/voicemail.conf&lt;br /&gt;
This defines the maximum amount of time in seconds of an incoming message.&lt;br /&gt;
&lt;br /&gt;
For example, this will set max duration to 5 minutes&lt;br /&gt;
 maxsecs = 300&lt;br /&gt;
&lt;br /&gt;
For changes to take effect, reload voicemail configuration&lt;br /&gt;
 asterisk -rx 'voicemail reload'&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Custom email server for Voicemail emails =&lt;br /&gt;
&lt;br /&gt;
By default, a local email relay is used. If some other email server needs to be used, then:&lt;br /&gt;
&lt;br /&gt;
Install additional packages:&lt;br /&gt;
 yum install cyrus-sasl cyrus-sasl-lib cyrus-sasl-plain&lt;br /&gt;
&lt;br /&gt;
Add these lines to the bottom of /etc/postfix/main.cf&lt;br /&gt;
 #smtp_tls_security_level = may #comment out this line on Rocky9&lt;br /&gt;
 relayhost = smtp.yourmailserver.com:587&lt;br /&gt;
 smtp_use_tls = yes&lt;br /&gt;
 smtp_sasl_auth_enable = yes&lt;br /&gt;
 smtp_sasl_security_options = noanonymous&lt;br /&gt;
 smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd&lt;br /&gt;
 smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt&lt;br /&gt;
 smtp_generic_maps = hash:/etc/postfix/generic&lt;br /&gt;
 smtp_tls_security_level = secure&lt;br /&gt;
 smtp_tls_mandatory_protocols = TLSv1&lt;br /&gt;
 #smtp_tls_mandatory_protocols = !SSLv2,!SSLv3 #on Rocky9 use this instead&lt;br /&gt;
 smtp_tls_mandatory_ciphers = high&lt;br /&gt;
 smtp_tls_secure_cert_match = nexthop&lt;br /&gt;
&lt;br /&gt;
Create /etc/postfix/sasl_passwd with content&lt;br /&gt;
 smtp.yourmailserver.com	user@yourmailserver.com:passwordofuser&lt;br /&gt;
NOTE: 16-character Google APP password should be added without spaces.&lt;br /&gt;
&lt;br /&gt;
run&lt;br /&gt;
 postmap /etc/postfix/sasl_passwd&lt;br /&gt;
&lt;br /&gt;
secure file&lt;br /&gt;
 chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db&lt;br /&gt;
 chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db&lt;br /&gt;
&lt;br /&gt;
Add this line to the bottom of /etc/postfix/generic&lt;br /&gt;
 root@CentOS-68-64-minimal.localdomain sender@yourmailserver.com&lt;br /&gt;
replace &amp;quot;CentOS-68-64-minimal.localdomai&amp;quot; with your servers hostname; replace sender@yourmailserver.com with suitable sender address.&lt;br /&gt;
&lt;br /&gt;
Run&lt;br /&gt;
 postmap /etc/postfix/generic&lt;br /&gt;
 service postfix restart&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Testing Voicemail emails =&lt;br /&gt;
This command sends email same way as Asterisk does:&lt;br /&gt;
 mail -s &amp;quot;Test Subject&amp;quot; yourmailbox@domain.com &amp;lt; /dev/null&lt;br /&gt;
&lt;br /&gt;
on Centos7 it may fail with&lt;br /&gt;
 send-mail: Cannot open mail:25&lt;br /&gt;
in such case add this line to bottom of /etc/ssmtp/ssmtp.conf&lt;br /&gt;
 mailhub=localhost:25&lt;br /&gt;
&lt;br /&gt;
on Rocky9:&lt;br /&gt;
 echo &amp;quot;test email&amp;quot; | sendmail your@email.com &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Upload prerecorded Voicemail messages =&lt;br /&gt;
&lt;br /&gt;
The location of the WAV file: /var/spool/asterisk/voicemail/default/1234/&lt;br /&gt;
&lt;br /&gt;
where 1234 is an extension number.&lt;br /&gt;
&lt;br /&gt;
2 files can be replaced: busy.wav and unavail.wav (names must be the same)&lt;br /&gt;
&lt;br /&gt;
Should be changed on all asterisk servers if there are several of them.&lt;br /&gt;
&lt;br /&gt;
Make sure to: [[Convert WAV file to Asterisk playable format]] before uploading.&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;
* [[Device_settings#Voicemail | Device Voicemail]]&lt;br /&gt;
* [[No sound on Voicemail or Playback]]&lt;br /&gt;
* [[Voicemail does not work]]&lt;br /&gt;
* [[Voicemail is sent with wrong time]]&lt;br /&gt;
* [[Voicemail sound files]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_provider_create&amp;diff=30501</id>
		<title>MOR API provider create</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_provider_create&amp;diff=30501"/>
		<updated>2025-09-15T14:02:08Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Parametres */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
[[MOR API]] for creating providers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X17''' call: '''/api/provider_create'''&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
* Only Admin can use this API.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parametres===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* u - username to login. '''Required'''.&lt;br /&gt;
&lt;br /&gt;
* name - Provider's name, must be unique '''Required'''.&lt;br /&gt;
* tech - Technology to use, can be any from (providertypes.name) (dahdi, SIP, IAX2, H323) '''Required'''.&lt;br /&gt;
* tariff_id - Tariff to use, can be any Provider Tariff (tariffs.purpose == 'provider') '''Required'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* server_ids - Asterisk Servers, must be in following format &amp;quot;1,3,4&amp;quot;, if this parameter is not used, all Asterisk Servers are automatically assigned&lt;br /&gt;
* active - 1 for active, 0 for not active&lt;br /&gt;
* dtmfmode - DTMF Mode, accepted values [inband, info, rfc2833, auto]. If CCL is active and Provider is SIP, then accepted values are [rfc2833, auto]&lt;br /&gt;
* location_id - Any Location (locations) by owner (locations.user_id)&lt;br /&gt;
* timeout - Ringing Timeout, any integer value which is equal to 30 or higher&lt;br /&gt;
* max_timeout - Call Timeout, any integer value which is equal to 0 or higher&lt;br /&gt;
* call_limit - Call Limit, any integer value which is equal to 0 or higher&lt;br /&gt;
* balance_limit - Balance limit, any decimal value (value separated by dot &amp;quot;.&amp;quot;)&lt;br /&gt;
* login - Authentication Login/Username (&amp;quot;anonymous&amp;quot; and &amp;quot;unknown&amp;quot; are not allowed)&lt;br /&gt;
* password - Authentication Password&lt;br /&gt;
* register - Authentication Register, 0 - Not register, 1 - Register. If Network related type is Dynamic, Register is automatically set to 0&lt;br /&gt;
* cid_name - Provider CallerID Name&lt;br /&gt;
* cid_number - Provider CallerID Number&lt;br /&gt;
* network_type - Network related type, accepted values [hostname ip dynamic]&lt;br /&gt;
* server_ip - Network related Hostname. If Network related type is Dynamic, Hostname is automatically set to 'dynamic'&lt;br /&gt;
* ipaddr - Network related Server IP. If Network related type is Dynamic, Server IP is automatically set to blank&lt;br /&gt;
* port - Network related Port, any integer value which is higher than 0. If Network related type is Dynamic, Port is automatically set to 0.&lt;br /&gt;
* fromdomain - SIP Specific Fromdomain&lt;br /&gt;
* fromuser - SIP Specific Fromuser&lt;br /&gt;
*[[MOR API hash construction | hash]] – SHA1 hash constructed using '''API Secret Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
If API Secret Key = secret&lt;br /&gt;
&lt;br /&gt;
You send:&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER IP&amp;gt;/billing/api/provider_create?u=admin&amp;amp;name=ApiProvider&amp;amp;tech=SIP&amp;amp;tariff_id=1&amp;amp;server_ids=1&amp;amp;hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
  &amp;lt;status&amp;gt;&lt;br /&gt;
    &amp;lt;success&amp;gt;Provider created&amp;lt;/success&amp;gt;&lt;br /&gt;
    &amp;lt;provider_id&amp;gt;7&amp;lt;/provider_id&amp;gt;&lt;br /&gt;
  &amp;lt;/status&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_provider_create&amp;diff=30500</id>
		<title>MOR API provider create</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_provider_create&amp;diff=30500"/>
		<updated>2025-09-15T14:00:37Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Parametres */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
[[MOR API]] for creating providers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X17''' call: '''/api/provider_create'''&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
* Only Admin can use this API.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parametres===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* u - username to login. '''Required'''.&lt;br /&gt;
*[[MOR API hash construction | hash]] – SHA1 hash constructed using '''API Secret Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&lt;br /&gt;
* name - Provider's name, must be unique '''Required'''.&lt;br /&gt;
* tech - Technology to use, can be any from (providertypes.name) (dahdi, SIP, IAX2, H323) '''Required'''.&lt;br /&gt;
* tariff_id - Tariff to use, can be any Provider Tariff (tariffs.purpose == 'provider') '''Required'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* server_ids - Asterisk Servers, must be in following format &amp;quot;1,3,4&amp;quot;, if this parameter is not used, all Asterisk Servers are automatically assigned&lt;br /&gt;
* active - 1 for active, 0 for not active&lt;br /&gt;
* dtmfmode - DTMF Mode, accepted values [inband, info, rfc2833, auto]. If CCL is active and Provider is SIP, then accepted values are [rfc2833, auto]&lt;br /&gt;
* location_id - Any Location (locations) by owner (locations.user_id)&lt;br /&gt;
* timeout - Ringing Timeout, any integer value which is equal to 30 or higher&lt;br /&gt;
* max_timeout - Call Timeout, any integer value which is equal to 0 or higher&lt;br /&gt;
* call_limit - Call Limit, any integer value which is equal to 0 or higher&lt;br /&gt;
* balance_limit - Balance limit, any decimal value (value separated by dot &amp;quot;.&amp;quot;)&lt;br /&gt;
* login - Authentication Login/Username (&amp;quot;anonymous&amp;quot; and &amp;quot;unknown&amp;quot; are not allowed)&lt;br /&gt;
* password - Authentication Password&lt;br /&gt;
* register - Authentication Register, 0 - Not register, 1 - Register. If Network related type is Dynamic, Register is automatically set to 0&lt;br /&gt;
* cid_name - Provider CallerID Name&lt;br /&gt;
* cid_number - Provider CallerID Number&lt;br /&gt;
* network_type - Network related type, accepted values [hostname ip dynamic]&lt;br /&gt;
* server_ip - Network related Hostname. If Network related type is Dynamic, Hostname is automatically set to 'dynamic'&lt;br /&gt;
* ipaddr - Network related Server IP. If Network related type is Dynamic, Server IP is automatically set to blank&lt;br /&gt;
* port - Network related Port, any integer value which is higher than 0. If Network related type is Dynamic, Port is automatically set to 0.&lt;br /&gt;
* fromdomain - SIP Specific Fromdomain&lt;br /&gt;
* fromuser - SIP Specific Fromuser&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
If API Secret Key = secret&lt;br /&gt;
&lt;br /&gt;
You send:&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER IP&amp;gt;/billing/api/provider_create?u=admin&amp;amp;name=ApiProvider&amp;amp;tech=SIP&amp;amp;tariff_id=1&amp;amp;server_ids=1&amp;amp;hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
  &amp;lt;status&amp;gt;&lt;br /&gt;
    &amp;lt;success&amp;gt;Provider created&amp;lt;/success&amp;gt;&lt;br /&gt;
    &amp;lt;provider_id&amp;gt;7&amp;lt;/provider_id&amp;gt;&lt;br /&gt;
  &amp;lt;/status&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_provider_create&amp;diff=30499</id>
		<title>MOR API provider create</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_provider_create&amp;diff=30499"/>
		<updated>2025-09-15T13:59:58Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Parametres */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
[[MOR API]] for creating providers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X17''' call: '''/api/provider_create'''&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
* Only Admin can use this API.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parametres===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* u - username to login. '''Required'''.&lt;br /&gt;
*[[MOR API hash construction | hash]] – SHA1 hash constructed using '''API Secret Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&lt;br /&gt;
* name - Provider's name, must be unique '''Required'''.&lt;br /&gt;
* tech - Technology to use, can be any from (providertypes.name) (dahdi, SIP, IAX2, H323) '''Required'''.&lt;br /&gt;
* tariff_id - Tariff to use, can be any Provider Tariff (tariffs.purpose == 'provider') '''Required'''.&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* server_ids - Asterisk Servers, must be in following format &amp;quot;1,3,4&amp;quot;, if this parameter is not used, all Asterisk Servers are automatically assigned&lt;br /&gt;
* active - 1 for active, 0 for not active&lt;br /&gt;
* dtmfmode - DTMF Mode, accepted values [inband, info, rfc2833, auto]. If CCL is active and Provider is SIP, then accepted values are [rfc2833, auto]&lt;br /&gt;
* location_id - Any Location (locations) by owner (locations.user_id)&lt;br /&gt;
* timeout - Ringing Timeout, any integer value which is equal to 30 or higher&lt;br /&gt;
* max_timeout - Call Timeout, any integer value which is equal to 0 or higher&lt;br /&gt;
* call_limit - Call Limit, any integer value which is equal to 0 or higher&lt;br /&gt;
* balance_limit - Balance limit, any decimal value (value separated by dot &amp;quot;.&amp;quot;)&lt;br /&gt;
* login - Authentication Login/Username (&amp;quot;anonymous&amp;quot; and &amp;quot;unknown&amp;quot; are not allowed)&lt;br /&gt;
* password - Authentication Password&lt;br /&gt;
* register - Authentication Register, 0 - Not register, 1 - Register. If Network related type is Dynamic, Register is automatically set to 0&lt;br /&gt;
* cid_name - Provider CallerID Name&lt;br /&gt;
* cid_number - Provider CallerID Number&lt;br /&gt;
* network_type - Network related type, accepted values [hostname ip dynamic]&lt;br /&gt;
* server_ip - Network related Hostname. If Network related type is Dynamic, Hostname is automatically set to 'dynamic'&lt;br /&gt;
* ipaddr - Network related Server IP. If Network related type is Dynamic, Server IP is automatically set to blank&lt;br /&gt;
* port - Network related Port, any integer value which is higher than 0. If Network related type is Dynamic, Port is automatically set to 0.&lt;br /&gt;
* fromdomain - SIP Specific Fromdomain&lt;br /&gt;
* fromuser - SIP Specific Fromuser&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
If API Secret Key = secret&lt;br /&gt;
&lt;br /&gt;
You send:&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER IP&amp;gt;/billing/api/provider_create?u=admin&amp;amp;name=ApiProvider&amp;amp;tech=SIP&amp;amp;tariff_id=1&amp;amp;server_ids=1&amp;amp;hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
  &amp;lt;status&amp;gt;&lt;br /&gt;
    &amp;lt;success&amp;gt;Provider created&amp;lt;/success&amp;gt;&lt;br /&gt;
    &amp;lt;provider_id&amp;gt;7&amp;lt;/provider_id&amp;gt;&lt;br /&gt;
  &amp;lt;/status&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Emails&amp;diff=30371</id>
		<title>M4 Emails</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Emails&amp;diff=30371"/>
		<updated>2025-07-23T05:43:29Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Invoice Email Supported Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=What are Emails?=&lt;br /&gt;
&lt;br /&gt;
This function is used to send emails to your clients. It can be used to send commercials, notes about service unavailability, or anything else – maybe Christmas greetings!&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Where I can find Emails?=&lt;br /&gt;
&lt;br /&gt;
This function can be found in '''MAINTENANCE –&amp;gt; Emails'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you see emails that are templates for emails about various system messages.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* '''invoices''' - customer will get his [[Invoices|Invoice]] files when they are will be sent [[Invoices#Send_invoices_by_email_.28manual.29|manually]].&lt;br /&gt;
* '''warning_balance_email''' - User will get when balance becomes lower than [[Warning balance]].&lt;br /&gt;
* '''block_when_no_balance''' - will be sent after the account is blocked due to insufficient balance.&lt;br /&gt;
* '''password_reminder''' - will be sent after M4 has received a [[MOR forgot user password|User password reminder]] request.&lt;br /&gt;
* '''warning_balance_email_local''' - Admin or/and Manager gets a warning when Users' balance becomes lower than [[Warning balance]].&lt;br /&gt;
*'''payment_confirmation''' - User will get when payment is made.&lt;br /&gt;
*'''warning_balance_email_local2''' - User will get when balance becomes higher than [[Warning balance]].&lt;br /&gt;
* '''server_low_free_space''' - will be sent when free space is too low in some of the Servers. Information about the Server and the remaining free space will be provided.&lt;br /&gt;
* '''cdr_export_success''' - will be sent after CDR export.&lt;br /&gt;
* '''cdr_export_error''' - will be sent if CDR export would end with an error.&lt;br /&gt;
* '''auto_aggregate_report''' -  Auto - emails for Aggregate Templates&lt;br /&gt;
* '''tariff_rate_notification''' -  emails for Rate Notifications&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Tariff Rate Notification template=&lt;br /&gt;
&lt;br /&gt;
[[File:Tariff_rate_notification_template.png]]&lt;br /&gt;
&lt;br /&gt;
* '''From''' - works like &amp;quot;Email From&amp;quot;. By default empty.&lt;br /&gt;
&lt;br /&gt;
Supported variables:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;%= rate_notification_url_agree %&amp;gt;'''&lt;br /&gt;
* '''&amp;lt;%= rate_notification_url_disagree %&amp;gt;'''&lt;br /&gt;
* '''&amp;lt;%= user_currency %&amp;gt;'''&lt;br /&gt;
* '''&amp;lt;%= rate_notification_tariff_name %&amp;gt;''' - Rate notification tariff name.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How to Edit Emails?=&lt;br /&gt;
&lt;br /&gt;
Press the Edit button and fill necessary information. You can use different variables.&lt;br /&gt;
Full list of [[Email_variables|email variables]] can be found [[Email_variables|HERE]]&lt;br /&gt;
&lt;br /&gt;
[[File:M2 emails edit button.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:M2 email edit.png]]&lt;br /&gt;
&lt;br /&gt;
=How to Create New Email=&lt;br /&gt;
&lt;br /&gt;
In main Emails window press '''ADD NEW EMAIL'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Simple Email==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:New m2 email simple.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Invoice Email Supported Variables=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*'''&amp;lt;%= username %&amp;gt;''' - User Username&lt;br /&gt;
*'''&amp;lt;%= first_name %&amp;gt;''' - User first name&lt;br /&gt;
*'''&amp;lt;%= last_name %&amp;gt;''' - User Last name&lt;br /&gt;
*'''&amp;lt;%= full_name %&amp;gt;''' - User full name&lt;br /&gt;
*'''&amp;lt;%= balance %&amp;gt;'''  - User balance&lt;br /&gt;
*'''&amp;lt;%= balance_range_min %&amp;gt;''' - User minimal balance range&lt;br /&gt;
*'''&amp;lt;%= balance_range_max %&amp;gt;''' - User maximum balance range&lt;br /&gt;
*'''&amp;lt;%= user_email %&amp;gt;''' - User email&lt;br /&gt;
*'''&amp;lt;%= currency %&amp;gt;''' - Currency&lt;br /&gt;
*'''&amp;lt;%= email %&amp;gt;''' - User email&lt;br /&gt;
*'''&amp;lt;%= company_email %&amp;gt;''' - Company email&lt;br /&gt;
*'''&amp;lt;%= invoice_price %&amp;gt;''' - Invoice price (&amp;quot;Total amount&amp;quot; x &amp;quot;Currency exchange rate&amp;quot;)&lt;br /&gt;
*'''&amp;lt;%= invoice_price_with_tax %&amp;gt;''' - Invoice price with tax (&amp;quot;Total amount with taxes&amp;quot; x &amp;quot;Currency exchange rate&amp;quot;)&lt;br /&gt;
*'''&amp;lt;%= invoice_currency %&amp;gt;''' - Invoice currency&lt;br /&gt;
*'''&amp;lt;%= invoice_period_start %&amp;gt;''' - Invoice period start&lt;br /&gt;
*'''&amp;lt;%= invoice_period_end %&amp;gt;''' - Invoice period end&lt;br /&gt;
*'''&amp;lt;%= invoice_price_in_system_currency %&amp;gt;''' - Invoice price in system currency&lt;br /&gt;
*'''&amp;lt;%= invoice_price_with_tax_in_system_currency %&amp;gt;''' - Invoice price with tax in system currency&lt;br /&gt;
*'''&amp;lt;%= invoice_currency_exchange_rate %&amp;gt;''' - The exchange rate&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=2FA variables=&lt;br /&gt;
* '''&amp;lt;%= two_fa_code %&amp;gt;''' - two factors authentication code&lt;br /&gt;
* '''&amp;lt;%= user_edit_url %&amp;gt;''' - URL to users settings page&lt;br /&gt;
* '''&amp;lt;%= current_time %&amp;gt;''' - current date and time&lt;br /&gt;
* '''&amp;lt;%= two_fa_code_attempt %&amp;gt;''' - number of attempt&lt;br /&gt;
* '''&amp;lt;%= two_fa_login_status %&amp;gt;''' - login status&lt;br /&gt;
* '''&amp;lt;%= two_fa_login_ip %&amp;gt;''' - IP which tries to login&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Adding an image=&lt;br /&gt;
It is possible to add an image or logo of your company to the email.&lt;br /&gt;
&lt;br /&gt;
In a template you should put an HTML code: &lt;br /&gt;
 &amp;lt;img src=&amp;quot;https://link_to_your_image.jpg&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to configure its height, width, border, etc: &lt;br /&gt;
 &amp;lt;img src=&amp;quot;https://link_to_your_image.jpg&amp;quot; height=&amp;quot;50px&amp;quot; width=&amp;quot;247px&amp;quot; border=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= How to get the default email templates =&lt;br /&gt;
&lt;br /&gt;
In case you changed them and want to revert, you can find all default email templates in our demo: &lt;br /&gt;
* MOR: https://demo.kolmisoft.com/billing&lt;br /&gt;
* M4: https://m4demo.kolmisoft.com/billing&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Configuration_from_GUI&amp;diff=30128</id>
		<title>Configuration from GUI</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Configuration_from_GUI&amp;diff=30128"/>
		<updated>2025-05-20T10:35:01Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Where I can find this settings menu?=&lt;br /&gt;
&lt;br /&gt;
You can find this menu in '''SETTINGS –&amp;gt; Setup –&amp;gt; Settings'''&lt;br /&gt;
&lt;br /&gt;
[[File:Settings_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Global ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; [[Global_Settings | Global]]'''&lt;br /&gt;
&lt;br /&gt;
* '''Company''' – name of the company.&lt;br /&gt;
* '''Company email''' – email address of the company.&lt;br /&gt;
* '''Version''' – version number.&lt;br /&gt;
* '''Copyright Title''' – copyright title supports html text format.&lt;br /&gt;
* '''Browser Title''' – browser title for MOR GUI.&lt;br /&gt;
* '''Front Page Text''' – some text to place on front page.&lt;br /&gt;
* '''Login Page Text''' – some text to place on login page&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Registration == &lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Registration'''&lt;br /&gt;
&lt;br /&gt;
* '''Enabled?''' – do we want to let users [[Online registration | register online]] automatically?&lt;br /&gt;
* '''Hide registration link in Login page?''' – tick this option if you do not want users to be able to register online.&lt;br /&gt;
* '''Default country'''&lt;br /&gt;
* '''Asterisk server IP''' – what IP should user connect his softphone/server to?&lt;br /&gt;
* '''Send Email to User after registration''' – just yes or no.&lt;br /&gt;
* '''Send Email to Admin after registration''' – just yes or no.&lt;br /&gt;
* '''Send Email To User after User was created''' – just yes or no.&lt;br /&gt;
* '''Send Email To Admin after User was created''' – just yes or no.&lt;br /&gt;
* '''[[ReCAPTCHA]] configuration'''&lt;br /&gt;
* '''[[User_Agreement|Terms and conditions]]'''&lt;br /&gt;
* '''Allow to create user and device with matching username and password''' – just yes or no. If this setting is not enabled - username and password from MOR GUI will have to be different than device's username and password.&lt;br /&gt;
* '''Enable VAT checking for EU companies''' – you can choose whether to check '''TAX Registration Number:''' during the [[Online registration]] or not. Done over [http://ec.europa.eu/taxation_customs/vies/?locale=lt EU page].&lt;br /&gt;
* '''Allow blank VAT for EU companies''' – allows to leave blank '''TAX Registration Number:''' field during the [[Online registration]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
* [[Default user]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Invoices ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Invoices'''&lt;br /&gt;
&lt;br /&gt;
Invoice configuration is divided into '''Prepaid''' and '''Postpaid'''. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Settings ===&lt;br /&gt;
&lt;br /&gt;
* '''Number start''' – how the invoice number should start.&lt;br /&gt;
* '''Number length''' – the length in digits AFTER Number Start – e.g. Number Start is not counted into this length. This value is active only for first number type.&lt;br /&gt;
* '''Number type''' – select more appropriate number format.&lt;br /&gt;
* '''Invoice period start''' – when invoices are issued, default is first day of the month.&lt;br /&gt;
* '''Show calls in detailed invoice''' – yes or no.&lt;br /&gt;
* '''[[Outstanding balance(Debt) | Show balance line]]''' – shows balance line in Invoice PDF files when Invoice is generated from first day of month till last one. &lt;br /&gt;
* '''Round finals to 2 decimals''' – round or not total in Invoices to 2 decimals.&lt;br /&gt;
* '''Use short file name'''&lt;br /&gt;
* '''Group Subscriptions''' - User's subscriptions will be grouped by service (only applies to PDF and XLSX invoice).&lt;br /&gt;
* '''Show Quantity''' - Show quantity of each service (only applies to PDF invoice).&lt;br /&gt;
* '''Invoice Page Limit:''' – invoice will be generated till this page limit. Additional page is added with an explanation that page limit was reached. &lt;br /&gt;
* ''' Rename 'DID owner cost' label in detailed PDF invoice:''' – text which will be used instead of '''DID owner cost''' in detailed PDF invoice.&lt;br /&gt;
* ''' Hide 'DID owner cost' line in detailed PDF invoice:''' – checkbox, which control whether or not DID owner cost should be shown in detailed PDF invoice.&lt;br /&gt;
* ''' Show Destination with Prefix in Detailed Invoice:''' - checkbox, if enabled, destination will be shown as '''Destination Name (prefix)'''.&lt;br /&gt;
* ''' Rename red 'INVOICE' label in Simplified PDF Invoice:''' &lt;br /&gt;
* ''' Rename red 'INVOICE' label in Detailed PDF Invoice:'''&lt;br /&gt;
* ''' Rename red 'INVOICE' label in PDF Invoice by CallerID:'''&lt;br /&gt;
* ''' Use rounded Invoice Details Prices to calculate Totals''' - use rounded sub-totals to calculate Invoice Total price. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Details ===&lt;br /&gt;
&lt;br /&gt;
* '''Address format''' – changes field positioning in the invoice for the address. You must select it in order to show address in the invoice. &lt;br /&gt;
* '''Address line 1-4''' – address info.&lt;br /&gt;
* '''Bank details line 1-5''' – bank details info.&lt;br /&gt;
* '''Invoice balance line''' – line for balance (e.g. &amp;quot;Your current balance is&amp;quot;)&lt;br /&gt;
* '''Invoice to pay Line'''&lt;br /&gt;
* '''End title''' – a title for the end of your invoice.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
* '''Add Average rate in detailed invoice''' – adds average rate in detailed invoice.&lt;br /&gt;
* '''Show Time in Minute''' – shows time in mm:ss instead of hh:mm:ss, for example, not 02:13:42 but 133:42.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional ===&lt;br /&gt;
&lt;br /&gt;
* '''Show additional details on separate page''' – enables additional custom page at the end of the invoice.&lt;br /&gt;
* '''Additional details''' – the information to be displayed in a custom page at the end of the invoice.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
&lt;br /&gt;
* '''Invoice allow recalculate after send''' – allows recalculating invoices after being sent. This setting also allows to delete sent invoices.&lt;br /&gt;
* '''Do not generate Invoices for blocked Users''' - if enabled Invoices will not be generated for blocked Users.&lt;br /&gt;
* '''Rename &amp;quot;Calls&amp;quot; label''' - changes 'Calls' name for Simplified Invoices and new Invoice XLSX. If you want to apply new 'Calls' name for old XLSX, you should go to Settings &amp;gt; Invoices &amp;gt; XLSX and mark 'New XLSX template apply for old Invoices'&lt;br /&gt;
* '''Start value for Invoice numbers''' - defines number from which Invoices numeration should start.&lt;br /&gt;
* '''Duration Format:''' - time format in invoice. This setting applies for XLSX type invoices (and PDF invoices generated from XLSX invoice) and Invoice Details page. Available options - 'H:M:S', 'H:M', 'M'. When option 'M' is used, sub option Decimal places appear, where you can select precision.&lt;br /&gt;
* '''Invoice Group By: Prefix / Destination'''&lt;br /&gt;
* '''Show Rates:No / Yes'''&lt;br /&gt;
* '''Show Calls in CID Invoice (CSV)''' - if enabled, then CSV Invoice by CallerID will show a list of calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XLSX ===&lt;br /&gt;
* '''XLSX Template''' - choose XLSX Template for Invoices.&lt;br /&gt;
* '''Send XLSX Invoices converted to PDF''' – If enabled XLSX invoices will be converted to PDF before sending over [[Invoices#Send_invoices_by_email_.28manual.29|Email]] or [[Cron_actions#Generate_Invoices_and_send_by_Email|using cron action]]&lt;br /&gt;
* '''Group regular Calls by Destination''' - Groups regular Calls be destination&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;
* [[Invoices]]&lt;br /&gt;
* [[Invoice configuration]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Emails ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Emails'''&lt;br /&gt;
&lt;br /&gt;
* ''' 	Sending globally enabled''' – if this is checked, you will be able to use Mass Mailing and the system will send emails upon user registration.&lt;br /&gt;
* ''' 	Add recipient first name and last name''' – if this is checked, it will show the user's first name and last name if they are entered in the User Settings.&lt;br /&gt;
* '''SMTP server''' – hostname of the server.&lt;br /&gt;
* '''Port''' – port of SMTP server.&lt;br /&gt;
* '''Login''' – username to your SMTP server.&lt;br /&gt;
* '''Password''' – password to your SMTP server.&lt;br /&gt;
* '''Batch size''' – value for Mass Mailing, or how many emails to send at once.&lt;br /&gt;
* '''From''' – email address to put into From: field in email. Acceptable formats are: '''example@email.com''' or '''John Smith &amp;lt;example@email.com&amp;gt;'''.&lt;br /&gt;
* '''Test email sending''' – save settings and press this to test email sending. Do not forget to save settings first!&lt;br /&gt;
* '''TLS''' – '''Auto''', '''Yes''' or '''No'''. Default '''Auto'''.&lt;br /&gt;
&lt;br /&gt;
'''P.S. Remember to set admin's e-mail in admin's personal settings. Without this test email sending will not work!'''&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;
* [[Emails|Mass Emails]]&lt;br /&gt;
* [[Email variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Various ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Various'''&lt;br /&gt;
&lt;br /&gt;
* '''Days for DID to close''' – how long to keep DID closed before making it free.&lt;br /&gt;
* '''Agreement number length''' – number length in digits.&lt;br /&gt;
* '''Change dahdi''' – Sometimes this is used to change &amp;quot;Zap&amp;quot; to something else in GUI, e.g. to &amp;quot;PSTN&amp;quot;, mainly because not everybody knows what Zap stands for. PSTN is more common.&lt;br /&gt;
* '''Device PIN length''' – length for automatically generated PIN codes for devices.&lt;br /&gt;
* '''Device range MIN''' – from which extension automatic extension assigning starts.&lt;br /&gt;
* '''Device range MAX''' – till which extension automatic extension assigning goes.&lt;br /&gt;
** For example, from this interval: [Device range MIN, Device range MAX] MOR will select extensions for newly created Devices.&lt;br /&gt;
* '''Random Device Extension''' – when creating device, random number from '''Device Range''' will be taken.&lt;br /&gt;
* '''Enable &amp;quot;Allowed addresses&amp;quot; option for Devices:'''  – allows [[Device_settings#Allowed_Addresses | Allowed Addresses]] functionality in Devices settings.&lt;br /&gt;
* '''Enable &amp;quot;Allowed addresses&amp;quot; option for Providers:''' – allows Allowed Addresses functionality in Providers settings.&lt;br /&gt;
* '''User wholesale tariff enabled''' – enables user wholesale tariffs.&lt;br /&gt;
* '''Play IVR for unauthenticated call'''&lt;br /&gt;
* '''Banned CLIs default IVR''' – default IVR to route banned numbers.&lt;br /&gt;
* '''Do not allow duplicate device user names'''&lt;br /&gt;
* '''Do not allow users to change their email addresses'''&lt;br /&gt;
* '''Logout link''' – a user will be redirected to this link after pressing &amp;quot;Logout&amp;quot;&lt;br /&gt;
* '''Change ANSWER to FAILED if HGC not equal to 16 for Users''' – changes the Hangupcause for users in call reports from Answered to Failed if Hangupcause is not 16.&lt;br /&gt;
* '''Inform when Devices are created or updated''' – check to get an email about every newly created or updated Device. &lt;br /&gt;
* '''Show Usernames on PDF/CSV Export Files in Last Calls''' – if checked, when a particular User in the Last Calls page search is selected, the Last Calls PDF/CSV file name will be composed also of the Name of selected User. If you are looking for All Users, no User Name will be used. (Name of the User will be shown in Name of the CSV/PDF file).&lt;br /&gt;
* '''Do not allow PREPAID User balance drop below zero (block them instead)'''&lt;br /&gt;
* '''Do not block POSTPAID User when balance goes bellow zero on subscription count'''&lt;br /&gt;
* '''Allow identical email addresses to different Users''' – allows creating Users or registering users with identical email addresses. After checking this setting you will be not able to check &lt;br /&gt;
* '''Show forgot password''', because this functionality requires a unique email in the system. The setting can be unchecked if all emails are unique in the system. &lt;br /&gt;
* '''Allow same IP and Port combinations in multiple Devices''' – allows creating Devices with the same IP and Port combination.&lt;br /&gt;
* '''Low Disk Space Alert''' – indicator when system should inform admin about low [[Multi_Server_support|Server]] space. By default 20%. Notice will appear in [[Integrity Check]] and every hour will send an email &amp;quot;Low Disk Space Alert&amp;quot;. Which template can be found and edited on [[Emails]] page. Information about the Server and the remaining free space will be provided.&lt;br /&gt;
* '''Limit PDF size in Last Calls''' - limits how many pages can be exported from Last Calls to PDF. It takes a lot of system resources to generate PDF files therefore this limit should be low enough to prevent high load on system.&lt;br /&gt;
* '''Google Maps API key''' - the setting is necessary for using the Google Maps functionality. For more on how to configure this key please check [[Get Google Maps key]].&lt;br /&gt;
* '''Allow login by email''' - allow users to log in by email instead of a username.&lt;br /&gt;
* '''Call Forwarding CallerID''' - allows to manage CallerID when [http://wiki.kolmisoft.com/index.php/Call_Flow#Change_Forward_action_by_Call forwarding is set by call].&lt;br /&gt;
** '''From Device''' - puts CallerID for the Device that is forwarding the call. If Device CallerID is empty, then the originator's CallerID will be used.&lt;br /&gt;
** '''Same as comes - unchanged''' - leaves the CallerID as it comes from the originator.&lt;br /&gt;
** '''Same as comes - with Diversion''' - leaves the CallerID as it comes from the original caller and additionally adds SIP header Diversion with CallerID from the Device that is forwarding the call (header will not be added if Device does not have CallerID set).&lt;br /&gt;
* '''DID for Unassigned DID''' - this feature is used for calls coming from providers to system DIDs. Allows redirecting call to specific DID if client dials nonexistent DID. If empty, then this feature is disabled and a call will be terminated with [http://wiki.kolmisoft.com/index.php/207_Not_clear_who_should_receive_call 207 Not clear who should receive call] hangup code.&lt;br /&gt;
* '''Default Music On Hold''' - allows to select Default Music On Hold.&lt;br /&gt;
* '''Use Extension in CallerID for Local Calls''' - overwrites original CallerID with Device Extension when making local calls. Outside calls are not affected by this setting.&lt;br /&gt;
*'''Send Recordings space warning Email''' - sends Email to Admin once a day if recordings exceed space limit.&lt;br /&gt;
*'''Hide Provider Payments from User Payment List''' - default off.&lt;br /&gt;
*'''Delete Tariff Jobs older than''' - deletes tariff jobs older than set days.&lt;br /&gt;
*'''Delete Automatic Tariff Import Inbox Messages older than''' - deletes automatic tariff import inbox messages older than set days.&lt;br /&gt;
*'''Allow forward from Resellers''' - enables advanced device option: Allow forward from Resellers. More information about option in [https://wiki.kolmisoft.com/index.php/Device_settings#Advanced device settings].&lt;br /&gt;
&lt;br /&gt;
== Tax ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Tax'''&lt;br /&gt;
&lt;br /&gt;
Settings are explained here: [[Multi-Tax system]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Backups ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Backups'''&lt;br /&gt;
&lt;br /&gt;
Configuration is explained here: [[Backup system]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; API'''&lt;br /&gt;
&lt;br /&gt;
* '''Allow API''' – enable/disable API.&lt;br /&gt;
* '''Allow GET API''' – enable/disable GET in API - use only for testing!&lt;br /&gt;
* '''API Secret Key''' – secret key for API. This will be used as a password for signing queries to MOR API, check [[MOR_API | MOR API documentation]] for more information&lt;br /&gt;
* '''XML API Extension''' – .NET does not follow standards (surprise!); enable this setting if you are using it to get XML starting with HTTP tags.&lt;br /&gt;
* '''Allow API Login Redirect''' – enable/disable&lt;br /&gt;
* '''API allow registration''' – enable/disable registration through API&lt;br /&gt;
* '''API allow Payments''' – enable/disable payments through API&lt;br /&gt;
* '''API Payment confirmation''' – enable/disable payments confirmation through API&lt;br /&gt;
* '''[[Balance_in_phone|Allow devices to check balance over HTTP]]''' – enable/disable device balance checking&lt;br /&gt;
* '''[[MOR_API_rate_get|Allow devices to check rate over HTTP]]''' – enable/disable device rate checking&lt;br /&gt;
* '''Disable hash checking''' – lets you skip hash parameter using API&lt;br /&gt;
* '''Uniquehash''' – shows your uniquehash &lt;br /&gt;
* '''Send Email To Admin after API/Manual Payment''' - sends Email  to Admin after API/Manual payment. Email Template name:  manual_payment_email &lt;br /&gt;
* '''Send Email to User after API/Manual Payment''' - sends Email to User after API/Manual payment. Email Template name:  manual_payment_email_for_user &lt;br /&gt;
* '''Send Email To Admin after API/Balance Update''' - sends Email to Admin after API/Balance Update. Email Template name:  balance_update_email &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
[[MOR API]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functionality ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Functionality'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===FAX===&lt;br /&gt;
&lt;br /&gt;
* '''Fax device enabled''' – enable/disable Fax device in MOR. When admin enables FAX, Functionality tab appears in Reseller's GUI configuration. He can then enable or disabled fax for his own users himself. &lt;br /&gt;
* '''Fax2Email From Sender''' – there is a field &amp;quot;From:&amp;quot; in an email form. When MOR sends Fax to Email, &amp;quot;Fax2Email From Sender&amp;quot; value is displayed in &amp;quot;From:&amp;quot; field.&lt;br /&gt;
* '''Allow Users to change FAX email''' - allow simple Users to add/remove/edit FAX emails in FAX Devices.&lt;br /&gt;
* '''Fax2Email Email Template''' - [[Emails|email template]] to be used for Fax2Email emails. &amp;quot;None&amp;quot; means the default Asterisk template.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CSV===&lt;br /&gt;
&lt;br /&gt;
* '''CSV Column Separator''' – how columns are separated in imported/exported CSV files.&lt;br /&gt;
* '''CSV Decimal Separator''' – how decimal parts in numbers are separated in imported/exported CSV files.&lt;br /&gt;
* ''' Archive CSV file when size reaches''' – if CSV file reaches a certain size, the system will archive it to save time to download it (0 means to archive always)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Active Calls===&lt;br /&gt;
&lt;br /&gt;
* '''How many maximum [[Active_Calls|Active Calls]] to show in GUI''' – how many [[Active_Calls| Active Calls]] to show in GUI&lt;br /&gt;
* '''[[Active_Calls| Active Calls]] refresh interval''' – [[Active_Calls|Active Calls]] refresh interval in seconds&lt;br /&gt;
* '''Show [[Active_Calls|Active Calls]] for Users''' – tick if you want to allow users to see [[Active_Calls|Active Calls]]&lt;br /&gt;
* '''Show Servers in [[Active_Calls|Active Calls]]'''&lt;br /&gt;
* '''Show DIDs in [[Active_Calls|Active Calls]]'''&lt;br /&gt;
* '''Show localized Source in [[Active_Calls|Active Calls]]''' - if set, [[Active_Calls|Active Calls]] will show callerid number after localisations (if any) have been applied.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tariffs/Rates===&lt;br /&gt;
&lt;br /&gt;
* '''Show rates for users''' – allows users to see rates&lt;br /&gt;
* '''Show rates without Tax''' – shows rates without TAX&lt;br /&gt;
* '''Show [[Advanced_Rates|Advanced Rates]] for users''' – allows users to see [[Advanced_Rates|Advanced Rates]]&lt;br /&gt;
* '''Show zero rates in LCR tariff export:''' – shows zero rates in LCR tariff exported file.&lt;br /&gt;
* '''Show Ghost percent column in Tariffs:''' – if enabled, the Ghost percent column will be shown in the tariff. Default disabled.&lt;br /&gt;
NOTE: if [[Custom Rates]] and/or Tariff Rates are set for the user, only the custom rates will be shown in the details of destination rates. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Statement of Account===&lt;br /&gt;
* ''' PDF Settings ''' - allows to put Address lines of PDF file for Statement of Account.&lt;br /&gt;
*Address line 1: Street Address&lt;br /&gt;
*Address line 2: City, Country&lt;br /&gt;
*Address line 3: Phone, fax&lt;br /&gt;
*Address line 4: Web, email&lt;br /&gt;
*Bank details line 1&lt;br /&gt;
*Bank details line 2&lt;br /&gt;
*Bank details line 3&lt;br /&gt;
*Bank details line 4&lt;br /&gt;
*Bank details line 5&lt;br /&gt;
*Bank details line 6&lt;br /&gt;
*Bank details line 7&lt;br /&gt;
*Bank details line 8&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Privacy==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Privacy'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Privacy_to_hide_Destination_ends|Privacy to hide Destination ends]]'''&lt;br /&gt;
* '''[[GDPR]] Activated''' – hides User data with notification &amp;quot;Data hidden due GDPR. Press to show data (action will be logged)&amp;quot;. Valid for Admin, Accountant, Reseller and Partner.&lt;br /&gt;
&lt;br /&gt;
== Visual ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Visual'''&lt;br /&gt;
&lt;br /&gt;
* '''Items per page''' – the number of items to display per one page&lt;br /&gt;
* '''[[Global_date_format| Default date format]]''' – System default date format&lt;br /&gt;
* '''Default Time Format''' – System default time format&lt;br /&gt;
* '''Default Hour Format''' - System default hour format&lt;br /&gt;
* '''Number digits''' – how many digits to display after a comma&lt;br /&gt;
* '''Hide Quick Stats in Start page''' – hide Quick stats from start page&lt;br /&gt;
* '''Hide device passwords for users''' – do not display device passwords for users&lt;br /&gt;
* '''Hide &amp;quot;Information about this page&amp;quot; link''' – hide HELP banner in GUI&lt;br /&gt;
* '''Hide &amp;quot;I want to&amp;quot; help links'''&lt;br /&gt;
* '''[[Remove_Manual_link_from_admin_GUI|Hide &amp;quot;Manual&amp;quot; link]]''' – hides &amp;quot;Manual&amp;quot; link&lt;br /&gt;
* '''Show logo on first page''' - untick to hide logo on the start page&lt;br /&gt;
* '''Show Full Source (CallerID Name and Number)'''&lt;br /&gt;
* '''Use &amp;lt;&amp;gt; brackets in CDR export''' - changes brackets in CDR export&lt;br /&gt;
* '''Hide payment options for postpaid users''' - will hide the payment option for all postpaid users (including Resellers if they are postpaid).&lt;br /&gt;
* '''Hide non-completed payments for user''' – hides non-completed payments (the ones which are started in MOR, but are not completed in a payment gateway website)&lt;br /&gt;
* '''Show only main page''' – this is a very advanced feature for those who want to hide default MOR menu tree on the left so that they could build their own menu using advanced techniques without modifying MOR GUI sources.&lt;br /&gt;
* '''Show forgot password''' – turns on '''[[MOR_forgot_user_password | Forgot password]]''' functionality.&lt;br /&gt;
* '''Hide Recordings for all users''' – hides recordings for all system users from menu and device settings.&lt;br /&gt;
* '''Show recordings with zero billsec''' – shows recordings with zero billsec&lt;br /&gt;
* '''Default Number Decimal''' – with this option you can set default number decimal for all GUI&lt;br /&gt;
* '''Show user_billsec for Users instead of billsec''' – shows user_billsec instead of billsec in Users invoices and last calls. Notice that Billsec shows real Call duration, user_billsec shows Call duration after minimal time or increment applied. For example, if user tariff has 60 sec minimal time and user made a Call for 20 sec, then billsec will show 20 sec and user_billsec will show 60 sec (minimal time is applied).&lt;br /&gt;
&amp;lt;!--- from X5---&amp;gt;&lt;br /&gt;
* '''Show Calls statistics to User for last''' – number of Calls statistics to show in days. For example, if you enter 5 days, users will only see 5 days old calls, they will not be able to check older calls.  &lt;br /&gt;
* '''Show Device and it's CallerID in Last Calls''' – shows additional column in [[Last Calls]] page with Device and its CallerID information. Click to reach that Device settings page..&lt;br /&gt;
* '''Allow User to assign DID to Device''' – lets User to assign DID to Device.&lt;br /&gt;
* '''Allow User to assign DID to Trunk''' – lets User to Assign DID to Trunk.&lt;br /&gt;
* '''Show DID User instead of Device User in Last Calls''' - if enabled, always shows DID User name in Last Calls.&lt;br /&gt;
* '''New Menu Active''' - if enabled, changes main menu to the new structure.&lt;br /&gt;
* '''Show Replication Broken warning only for Admin''' - if enabled, shows Replication Broken warning message only for Admin account.&lt;br /&gt;
* '''Dropdown field in User's subscriptions''' - enables old style Service selection in Subscription form.&lt;br /&gt;
* '''Show detailed Quick Stats''' - shows modified quick stats of first page.&lt;br /&gt;
* '''Show Terminated by in Last Calls''' - show Terminated  By column in [[Last Calls]], calls CSV/PDF export, and adds the possibility to select this column in [[CDR Export Templates]].&lt;br /&gt;
* '''Show entered Destination only for Users''' - show the Destination numbers for Users that were entered by them and not Destination numbers after Localization.&lt;br /&gt;
* '''Show Company Name column in Users page''' - show &amp;quot;Company Name&amp;quot; column in Users list page.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Server load ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Server load'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Settings for GUI Server and Database Server&lt;br /&gt;
&lt;br /&gt;
* '''HDD utilisation higher than''' – Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device).&lt;br /&gt;
* '''CPU General Load higher than''' – CPU General load higher than – Percentage of the CPU for user processes.&lt;br /&gt;
* '''CPU Load Stats 1 higher than''' – average load per one minute on the system&lt;br /&gt;
* '''CPU MySQL process higher than''' –  Percentage of the CPU for MySQL process&lt;br /&gt;
* '''CPU Ruby process higher than''' –  Percentage of the CPU for Ruby process&lt;br /&gt;
* '''CPU Asterisk process (if present) higher than''' – Percentage of the CPU for Asterisk process&lt;br /&gt;
* '''Delete Server Load Stats older than''' – deletes internal servers load statistics older than defined number of days.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Calls ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Calls'''&lt;br /&gt;
* '''Retrieve PCAP files from the Proxy Server''' – default off. Works only when CCL module is activated.&lt;br /&gt;
&amp;lt;!--- from X18---&amp;gt;&lt;br /&gt;
* '''SQL Max Execution Time''' - max execution time in seconds for SQL query. The default time is 300 seconds (5 minutes). Used in Statistics pages (Calls List export and similar).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Archived calls]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FTP ==&lt;br /&gt;
Please fill up FTP server details if you want to store Archived calls or/and Backups to FTP server.&lt;br /&gt;
&lt;br /&gt;
* '''IP''' - Enter FTP server IP.&lt;br /&gt;
* '''Port''' - Enter FTP server Port.&lt;br /&gt;
* '''Username''' - Enter FTP server Username.&lt;br /&gt;
* '''Password''' - Enter FTP server Password.&lt;br /&gt;
* '''Path for Archived Calls''' - Enter Path for Archived Calls.&lt;br /&gt;
* '''Path for Backups''' - Enter path for Backups.&lt;br /&gt;
* '''Path for CDR Export''' - Enter path where to export CDRs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SFTP ==&lt;br /&gt;
Please fill up SFTP server details if you want to use SFTP for [[Automatic CDR Export]].&lt;br /&gt;
&lt;br /&gt;
* '''IP''' - IP of the SFTP server.&lt;br /&gt;
* '''Port''' - Port of the SFTP server.&lt;br /&gt;
* '''Username''' - Username to connect to SFTP server.&lt;br /&gt;
* '''Password''' - Password to connect to SFTP server. &lt;br /&gt;
* '''Use SSH key''' - Use SSH key configured as described [[Configure SSH connection between servers|here]].&lt;br /&gt;
* '''Path for CDR Export''' - Path in SFTP server where to export CDRs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
* '''Allow short passwords in devices'''&lt;br /&gt;
* '''Use strong passwords for users'''&lt;br /&gt;
* '''Admin login with approved IP only''' - security measure which allows to approve IP's that try to [[MOR_Login_with_approved_IP%27s|login with Admin Account]].&lt;br /&gt;
* '''Enable IP report warning on login failure''' - show [[MOR_Login_Failure_Report|warning]] on unsuccessful login attempts.&lt;br /&gt;
* '''Logout after password change''' - terminates all sessions of the User whose password is changed.&lt;br /&gt;
* '''Logout after closing browser window''' - terminates all sessions of the User after closing browser window.&lt;br /&gt;
* '''Do not logout on session IP change''' - do not logout from MOR GUI if IP is changed.&lt;br /&gt;
* '''2FA Enabled''' - Enables two factors authentication. Two factors authentication requires to enter emailed code during login to user account. '''2FA Enabled must be also enable on individual [[User_Details|User settings]] to make it work for that User.'''&lt;br /&gt;
** '''Email Template''' - [[Emails|email template]] used to send the code.&lt;br /&gt;
** '''Code length (digits)''' - code length.&lt;br /&gt;
** '''Code Enter Attempts Allowed''' - number of attempts to enter the code correctly. Code expires after this number of failed attempts.&lt;br /&gt;
** '''Code Enter Time Allowed''' - code is valid for this amount of time.&lt;br /&gt;
** '''Send Notification Email to Admin on Login''' - allows admin to get email notification on login.&lt;br /&gt;
*** '''Email Template''' - [[Emails|email template]] used to notify admin.&lt;br /&gt;
*** '''On Admin Login''' - get notification on login to Admin's account.&lt;br /&gt;
*** '''On User Login''' - get notification on login to User's accounts.&lt;br /&gt;
** '''Send Notification Email on Login''' - allows this mailbox to get email notification on login.&lt;br /&gt;
*** '''Email Template''' - [[Emails|email template]] used to notify.&lt;br /&gt;
*** '''On Admin Login''' - get notification on login to Admin's account.&lt;br /&gt;
*** '''On User Login''' - get notification on login to User's accounts.&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;
* [[Server is overloaded]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=SIP/2.0_483_Interval_Too_Brief&amp;diff=30127</id>
		<title>SIP/2.0 483 Interval Too Brief</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=SIP/2.0_483_Interval_Too_Brief&amp;diff=30127"/>
		<updated>2025-05-16T05:06:03Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Got SIP response 423 &amp;quot;Interval Too Brief&amp;quot; back from XXX.XXX.XXX.XXX&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
Go to /etc/asterisk/sip.conf and increase to higher value:&lt;br /&gt;
&lt;br /&gt;
 defaultexpiry = 600&lt;br /&gt;
&lt;br /&gt;
Default is 120. Try 1200 and more if 600 does not work.&lt;br /&gt;
&lt;br /&gt;
The line &amp;quot;defaultexpiry = 600&amp;quot; must be above &amp;quot;#exec /usr/local/mor/mor_ast_register SIP&amp;quot;, otherwise it will not be applied on outbound registrations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Check also:'''&lt;br /&gt;
* [[SIP Error Codes]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=SIP/2.0_483_Interval_Too_Brief&amp;diff=30126</id>
		<title>SIP/2.0 483 Interval Too Brief</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=SIP/2.0_483_Interval_Too_Brief&amp;diff=30126"/>
		<updated>2025-05-16T05:05:50Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Got SIP response 423 &amp;quot;Interval Too Brief&amp;quot; back from XXX.XXX.XXX.XXX&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
Go to /etc/asterisk/sip.conf and increase to higher value:&lt;br /&gt;
&lt;br /&gt;
 defaultexpiry = 600&lt;br /&gt;
&lt;br /&gt;
Default is 120. Try 1200 and more if 600 does not work.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;defaultexpiry = 600&amp;quot; must be above &amp;quot;#exec /usr/local/mor/mor_ast_register SIP&amp;quot;, otherwise it will not be applied on outbound registrations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Check also:'''&lt;br /&gt;
* [[SIP Error Codes]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Recordings_Addon&amp;diff=30125</id>
		<title>Recordings Addon</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Recordings_Addon&amp;diff=30125"/>
		<updated>2025-05-15T11:48:01Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* User settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Recordings functionality can be used to record selected users' calls for Monitoring purpose.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Functionality ==&lt;br /&gt;
&lt;br /&gt;
Recording Addon provides this functionality:&lt;br /&gt;
&lt;br /&gt;
* Record User Calls.&lt;br /&gt;
* Send a Recording to email.&lt;br /&gt;
* Limit space Users' space for Recordings.&lt;br /&gt;
* Record Calls without User knowledge.&lt;br /&gt;
* Let Users manage their Recordings (send to email/listen/download/delete).&lt;br /&gt;
* Convert recordings from WAV to MP3 format and store them on an external server, to ease the load on the main server.&lt;br /&gt;
&lt;br /&gt;
NOTE: Reseller is able to have the same functions as an administrator if '''Allow to use recording functionality''' option is checked by Admin in resellers settings. In order for the calls to be recorded for resellers users the &amp;quot;Record calls for this Device:&amp;quot; option (located in the device edit window, &amp;quot;Recordings&amp;quot; block) has to be enabled by the reseller for the devices for which the calls should be recorded. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
* Recordings will not be saved on the server if there will be left less then 10% of free space. Such recordings will be sent directly to the Email (if email is specified in GUI Interface) and will be completely removed from the server.&lt;br /&gt;
&lt;br /&gt;
*Calling Cards calls cannot be recorded.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound file format ===&lt;br /&gt;
&lt;br /&gt;
Recordings are saved into mp3 format. 1MB can save around 4min of recordings.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Adjust needed settings in '''ADDONS –&amp;gt; Recordings –&amp;gt; Settings'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:recordings_addon_settings.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Show in the File Name:''' select format for recording filename. This applies to filename when you download recording(s) over GUI interface. Recordings filename in the server will always be stored in internal Asterisk format uniqueid.mp3, where uniqued is in format unixtimestamp.xxxxx. Format rules also do not apply to recording files sent over email. Internal recording filename will be used for attachment.&lt;br /&gt;
* '''Show Recordings with zero billsec:''' Display recordings which have zero billsec. &lt;br /&gt;
* '''Start Recordings On Answer:''' by default, the recording starts before the call is answered. However, you have the option to start recording when the call is answered. This feature helps to minimize system resource usage.&lt;br /&gt;
* '''Delete Recordings older than:''' delete recordings older than x amount of days. 0 (default) means to no delete any recordings.&lt;br /&gt;
* '''Delete Recordings on the Backup Server''' - With this option enabled, MOR will explicitly delete recordings (both manually selected and automatically selected based on recordings age) on the Backup server. Use this option only if there are two GUI servers (Main and Backup) and there is a cron that syncs recordings between these servers. SSH connection using keys [[Configure SSH connection between servers |must be configured]] between the Main and Backup servers. &lt;br /&gt;
** '''IP:''' - IP of the backup server.&lt;br /&gt;
** '''Port:''' - SSH Port of the backup server.&lt;br /&gt;
** '''Login:''' - SSH username of the backup server.&lt;br /&gt;
** '''Path:''' - Recordings path on the backup server. Default /home/mor/public/recordings&lt;br /&gt;
* '''Use external Server:''' enable this option if you want to use [[External Recordings Server]].&lt;br /&gt;
* '''Recordings Server:''' valid only if '''Use external Server:''' is enabled. More information available in [[External Recordings Server]] page.&lt;br /&gt;
 &lt;br /&gt;
In order to use Recording, you have to set up which Users' Calls you want to record. &lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Recordings –&amp;gt; Users''' and you will see this window:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:recordings1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here you can check the '''Forced record calls for this User''' field for the Users you want to record. By checking '''Allow to use recording functionality''' option you can authorize the User to use the Recordings Addon functionality. Click '''Update''' at the bottom for the changes to take effect.&lt;br /&gt;
To allow particular Reseller to use Recordings functionality, &amp;quot;Allow to use recording functionality&amp;quot; option must be checked in his details. &lt;br /&gt;
&lt;br /&gt;
If you leave '''Server space (MB)''' 0 - there will be no limitations in data usage (HDD will fill up after some time).&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' Recordings are NOT available in Calls between 2 SIP Devices in MOR. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''SETTINGS –&amp;gt; Users –&amp;gt; Edit (on selected user)'''&lt;br /&gt;
&lt;br /&gt;
The Recordings section has the following options:&lt;br /&gt;
&lt;br /&gt;
* Allow to use recording functionality - can this user use the Recording addon functionality?&lt;br /&gt;
&lt;br /&gt;
* Forced record calls for this User - record calls for this user (all devices) without user knowledge. This option has the highest priority.&lt;br /&gt;
when enabled - records for all User devices will be recorded regardless of other options (value in Device settings: Record calls for this Device: - will be ignored, Server space - dedicated for User will be ignored ant etc ) &lt;br /&gt;
&lt;br /&gt;
* Server space - how much HDD space to reserve for recordings of this user. Takes effect only if Admin has not enabled recordings for User himself. Such options should be set on appropriate User/Device by Admin in order to enable this function for User:&lt;br /&gt;
User settings&lt;br /&gt;
    Forced record calls for this User: NO&lt;br /&gt;
Device settings:&lt;br /&gt;
    Record calls for this Device : NO&lt;br /&gt;
    Keep Recordings on Server after sent to Email: NO&lt;br /&gt;
&lt;br /&gt;
* Send deleted recordings to this email. If HDD space is exceeded, the new recordings will not be saved and will be sent to this email instead. If this email is empty, the recording will be sent to the default user email. Recordings will be kept in server if email sending fails.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Device –&amp;gt; Edit window'''&lt;br /&gt;
&lt;br /&gt;
The following options are available for Device:&lt;br /&gt;
&lt;br /&gt;
* '''Record calls for this Device''' - record calls for this Device (without user knowledge). If this option is enabled, recordings must be deleted manually. If this option is set to YES, then server space - dedicated for User will be ignored and records will be placed on server regardless of this value&lt;br /&gt;
* '''Show Recordings to the User for this Device''' - allows User to see his recordings. Shows new recordings from time then this option enabled.&lt;br /&gt;
* '''Send Recording to Email''' - when recording is completed, send to it email. Recordings will be kept in server if email sending fails. Admin must enable &amp;quot;Allow to use recording functionality&amp;quot; for this User; and User, on his/her account must set &amp;quot;Record calls for this Device:&amp;quot; to &amp;quot;Yes&amp;quot; in the Device settings, otherwise, mail will not be sent.&lt;br /&gt;
* '''Recordings Email''' - send to this email address.&lt;br /&gt;
* '''Keep Recordings on Server after sent to Email''' - should the recording be left on the server after being sent to email? If this option is set to YES, then server space - dedicated for User will be ignored and records will be placed on server regardless of this value &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:device_recordings_settings.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Setup User so he could see his recorded Calls ==&lt;br /&gt;
&lt;br /&gt;
1. As admin, go to '''User Edit''' settings [[Image:icon_edit.png]] and check '''Allow to use recording functionality'''. User will be able to use Recording addon functionality.&lt;br /&gt;
&lt;br /&gt;
2. Log in as this User and in '''PERSONAL MENU –&amp;gt; Details –&amp;gt; Devices''', click [[Image:icon_edit.png]] for Device and in the Recordings section check '''Record calls for this Device: YES.'''&lt;br /&gt;
&lt;br /&gt;
3. Now the user will be able to see his calls in '''PERSONAL MENU –&amp;gt; Call –&amp;gt; Recordings'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== User settings ===&lt;br /&gt;
&lt;br /&gt;
The Administrator must authorize the User to use the Recording Addon functionality before User can use its functions. This can be done by checking '''Allow to use recording functionality''' in the User Edit window.&lt;br /&gt;
&lt;br /&gt;
* Delete Recordings older than - any integer value higher than 0 enables functionality only for this User (ignoring Global Recordings Setting). Value 0 - disables deleting Recordings older than by days functionality, only for this User (ignoring Global Recordings Setting). Empty input box (no value at all) uses Global Recordings Setting. This option will only delete the Call Recording originated by User X to Provider Y only if deletion is enabled on both, User X and Provider Y settings; if the deletion is enabled on one of them only, then Recording will not be deleted.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''PERSONAL MENU –&amp;gt; Details'''&lt;br /&gt;
&lt;br /&gt;
* Server space - shows used/reserved HDD space for recordings. If limit reached , recordings will not be showed for user.&lt;br /&gt;
* Email for deleted Recordings - to which email recordings should be sent if there is not enough space for them.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''PERSONAL MENU –&amp;gt; Details –&amp;gt; Devices –&amp;gt; Edit'''&lt;br /&gt;
&lt;br /&gt;
* Record calls for this Device - user can set to record calls for this device or not.&lt;br /&gt;
* Send Recording to Email - should recording be sent to email? Recordings will be kept in server if email sending fails.&lt;br /&gt;
* Recordings Email - the email address email to which recordings should be sent.&lt;br /&gt;
* Keep Recordings on Server after sent to Email - should recordings be left on the server after being sent to email?&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''PERSONAL MENU –&amp;gt; Calls –&amp;gt; Recordings'''&lt;br /&gt;
&lt;br /&gt;
On this page, the User can manage his recordings.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
User Owner can decide:&lt;br /&gt;
&lt;br /&gt;
* Whether or not the user can use Recording Addon functionality (set to record calls, send recordings to email, etc).&lt;br /&gt;
* Which user calls should always be recorded (without User knowledge).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Record not answered calls ==&lt;br /&gt;
&lt;br /&gt;
In order to enable this functionality few changes a needed: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1) Edit /etc/asterisk/mor.conf &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 vi /etc/asterisk/mor.conf&lt;br /&gt;
&lt;br /&gt;
and set '''record_not_answered_calls =''' '''1''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This option record_not_answered_calls - save audio to the file while the channel is not answered (not bridged), default 0 (by default records only answered calls). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) Option Show Recordings with zero billsec should be enabled in GUI. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enable it go to '''Addons –&amp;gt; Recordings –&amp;gt; Settings''' and check option '''Show recordings with zero billsec'''. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now system records not answered calls for all users which are using recording functionality. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Recordings are located in '''ADDONS –&amp;gt; Recordings.''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In recording list you will be able to see recordings without duration. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such calls were not answered but recorded.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:recordingams2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Delete recordings after sending it via e-mail ==&lt;br /&gt;
&lt;br /&gt;
1. As admin, go to '''User Edit''' settings [[Image:icon_edit.png]] and check '''Allow to use recording functionality'''. User will be able to use Recording addon functionality. Do not check '''Forced record calls for this User''' because it this way recordings will '''NOT''' be deleted.&lt;br /&gt;
&lt;br /&gt;
2. Log in as this User and in '''PERSONAL MENU –&amp;gt; Personal Details –&amp;gt; Devices''', click [[Image:icon_edit.png]] for Device and in the Recordings section check '''Keep Recordings on Server after sent to Email: NO.'''&lt;br /&gt;
&lt;br /&gt;
3. Now recordings will be deleted immediately after they will be sent via e-mail.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Recordings on external server == &lt;br /&gt;
&lt;br /&gt;
Manage settings for recordings upload to external server go to '''ADDONS –&amp;gt; Recordings –&amp;gt; Settings'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:recordings_settings_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
you will reach settings page&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:recordings_addon_settings.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
* '''Use external Server''' - should system send recordings to [[External Recordings Server]]? Please check instructions how to setup [[External Recordings Server]].&lt;br /&gt;
* '''Recordings server''' - details such as IP/Port/Login where port is SSH default port 22 and Login is default root.&lt;br /&gt;
* By default recording files in remote server will be placed at /tmp directory&lt;br /&gt;
&lt;br /&gt;
'''P.S. SSH keys must be configured without password in order scp command could transfer the recordings to other server. If this functionality is not enabled - the recordings are stored in local server'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Recordings on additional HDD==&lt;br /&gt;
&lt;br /&gt;
If you want to save recordings on an additional HDD, [[Recordings on additional HDD|please follow this instruction]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Recordings HDD usage==&lt;br /&gt;
&lt;br /&gt;
By default, recordings will not be stored on HDD if free space drops below 10%. If the limit is reached, recordings will be sent to email.&lt;br /&gt;
&lt;br /&gt;
It is possible to set a specific free space limit (in gigabytes) to control when recordings should be sent to email and deleted from the HDD. To set this limit, edit '''/etc/mor/system.conf''' file in each Asterisk server and add the following line:&lt;br /&gt;
&lt;br /&gt;
  recordings_hdd_free_space_limit_gb = X&lt;br /&gt;
&lt;br /&gt;
Here X is the limit in gigabytes. For example '''recordings_hdd_free_space_limit_gb = 5''' will force recordings to be sent via email (instead of storing them on HDD) when free space left on the recordings partition is 5GB or less.&lt;br /&gt;
&lt;br /&gt;
==Do not send Recordings to Email on free space limit==&lt;br /&gt;
&lt;br /&gt;
By default, Recordings are sent to the User via Email when the free space limit is reached (either global HDD space limit or personal User Server Space limit). To disable these emails, add the following option to '''/etc/mor/system.conf''':&lt;br /&gt;
&lt;br /&gt;
 recordings_no_email_on_free_space_limit = 1&lt;br /&gt;
&lt;br /&gt;
Note that in this case Recordings will be lost (deleted from the server and not sent to the User).&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
To view/listen/download/delete recorded Calls go to '''ADDONS –&amp;gt; Recordings'''. You will see something like this:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:recordings2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here Admin/Reseller can see all recordings, search Recordings by:&lt;br /&gt;
&lt;br /&gt;
* Period.&lt;br /&gt;
* Source (CallerID).&lt;br /&gt;
* Destination (Dialed number).&lt;br /&gt;
* User.&lt;br /&gt;
* Device.&lt;br /&gt;
* Provider.&lt;br /&gt;
With each recording, it is possible to:&lt;br /&gt;
&lt;br /&gt;
* Check its details.&lt;br /&gt;
* Check Call details.&lt;br /&gt;
* Add comment to it (note that User and Admin have different comment fields)&lt;br /&gt;
* Listen to it.&lt;br /&gt;
* Download it.&lt;br /&gt;
* Delete it.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE:''' It is available to use recordings 15 minutes after call was made. Till then you may see the message '''Recording was not found locally'''. When listening to a recording its row will turn green as an indicator that the recording was listened.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Recordig_listened_indicator.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Recordings bulk management =&lt;br /&gt;
&lt;br /&gt;
This feature allows an administrator to quickly delete Recordings for selected period or selected Device&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Who can use this functionality? ===&lt;br /&gt;
&lt;br /&gt;
* This feature is available for MOR administrator and Users.&lt;br /&gt;
&lt;br /&gt;
By default, simple Users can listen and download selected recordings. Please note that Users need to have enabled Recording functionality.&lt;br /&gt;
&lt;br /&gt;
If you want to let simple users to delete Recordings. Special permission must be enabled at Users-&amp;gt;[[User_Permissions]]-&amp;gt;Recordings delete.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How to use this functionality ===&lt;br /&gt;
&lt;br /&gt;
To delete by device:&amp;lt;br&amp;gt;&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Recordings'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_menu_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[image:icon_edit.png]] '''Bulk management''' link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_bulk_management.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can check an option to delete by device, select device and click '''Delete'''.&lt;br /&gt;
&lt;br /&gt;
To delete all recordings from all devices at once, select '''All'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_bulk_management_delete_all.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_bulk_management_confirm.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm that you really want to delete recordings of selected device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To delete by date:&amp;lt;br&amp;gt;&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Recordings'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_menu_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on [[image:icon_edit.png]] '''Bulk management''' link. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Date bulkmanagement.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can check an option to delete by date, select date and click '''Delete'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Date recorddelete.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Confirm that you really want to delete recordings of selected period.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To delete recordings for specific user and for specific date, please select user, date and click '''Delete'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recorduserdate.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Recordings Quality Test =&lt;br /&gt;
&lt;br /&gt;
This feature allows to record Calls for specified Destination Group with desired quantity and send Recordings' links via e-mail.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Who can use this functionality? ===&lt;br /&gt;
&lt;br /&gt;
* This feature is only available for MOR administrator and accountant (Manage Recordings Permission)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=== How to use this functionality ===&lt;br /&gt;
&lt;br /&gt;
To setup new Quality Test:&amp;lt;br&amp;gt;&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Recordings –&amp;gt; Quality Test'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_quality_test_menu_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_quality_test_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Set desired E-mail address, Destination Group, Calls Quantity and click on [[image:icon_add.png]] icon. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_quality_test_list_input.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
After Quality Test is created, MOR will collect Recordings with required Destination Group.&lt;br /&gt;
Once Recordings quantity is met, shortly after links with Recordings will be sent to Email.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Recordings_quality_test_list_input_success.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Once email is sent, corresponding Quality Test row will not be shown in list.&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;
* [[MOR Addons]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=High_Availability_Configuration_with_Pacemaker_and_Corosync&amp;diff=30123</id>
		<title>High Availability Configuration with Pacemaker and Corosync</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=High_Availability_Configuration_with_Pacemaker_and_Corosync&amp;diff=30123"/>
		<updated>2025-05-14T07:30:04Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
This tutorial will demonstrate how you can use Corosync and Pacemaker with a Virtual IP to create a high availability server solution in MOR.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
* All public IP addresses have to be on same subnet.&lt;br /&gt;
* Virtual IP has to be free (not assigned to any device on the network). Virtual IP will be managed by Corosync itself.&lt;br /&gt;
* The following ports have to be open between nodes in cluster:&lt;br /&gt;
** UDP 5404, 5405, 5406 - used by Corosync &lt;br /&gt;
** TCP 2224 - used by pscd service&lt;br /&gt;
** TCP 3121 - used by Pacemaker&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Install=&lt;br /&gt;
Run commands below on both nodes to install Pacemaker and Corosync:&lt;br /&gt;
 svn update /usr/src/k_framework/&lt;br /&gt;
 /usr/src/k_framework/helpers/corosync/corosync_install.sh&lt;br /&gt;
 source /root/.bashrc&lt;br /&gt;
&lt;br /&gt;
If /usr/src/k_framework/ directory is not present, checkout it manually:&lt;br /&gt;
 svn co http://svn.kolmisoft.com/k_framework/ /usr/src/k_framework&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Firsly, we need to configure hostnames in servers. You can find current hostname with command:&lt;br /&gt;
 uname -n&lt;br /&gt;
&lt;br /&gt;
We recommend to user hostname node01 for main server, and node02 for backup server, however you can use different hostnames if you wish. You can set hostname on server using command bellow:&lt;br /&gt;
 hostnamectl set-hostname your-new-hostname&lt;br /&gt;
&lt;br /&gt;
If you use different hostname, please replace node01 and node02 with actual hostname names in configuration examples bellow.&lt;br /&gt;
&lt;br /&gt;
Once hostame setup is complete, on main server open file /etc/hosts, you will see something like this:&lt;br /&gt;
 192.168.0.131 node01 #This is example. Change to correct IP&lt;br /&gt;
 192.168.0.132 node02 #Change to correct IP here aswell&lt;br /&gt;
&lt;br /&gt;
Replace IP addresses with actual IP of both servers. If servers hostnames are not node01/node02 replace them with actual hostanme name of servers.&lt;br /&gt;
&lt;br /&gt;
'''Repeat this procedure on backup server too.''' &lt;br /&gt;
&lt;br /&gt;
All examples assume that there are two nodes with hostnames '''node01''' and '''node02''' and they are reachable by their hostnames and IP addresses:&lt;br /&gt;
* node01 - 192.168.0.152&lt;br /&gt;
* node02 - 192.168.0.200&lt;br /&gt;
192.168.0.205 is Virtual IP address.&lt;br /&gt;
&lt;br /&gt;
Also, in all following command line examples, convention is this:&lt;br /&gt;
* '''[root@node01 ~]#'''  denotes a command which should be run on 'ONE' server in the cluster.&lt;br /&gt;
* '''[root@ALL ~]#''' denotes a command which should be run on 'ALL' servers (node01 and node02) in the cluster.&lt;br /&gt;
&lt;br /&gt;
'''You should replace hostnames and IP addresses to match your setup.'''&lt;br /&gt;
&lt;br /&gt;
== Authenticate and Setup Cluster ==&lt;br /&gt;
&lt;br /&gt;
Installation script will install all needed packages and configuration files. Firstly let's setup cluster authentication:&lt;br /&gt;
&lt;br /&gt;
Copy password from node'''01''' to node'''02'''&lt;br /&gt;
 [root@node01 ~]#  scp /root/hacluster_password root@node02:/root/hacluster_password &lt;br /&gt;
And apply password on node'''02'''&lt;br /&gt;
 [root@node02 ~]# cat /root/hacluster_password | passwd --stdin hacluster&lt;br /&gt;
&lt;br /&gt;
Now we can authenticate cluster:&lt;br /&gt;
&lt;br /&gt;
'''On Centos 7'''&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]#  pcs cluster auth node01 node02 -u hacluster -p $(cat /root/hacluster_password)&lt;br /&gt;
 node02: Authorized&lt;br /&gt;
 node01: Authorized&lt;br /&gt;
&lt;br /&gt;
'''On Rocky 9'''&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]#  pcs host auth -u hacluster -p $(cat /root/hacluster_password) node01 node02&lt;br /&gt;
 node02: Authorized&lt;br /&gt;
 node01: Authorized&lt;br /&gt;
&lt;br /&gt;
If you get any other output, it means something went wrong and you should not proceed until this is fixed. If everything is OK, then we can setup cluster:&lt;br /&gt;
&lt;br /&gt;
'''On Centos 7'''&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs cluster setup --name cluster_asterisk node01 node02&lt;br /&gt;
 Destroying cluster on nodes: node01, node02...&lt;br /&gt;
 node01: Stopping Cluster (pacemaker)...&lt;br /&gt;
 node02: Stopping Cluster (pacemaker)...&lt;br /&gt;
 node02: Successfully destroyed cluster&lt;br /&gt;
 node01: Successfully destroyed cluster&lt;br /&gt;
 Sending 'pacemaker_remote authkey' to 'node01', 'node02'&lt;br /&gt;
 node01: successful distribution of the file 'pacemaker_remote authkey'&lt;br /&gt;
 node02: successful distribution of the file 'pacemaker_remote authkey'&lt;br /&gt;
 Sending cluster config files to the nodes...&lt;br /&gt;
 node01: Succeeded&lt;br /&gt;
 node02: Succeeded&lt;br /&gt;
 Synchronizing pcsd certificates on nodes node01, node02...&lt;br /&gt;
 node02: Success&lt;br /&gt;
 node01: Success&lt;br /&gt;
 Restarting pcsd on the nodes in order to reload the certificates...&lt;br /&gt;
 node02: Success&lt;br /&gt;
 node01: Success&lt;br /&gt;
 [root@node01 ~]# &lt;br /&gt;
&lt;br /&gt;
'''On Rocky 9'''&lt;br /&gt;
 [root@node01 ~]# pcs cluster setup  cluster_asterisk node02 node01&lt;br /&gt;
 No addresses specified for host 'node02', using 'node02'&lt;br /&gt;
 No addresses specified for host 'node01', using 'node01'&lt;br /&gt;
 Destroying cluster on hosts: 'node02', 'node01'...&lt;br /&gt;
 node02: Successfully destroyed cluster&lt;br /&gt;
 node01: Successfully destroyed cluster&lt;br /&gt;
 Requesting remove 'pcsd settings' from 'node02', 'node01'&lt;br /&gt;
 node01: successful removal of the file 'pcsd settings'&lt;br /&gt;
 node02: successful removal of the file 'pcsd settings'&lt;br /&gt;
 Sending 'corosync authkey', 'pacemaker authkey' to 'node02', 'node01'&lt;br /&gt;
 node01: successful distribution of the file 'corosync authkey'&lt;br /&gt;
 node01: successful distribution of the file 'pacemaker authkey'&lt;br /&gt;
 node02: successful distribution of the file 'corosync authkey'&lt;br /&gt;
 node02: successful distribution of the file 'pacemaker authkey'&lt;br /&gt;
 Sending 'corosync.conf' to 'node02', 'node01'&lt;br /&gt;
 node01: successful distribution of the file 'corosync.conf'&lt;br /&gt;
 node02: successful distribution of the file 'corosync.conf'&lt;br /&gt;
 Cluster has been successfully set up.&lt;br /&gt;
&lt;br /&gt;
If everything went OK, there should be no errors in output. If this is the case, let's start cluster:&lt;br /&gt;
 [root@node01 ~]# pcs cluster start --all&lt;br /&gt;
 node02: Starting Cluster...&lt;br /&gt;
 node01: Starting Cluster...&lt;br /&gt;
 [root@node01 ~]# &lt;br /&gt;
&lt;br /&gt;
Enable cluster, this will enable pacemaker and corosync on all cluster nodes to start automatically after server reboot:&lt;br /&gt;
&lt;br /&gt;
 [root@node01]# pcs cluster enable  --all&lt;br /&gt;
 node01: Cluster Enabled&lt;br /&gt;
 node02: Cluster Enabled&lt;br /&gt;
&lt;br /&gt;
Now let's check if Corosync is happy and if there are no errors (issue this command on both nodes separately):&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# corosync-cfgtool -s&lt;br /&gt;
 Printing ring status.&lt;br /&gt;
 Local node ID 1&lt;br /&gt;
 RING ID 0&lt;br /&gt;
        id	= 192.168.0.152&lt;br /&gt;
        status	= ring 0 active with no faults&lt;br /&gt;
&lt;br /&gt;
 [root@node02 ~]# corosync-cfgtool -s&lt;br /&gt;
 Printing ring status.&lt;br /&gt;
 Local node ID 2&lt;br /&gt;
 RING ID 0&lt;br /&gt;
      id	= 192.168.0.200&lt;br /&gt;
      status	= ring 0 active with no faults&lt;br /&gt;
&lt;br /&gt;
If you see different output, you should investigate before proceeding. Now let's check membership and quorum APIs, you should see both nodes with status Joined&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# corosync-cmapctl | grep members&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.1.config_version (u64) = 0&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.1.ip (str) = r(0) ip(192.168.0.152) &lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.1.join_count (u32) = 1&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.1.status (str) = joined&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.2.config_version (u64) = 0&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.2.ip (str) = r(0) ip(192.168.0.200) &lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.2.join_count (u32) = 1&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.2.status (str) = joined&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Now disable STONITH and Ignore the Quorum Policy:&lt;br /&gt;
 [root@node01 ~]# pcs property set stonith-enabled=false&lt;br /&gt;
 [root@node01 ~]# pcs property set no-quorum-policy=ignore&lt;br /&gt;
 [root@node01 ~]# pcs property list&lt;br /&gt;
 Cluster Properties:&lt;br /&gt;
  cluster-infrastructure: corosync&lt;br /&gt;
  cluster-name: cluster_asterisk&lt;br /&gt;
  dc-version: 1.1.18-11.el7_5.3-2b07d5c5a9&lt;br /&gt;
  have-watchdog: false&lt;br /&gt;
  no-quorum-policy: ignore&lt;br /&gt;
  stonith-enabled: false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, let check cluster status:&lt;br /&gt;
 [root@node01 ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync svn update /usr/src/mor/sh_scripts&lt;br /&gt;
 /usr/src/mor/sh_scripts/corosync/corosync_install.sh&lt;br /&gt;
 systemctl enable corosync&lt;br /&gt;
 systemctl enable pacemaker&lt;br /&gt;
 Current DC: node02 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum&lt;br /&gt;
 Last updated: Wed Oct 17 07:34:20 2018&lt;br /&gt;
 Last change: Wed Oct 17 07:32:39 2018 by root via cibadmin on node01&lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 0 resources configured&lt;br /&gt;
 Online: [ node01 node02 ]&lt;br /&gt;
 No resources&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
   corosync: active/enabled&lt;br /&gt;
   pacemaker: active/enabled&lt;br /&gt;
   pcsd: active/enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that both nodes are online, all daemons (corosync, pacemaker, pcsd) are active.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Configuring Asterisk HA solution with Virtual IP==&lt;br /&gt;
&lt;br /&gt;
Before proceeding we need to prepare Asterisk to be managed by Corosync with Virtual IP.&lt;br /&gt;
&lt;br /&gt;
1. Make sure that Asterisk service is stopped and disabled on both nodes.&lt;br /&gt;
 [root@ALL ~]# systemctl disable asterisk&lt;br /&gt;
 [root@ALL ~]# systemctl stop asterisk&lt;br /&gt;
&lt;br /&gt;
2. Replace binaddr from 0.0.0.0 to VirtualIP in /etc/asterisk/sip.conf&lt;br /&gt;
&lt;br /&gt;
3. Add Virtual IP in file /etc/asterisk/manager.conf&lt;br /&gt;
&lt;br /&gt;
 permit=192.168.0.205/255.255.255.0&lt;br /&gt;
&lt;br /&gt;
4. Add VirtualIP in GUI Servers page and Global settings page.&lt;br /&gt;
&lt;br /&gt;
5. In file /etc/mor/system.conf add variable VIRTUAL_IP with correct virtual IP&lt;br /&gt;
&lt;br /&gt;
 VIRTUAL_IP=xx.xx.xx.xx &lt;br /&gt;
&lt;br /&gt;
This variable will be used by check scripts.&lt;br /&gt;
&lt;br /&gt;
=== Adding VirtualIP resource ===&lt;br /&gt;
Now when cluster is ready, we can add resources (Virtual IP, Asterisk, httpd, opensips, etc). In this section we will show how to add Virtual IP and Asterisk resources.&lt;br /&gt;
&lt;br /&gt;
Firstly, let's add Virtual IP resource. Do not forget replace '''ip''', '''cidr_netmask''' values and '''nic''' name with values from your setup. Use subnet of main IP for '''cidr_netmask'''.&lt;br /&gt;
Also, make sure that nic name is the same on both servers. If nic name is different, leave nic parameter out. System will find suitable nic for Virtual IP automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource create VirtualIP  ocf:heartbeat:IPaddr2 ip=192.168.0.205 cidr_netmask=32 nic=enp0s3 op monitor interval=30s&lt;br /&gt;
 [root@node01 ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: node02 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum&lt;br /&gt;
 Last updated: Wed Oct 17 07:49:56 2018&lt;br /&gt;
 Last change: Wed Oct 17 07:49:51 2018 by root via cibadmin on node01&lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 1 resource configured&lt;br /&gt;
 Online: [ node01 node02 ]&lt;br /&gt;
 Full list of resources:&lt;br /&gt;
  VirtualIP	(ocf::heartbeat:IPaddr2):	Started node01&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
   corosync: active/enabled&lt;br /&gt;
   pacemaker: active/enabled&lt;br /&gt;
   pcsd: active/enabled&lt;br /&gt;
&lt;br /&gt;
Now let's confirm that Virtual IP has indeed been assigned to interface:&lt;br /&gt;
 [root@node01 ~]# ip addr show&lt;br /&gt;
 1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000&lt;br /&gt;
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00&lt;br /&gt;
     inet 127.0.0.1/8 scope host lo&lt;br /&gt;
        valid_lft forever preferred_lft forever&lt;br /&gt;
     inet6 ::1/128 scope host &lt;br /&gt;
        valid_lft forever preferred_lft forever&lt;br /&gt;
 2: enp0s3: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000&lt;br /&gt;
     link/ether 08:00:27:90:37:9c brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
     inet 192.168.0.152/24 brd 192.168.0.255 scope global noprefixroute dynamic enp0s3&lt;br /&gt;
        valid_lft 564sec preferred_lft 564sec&lt;br /&gt;
     inet 192.168.0.205/24 brd 192.168.0.255 scope global enp0s3&lt;br /&gt;
        valid_lft forever preferred_lft forever&lt;br /&gt;
     inet6 fe80::eb74:dc5d:cdd:df23/64 scope link noprefixroute &lt;br /&gt;
        valid_lft forever preferred_lft forever&lt;br /&gt;
&lt;br /&gt;
If IP is not assigned, recheck if nic interface is correct. If nic was not used, check output of this command:&lt;br /&gt;
 ip -o -f inet route list match 1.2.3.4 scope link&lt;br /&gt;
Where 1.2.3.4 is Virtual IP. If output is empty, it means that system cannot find interface automatically, most likely main IP/mask is set incorrectly.&lt;br /&gt;
&lt;br /&gt;
=== Adding  Asterisk resource ===&lt;br /&gt;
&lt;br /&gt;
Once Virtual IP resource is setup correctly, it is time to add Asterisk resource (Install script will add Asterisk resource in directory /usr/lib/ocf/resource.d/heartbeat/).&lt;br /&gt;
&lt;br /&gt;
'''On Centos 7''':&lt;br /&gt;
&lt;br /&gt;
a) Legacy ocf:heartbeat:asterisk&lt;br /&gt;
&lt;br /&gt;
ocf:heartbeat:asterisk resource was default resource previously, use this option if for some reason you need to re(create) configuration as it was previously.&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource create asterisk ocf:heartbeat:asterisk op monitor timeout=&amp;quot;30&amp;quot;&lt;br /&gt;
&lt;br /&gt;
b) Use systemd:asterisk for new installs&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource create asterisk systemd:asterisk op monitor timeout=&amp;quot;30&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''On Rocky 9'''&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource create asterisk systemd:asterisk op monitor timeout=&amp;quot;30&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now add colocation so that both resources will start at the same node, and set ordering (so that VirtualIP would start before Asterisk):&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs constraint colocation add asterisk with VirtualIP score=INFINITY &lt;br /&gt;
 [root@node01 ~]# pcs constraint order VirtualIP then asterisk &lt;br /&gt;
 Adding VirtualIP asterisk (kind: Mandatory) (Options: first-action=start then-action=start)&lt;br /&gt;
&lt;br /&gt;
Let's check if Asterisk is running:&lt;br /&gt;
&lt;br /&gt;
 [root@localhost node01 ~]# pcs resource status&lt;br /&gt;
  VirtualIP	(ocf::heartbeat:IPaddr2):	Started node01&lt;br /&gt;
  asterisk	(ocf::heartbeat:asterisk):	Started node01&lt;br /&gt;
&lt;br /&gt;
Now make node01 preferd one. This means that if node01 fails and resources are moved node02, node01 will reclaim resources once it will be up again.&lt;br /&gt;
  [root@node01 ~]# pcs resource defaults resource-stickiness=0&lt;br /&gt;
  [root@node01 ~]# pcs constraint location asterisk prefers node01=50&lt;br /&gt;
&lt;br /&gt;
Run corosync check and fix all reported errors:&lt;br /&gt;
 /usr/src/k_framework/helpers/corosync/corosync_check.sh &lt;br /&gt;
&lt;br /&gt;
Reboot servers to make sure that resources are switching correctly and services are started as needed.&lt;br /&gt;
&lt;br /&gt;
==Configuring KSR HA solution with Virtual IP==&lt;br /&gt;
&lt;br /&gt;
Follow this for KSR, GERD, and KSR+GERD on the same server.&lt;br /&gt;
&lt;br /&gt;
1. Install Failover software as described [[#Install|here]].&lt;br /&gt;
&lt;br /&gt;
2. [[#Configuration | Configure the nodes]] and [[#Authenticate and Setup Cluster]]&lt;br /&gt;
&lt;br /&gt;
3. On all failover servers, In file /etc/m2/system.conf add variable VIRTUAL_IP with correct virtual IP&lt;br /&gt;
&lt;br /&gt;
VIRTUAL_IP=xx.xx.xx.xx &lt;br /&gt;
&lt;br /&gt;
4. Virtual IP should be in the GUI servers list. Physical IPs should be added too.&lt;br /&gt;
&lt;br /&gt;
5. Add [[#Adding_VirtualIP_resource | Virtual IP resource]].&lt;br /&gt;
&lt;br /&gt;
6. Make the main node the preferred node for VirtualIP:&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource defaults resource-stickiness=0&lt;br /&gt;
 [root@node01 ~]# pcs constraint location VirtualIP prefers node01=50&lt;br /&gt;
&lt;br /&gt;
7. Run /usr/src/m2/check.sh&lt;br /&gt;
 [root@ALL ~]# /usr/src/m2/check.sh&lt;br /&gt;
&lt;br /&gt;
8. Make changes as indicated by the check.&lt;br /&gt;
&lt;br /&gt;
9. (for KSR and GERDKSR severs) Manually grep for physical servers IP:&lt;br /&gt;
 [root@ALL ~]# grep -F 'physical IP' /etc/kamailio/kamailio.cfg /etc/sysconfig/rtpengine /usr/local/etc/sems/etc/b2bua_topology_hiding.sbcprofile.conf /usr/local/etc/sems/sems.conf&lt;br /&gt;
If grep found anything, replace IPs manually with virtual IP.&lt;br /&gt;
&lt;br /&gt;
10. Stop and disable services&lt;br /&gt;
If KSR is active&lt;br /&gt;
 [root@ALL ~]# systemctl disable kamailio&lt;br /&gt;
 [root@ALL ~]# systemctl stop kamailio&lt;br /&gt;
 [root@ALL ~]# systemctl disable sems&lt;br /&gt;
 [root@ALL ~]# systemctl stop sems&lt;br /&gt;
 [root@ALL ~]# systemctl disable rtpengine&lt;br /&gt;
 [root@ALL ~]# systemctl stop rtpengine&lt;br /&gt;
If GERD is active&lt;br /&gt;
 [root@ALL ~]# systemctl disable radiusd&lt;br /&gt;
 [root@ALL ~]# systemctl stop radiusd&lt;br /&gt;
&lt;br /&gt;
11. Create resources &lt;br /&gt;
&lt;br /&gt;
FOR KSR:&lt;br /&gt;
&lt;br /&gt;
 pcs resource create rtpengine systemd:rtpengine&lt;br /&gt;
 pcs resource create sems systemd:sems&lt;br /&gt;
 pcs resource create kamailio systemd:kamailio&lt;br /&gt;
&lt;br /&gt;
FOR GERD:&lt;br /&gt;
&lt;br /&gt;
 pcs resource create radiusd systemd:radiusd&lt;br /&gt;
&lt;br /&gt;
12. Create a new resource group (for example named ksr) and add all resources (including VirtualIP) into it. Resources in a group are started sequentially and stopped in the reverse order.&lt;br /&gt;
&lt;br /&gt;
For KSR:&lt;br /&gt;
&lt;br /&gt;
 pcs resource group add ksr VirtualIP rtpengine sems kamailio&lt;br /&gt;
&lt;br /&gt;
For GERD&lt;br /&gt;
&lt;br /&gt;
 pcs resource group add gerd VirtualIP radiusd&lt;br /&gt;
&lt;br /&gt;
For GERD+KSR on same server&lt;br /&gt;
&lt;br /&gt;
  pcs resource group add gerdksr VirtualIP radiusd rtpengine sems kamailio&lt;br /&gt;
&lt;br /&gt;
13. Check the output of pcs status. If any resource fails to start, subsequent will not start too. In such case, you will see an error like this (in this case example for rtpengine) in pcs status output&lt;br /&gt;
 Resource Group: ksr&lt;br /&gt;
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started ksr-45&lt;br /&gt;
     rtpengine  (systemd:rtpengine):    Stopped&lt;br /&gt;
     sems       (systemd:sems): Stopped&lt;br /&gt;
     kamailio   (systemd:kamailio):     Stopped&lt;br /&gt;
&lt;br /&gt;
 Failed Resource Actions:&lt;br /&gt;
 * rtpengine_start_0 on ksr-45 'unknown error' (1): call=20, status=complete, exitreason='',&lt;br /&gt;
     last-rc-change='Fri Nov 18 11:07:54 2022', queued=0ms, exec=2060ms&lt;br /&gt;
&lt;br /&gt;
To fix this, check failed resource logs to determine the reason (for example, wrong IP), fix it, and clear pcs with the command:&lt;br /&gt;
 pcs resource cleanup rtpengine&lt;br /&gt;
(use the appropriate resources in your scenario)&lt;br /&gt;
&lt;br /&gt;
If an error has been fixed, pcs will try to start service again, and all subsequent services:&lt;br /&gt;
 Resource Group: ksr&lt;br /&gt;
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started ksr-45&lt;br /&gt;
     rtpengine  (systemd:rtpengine):    Started ksr-45&lt;br /&gt;
     sems       (systemd:sems): Started ksr-45&lt;br /&gt;
     kamailio   (systemd:kamailio):     Started ksr-45&lt;br /&gt;
&lt;br /&gt;
14. If all services running, make a test call, check the sip trace, etc. &lt;br /&gt;
&lt;br /&gt;
15. To test configuration on the backup node, use this command on the main node:&lt;br /&gt;
  [root@node01 ~]# pcs cluster stop&lt;br /&gt;
&lt;br /&gt;
And check the output on node02&lt;br /&gt;
&lt;br /&gt;
 [root@node02 ~]# pcs status&lt;br /&gt;
&lt;br /&gt;
If there are any errors, fix them as described in  10. step&lt;br /&gt;
If all services running, make a test call, check the sip trace, etc. &lt;br /&gt;
&lt;br /&gt;
16. To move services to the main node, start the cluster again on the main node:&lt;br /&gt;
 [root@node01 ~]# pcs cluster start&lt;br /&gt;
&lt;br /&gt;
and check the status:&lt;br /&gt;
  [root@node01 ~]# pcs status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
17. After all tests, run m2/check.sh to check final configuration&lt;br /&gt;
 [root@ALL~]  /usr/src/m2/check.sh &lt;br /&gt;
&lt;br /&gt;
=Stickiness, constraints and moving resources=&lt;br /&gt;
If one node fails, resources will be moved to other node. After first node recovers, should we move resources back to first one or leave the running on second one? This can be controlled using stickiness, if we set stickiness &amp;gt; prefer score, this mean that Pacemaker will prefer to leave resources running and avoid moving them between nodes:&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]#  pcs resource defaults resource-stickiness=100&lt;br /&gt;
 Warning: Defaults do not apply to resources which override them with their own defined values&lt;br /&gt;
 [root@node01 ~]# pcs resource defaults&lt;br /&gt;
 resource-stickiness: 100&lt;br /&gt;
 [root@node01 ~]# &lt;br /&gt;
&lt;br /&gt;
With this settings, resources should not be moved back to original node if that node rebooted for example.&lt;br /&gt;
&lt;br /&gt;
It is possible to move resource manually using pcs recourse move command. For example, let's move resources from current node to the other one:&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource show&lt;br /&gt;
  VirtualIP	(ocf::heartbeat:IPaddr2):	Started node01&lt;br /&gt;
  asterisk	(ocf::heartbeat:asterisk):	Started node01&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource move VirtualIP&lt;br /&gt;
 Warning: Creating location constraint cli-ban-VirtualIP-on-node01 with a score of -INFINITY for resource VirtualIP on node node01.&lt;br /&gt;
 This will prevent VirtualIP from running on node01 until the constraint is removed. This will be the case even if node01 is the last node in the cluster.&lt;br /&gt;
 [root@node01 ~]# &lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource show&lt;br /&gt;
 VirtualIP	(ocf::heartbeat:IPaddr2):	Started node02&lt;br /&gt;
 asterisk	(ocf::heartbeat:asterisk):	Started node02&lt;br /&gt;
&lt;br /&gt;
As you can see, resources has been moved (as asterisk depends on VirtualIP, it is enough to move VirtualIP resource), however new location constraint has been created (cli-ban-VirtualIP-on-node01). We can check constraints this way: &lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]#  pcs constraint --full&lt;br /&gt;
 Location Constraints:&lt;br /&gt;
   Resource: VirtualIP&lt;br /&gt;
     Disabled on: node01 (score:-INFINITY) (role: Started) (id:cli-ban-VirtualIP-on-node01)&lt;br /&gt;
 Ordering Constraints:&lt;br /&gt;
   start VirtualIP then start asterisk (kind:Mandatory) (id:order-VirtualIP-asterisk-mandatory)&lt;br /&gt;
 Colocation Constraints:&lt;br /&gt;
   asterisk with VirtualIP (score:INFINITY) (id:colocation-asterisk-VirtualIP-INFINITY)&lt;br /&gt;
 Ticket Constraints:&lt;br /&gt;
&lt;br /&gt;
Now even if node02 will fail, resources will not be moved to node01. To remove constraint, we can use command  pcs constraint remove &amp;lt;constraint-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs constraint remove cli-ban-VirtualIP-on-node01&lt;br /&gt;
 [root@node01 ~]#  pcs constraint --full&lt;br /&gt;
 Location Constraints:&lt;br /&gt;
 Ordering Constraints:&lt;br /&gt;
   start VirtualIP then start asterisk (kind:Mandatory) (id:order-VirtualIP-asterisk-mandatory)&lt;br /&gt;
 Colocation Constraints:&lt;br /&gt;
   asterisk with VirtualIP (score:INFINITY) (id:colocation-asterisk-VirtualIP-INFINITY)&lt;br /&gt;
 Ticket Constraints:&lt;br /&gt;
&lt;br /&gt;
=Maintenance mode=&lt;br /&gt;
&lt;br /&gt;
There is time when we need to stop, inspect or do other maintenance work on resources without interference from cluster management software. We can achieve this by putting cluster in maintenance mode&lt;br /&gt;
 [root@node01 ~]# pcs property set maintenance-mode=true&lt;br /&gt;
 [root@node01 ~]# pcs property | grep -i maintenance&lt;br /&gt;
  maintenance-mode: true&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs status &lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: node02 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum&lt;br /&gt;
 Last updated: Wed Oct 17 10:45:24 2018&lt;br /&gt;
 Last change: Wed Oct 17 10:39:18 2018 by root via cibadmin on node01&lt;br /&gt;
 &lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 2 resources configured&lt;br /&gt;
 &lt;br /&gt;
              *** Resource management is DISABLED ***&lt;br /&gt;
   The cluster will not attempt to start, stop or recover services&lt;br /&gt;
 &lt;br /&gt;
 Online: [ node01 node02 ] &lt;br /&gt;
 &lt;br /&gt;
 Full list of resources:&lt;br /&gt;
 &lt;br /&gt;
  VirtualIP	(ocf::heartbeat:IPaddr2):	Started node02 (unmanaged)&lt;br /&gt;
  asterisk	(ocf::heartbeat:asterisk):	Started node02 (unmanaged)&lt;br /&gt;
 &lt;br /&gt;
 Daemon Status:&lt;br /&gt;
   corosync: active/enabled&lt;br /&gt;
   pacemaker: active/enabled&lt;br /&gt;
   pcsd: active/enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To move back cluster to normal operation, simply set maintenance mode to false&lt;br /&gt;
 [root@node01 ~]# pcs property set maintenance-mode=false&lt;br /&gt;
 [root@node01 ~]# pcs property | grep -i maintenance&lt;br /&gt;
  maintenance-mode: false&lt;br /&gt;
 [root@node01 ~]#&lt;br /&gt;
&lt;br /&gt;
= Resource Clean Up =&lt;br /&gt;
If the asterisk does not start on the node, due to such errors:&lt;br /&gt;
 pcs status&lt;br /&gt;
  VirtualIP      (ocf::heartbeat:IPaddr2):       Started[ mor01 mor02 ]&lt;br /&gt;
  asterisk       (ocf::heartbeat:asterisk):      FAILED mor 01 (blocked) &lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 pcs status&lt;br /&gt;
 Failed Resource Actions:&lt;br /&gt;
 * asterisk_start_0 on mor01 'unknown error' (1): call=24, status=Error, exitreason='',&lt;br /&gt;
    last-rc-change='Sun Jun  5 03:18:00 2022', queued=0ms, exec=6175ms&lt;br /&gt;
&lt;br /&gt;
try to cleanup Asterisk resource&lt;br /&gt;
 [root@mor01 ~]# pcs resource cleanup asterisk &lt;br /&gt;
 Cleaned up asterisk on mor02&lt;br /&gt;
 Cleaned up asterisk on mor01&lt;br /&gt;
 Waiting for 1 reply from the CRMd. OK&lt;br /&gt;
&lt;br /&gt;
=Replacing a Corosync Node=&lt;br /&gt;
&lt;br /&gt;
Example based on situation when node'''01''' is being replaced.&lt;br /&gt;
&lt;br /&gt;
Disable selinux.&lt;br /&gt;
&lt;br /&gt;
Make sure the node'''01''' is completely stopped.&lt;br /&gt;
&lt;br /&gt;
Give the new machine the same '''hostname''' and '''IP''' address as the old one.&lt;br /&gt;
&lt;br /&gt;
Correct '''/etc/hosts''' on the node'''01'''.&lt;br /&gt;
&lt;br /&gt;
Install the cluster software on node'''01'''. Run commands bellow on both nodes to install Pacemaker and Corosync:&lt;br /&gt;
 svn update /usr/src/k_framework/&lt;br /&gt;
 /usr/src/k_framework/helpers/corosync/corosync_install.sh&lt;br /&gt;
 systemctl enable corosync&lt;br /&gt;
 systemctl enable pacemaker&lt;br /&gt;
&lt;br /&gt;
Copy ''/etc/corosync/corosync.conf'' from node'''02''' to node'''01'''.&lt;br /&gt;
&lt;br /&gt;
Copy password from node'''02''' to node'''01''':&lt;br /&gt;
 [root@node02 ~]#  scp /root/hacluster_password root@node01:/root/hacluster_password &lt;br /&gt;
And apply password on node'''01''':&lt;br /&gt;
 [root@node01 ~]# cat /root/hacluster_password | passwd --stdin hacluster&lt;br /&gt;
&lt;br /&gt;
Copy authkey from node'''02''' to node'''01''':&lt;br /&gt;
  [root@node02 ~]#  scp /etc/pacemaker/authkey root@node01:/etc/pacemaker/authkey&lt;br /&gt;
&lt;br /&gt;
Restart pcs Daemon on node'''02''':&lt;br /&gt;
 [root@node02 ~]# systemctl restart pcsd.service&lt;br /&gt;
&lt;br /&gt;
Now we can authenticate cluster:&lt;br /&gt;
 [root@node01 ~]#  pcs cluster auth node01 node02 -u hacluster -p $(cat /root/hacluster_password)&lt;br /&gt;
 node02: Authorized&lt;br /&gt;
 node01: Authorized&lt;br /&gt;
&lt;br /&gt;
If you get any other output, it means something went wrong and you should not proceed until this is fixed.&lt;br /&gt;
&lt;br /&gt;
Remove VirtualIP resource and create it again:&lt;br /&gt;
 [root@node01 ~]# pcs resource delete VirtualIP&lt;br /&gt;
 [root@node01 ~]# pcs resource create VirtualIP  ocf:heartbeat:IPaddr2 ip=192.168.0.205 cidr_netmask=32 nic=enp0s3 op monitor interval=30s&lt;br /&gt;
&lt;br /&gt;
Check more details about creating VirtualIP in the topics above.&lt;br /&gt;
&lt;br /&gt;
Now add colocation so that both resources will start at the same node, and set ordering (so that VirtualIP would start before Asterisk):&lt;br /&gt;
 [root@node01 ~]# pcs constraint colocation add asterisk with VirtualIP score=INFINITY &lt;br /&gt;
 [root@node01 ~]# pcs constraint order VirtualIP then asterisk &lt;br /&gt;
 Adding VirtualIP asterisk (kind: Mandatory) (Options: first-action=start then-action=start)&lt;br /&gt;
&lt;br /&gt;
Make sure that everything is enabled and working by executing command:&lt;br /&gt;
 [root@node01 ~]# pcs status&lt;br /&gt;
&lt;br /&gt;
=Increase token timeout=&lt;br /&gt;
Corosync runs in real-time priority, if corosync is not scheduled in time, such messages might appear&lt;br /&gt;
&lt;br /&gt;
 Corosync main process was not scheduled (@1687222876617) for 1587.5076 ms (threshold is 800.0000 ms). Consider token timeout increase.&lt;br /&gt;
 Corosync main process was not scheduled (@1687222961366) for 916.5676 ms (threshold is 800.0000 ms). Consider token timeout increase.&lt;br /&gt;
 Corosync main process was not scheduled (@1687222974600) for 2899.7456 ms (threshold is 800.0000 ms). Consider token timeout increase.&lt;br /&gt;
&lt;br /&gt;
This usually happens when a hypervisor (VM) is used. &lt;br /&gt;
&lt;br /&gt;
The procedure to increase timeout is:&lt;br /&gt;
&lt;br /&gt;
1. Edit corosync file on node01&lt;br /&gt;
 [root@node01 ~]# vi /etc/corosync/corosync.conf&lt;br /&gt;
 totem {&lt;br /&gt;
     version: 2&lt;br /&gt;
     cluster_name: cluster_asterisk&lt;br /&gt;
     secauth: off&lt;br /&gt;
     transport: udpu&lt;br /&gt;
     token: 5000  # &amp;lt;--- add this line with the proper value to your situation. The default value on Centos 7 is 1000, and the threshold is met at 80% of that value (so default is 800ms)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
2. Sync file automatically to other node:&lt;br /&gt;
 [root@node01 ~]# pcs cluster sync&lt;br /&gt;
3. Reload configuration (this will reload on both nodes automatically)&lt;br /&gt;
  [root@node01 ~]# pcs cluster reload corosync&lt;br /&gt;
4. Check if changes are applied:&lt;br /&gt;
 [root@node01 ~]# corosync-cmapctl | grep totem.token&lt;br /&gt;
 runtime.config.totem.token (u32) = 5000&lt;br /&gt;
 runtime.config.totem.token_retransmit (u32) = 1190&lt;br /&gt;
 runtime.config.totem.token_retransmits_before_loss_const (u32) = 4&lt;br /&gt;
 totem.token (u32) = 5000&lt;br /&gt;
&lt;br /&gt;
Incrasing might not help, if there are periodic freezes, for example, if the hypervisor takes VM backups periodically.&lt;br /&gt;
&lt;br /&gt;
= Moving from ofc Asterisk resource to systemd Asterisk =&lt;br /&gt;
&lt;br /&gt;
systemd Asterisk directly integrates with Asterisk systemd service and can better manage Asterisk sate (when it is up, stopped, etc).&lt;br /&gt;
&lt;br /&gt;
Moving from ofc to systemd will require Asterisk stop/start.&lt;br /&gt;
&lt;br /&gt;
1. Cleanup Asterisk resource to make sure it is in a clean state&lt;br /&gt;
 [root@node01 ~]# pcs resource delete asterisk&lt;br /&gt;
&lt;br /&gt;
2. Delete Asterisk resource ('''this will stop Asterisk!''')&lt;br /&gt;
 [root@node01 ~]# pcs resource delete asterisk&lt;br /&gt;
&lt;br /&gt;
3. Follow all instructions here (including constraints) https://wiki.kolmisoft.com/index.php/High_Availability_Configuration_with_Pacemaker_and_Corosync#Adding_Asterisk_resource&lt;br /&gt;
&lt;br /&gt;
  of course use '''systemd:asterisk'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' After Asterisk resource creation, it is likely that it will start on the backup node, but after adding constrains it will move to the main node.&lt;br /&gt;
&lt;br /&gt;
Example with all output (vmx17main = node1, vmx17backup = node2)&lt;br /&gt;
&lt;br /&gt;
 [root@vmx17main ~]# pcs resource cleanup asterisk      &lt;br /&gt;
 Cleaned up asterisk on vmx17backup&lt;br /&gt;
 Cleaned up asterisk on vmx17main&lt;br /&gt;
 [root@vmx17main ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: vmx17backup (version 1.1.23-1.el7_9.1-9acf116022) - partition with quorum&lt;br /&gt;
 Last updated: Fri Feb  7 12:03:46 2025&lt;br /&gt;
 Last change: Fri Feb  7 12:02:20 2025 by root via cibadmin on vmx17main&lt;br /&gt;
 &lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 2 resource instances configured &lt;br /&gt;
 Online: [ vmx17backup vmx17main ]&lt;br /&gt;
 Full list of resources:&lt;br /&gt;
 VirtualIP      (ocf::heartbeat:IPaddr2):       Started vmx17main&lt;br /&gt;
 asterisk       (ocf::heartbeat:asterisk):      Started vmx17main&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
  corosync: active/enabled&lt;br /&gt;
  pacemaker: active/enabled&lt;br /&gt;
  pcsd: active/enabled&lt;br /&gt;
 [root@vmx17main ~]# pcs resource delete asterisk&lt;br /&gt;
 Attempting to stop: asterisk... Stopped&lt;br /&gt;
 [root@vmx17main ~]# pcs resource create asterisk systemd:asterisk op monitor timeout=&amp;quot;30&amp;quot;&lt;br /&gt;
 [root@vmx17main ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: vmx17backup (version 1.1.23-1.el7_9.1-9acf116022) - partition with quorum&lt;br /&gt;
 Last updated: Fri Feb  7 12:04:28 2025&lt;br /&gt;
 Last change: Fri Feb  7 12:04:17 2025 by root via cibadmin on vmx17main&lt;br /&gt;
 &lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 2 resource instances configured&lt;br /&gt;
 &lt;br /&gt;
 Online: [ vmx17backup vmx17main ] &lt;br /&gt;
 Full list of resources:&lt;br /&gt;
 VirtualIP      (ocf::heartbeat:IPaddr2):       Started vmx17main&lt;br /&gt;
 asterisk       (systemd:asterisk):     Started vmx17backup&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
  corosync: active/enabled&lt;br /&gt;
  pacemaker: active/enabled&lt;br /&gt;
  pcsd: active/enabled&lt;br /&gt;
 [root@vmx17main ~]# pcs constraint colocation add asterisk with VirtualIP score=INFINITY &lt;br /&gt;
 [root@vmx17main ~]# pcs constraint order VirtualIP then asterisk &lt;br /&gt;
 Adding VirtualIP asterisk (kind: Mandatory) (Options: first-action=start then-action=start)&lt;br /&gt;
 [root@vmx17main ~]# pcs resource defaults resource-stickiness=0&lt;br /&gt;
 Warning: Defaults do not apply to resources which override them with their own defined values&lt;br /&gt;
 [root@vmx17main ~]# pcs constraint location asterisk prefers vmx17main=50&lt;br /&gt;
 [root@vmx17main ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: vmx17backup (version 1.1.23-1.el7_9.1-9acf116022) - partition with quorum&lt;br /&gt;
 Last updated: Fri Feb  7 12:04:49 2025&lt;br /&gt;
 Last change: Fri Feb  7 12:04:46 2025 by root via cibadmin on vmx17main &lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 2 resource instances configured&lt;br /&gt;
 Online: [ vmx17backup vmx17main ]&lt;br /&gt;
 Full list of resources:&lt;br /&gt;
  VirtualIP      (ocf::heartbeat:IPaddr2):       Started vmx17main&lt;br /&gt;
  asterisk       (systemd:asterisk):     Started vmx17main&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
   corosync: active/enabled&lt;br /&gt;
   pacemaker: active/enabled&lt;br /&gt;
   pcsd: active/enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Modifying Resource Timeout Parameters=&lt;br /&gt;
Resources have 3 main timeouts (monitor, start, and stop)&lt;br /&gt;
&lt;br /&gt;
Monitor timeout also has an interval parameter (how often execute monitor operation)&lt;br /&gt;
&lt;br /&gt;
For example, Asterisk resources by default have a monitor timeout of 30, with an interval of 60&lt;br /&gt;
 pcs resource show asterisk&lt;br /&gt;
 Resource: asterisk (class=systemd type=asterisk)&lt;br /&gt;
  Operations: monitor interval=60 timeout=30 (asterisk-monitor-interval-60)&lt;br /&gt;
&lt;br /&gt;
So if we want to increase the timeout, if it exceeds the interval, we should increase the interval too, to avoid overlapping monitoring.&lt;br /&gt;
&lt;br /&gt;
For example, If we simply increase monitor timeout to 120:&lt;br /&gt;
 [root@vmx17main ~]# pcs resource update asterisk op monitor  timeout=&amp;quot;120&amp;quot;&lt;br /&gt;
 [root@vmx17main ~]# pcs resource show asterisk&lt;br /&gt;
  Resource: asterisk (class=systemd type=asterisk)&lt;br /&gt;
   Operations: monitor interval=60s timeout=120 (asterisk-monitor-interval-60s)&lt;br /&gt;
&lt;br /&gt;
So we have a situation where the interval is less than the timeout. The correct update would be like this:&lt;br /&gt;
&lt;br /&gt;
 [root@vmx17main ~]# pcs resource update asterisk op monitor interval=&amp;quot;140&amp;quot; timeout=&amp;quot;120&amp;quot;&lt;br /&gt;
 [root@vmx17main ~]# pcs resource show asterisk&lt;br /&gt;
  Resource: asterisk (class=systemd type=asterisk)&lt;br /&gt;
   Operations: monitor interval=140 timeout=120 (asterisk-monitor-interval-140)&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT''' for systemd resources, monitor interval controls how long resource is down when it crashed, for example, more information [[High_Availability_Configuration_with_Pacemaker_and_Corosync#systemd_resources_and_automatic_restarts | here]]&lt;br /&gt;
&lt;br /&gt;
Start and stop actions always have an interval set to 0 (as it does not make sense otherwise), so we can only update the timeout, for example:&lt;br /&gt;
&lt;br /&gt;
 pcs resource update asterisk op start timeout=&amp;quot;60&amp;quot;&lt;br /&gt;
 pcs resource update asterisk op stop timeout=&amp;quot;60&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= systemd resources and automatic restarts =&lt;br /&gt;
&lt;br /&gt;
systemd units often have automatic restart functionality, for example, Asterisk unit:&lt;br /&gt;
 # safe_asterisk emulation&lt;br /&gt;
 Restart=always&lt;br /&gt;
 RestartSec=10&lt;br /&gt;
&lt;br /&gt;
When systemd resource is added in pcs, it automatically creates systemd configuration file which disables automatic restart, so that the cluster could fully control the resource.&lt;br /&gt;
&lt;br /&gt;
For example, for Asterisk resource, note # /run/systemd/system/asterisk.service.d/50-pacemaker.conf at the end:&lt;br /&gt;
&lt;br /&gt;
 [root@vmx17main ~]# systemctl cat asterisk&lt;br /&gt;
 # /etc/systemd/system/asterisk.service&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Asterisk PBX and telephony daemon&lt;br /&gt;
 Documentation=man:asterisk(8)&lt;br /&gt;
 Wants=network.target&lt;br /&gt;
 After=network.target &lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=simple&lt;br /&gt;
 User=root&lt;br /&gt;
 Group=root&lt;br /&gt;
 Environment=HOME=/var/lib/asterisk&lt;br /&gt;
 WorkingDirectory=/var/lib/asterisk&lt;br /&gt;
 ExecStart=/usr/sbin/asterisk -g -f -C /etc/asterisk/asterisk.conf&lt;br /&gt;
 ExecStop=/usr/sbin/asterisk -rx 'core stop now'&lt;br /&gt;
 ExecReload=/usr/bin/asterisk -rx 'core reload'&lt;br /&gt;
 LimitNOFILE=65536&lt;br /&gt;
 LimitCORE=infinity &lt;br /&gt;
 &lt;br /&gt;
 # safe_asterisk emulation&lt;br /&gt;
 Restart=always&lt;br /&gt;
 RestartSec=10&lt;br /&gt;
  &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
 # /run/systemd/system/asterisk.service.d/50-pacemaker.conf&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Cluster Controlled asterisk&lt;br /&gt;
 Before=pacemaker.service pacemaker_remote.service&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Restart=no&lt;br /&gt;
&lt;br /&gt;
which adds  Restart=no.&lt;br /&gt;
&lt;br /&gt;
This means that with systemd resources, resource monitor interval also controls how long we wait until the service is started after the crash.&lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
This guide is based on and more information can be found here:&lt;br /&gt;
&lt;br /&gt;
http://www.alexlinux.com/asterisk-high-availability-cluster-with-pacemaker-on-centos-7/&lt;br /&gt;
&lt;br /&gt;
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Overview/&lt;br /&gt;
&lt;br /&gt;
https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/ch05.html&lt;br /&gt;
&lt;br /&gt;
http://linux-ha.org/doc/man-pages/re-ra-IPaddr2.html&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=30120</id>
		<title>Device settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=30120"/>
		<updated>2025-05-13T09:39:46Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;mkmeta&amp;gt;MOR Device Settings Explained&amp;lt;/mkmeta&amp;gt;&lt;br /&gt;
=General=&lt;br /&gt;
&lt;br /&gt;
* '''Accountcode''' – the unique ID of the device in the system.&lt;br /&gt;
* '''Description''' – for informational purposes.&lt;br /&gt;
* '''PIN''' – device PIN for authentication/authorization.&lt;br /&gt;
* '''Device group''' – to which group the device belongs (not used most of the time).&lt;br /&gt;
* '''Type''' – what type of device it is. Device type '''cannot''' be changed once it is created.&lt;br /&gt;
* '''Extension''' – a short number by which this device can be reached; must be unique in the system.&lt;br /&gt;
* '''DTMF Mode''' – in which protocol phone button presses are sent over network. The available options are: inband, info, RFC2833, and auto. Choose which one your provider uses (RFC2833 is used most often). This setting applies to SIP, H.323 and IAX2 protocols. For ZAP devices edit the configuration files in /etc/asterisk.&lt;br /&gt;
* '''Location''' – the default is Global. Choose the appropriate location based on [[Localization]] needs.&lt;br /&gt;
* '''Ringing Timeout''' – allows to limit the ringing duration in seconds. Minimal value is 10 seconds. Option is designed for incoming calls.&lt;br /&gt;
* '''Call Timeout''' – allows to limit answered call billsec. Leave 0 for unlimited.&lt;br /&gt;
* '''[[Trunks | Trunk]]''' – No/ Yes/ Yes with ANI/ 3CX – Is this device Trunk with/without ANI, 3CX? The &amp;quot;3CX&amp;quot; option adds rinstance parameter to R-URI which is used on 3CX authentication. In general 3CX option sets R-URI with Contact URI (including all parameters, such as rinstance) but replaces user part with DID number. 3CX option only works for dynamic trunks. More details: https://www.3cx.com/docs/sip-trunk-registration-authentication/&lt;br /&gt;
* '''[[Multi_Server_support | Server]]''' – allows to choose server in multiple servers system. Choose '''''All''''' to assign all servers. Option '''All''' can be used and is shown only for IP Authenticated devices. (While Carrier Class Addon is active, all Virtual and Fax devices are auto-assigned to all present Asterisk servers and cannot be re-assigned. Disabling Carrier Class Addon all Virtual and Fax devices will be assigned to default Asterisk server chosen from Addons &amp;gt; Carrier Class &amp;gt; Settings dropdown).&lt;br /&gt;
* '''Balance''' – a balance of the device. Disabled by default. Balance is decreasing when the User makes calls. Payments does not affect device balance.&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 dahdi devices:===&lt;br /&gt;
&lt;br /&gt;
* '''Channel''' – which channel (or channel group) to use on 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, H323 and IAX2 Devices:===&lt;br /&gt;
&lt;br /&gt;
'''IP Authentication:'''&lt;br /&gt;
* '''Hostname''' – Device hostname. Use &amp;quot;IP Address&amp;quot; instead if you have problems with inbound calls.&lt;br /&gt;
* '''IP Address''' – Device IP address in one of the following formats: &lt;br /&gt;
** '''IP''' – understands simple IPv4 address, IPv4 address with it's Subnet Mask and IPv4 address with it's Range. For example ''192.168.0.1'', ''192.168.0.1/24'' and ''192.168.0.0-255''. Or IPv6 address without a Subnet Mask or Range.&lt;br /&gt;
* '''Accept calls from any port''' – this option lets you receive calls from different Ports. This option is just on SIP (when [[SIP balancer]] in use) and H323.&lt;br /&gt;
* '''Port''' – Device Port.&lt;br /&gt;
&lt;br /&gt;
'''Dynamic:'''&lt;br /&gt;
&lt;br /&gt;
* '''Username''' – username you enter in your Device.&lt;br /&gt;
* '''Password''' – password you enter in your Device.&lt;br /&gt;
* '''IP Address''' – shows Device IP address.&lt;br /&gt;
* '''Port''' – shows Device Port.&lt;br /&gt;
* '''Registration Status''' - available only for SIP  devices. If device is assigned to server A but registers to server B - status will not be shown (devices must register to the server they are assigned to). If no status is displayed - device has not tried to register or no one called to that device. Qualify must enabled if you want to monitor device status.&lt;br /&gt;
* '''UNREGISTER''' - last registration information will be deleted (ipaddr, port, fullcontact).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=CallerID=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:device_callerid.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
A CallerID consists of two parts: Name and Number. The &amp;quot;Number&amp;quot; part is transferred by default by all technologies (GSM, PSTN, SIP etc), but the &amp;quot;Name&amp;quot; part is transferred only by 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;
&lt;br /&gt;
* '''Name''' – the &amp;quot;Name&amp;quot; part of the CallerID.&lt;br /&gt;
* '''Number''' – the &amp;quot;Number&amp;quot; part of the CallerID. Only numerical values can be entered in this field. &lt;br /&gt;
&lt;br /&gt;
NOTE: if you leave these fields empty, the user can set the CallerID name by himself. Usually it is not advisable to allow the user do it on his own. If CallerID number field is empty, system will take device username as CallerID number (if device is username/password authenticated).&lt;br /&gt;
&lt;br /&gt;
* '''Number from DID''' - use the DID as the CallerID (only available when the device has DIDs), this option just sets CallerID Number to be equal to DID. Next time you will edit Device's settings, first option - Number will be checked&lt;br /&gt;
&lt;br /&gt;
* '''Control by DIDs (CID from DIDs)''' – only available when the device has DIDs and &amp;quot;Number&amp;quot; field is empty.&lt;br /&gt;
&lt;br /&gt;
This setting lets you control what a CID user can enter in his devices. CID numbers should be from the set of the device's DIDs. They are mainly used when the user's PBX is connected over Trunk and many DIDs are routed to this Trunk. Calls coming out from this PBX must have a CallerID Number from the set of DIDs assigned to this Trunk (PBX). If &amp;quot;CID from DIDs&amp;quot; is checked, the system checks whether the device's CID number is from DIDs assigned to this device. If no DIDs are assigned, this value is ignored. In order for this setting to be active, CID Name/Number fields must be empty to allow the user to enter any CID number he wants. If &amp;quot;CID from DIDs&amp;quot; is checked and user enters any CID (not from his DIDs), the system will change his CID to one of the DIDs assigned to this Device. Original (non Localized) CallerID is used for DID matching.&lt;br /&gt;
&lt;br /&gt;
* '''Control by CIDs'''  – system checks incoming CallerID (Device's CallerID which is set on the Device). If CallerID matches one of the Device's CIDs - then such CallerID will be allowed. If it does not match - it will be changed to the selected CID.&lt;br /&gt;
&lt;br /&gt;
* '''Control by Destination''' – This is advanced option which works by such algorithm:&lt;br /&gt;
&lt;br /&gt;
# system checks Destination and checks DIDs assigned to calling Device. Then it finds 'nearest' DID to the Destination by subtracting DID from Destination in numerical form (Example, DID: 11111, Destination: 11112, |DID-Destination|=|1111-11112|=1) If Device has several DIDs - the lowest value is selected and this DID is set as CallerID.&lt;br /&gt;
#If Device has no DIDs - then User DIDs are used. &lt;br /&gt;
#If Device does not have DIDs and User has no DIDs, then CallerID set in Number field will be used. &lt;br /&gt;
#If nothing is set here - CallerID coming from Device will be used.&lt;br /&gt;
Note: behavior can be [http://wiki.kolmisoft.com/index.php/Mor.conf changed] to search for '''best matching''' DID instead of '''nearest''' DID &lt;br /&gt;
* '''Random Number from Number Pool''' – This functionality gives you an ability to send different caller number on each Call. Available from MOR X4. More information: [http://wiki.kolmisoft.com/index.php/Number_Pool 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;
&lt;br /&gt;
* '''Unknown''' - This option lets you set CallerID number to ''unknown'' and pass a custom CallerID in either RPID or PAI header:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Unknown_cid_rpid_pai.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Copy Leg A Name to Leg B Number''' – Leg A name will be used as Leg B number.&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;
===For H323:===&lt;br /&gt;
&lt;br /&gt;
* '''Fast start''' – option for faster H.245.&lt;br /&gt;
* '''h245 Tunneling''' – use H.245 without opening a second TCP/IP channel.&lt;br /&gt;
More info you can find [http://toncar.cz/Tutorials/VoIP/VoIP_Protocols_H323_Call_Signalling_Optimizations.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===For SIP and IAX2===&lt;br /&gt;
&lt;br /&gt;
* '''Media control''' – can reinvite. Do you want your server to stay in media path between your clients and your provider? Please note that this option will work only if it is supported from both, device and provider, sides and it allows to handle SIP packets only. Moreover, no codec mismatch between device and provider is available. Default value is ''No''. '''WARNING''': This option can cause [[Call was billed incorrectly|incorrect billing]].&lt;br /&gt;
** canreinvite = yes &amp;quot;allow RTP media direct&amp;quot;&lt;br /&gt;
** canreinvite = no &amp;quot;deny re-invites&amp;quot;&lt;br /&gt;
** canreinvite = nonat &amp;quot;allow reinvite when local, deny reinvite when NAT&amp;quot;&lt;br /&gt;
** canreinvite = update &amp;quot;use UPDATE instead of INVITE&amp;quot;&lt;br /&gt;
** canreinvite = update,nonat &amp;quot;use UPDATE when local, deny when NAT&amp;quot;&lt;br /&gt;
* '''NAT''' – the available options are: yes, no, never, force_rport, comedia. For a detailed explanation of these settings, refer to [http://www.voip-info.org/wiki/view/Asterisk+sip+nat here].&lt;br /&gt;
* '''Qualify''' – how long to wait for a response to Qualify request. If you have lot of Devices in your system, set it to 9000ms or more. More details [http://www.voip-info.org/wiki/view/Asterisk+sip+qualify here] for SIP devices and [http://www.voip-info.org/wiki/view/Asterisk+iax+qualify here] for IAX2 devices.&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. Only on IAX2.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Groups=&lt;br /&gt;
&lt;br /&gt;
* [[What are callgroups and pickupgroups | Call Group]] – to which Call Group this device belongs.&lt;br /&gt;
* [[What are callgroups and pickupgroups | Pickup Group]] – which Call Groups this device can pick up.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Voicemail=&lt;br /&gt;
&lt;br /&gt;
* '''Email''' – where to send received Voicemail.&lt;br /&gt;
* '''Password''' – the digital password the user enters when he calls the Voicemail number to hear his messages.&lt;br /&gt;
Voicemail login details are required when the user access Voicemail from outside over DID.&lt;br /&gt;
* '''Enable MWI''' - In telephony, a Message Waiting Indicator (MWI) is a telephone calling feature that illuminates a LED on selected telephones to notify a user of waiting for voicemail messages. It works on most telephone networks and PBXs.&lt;br /&gt;
* '''Subscribe MWI''' - If set to 'no', then Asterisk will send notifications to the phone about new voicemails. If set to 'yes', then the Phone should subscribe to Asterisk to get messages. If MWI does not work on your phone, try to switch this setting on/off.&lt;br /&gt;
* '''Delete VoiceMail after sending it''' – If it is set to 'yes', the VoiceMail will be deleted after it is sent to email.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Language – (in Advanced settings) sets Voicemail language (and IVR language)&lt;br /&gt;
&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;
[[Which codecs should I choose for devices | Choose the codecs]] your provider uses.&lt;br /&gt;
&lt;br /&gt;
NOTES: &lt;br /&gt;
* When no fields are checked, all codecs are available – for example, settings in sip.conf or iax.conf are effective.&lt;br /&gt;
* If the Provider and the Device do not have similar codecs, no call can be established.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Allowed Addresses=&lt;br /&gt;
&lt;br /&gt;
Described [[Allowed Addresses | here]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Limits=&lt;br /&gt;
&lt;br /&gt;
Here is possible to set various limits for a device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_device_call_limits.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Separate concurrent Call Limits'''&lt;br /&gt;
**'''Outbound concurrent Call Limit''' - how many outbound simultaneous calls a Device can make?&lt;br /&gt;
**'''Inbound concurrent Call Limit''' - how many inbound simultaneous calls a Device can get?&lt;br /&gt;
*'''One concurrent Call Limit (Outbound + Inbound)''' - how many outbound simultaneous and inbound simultaneous together calls a Device can make?&lt;br /&gt;
*'''Time limit per day''' - Total time available for device per day. When the limit is reached call fails with HGC &amp;quot;239 - Device used its daily call time limit&amp;quot; (total time is calculated after rounding rules and minimal time adjustment, so if the user's tariff has increment higher than 1 or minimal time set, then the total device time may be different than actual call time).&lt;br /&gt;
*'''Time limit per month''' - Total time available for device per month. You can also set the day of the limit reset (the default is 1st day of a month). When the limit is reached, the call fails with HGC &amp;quot;286 - Device used its monthly call time limit&amp;quot; (total time is calculated after rounding rules and minimal time adjustment, so if the user's tariff has increment higher than 1 or minimal time set, then total device time may be different than actual call time).&lt;br /&gt;
*'''(CPS) Limit up to''' - allows setting calls per second limit in some period.&lt;br /&gt;
*'''Hangup Call if PDD is more than'''- set maximum PDD time (in seconds) before call hangup. Note that failover providers will not be used in this case. The call will be hung up completely and will not be passed to other providers in LCR.&lt;br /&gt;
&lt;br /&gt;
=Advanced=&lt;br /&gt;
&lt;br /&gt;
* '''Fromuser/Fromdomain''' – used when calling TO this peer FROM Asterisk. If you're using _register=&amp;gt;_ with another SIP proxy, this setting can come in handy since some SIP networks only allow users in the right domain with the correct user name. &lt;br /&gt;
* '''Trustrpid''' – 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. The default setting is &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;
* [http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+insecure Insecure]&lt;br /&gt;
** port: ignore the port number where the request came from. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
** invite: don't require authentication of incoming INVITEs. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
** port, invite: don't require initial INVITE to authenticate and ignore the port where the request came from. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
&lt;br /&gt;
Both of these settings are enabled by default for [[Authentication | IP Authenticated]] devices, but they can be changed, unless you are using Carrier Class Addon, which forces the device to ignore the port number and the authentication from an incoming request.&lt;br /&gt;
&lt;br /&gt;
Insecure Invite means that MOR will not challenge for a password, it means that anyone who knows extension can call without password, this is the reason why it is very insecure to use for username/password authenticated devices.&lt;br /&gt;
&lt;br /&gt;
Insecure Port means that MOR will allow INVITES from a different port than the one REGISTER packets come from. This could be used with username/password authenticated devices too. &lt;br /&gt;
&lt;br /&gt;
* '''Disable global pass_privacy''' - if set to yes, this option disables global [[mor.conf|pass_privacy_header]] variable for this device. If global pass_privacy_header variable is not set to yes, this option has no effect.&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. Only active for incoming calls. If the device is originator, please set '''Usereqphone''' in Provider settings.&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;
* '''[http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+progressinband Progressinband]''':&lt;br /&gt;
** yes – when the &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;
NOTE: if Progressinband does not work, add &amp;quot;prematuremedia=no&amp;quot; to sip.conf and reload 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;
* '''Language''' – sets IVR language&lt;br /&gt;
* '''Use ANI (if available) for CallerID:''' – When the call comes the information about who is calling is found in CallerID field. This field is used to determine who is calling. When the call comes through PRI/SS7 channels - then additional information is available who is calling in ANI field (in call's data channel) so sometimes CallerID might be empty or anonymous, but the caller can be found in ANI field. This option allows to use ANI field as CallerID to determine and recognize who is calling. &lt;br /&gt;
* '''Incoming Call CallerID Presentation''' – sets CallerID Presentation. Please note that this setting applies only for incoming calls. More information can be found [http://www.voip-info.org/wiki/view/Asterisk+cmd+SetCallerPres here] and [http://www.voip-info.org/wiki/view/Asterisk+cmd+CallingPres here] &lt;br /&gt;
* '''Change Failed Code To''' – if call fails change Hangup Cause Code to this value. This works only for outgoing calls from device. '''Not for Incoming'''&lt;br /&gt;
* '''Forward DID''' – it allows to forward call to DID which is assigned to Authorization by PIN or Calling Cards dial plan. After user enters PIN of any device or card, call gets connected with destination.&lt;br /&gt;
* '''Anti-resale (Auto-answer)''' – when option is set to YES, MOR answers the call before sending it to provider in order to generate FAS. This does not affect billing in MOR (User is not billed for extra time).&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. Appears only if device is SIP and when Asterisk 1.8 is enabled. Default value: ''udp''. If TCP is used, it has to be [[How_to_enable_TCP_for_Asterisk |enabled in Asterisk]].&lt;br /&gt;
* '''T.38 Support''' – should T.38 pass-through be supported&lt;br /&gt;
* '''SRTP Encryption''' – should SRTP protocol be used for calls &lt;br /&gt;
* '''Block callerid if (number) simultaneous calls come from it''' – blocks CallerID if the entered number of simultaneous calls come from it&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x4---&amp;gt;&lt;br /&gt;
* '''Outbound Proxy''' – send outbound signaling to this proxy, not directly to the peer (Internal Asterisk option).&lt;br /&gt;
* '''SIP Session Timers''' - SIP Session Timers provide an end-to-end keep-alive mechanism for active SIP sessions. 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;
* '''Localize PAI''' - if set to 'yes' then MOR will localize originator's number from PAI (P-Asserted-Identity) by [[Localization | CallerID Localization Rules]]. Works only if '''pass_pai''' is set in [[Mor.conf|mor.conf]].&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;
* '''Use random Number when CallerID is invalid''' - if set to ''Yes'' then when CallerID is NOT found in a Number Pool set in '''Number Pool with valid CallerIDs''' then CalleID in FROM is changed to &amp;quot;anonymous&amp;quot; and random CallerID taken from '''Random Number from a Number Pool''' is set in PAI/RPID headers.&lt;br /&gt;
* '''Emergency CallerID''' - number from this field will be used as CallerID if Destination number matches any number from '''Emergency CallerID Number Pool''' (see below). Localization rules will be applied before checking Destination number in Number Pool. P-Asserted and/or Remote-party-ID will be overwritten with the same as CallerID. If Destination number (after localization applied) does not match any number in '''Emergency CallerID Number Pool''', then CallerID is handled as usual.&lt;br /&gt;
* '''Emergency CallerID Number Pool''' - Number Pool with numbers used for '''Emergency CallerID''' feature.&lt;br /&gt;
* '''Music On Hold to Device''' - what to play when this Device is made On Hold by other party. Feature named &amp;quot;mohinterpret&amp;quot; on Asterisk.&lt;br /&gt;
* '''Music On Hold from Device''' - what to play to other party, when this Device sets it On Hold. Feature named &amp;quot;mohsuggest&amp;quot; on Asterisk.&lt;br /&gt;
* '''Announcement to the Called Party''' - plays specified announcement to callee in the beginning of conversation, right after call is answered. For example you can play message like &amp;quot;This conversation will be recorded&amp;quot; before every call from this Device.&lt;br /&gt;
* ''' Allow forward from Resellers''' - If option is enabled, Reseller can forward call to this device from Reseller's User's Device Call-flow window. Username of the Device owner and Device extension will be visible from the Reseller account. Setting is active only when enabled at [https://wiki.kolmisoft.com/index.php/Configuration_from_GUI#Various Settings]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Tell Options=&lt;br /&gt;
&lt;br /&gt;
* '''Tell rate before call''' - should MOR tell announce minute price (rounded to cents) before every call. Default value is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Tell balance before call''' – should MOR tell the user his balance every time he tries to dial?  The default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Tell time''' - should MOR tell the user his remaining time every time he tries to dial?  The default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
** Time is told in MINUTES only. Currently it is not possible to tell both in minutes and seconds.&lt;br /&gt;
* '''Tell remaining time when left''' – when some time is left, MOR will tell the remaining time to talk (in seconds).&lt;br /&gt;
* '''Repeat remaining time when left''' – repeats the remaining time when some time is left (in seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Debug=&lt;br /&gt;
&lt;br /&gt;
* [[SIP debug info|'''Process SIPCHANINFO''']] - shows SIP channel info in [[Asterisk CLI]] and saves this information on database.&lt;br /&gt;
NOTE: debug should be enabled only if you are experiencing any problems. It should be disable in any other cases, because it stores lot of information on database.&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;
=Comment=&lt;br /&gt;
&lt;br /&gt;
Devices can have Comments, which gives information about the Device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Grace_time | Grace time]]&lt;br /&gt;
* [[PAP_device_configuration | PAP device configuration]]&lt;br /&gt;
* [[H323 Device settings]]&lt;br /&gt;
* [[Hide Device username for Users]]&lt;br /&gt;
* [[What is PIN]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=30119</id>
		<title>Device settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=30119"/>
		<updated>2025-05-13T09:39:14Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;mkmeta&amp;gt;MOR Device Settings Explained&amp;lt;/mkmeta&amp;gt;&lt;br /&gt;
=General=&lt;br /&gt;
&lt;br /&gt;
* '''Accountcode''' – the unique ID of the device in the system.&lt;br /&gt;
* '''Description''' – for informational purposes.&lt;br /&gt;
* '''PIN''' – device PIN for authentication/authorization.&lt;br /&gt;
* '''Device group''' – to which group the device belongs (not used most of the time).&lt;br /&gt;
* '''Type''' – what type of device it is. Device type '''cannot''' be changed once it is created.&lt;br /&gt;
* '''Extension''' – a short number by which this device can be reached; must be unique in the system.&lt;br /&gt;
* '''DTMF Mode''' – in which protocol phone button presses are sent over network. The available options are: inband, info, RFC2833, and auto. Choose which one your provider uses (RFC2833 is used most often). This setting applies to SIP, H.323 and IAX2 protocols. For ZAP devices edit the configuration files in /etc/asterisk.&lt;br /&gt;
* '''Location''' – the default is Global. Choose the appropriate location based on [[Localization]] needs.&lt;br /&gt;
* '''Ringing Timeout''' – allows to limit the ringing duration in seconds. Minimal value is 10 seconds. Option is designed for incoming calls.&lt;br /&gt;
* '''Call Timeout''' – allows to limit answered call billsec. Leave 0 for unlimited.&lt;br /&gt;
* '''[[Trunks | Trunk]]''' – No/ Yes/ Yes with ANI/ 3CX – Is this device Trunk with/without ANI, 3CX? The &amp;quot;3CX&amp;quot; option adds rinstance parameter to R-URI which is used on 3CX authentication. In general 3CX option sets R-URI with Contact URI (including all parameters, such as rinstance) but replaces user part with DID number. Only works for dynamic trunks.. More details: https://www.3cx.com/docs/sip-trunk-registration-authentication/&lt;br /&gt;
* '''[[Multi_Server_support | Server]]''' – allows to choose server in multiple servers system. Choose '''''All''''' to assign all servers. Option '''All''' can be used and is shown only for IP Authenticated devices. (While Carrier Class Addon is active, all Virtual and Fax devices are auto-assigned to all present Asterisk servers and cannot be re-assigned. Disabling Carrier Class Addon all Virtual and Fax devices will be assigned to default Asterisk server chosen from Addons &amp;gt; Carrier Class &amp;gt; Settings dropdown).&lt;br /&gt;
* '''Balance''' – a balance of the device. Disabled by default. Balance is decreasing when the User makes calls. Payments does not affect device balance.&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 dahdi devices:===&lt;br /&gt;
&lt;br /&gt;
* '''Channel''' – which channel (or channel group) to use on 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, H323 and IAX2 Devices:===&lt;br /&gt;
&lt;br /&gt;
'''IP Authentication:'''&lt;br /&gt;
* '''Hostname''' – Device hostname. Use &amp;quot;IP Address&amp;quot; instead if you have problems with inbound calls.&lt;br /&gt;
* '''IP Address''' – Device IP address in one of the following formats: &lt;br /&gt;
** '''IP''' – understands simple IPv4 address, IPv4 address with it's Subnet Mask and IPv4 address with it's Range. For example ''192.168.0.1'', ''192.168.0.1/24'' and ''192.168.0.0-255''. Or IPv6 address without a Subnet Mask or Range.&lt;br /&gt;
* '''Accept calls from any port''' – this option lets you receive calls from different Ports. This option is just on SIP (when [[SIP balancer]] in use) and H323.&lt;br /&gt;
* '''Port''' – Device Port.&lt;br /&gt;
&lt;br /&gt;
'''Dynamic:'''&lt;br /&gt;
&lt;br /&gt;
* '''Username''' – username you enter in your Device.&lt;br /&gt;
* '''Password''' – password you enter in your Device.&lt;br /&gt;
* '''IP Address''' – shows Device IP address.&lt;br /&gt;
* '''Port''' – shows Device Port.&lt;br /&gt;
* '''Registration Status''' - available only for SIP  devices. If device is assigned to server A but registers to server B - status will not be shown (devices must register to the server they are assigned to). If no status is displayed - device has not tried to register or no one called to that device. Qualify must enabled if you want to monitor device status.&lt;br /&gt;
* '''UNREGISTER''' - last registration information will be deleted (ipaddr, port, fullcontact).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=CallerID=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:device_callerid.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
A CallerID consists of two parts: Name and Number. The &amp;quot;Number&amp;quot; part is transferred by default by all technologies (GSM, PSTN, SIP etc), but the &amp;quot;Name&amp;quot; part is transferred only by 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;
&lt;br /&gt;
* '''Name''' – the &amp;quot;Name&amp;quot; part of the CallerID.&lt;br /&gt;
* '''Number''' – the &amp;quot;Number&amp;quot; part of the CallerID. Only numerical values can be entered in this field. &lt;br /&gt;
&lt;br /&gt;
NOTE: if you leave these fields empty, the user can set the CallerID name by himself. Usually it is not advisable to allow the user do it on his own. If CallerID number field is empty, system will take device username as CallerID number (if device is username/password authenticated).&lt;br /&gt;
&lt;br /&gt;
* '''Number from DID''' - use the DID as the CallerID (only available when the device has DIDs), this option just sets CallerID Number to be equal to DID. Next time you will edit Device's settings, first option - Number will be checked&lt;br /&gt;
&lt;br /&gt;
* '''Control by DIDs (CID from DIDs)''' – only available when the device has DIDs and &amp;quot;Number&amp;quot; field is empty.&lt;br /&gt;
&lt;br /&gt;
This setting lets you control what a CID user can enter in his devices. CID numbers should be from the set of the device's DIDs. They are mainly used when the user's PBX is connected over Trunk and many DIDs are routed to this Trunk. Calls coming out from this PBX must have a CallerID Number from the set of DIDs assigned to this Trunk (PBX). If &amp;quot;CID from DIDs&amp;quot; is checked, the system checks whether the device's CID number is from DIDs assigned to this device. If no DIDs are assigned, this value is ignored. In order for this setting to be active, CID Name/Number fields must be empty to allow the user to enter any CID number he wants. If &amp;quot;CID from DIDs&amp;quot; is checked and user enters any CID (not from his DIDs), the system will change his CID to one of the DIDs assigned to this Device. Original (non Localized) CallerID is used for DID matching.&lt;br /&gt;
&lt;br /&gt;
* '''Control by CIDs'''  – system checks incoming CallerID (Device's CallerID which is set on the Device). If CallerID matches one of the Device's CIDs - then such CallerID will be allowed. If it does not match - it will be changed to the selected CID.&lt;br /&gt;
&lt;br /&gt;
* '''Control by Destination''' – This is advanced option which works by such algorithm:&lt;br /&gt;
&lt;br /&gt;
# system checks Destination and checks DIDs assigned to calling Device. Then it finds 'nearest' DID to the Destination by subtracting DID from Destination in numerical form (Example, DID: 11111, Destination: 11112, |DID-Destination|=|1111-11112|=1) If Device has several DIDs - the lowest value is selected and this DID is set as CallerID.&lt;br /&gt;
#If Device has no DIDs - then User DIDs are used. &lt;br /&gt;
#If Device does not have DIDs and User has no DIDs, then CallerID set in Number field will be used. &lt;br /&gt;
#If nothing is set here - CallerID coming from Device will be used.&lt;br /&gt;
Note: behavior can be [http://wiki.kolmisoft.com/index.php/Mor.conf changed] to search for '''best matching''' DID instead of '''nearest''' DID &lt;br /&gt;
* '''Random Number from Number Pool''' – This functionality gives you an ability to send different caller number on each Call. Available from MOR X4. More information: [http://wiki.kolmisoft.com/index.php/Number_Pool 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;
&lt;br /&gt;
* '''Unknown''' - This option lets you set CallerID number to ''unknown'' and pass a custom CallerID in either RPID or PAI header:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Unknown_cid_rpid_pai.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Copy Leg A Name to Leg B Number''' – Leg A name will be used as Leg B number.&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;
===For H323:===&lt;br /&gt;
&lt;br /&gt;
* '''Fast start''' – option for faster H.245.&lt;br /&gt;
* '''h245 Tunneling''' – use H.245 without opening a second TCP/IP channel.&lt;br /&gt;
More info you can find [http://toncar.cz/Tutorials/VoIP/VoIP_Protocols_H323_Call_Signalling_Optimizations.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===For SIP and IAX2===&lt;br /&gt;
&lt;br /&gt;
* '''Media control''' – can reinvite. Do you want your server to stay in media path between your clients and your provider? Please note that this option will work only if it is supported from both, device and provider, sides and it allows to handle SIP packets only. Moreover, no codec mismatch between device and provider is available. Default value is ''No''. '''WARNING''': This option can cause [[Call was billed incorrectly|incorrect billing]].&lt;br /&gt;
** canreinvite = yes &amp;quot;allow RTP media direct&amp;quot;&lt;br /&gt;
** canreinvite = no &amp;quot;deny re-invites&amp;quot;&lt;br /&gt;
** canreinvite = nonat &amp;quot;allow reinvite when local, deny reinvite when NAT&amp;quot;&lt;br /&gt;
** canreinvite = update &amp;quot;use UPDATE instead of INVITE&amp;quot;&lt;br /&gt;
** canreinvite = update,nonat &amp;quot;use UPDATE when local, deny when NAT&amp;quot;&lt;br /&gt;
* '''NAT''' – the available options are: yes, no, never, force_rport, comedia. For a detailed explanation of these settings, refer to [http://www.voip-info.org/wiki/view/Asterisk+sip+nat here].&lt;br /&gt;
* '''Qualify''' – how long to wait for a response to Qualify request. If you have lot of Devices in your system, set it to 9000ms or more. More details [http://www.voip-info.org/wiki/view/Asterisk+sip+qualify here] for SIP devices and [http://www.voip-info.org/wiki/view/Asterisk+iax+qualify here] for IAX2 devices.&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. Only on IAX2.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Groups=&lt;br /&gt;
&lt;br /&gt;
* [[What are callgroups and pickupgroups | Call Group]] – to which Call Group this device belongs.&lt;br /&gt;
* [[What are callgroups and pickupgroups | Pickup Group]] – which Call Groups this device can pick up.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Voicemail=&lt;br /&gt;
&lt;br /&gt;
* '''Email''' – where to send received Voicemail.&lt;br /&gt;
* '''Password''' – the digital password the user enters when he calls the Voicemail number to hear his messages.&lt;br /&gt;
Voicemail login details are required when the user access Voicemail from outside over DID.&lt;br /&gt;
* '''Enable MWI''' - In telephony, a Message Waiting Indicator (MWI) is a telephone calling feature that illuminates a LED on selected telephones to notify a user of waiting for voicemail messages. It works on most telephone networks and PBXs.&lt;br /&gt;
* '''Subscribe MWI''' - If set to 'no', then Asterisk will send notifications to the phone about new voicemails. If set to 'yes', then the Phone should subscribe to Asterisk to get messages. If MWI does not work on your phone, try to switch this setting on/off.&lt;br /&gt;
* '''Delete VoiceMail after sending it''' – If it is set to 'yes', the VoiceMail will be deleted after it is sent to email.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Language – (in Advanced settings) sets Voicemail language (and IVR language)&lt;br /&gt;
&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;
[[Which codecs should I choose for devices | Choose the codecs]] your provider uses.&lt;br /&gt;
&lt;br /&gt;
NOTES: &lt;br /&gt;
* When no fields are checked, all codecs are available – for example, settings in sip.conf or iax.conf are effective.&lt;br /&gt;
* If the Provider and the Device do not have similar codecs, no call can be established.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Allowed Addresses=&lt;br /&gt;
&lt;br /&gt;
Described [[Allowed Addresses | here]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Limits=&lt;br /&gt;
&lt;br /&gt;
Here is possible to set various limits for a device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_device_call_limits.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Separate concurrent Call Limits'''&lt;br /&gt;
**'''Outbound concurrent Call Limit''' - how many outbound simultaneous calls a Device can make?&lt;br /&gt;
**'''Inbound concurrent Call Limit''' - how many inbound simultaneous calls a Device can get?&lt;br /&gt;
*'''One concurrent Call Limit (Outbound + Inbound)''' - how many outbound simultaneous and inbound simultaneous together calls a Device can make?&lt;br /&gt;
*'''Time limit per day''' - Total time available for device per day. When the limit is reached call fails with HGC &amp;quot;239 - Device used its daily call time limit&amp;quot; (total time is calculated after rounding rules and minimal time adjustment, so if the user's tariff has increment higher than 1 or minimal time set, then the total device time may be different than actual call time).&lt;br /&gt;
*'''Time limit per month''' - Total time available for device per month. You can also set the day of the limit reset (the default is 1st day of a month). When the limit is reached, the call fails with HGC &amp;quot;286 - Device used its monthly call time limit&amp;quot; (total time is calculated after rounding rules and minimal time adjustment, so if the user's tariff has increment higher than 1 or minimal time set, then total device time may be different than actual call time).&lt;br /&gt;
*'''(CPS) Limit up to''' - allows setting calls per second limit in some period.&lt;br /&gt;
*'''Hangup Call if PDD is more than'''- set maximum PDD time (in seconds) before call hangup. Note that failover providers will not be used in this case. The call will be hung up completely and will not be passed to other providers in LCR.&lt;br /&gt;
&lt;br /&gt;
=Advanced=&lt;br /&gt;
&lt;br /&gt;
* '''Fromuser/Fromdomain''' – used when calling TO this peer FROM Asterisk. If you're using _register=&amp;gt;_ with another SIP proxy, this setting can come in handy since some SIP networks only allow users in the right domain with the correct user name. &lt;br /&gt;
* '''Trustrpid''' – 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. The default setting is &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;
* [http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+insecure Insecure]&lt;br /&gt;
** port: ignore the port number where the request came from. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
** invite: don't require authentication of incoming INVITEs. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
** port, invite: don't require initial INVITE to authenticate and ignore the port where the request came from. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
&lt;br /&gt;
Both of these settings are enabled by default for [[Authentication | IP Authenticated]] devices, but they can be changed, unless you are using Carrier Class Addon, which forces the device to ignore the port number and the authentication from an incoming request.&lt;br /&gt;
&lt;br /&gt;
Insecure Invite means that MOR will not challenge for a password, it means that anyone who knows extension can call without password, this is the reason why it is very insecure to use for username/password authenticated devices.&lt;br /&gt;
&lt;br /&gt;
Insecure Port means that MOR will allow INVITES from a different port than the one REGISTER packets come from. This could be used with username/password authenticated devices too. &lt;br /&gt;
&lt;br /&gt;
* '''Disable global pass_privacy''' - if set to yes, this option disables global [[mor.conf|pass_privacy_header]] variable for this device. If global pass_privacy_header variable is not set to yes, this option has no effect.&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. Only active for incoming calls. If the device is originator, please set '''Usereqphone''' in Provider settings.&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;
* '''[http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+progressinband Progressinband]''':&lt;br /&gt;
** yes – when the &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;
NOTE: if Progressinband does not work, add &amp;quot;prematuremedia=no&amp;quot; to sip.conf and reload 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;
* '''Language''' – sets IVR language&lt;br /&gt;
* '''Use ANI (if available) for CallerID:''' – When the call comes the information about who is calling is found in CallerID field. This field is used to determine who is calling. When the call comes through PRI/SS7 channels - then additional information is available who is calling in ANI field (in call's data channel) so sometimes CallerID might be empty or anonymous, but the caller can be found in ANI field. This option allows to use ANI field as CallerID to determine and recognize who is calling. &lt;br /&gt;
* '''Incoming Call CallerID Presentation''' – sets CallerID Presentation. Please note that this setting applies only for incoming calls. More information can be found [http://www.voip-info.org/wiki/view/Asterisk+cmd+SetCallerPres here] and [http://www.voip-info.org/wiki/view/Asterisk+cmd+CallingPres here] &lt;br /&gt;
* '''Change Failed Code To''' – if call fails change Hangup Cause Code to this value. This works only for outgoing calls from device. '''Not for Incoming'''&lt;br /&gt;
* '''Forward DID''' – it allows to forward call to DID which is assigned to Authorization by PIN or Calling Cards dial plan. After user enters PIN of any device or card, call gets connected with destination.&lt;br /&gt;
* '''Anti-resale (Auto-answer)''' – when option is set to YES, MOR answers the call before sending it to provider in order to generate FAS. This does not affect billing in MOR (User is not billed for extra time).&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. Appears only if device is SIP and when Asterisk 1.8 is enabled. Default value: ''udp''. If TCP is used, it has to be [[How_to_enable_TCP_for_Asterisk |enabled in Asterisk]].&lt;br /&gt;
* '''T.38 Support''' – should T.38 pass-through be supported&lt;br /&gt;
* '''SRTP Encryption''' – should SRTP protocol be used for calls &lt;br /&gt;
* '''Block callerid if (number) simultaneous calls come from it''' – blocks CallerID if the entered number of simultaneous calls come from it&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x4---&amp;gt;&lt;br /&gt;
* '''Outbound Proxy''' – send outbound signaling to this proxy, not directly to the peer (Internal Asterisk option).&lt;br /&gt;
* '''SIP Session Timers''' - SIP Session Timers provide an end-to-end keep-alive mechanism for active SIP sessions. 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;
* '''Localize PAI''' - if set to 'yes' then MOR will localize originator's number from PAI (P-Asserted-Identity) by [[Localization | CallerID Localization Rules]]. Works only if '''pass_pai''' is set in [[Mor.conf|mor.conf]].&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;
* '''Use random Number when CallerID is invalid''' - if set to ''Yes'' then when CallerID is NOT found in a Number Pool set in '''Number Pool with valid CallerIDs''' then CalleID in FROM is changed to &amp;quot;anonymous&amp;quot; and random CallerID taken from '''Random Number from a Number Pool''' is set in PAI/RPID headers.&lt;br /&gt;
* '''Emergency CallerID''' - number from this field will be used as CallerID if Destination number matches any number from '''Emergency CallerID Number Pool''' (see below). Localization rules will be applied before checking Destination number in Number Pool. P-Asserted and/or Remote-party-ID will be overwritten with the same as CallerID. If Destination number (after localization applied) does not match any number in '''Emergency CallerID Number Pool''', then CallerID is handled as usual.&lt;br /&gt;
* '''Emergency CallerID Number Pool''' - Number Pool with numbers used for '''Emergency CallerID''' feature.&lt;br /&gt;
* '''Music On Hold to Device''' - what to play when this Device is made On Hold by other party. Feature named &amp;quot;mohinterpret&amp;quot; on Asterisk.&lt;br /&gt;
* '''Music On Hold from Device''' - what to play to other party, when this Device sets it On Hold. Feature named &amp;quot;mohsuggest&amp;quot; on Asterisk.&lt;br /&gt;
* '''Announcement to the Called Party''' - plays specified announcement to callee in the beginning of conversation, right after call is answered. For example you can play message like &amp;quot;This conversation will be recorded&amp;quot; before every call from this Device.&lt;br /&gt;
* ''' Allow forward from Resellers''' - If option is enabled, Reseller can forward call to this device from Reseller's User's Device Call-flow window. Username of the Device owner and Device extension will be visible from the Reseller account. Setting is active only when enabled at [https://wiki.kolmisoft.com/index.php/Configuration_from_GUI#Various Settings]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Tell Options=&lt;br /&gt;
&lt;br /&gt;
* '''Tell rate before call''' - should MOR tell announce minute price (rounded to cents) before every call. Default value is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Tell balance before call''' – should MOR tell the user his balance every time he tries to dial?  The default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Tell time''' - should MOR tell the user his remaining time every time he tries to dial?  The default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
** Time is told in MINUTES only. Currently it is not possible to tell both in minutes and seconds.&lt;br /&gt;
* '''Tell remaining time when left''' – when some time is left, MOR will tell the remaining time to talk (in seconds).&lt;br /&gt;
* '''Repeat remaining time when left''' – repeats the remaining time when some time is left (in seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Debug=&lt;br /&gt;
&lt;br /&gt;
* [[SIP debug info|'''Process SIPCHANINFO''']] - shows SIP channel info in [[Asterisk CLI]] and saves this information on database.&lt;br /&gt;
NOTE: debug should be enabled only if you are experiencing any problems. It should be disable in any other cases, because it stores lot of information on database.&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;
=Comment=&lt;br /&gt;
&lt;br /&gt;
Devices can have Comments, which gives information about the Device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Grace_time | Grace time]]&lt;br /&gt;
* [[PAP_device_configuration | PAP device configuration]]&lt;br /&gt;
* [[H323 Device settings]]&lt;br /&gt;
* [[Hide Device username for Users]]&lt;br /&gt;
* [[What is PIN]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=30118</id>
		<title>Device settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=30118"/>
		<updated>2025-05-13T09:38:21Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;mkmeta&amp;gt;MOR Device Settings Explained&amp;lt;/mkmeta&amp;gt;&lt;br /&gt;
=General=&lt;br /&gt;
&lt;br /&gt;
* '''Accountcode''' – the unique ID of the device in the system.&lt;br /&gt;
* '''Description''' – for informational purposes.&lt;br /&gt;
* '''PIN''' – device PIN for authentication/authorization.&lt;br /&gt;
* '''Device group''' – to which group the device belongs (not used most of the time).&lt;br /&gt;
* '''Type''' – what type of device it is. Device type '''cannot''' be changed once it is created.&lt;br /&gt;
* '''Extension''' – a short number by which this device can be reached; must be unique in the system.&lt;br /&gt;
* '''DTMF Mode''' – in which protocol phone button presses are sent over network. The available options are: inband, info, RFC2833, and auto. Choose which one your provider uses (RFC2833 is used most often). This setting applies to SIP, H.323 and IAX2 protocols. For ZAP devices edit the configuration files in /etc/asterisk.&lt;br /&gt;
* '''Location''' – the default is Global. Choose the appropriate location based on [[Localization]] needs.&lt;br /&gt;
* '''Ringing Timeout''' – allows to limit the ringing duration in seconds. Minimal value is 10 seconds. Option is designed for incoming calls.&lt;br /&gt;
* '''Call Timeout''' – allows to limit answered call billsec. Leave 0 for unlimited.&lt;br /&gt;
* '''[[Trunks | Trunk]]''' – No/ Yes/ Yes with ANI/ 3CX – Is this device Trunk with/without ANI, 3CX? The &amp;quot;3CX&amp;quot; option adds rinstance parameter to R-URI which is used on 3CX authentication. In general this option sets R-URI with Contact URI (including all parameters, such as rinstance) but replaces user part with DID number. Only works for dynamic trunks.. More details: https://www.3cx.com/docs/sip-trunk-registration-authentication/&lt;br /&gt;
* '''[[Multi_Server_support | Server]]''' – allows to choose server in multiple servers system. Choose '''''All''''' to assign all servers. Option '''All''' can be used and is shown only for IP Authenticated devices. (While Carrier Class Addon is active, all Virtual and Fax devices are auto-assigned to all present Asterisk servers and cannot be re-assigned. Disabling Carrier Class Addon all Virtual and Fax devices will be assigned to default Asterisk server chosen from Addons &amp;gt; Carrier Class &amp;gt; Settings dropdown).&lt;br /&gt;
* '''Balance''' – a balance of the device. Disabled by default. Balance is decreasing when the User makes calls. Payments does not affect device balance.&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 dahdi devices:===&lt;br /&gt;
&lt;br /&gt;
* '''Channel''' – which channel (or channel group) to use on 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, H323 and IAX2 Devices:===&lt;br /&gt;
&lt;br /&gt;
'''IP Authentication:'''&lt;br /&gt;
* '''Hostname''' – Device hostname. Use &amp;quot;IP Address&amp;quot; instead if you have problems with inbound calls.&lt;br /&gt;
* '''IP Address''' – Device IP address in one of the following formats: &lt;br /&gt;
** '''IP''' – understands simple IPv4 address, IPv4 address with it's Subnet Mask and IPv4 address with it's Range. For example ''192.168.0.1'', ''192.168.0.1/24'' and ''192.168.0.0-255''. Or IPv6 address without a Subnet Mask or Range.&lt;br /&gt;
* '''Accept calls from any port''' – this option lets you receive calls from different Ports. This option is just on SIP (when [[SIP balancer]] in use) and H323.&lt;br /&gt;
* '''Port''' – Device Port.&lt;br /&gt;
&lt;br /&gt;
'''Dynamic:'''&lt;br /&gt;
&lt;br /&gt;
* '''Username''' – username you enter in your Device.&lt;br /&gt;
* '''Password''' – password you enter in your Device.&lt;br /&gt;
* '''IP Address''' – shows Device IP address.&lt;br /&gt;
* '''Port''' – shows Device Port.&lt;br /&gt;
* '''Registration Status''' - available only for SIP  devices. If device is assigned to server A but registers to server B - status will not be shown (devices must register to the server they are assigned to). If no status is displayed - device has not tried to register or no one called to that device. Qualify must enabled if you want to monitor device status.&lt;br /&gt;
* '''UNREGISTER''' - last registration information will be deleted (ipaddr, port, fullcontact).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=CallerID=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:device_callerid.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
A CallerID consists of two parts: Name and Number. The &amp;quot;Number&amp;quot; part is transferred by default by all technologies (GSM, PSTN, SIP etc), but the &amp;quot;Name&amp;quot; part is transferred only by 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;
&lt;br /&gt;
* '''Name''' – the &amp;quot;Name&amp;quot; part of the CallerID.&lt;br /&gt;
* '''Number''' – the &amp;quot;Number&amp;quot; part of the CallerID. Only numerical values can be entered in this field. &lt;br /&gt;
&lt;br /&gt;
NOTE: if you leave these fields empty, the user can set the CallerID name by himself. Usually it is not advisable to allow the user do it on his own. If CallerID number field is empty, system will take device username as CallerID number (if device is username/password authenticated).&lt;br /&gt;
&lt;br /&gt;
* '''Number from DID''' - use the DID as the CallerID (only available when the device has DIDs), this option just sets CallerID Number to be equal to DID. Next time you will edit Device's settings, first option - Number will be checked&lt;br /&gt;
&lt;br /&gt;
* '''Control by DIDs (CID from DIDs)''' – only available when the device has DIDs and &amp;quot;Number&amp;quot; field is empty.&lt;br /&gt;
&lt;br /&gt;
This setting lets you control what a CID user can enter in his devices. CID numbers should be from the set of the device's DIDs. They are mainly used when the user's PBX is connected over Trunk and many DIDs are routed to this Trunk. Calls coming out from this PBX must have a CallerID Number from the set of DIDs assigned to this Trunk (PBX). If &amp;quot;CID from DIDs&amp;quot; is checked, the system checks whether the device's CID number is from DIDs assigned to this device. If no DIDs are assigned, this value is ignored. In order for this setting to be active, CID Name/Number fields must be empty to allow the user to enter any CID number he wants. If &amp;quot;CID from DIDs&amp;quot; is checked and user enters any CID (not from his DIDs), the system will change his CID to one of the DIDs assigned to this Device. Original (non Localized) CallerID is used for DID matching.&lt;br /&gt;
&lt;br /&gt;
* '''Control by CIDs'''  – system checks incoming CallerID (Device's CallerID which is set on the Device). If CallerID matches one of the Device's CIDs - then such CallerID will be allowed. If it does not match - it will be changed to the selected CID.&lt;br /&gt;
&lt;br /&gt;
* '''Control by Destination''' – This is advanced option which works by such algorithm:&lt;br /&gt;
&lt;br /&gt;
# system checks Destination and checks DIDs assigned to calling Device. Then it finds 'nearest' DID to the Destination by subtracting DID from Destination in numerical form (Example, DID: 11111, Destination: 11112, |DID-Destination|=|1111-11112|=1) If Device has several DIDs - the lowest value is selected and this DID is set as CallerID.&lt;br /&gt;
#If Device has no DIDs - then User DIDs are used. &lt;br /&gt;
#If Device does not have DIDs and User has no DIDs, then CallerID set in Number field will be used. &lt;br /&gt;
#If nothing is set here - CallerID coming from Device will be used.&lt;br /&gt;
Note: behavior can be [http://wiki.kolmisoft.com/index.php/Mor.conf changed] to search for '''best matching''' DID instead of '''nearest''' DID &lt;br /&gt;
* '''Random Number from Number Pool''' – This functionality gives you an ability to send different caller number on each Call. Available from MOR X4. More information: [http://wiki.kolmisoft.com/index.php/Number_Pool 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;
&lt;br /&gt;
* '''Unknown''' - This option lets you set CallerID number to ''unknown'' and pass a custom CallerID in either RPID or PAI header:&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Unknown_cid_rpid_pai.png]]&lt;br /&gt;
&lt;br /&gt;
* '''Copy Leg A Name to Leg B Number''' – Leg A name will be used as Leg B number.&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;
===For H323:===&lt;br /&gt;
&lt;br /&gt;
* '''Fast start''' – option for faster H.245.&lt;br /&gt;
* '''h245 Tunneling''' – use H.245 without opening a second TCP/IP channel.&lt;br /&gt;
More info you can find [http://toncar.cz/Tutorials/VoIP/VoIP_Protocols_H323_Call_Signalling_Optimizations.html here].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===For SIP and IAX2===&lt;br /&gt;
&lt;br /&gt;
* '''Media control''' – can reinvite. Do you want your server to stay in media path between your clients and your provider? Please note that this option will work only if it is supported from both, device and provider, sides and it allows to handle SIP packets only. Moreover, no codec mismatch between device and provider is available. Default value is ''No''. '''WARNING''': This option can cause [[Call was billed incorrectly|incorrect billing]].&lt;br /&gt;
** canreinvite = yes &amp;quot;allow RTP media direct&amp;quot;&lt;br /&gt;
** canreinvite = no &amp;quot;deny re-invites&amp;quot;&lt;br /&gt;
** canreinvite = nonat &amp;quot;allow reinvite when local, deny reinvite when NAT&amp;quot;&lt;br /&gt;
** canreinvite = update &amp;quot;use UPDATE instead of INVITE&amp;quot;&lt;br /&gt;
** canreinvite = update,nonat &amp;quot;use UPDATE when local, deny when NAT&amp;quot;&lt;br /&gt;
* '''NAT''' – the available options are: yes, no, never, force_rport, comedia. For a detailed explanation of these settings, refer to [http://www.voip-info.org/wiki/view/Asterisk+sip+nat here].&lt;br /&gt;
* '''Qualify''' – how long to wait for a response to Qualify request. If you have lot of Devices in your system, set it to 9000ms or more. More details [http://www.voip-info.org/wiki/view/Asterisk+sip+qualify here] for SIP devices and [http://www.voip-info.org/wiki/view/Asterisk+iax+qualify here] for IAX2 devices.&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. Only on IAX2.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Groups=&lt;br /&gt;
&lt;br /&gt;
* [[What are callgroups and pickupgroups | Call Group]] – to which Call Group this device belongs.&lt;br /&gt;
* [[What are callgroups and pickupgroups | Pickup Group]] – which Call Groups this device can pick up.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Voicemail=&lt;br /&gt;
&lt;br /&gt;
* '''Email''' – where to send received Voicemail.&lt;br /&gt;
* '''Password''' – the digital password the user enters when he calls the Voicemail number to hear his messages.&lt;br /&gt;
Voicemail login details are required when the user access Voicemail from outside over DID.&lt;br /&gt;
* '''Enable MWI''' - In telephony, a Message Waiting Indicator (MWI) is a telephone calling feature that illuminates a LED on selected telephones to notify a user of waiting for voicemail messages. It works on most telephone networks and PBXs.&lt;br /&gt;
* '''Subscribe MWI''' - If set to 'no', then Asterisk will send notifications to the phone about new voicemails. If set to 'yes', then the Phone should subscribe to Asterisk to get messages. If MWI does not work on your phone, try to switch this setting on/off.&lt;br /&gt;
* '''Delete VoiceMail after sending it''' – If it is set to 'yes', the VoiceMail will be deleted after it is sent to email.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Language – (in Advanced settings) sets Voicemail language (and IVR language)&lt;br /&gt;
&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;
[[Which codecs should I choose for devices | Choose the codecs]] your provider uses.&lt;br /&gt;
&lt;br /&gt;
NOTES: &lt;br /&gt;
* When no fields are checked, all codecs are available – for example, settings in sip.conf or iax.conf are effective.&lt;br /&gt;
* If the Provider and the Device do not have similar codecs, no call can be established.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Allowed Addresses=&lt;br /&gt;
&lt;br /&gt;
Described [[Allowed Addresses | here]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Limits=&lt;br /&gt;
&lt;br /&gt;
Here is possible to set various limits for a device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Mor_device_call_limits.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Separate concurrent Call Limits'''&lt;br /&gt;
**'''Outbound concurrent Call Limit''' - how many outbound simultaneous calls a Device can make?&lt;br /&gt;
**'''Inbound concurrent Call Limit''' - how many inbound simultaneous calls a Device can get?&lt;br /&gt;
*'''One concurrent Call Limit (Outbound + Inbound)''' - how many outbound simultaneous and inbound simultaneous together calls a Device can make?&lt;br /&gt;
*'''Time limit per day''' - Total time available for device per day. When the limit is reached call fails with HGC &amp;quot;239 - Device used its daily call time limit&amp;quot; (total time is calculated after rounding rules and minimal time adjustment, so if the user's tariff has increment higher than 1 or minimal time set, then the total device time may be different than actual call time).&lt;br /&gt;
*'''Time limit per month''' - Total time available for device per month. You can also set the day of the limit reset (the default is 1st day of a month). When the limit is reached, the call fails with HGC &amp;quot;286 - Device used its monthly call time limit&amp;quot; (total time is calculated after rounding rules and minimal time adjustment, so if the user's tariff has increment higher than 1 or minimal time set, then total device time may be different than actual call time).&lt;br /&gt;
*'''(CPS) Limit up to''' - allows setting calls per second limit in some period.&lt;br /&gt;
*'''Hangup Call if PDD is more than'''- set maximum PDD time (in seconds) before call hangup. Note that failover providers will not be used in this case. The call will be hung up completely and will not be passed to other providers in LCR.&lt;br /&gt;
&lt;br /&gt;
=Advanced=&lt;br /&gt;
&lt;br /&gt;
* '''Fromuser/Fromdomain''' – used when calling TO this peer FROM Asterisk. If you're using _register=&amp;gt;_ with another SIP proxy, this setting can come in handy since some SIP networks only allow users in the right domain with the correct user name. &lt;br /&gt;
* '''Trustrpid''' – 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. The default setting is &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;
* [http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+insecure Insecure]&lt;br /&gt;
** port: ignore the port number where the request came from. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
** invite: don't require authentication of incoming INVITEs. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
** port, invite: don't require initial INVITE to authenticate and ignore the port where the request came from. '''WARNING:''' do NOT enable it on username/password authenticated devices.&lt;br /&gt;
&lt;br /&gt;
Both of these settings are enabled by default for [[Authentication | IP Authenticated]] devices, but they can be changed, unless you are using Carrier Class Addon, which forces the device to ignore the port number and the authentication from an incoming request.&lt;br /&gt;
&lt;br /&gt;
Insecure Invite means that MOR will not challenge for a password, it means that anyone who knows extension can call without password, this is the reason why it is very insecure to use for username/password authenticated devices.&lt;br /&gt;
&lt;br /&gt;
Insecure Port means that MOR will allow INVITES from a different port than the one REGISTER packets come from. This could be used with username/password authenticated devices too. &lt;br /&gt;
&lt;br /&gt;
* '''Disable global pass_privacy''' - if set to yes, this option disables global [[mor.conf|pass_privacy_header]] variable for this device. If global pass_privacy_header variable is not set to yes, this option has no effect.&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. Only active for incoming calls. If the device is originator, please set '''Usereqphone''' in Provider settings.&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;
* '''[http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+progressinband Progressinband]''':&lt;br /&gt;
** yes – when the &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;
NOTE: if Progressinband does not work, add &amp;quot;prematuremedia=no&amp;quot; to sip.conf and reload 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;
* '''Language''' – sets IVR language&lt;br /&gt;
* '''Use ANI (if available) for CallerID:''' – When the call comes the information about who is calling is found in CallerID field. This field is used to determine who is calling. When the call comes through PRI/SS7 channels - then additional information is available who is calling in ANI field (in call's data channel) so sometimes CallerID might be empty or anonymous, but the caller can be found in ANI field. This option allows to use ANI field as CallerID to determine and recognize who is calling. &lt;br /&gt;
* '''Incoming Call CallerID Presentation''' – sets CallerID Presentation. Please note that this setting applies only for incoming calls. More information can be found [http://www.voip-info.org/wiki/view/Asterisk+cmd+SetCallerPres here] and [http://www.voip-info.org/wiki/view/Asterisk+cmd+CallingPres here] &lt;br /&gt;
* '''Change Failed Code To''' – if call fails change Hangup Cause Code to this value. This works only for outgoing calls from device. '''Not for Incoming'''&lt;br /&gt;
* '''Forward DID''' – it allows to forward call to DID which is assigned to Authorization by PIN or Calling Cards dial plan. After user enters PIN of any device or card, call gets connected with destination.&lt;br /&gt;
* '''Anti-resale (Auto-answer)''' – when option is set to YES, MOR answers the call before sending it to provider in order to generate FAS. This does not affect billing in MOR (User is not billed for extra time).&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. Appears only if device is SIP and when Asterisk 1.8 is enabled. Default value: ''udp''. If TCP is used, it has to be [[How_to_enable_TCP_for_Asterisk |enabled in Asterisk]].&lt;br /&gt;
* '''T.38 Support''' – should T.38 pass-through be supported&lt;br /&gt;
* '''SRTP Encryption''' – should SRTP protocol be used for calls &lt;br /&gt;
* '''Block callerid if (number) simultaneous calls come from it''' – blocks CallerID if the entered number of simultaneous calls come from it&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x4---&amp;gt;&lt;br /&gt;
* '''Outbound Proxy''' – send outbound signaling to this proxy, not directly to the peer (Internal Asterisk option).&lt;br /&gt;
* '''SIP Session Timers''' - SIP Session Timers provide an end-to-end keep-alive mechanism for active SIP sessions. 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;
* '''Localize PAI''' - if set to 'yes' then MOR will localize originator's number from PAI (P-Asserted-Identity) by [[Localization | CallerID Localization Rules]]. Works only if '''pass_pai''' is set in [[Mor.conf|mor.conf]].&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;
* '''Use random Number when CallerID is invalid''' - if set to ''Yes'' then when CallerID is NOT found in a Number Pool set in '''Number Pool with valid CallerIDs''' then CalleID in FROM is changed to &amp;quot;anonymous&amp;quot; and random CallerID taken from '''Random Number from a Number Pool''' is set in PAI/RPID headers.&lt;br /&gt;
* '''Emergency CallerID''' - number from this field will be used as CallerID if Destination number matches any number from '''Emergency CallerID Number Pool''' (see below). Localization rules will be applied before checking Destination number in Number Pool. P-Asserted and/or Remote-party-ID will be overwritten with the same as CallerID. If Destination number (after localization applied) does not match any number in '''Emergency CallerID Number Pool''', then CallerID is handled as usual.&lt;br /&gt;
* '''Emergency CallerID Number Pool''' - Number Pool with numbers used for '''Emergency CallerID''' feature.&lt;br /&gt;
* '''Music On Hold to Device''' - what to play when this Device is made On Hold by other party. Feature named &amp;quot;mohinterpret&amp;quot; on Asterisk.&lt;br /&gt;
* '''Music On Hold from Device''' - what to play to other party, when this Device sets it On Hold. Feature named &amp;quot;mohsuggest&amp;quot; on Asterisk.&lt;br /&gt;
* '''Announcement to the Called Party''' - plays specified announcement to callee in the beginning of conversation, right after call is answered. For example you can play message like &amp;quot;This conversation will be recorded&amp;quot; before every call from this Device.&lt;br /&gt;
* ''' Allow forward from Resellers''' - If option is enabled, Reseller can forward call to this device from Reseller's User's Device Call-flow window. Username of the Device owner and Device extension will be visible from the Reseller account. Setting is active only when enabled at [https://wiki.kolmisoft.com/index.php/Configuration_from_GUI#Various Settings]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Tell Options=&lt;br /&gt;
&lt;br /&gt;
* '''Tell rate before call''' - should MOR tell announce minute price (rounded to cents) before every call. Default value is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Tell balance before call''' – should MOR tell the user his balance every time he tries to dial?  The default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
* '''Tell time''' - should MOR tell the user his remaining time every time he tries to dial?  The default setting is &amp;quot;no&amp;quot;.&lt;br /&gt;
** Time is told in MINUTES only. Currently it is not possible to tell both in minutes and seconds.&lt;br /&gt;
* '''Tell remaining time when left''' – when some time is left, MOR will tell the remaining time to talk (in seconds).&lt;br /&gt;
* '''Repeat remaining time when left''' – repeats the remaining time when some time is left (in seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Debug=&lt;br /&gt;
&lt;br /&gt;
* [[SIP debug info|'''Process SIPCHANINFO''']] - shows SIP channel info in [[Asterisk CLI]] and saves this information on database.&lt;br /&gt;
NOTE: debug should be enabled only if you are experiencing any problems. It should be disable in any other cases, because it stores lot of information on database.&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;
=Comment=&lt;br /&gt;
&lt;br /&gt;
Devices can have Comments, which gives information about the Device.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Devices]]&lt;br /&gt;
* [[Grace_time | Grace time]]&lt;br /&gt;
* [[PAP_device_configuration | PAP device configuration]]&lt;br /&gt;
* [[H323 Device settings]]&lt;br /&gt;
* [[Hide Device username for Users]]&lt;br /&gt;
* [[What is PIN]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=System_is_working_on_some_queries_already&amp;diff=30117</id>
		<title>System is working on some queries already</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=System_is_working_on_some_queries_already&amp;diff=30117"/>
		<updated>2025-05-13T08:36:20Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Cause =&lt;br /&gt;
You see this message if in the MOR menu:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Setup &amp;gt; Settings &amp;gt; Server Load''' TAB you have setup values&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Server Load is too high when one of these conditions are met:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
1. HDD utilisation higher than:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
2. CPU General load higher than:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
3. CPU Ruby process higher than:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
And other&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Why it happens ?&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
1. Many queres goes to mysql&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
2. Many calls.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
3. Working with rates.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
4. Working with reports.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
5. In other cases when many users logged into the webgui and pressing different buttons to learn menu.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Also possible bad hard disk condition, which must be replaced.&lt;br /&gt;
&lt;br /&gt;
= Solutions =&lt;br /&gt;
1. Log in to the server over SSH. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
2. Check server load &lt;br /&gt;
 top&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 [root@mor /]# top&lt;br /&gt;
 top - 10:18:18 up 8 days,  4:33,  3 users,  load average: 0.00, 0.02, 0.00&lt;br /&gt;
 Tasks: 175 total,   1 running, 172 sleeping,   0 stopped,   2 zombie&lt;br /&gt;
 Cpu(s):  0.2%us,  0.6%sy,  0.1%ni, 99.1%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st&lt;br /&gt;
 Mem:   4056240k total,  3502792k used,   553448k free,   150176k buffers&lt;br /&gt;
 Swap:  4063228k total,   131476k used,  3931752k free,   402968k cached&lt;br /&gt;
&lt;br /&gt;
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                        &lt;br /&gt;
   22 root      20   0     0    0    0 S  0.3  0.0   4:32.51 events/3                                                                        &lt;br /&gt;
 1886 mysql     20   0 2539m 574m 4716 S  0.3 14.5  19:32.47 mysqld                                                                          &lt;br /&gt;
 2165 root      20   0 2530m  15m 4196 S  0.3  0.4  20:10.94 asterisk                                                                        &lt;br /&gt;
 3561 root      20   0  949m 4584 2732 S  0.3  0.1  10:36.30 PassengerHelper                                                                 &lt;br /&gt;
 25893 root      20   0 15020 1388 1008 R  0.3  0.0   0:00.01 top                                                                             &lt;br /&gt;
    1 root      20   0 19360 1064  880 S  0.0  0.0   0:01.87 init &lt;br /&gt;
&lt;br /&gt;
3. Check Active calls&lt;br /&gt;
&lt;br /&gt;
 asterisk -rx &amp;quot;core show channels&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Check HDD&lt;br /&gt;
&lt;br /&gt;
 atop -d &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Wait ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kill MySQL Query ==&lt;br /&gt;
1. Log in to the server over SSH. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
2. Connect to the mysql&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 mysql -u root -pkolmisoft&lt;br /&gt;
3. Check processlist&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 select * from INFORMATION_SCHEMA.PROCESSLIST where db = 'mor'\g&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Query_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
4. Kill process which is overloading mysql&lt;br /&gt;
 mysql&amp;gt; kill 2488509;&lt;br /&gt;
&lt;br /&gt;
= Precaution =&lt;br /&gt;
&lt;br /&gt;
Setting for users to limit for how many days they can watch statistics&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check slow query log&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Calls_per_Day&amp;diff=30116</id>
		<title>Calls per Day</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Calls_per_Day&amp;diff=30116"/>
		<updated>2025-05-13T05:28:20Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''STATISTICS - Calls - Calls per Day''' &amp;lt;br/&amp;gt;&lt;br /&gt;
This page shows statistics of calls grouped by days.&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Calls_per_day.png]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Besides calls date, number of calls, duration of calls made during the specific day, failed calls, user price, provider price and profit, you can also check [http://wiki.kolmisoft.com/index.php/Margin_and_Markup Margin and Markup] and [http://wiki.kolmisoft.com/index.php/ASR/ACD ASR/ACD] information. &lt;br /&gt;
&lt;br /&gt;
You will not see days here that has no calls.&lt;br /&gt;
&lt;br /&gt;
Calls per Day does not count DID calls.&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Whitelisted_IPs&amp;diff=30115</id>
		<title>Whitelisted IPs</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Whitelisted_IPs&amp;diff=30115"/>
		<updated>2025-05-12T05:23:01Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Whitelisted IPs''' can be used from '''Admin''' account and from '''Accountant''' account with Monitoring permissions enabled.&lt;br /&gt;
&lt;br /&gt;
From the Admin account, go to '''SETTINGS -&amp;gt; Security -&amp;gt; Whitelisted IPs''' to manage Whitelisted IPs.&lt;br /&gt;
&lt;br /&gt;
An IP can be whitelisted by entering valid input values and by clicking the '''Whitelist''' icon.&lt;br /&gt;
&lt;br /&gt;
'''The range of IPs''' can be added in a format like '''192.168.0.1-5''', which would result in multiple entries being created (192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.4 and 192.168.0.5).&lt;br /&gt;
&lt;br /&gt;
All the Whitelisted changes will be active in '''one minute after they have been applied.''' Country information (flag) can take up to one hour to appear.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:mor_whitelist_ips_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The Comment can be added to the Reason field. If the Reason is not specified, then it will be set to &amp;quot;MOR-WHITELIST-GUI&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If the country, to which IP belongs, is blocked in [[Blocked Countries]], but IP is added to '''Whitelisted IPs''', it means that the whole country is blocked except that whitelisted IP.&lt;br /&gt;
&lt;br /&gt;
'''Search''' functionality allows to check if the entered IP exists in the list.&lt;br /&gt;
&lt;br /&gt;
= Whitelisted IP format =&lt;br /&gt;
It is possible to block IPs in such format:&lt;br /&gt;
* Single IP, for example, '''2.2.2.2'''&lt;br /&gt;
* Subnet in CIDR notation, for example, '''2.2.2.0/24'''. Please note that CIDR notation will be converted into the canonical format automatically. For example, if you enter 2.2.2.1/24, it will be converted to 2.2.2.0/24. This is because 2.2.2.0/24 denotes the range 2.2.2.1 - 2.2.2.254, so any subnet from 2.2.2.1/24 to 2.2.2.254/24 means exactly the same range, and a canonical way to represent this is range is with 2.2.2.0/24&lt;br /&gt;
* IP range in format x.x.x-xx, for example '''2.2.2.1-125'''. Please note that all IPs in the range will be blocked as separate IPs, so entering 2.2.2.1-125 would create 125 single IP entries. For this reason, we strongly recommend using subnets if possible.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [[Blocked IPs]]&lt;br /&gt;
* [[How to block someone's IP]]&lt;br /&gt;
* [[How to block country IP]]&lt;br /&gt;
* [[How to add Fail2ban exception for my IP]]&lt;br /&gt;
* [[Monitorings Addon]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=High_Availability_Configuration_with_Pacemaker_and_Corosync&amp;diff=30114</id>
		<title>High Availability Configuration with Pacemaker and Corosync</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=High_Availability_Configuration_with_Pacemaker_and_Corosync&amp;diff=30114"/>
		<updated>2025-05-06T07:42:15Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Adding  Asterisk resource */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
This tutorial will demonstrate how you can use Corosync and Pacemaker with a Virtual IP to create a high availability server solution in MOR.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
* All public IP addresses have to be on same subnet.&lt;br /&gt;
* Virtual IP has to be free (not assigned to any device on the network). Virtual IP will be managed by Corosync itself.&lt;br /&gt;
* The following ports have to be open between nodes in cluster:&lt;br /&gt;
** UDP 5404, 5405, 5406 - used by Corosync &lt;br /&gt;
** TCP 2224 - used by pscd service&lt;br /&gt;
** TCP 3121 - used by Pacemaker&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Install=&lt;br /&gt;
Run commands below on both nodes to install Pacemaker and Corosync:&lt;br /&gt;
 svn update /usr/src/k_framework/&lt;br /&gt;
 /usr/src/k_framework/helpers/corosync/corosync_install.sh&lt;br /&gt;
&lt;br /&gt;
If /usr/src/k_framework/ directory is not present, checkout it manually:&lt;br /&gt;
 svn co http://svn.kolmisoft.com/k_framework/ /usr/src/k_framework&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Configuration=&lt;br /&gt;
Firsly, we need to configure hostnames in servers. You can find current hostname with command:&lt;br /&gt;
 uname -n&lt;br /&gt;
&lt;br /&gt;
We recommend to user hostname node01 for main server, and node02 for backup server, however you can use different hostnames if you wish. You can set hostname on server using command bellow:&lt;br /&gt;
 hostnamectl set-hostname your-new-hostname&lt;br /&gt;
&lt;br /&gt;
If you use different hostname, please replace node01 and node02 with actual hostname names in configuration examples bellow.&lt;br /&gt;
&lt;br /&gt;
Once hostame setup is complete, on main server open file /etc/hosts, you will see something like this:&lt;br /&gt;
 192.168.0.131 node01 #This is example. Change to correct IP&lt;br /&gt;
 192.168.0.132 node02 #Change to correct IP here aswell&lt;br /&gt;
&lt;br /&gt;
Replace IP addresses with actual IP of both servers. If servers hostnames are not node01/node02 replace them with actual hostanme name of servers.&lt;br /&gt;
&lt;br /&gt;
'''Repeat this procedure on backup server too.''' &lt;br /&gt;
&lt;br /&gt;
All examples assume that there are two nodes with hostnames '''node01''' and '''node02''' and they are reachable by their hostnames and IP addresses:&lt;br /&gt;
* node01 - 192.168.0.152&lt;br /&gt;
* node02 - 192.168.0.200&lt;br /&gt;
192.168.0.205 is Virtual IP address.&lt;br /&gt;
&lt;br /&gt;
Also, in all following command line examples, convention is this:&lt;br /&gt;
* '''[root@node01 ~]#'''  denotes a command which should be run on 'ONE' server in the cluster.&lt;br /&gt;
* '''[root@ALL ~]#''' denotes a command which should be run on 'ALL' servers (node01 and node02) in the cluster.&lt;br /&gt;
&lt;br /&gt;
'''You should replace hostnames and IP addresses to match your setup.'''&lt;br /&gt;
&lt;br /&gt;
== Authenticate and Setup Cluster ==&lt;br /&gt;
&lt;br /&gt;
Installation script will install all needed packages and configuration files. Firstly let's setup cluster authentication:&lt;br /&gt;
&lt;br /&gt;
Copy password from node'''01''' to node'''02'''&lt;br /&gt;
 [root@node01 ~]#  scp /root/hacluster_password root@node02:/root/hacluster_password &lt;br /&gt;
And apply password on node'''02'''&lt;br /&gt;
 [root@node02 ~]# cat /root/hacluster_password | passwd --stdin hacluster&lt;br /&gt;
&lt;br /&gt;
Now we can authenticate cluster:&lt;br /&gt;
&lt;br /&gt;
'''On Centos 7'''&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]#  pcs cluster auth node01 node02 -u hacluster -p $(cat /root/hacluster_password)&lt;br /&gt;
 node02: Authorized&lt;br /&gt;
 node01: Authorized&lt;br /&gt;
&lt;br /&gt;
'''On Rocky 9'''&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]#  pcs host auth -u hacluster -p $(cat /root/hacluster_password) node01 node02&lt;br /&gt;
 node02: Authorized&lt;br /&gt;
 node01: Authorized&lt;br /&gt;
&lt;br /&gt;
If you get any other output, it means something went wrong and you should not proceed until this is fixed. If everything is OK, then we can setup cluster:&lt;br /&gt;
&lt;br /&gt;
'''On Centos 7'''&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs cluster setup --name cluster_asterisk node01 node02&lt;br /&gt;
 Destroying cluster on nodes: node01, node02...&lt;br /&gt;
 node01: Stopping Cluster (pacemaker)...&lt;br /&gt;
 node02: Stopping Cluster (pacemaker)...&lt;br /&gt;
 node02: Successfully destroyed cluster&lt;br /&gt;
 node01: Successfully destroyed cluster&lt;br /&gt;
 Sending 'pacemaker_remote authkey' to 'node01', 'node02'&lt;br /&gt;
 node01: successful distribution of the file 'pacemaker_remote authkey'&lt;br /&gt;
 node02: successful distribution of the file 'pacemaker_remote authkey'&lt;br /&gt;
 Sending cluster config files to the nodes...&lt;br /&gt;
 node01: Succeeded&lt;br /&gt;
 node02: Succeeded&lt;br /&gt;
 Synchronizing pcsd certificates on nodes node01, node02...&lt;br /&gt;
 node02: Success&lt;br /&gt;
 node01: Success&lt;br /&gt;
 Restarting pcsd on the nodes in order to reload the certificates...&lt;br /&gt;
 node02: Success&lt;br /&gt;
 node01: Success&lt;br /&gt;
 [root@node01 ~]# &lt;br /&gt;
&lt;br /&gt;
'''On Rocky 9'''&lt;br /&gt;
 [root@node01 ~]# pcs cluster setup  cluster_asterisk node02 node01&lt;br /&gt;
 No addresses specified for host 'node02', using 'node02'&lt;br /&gt;
 No addresses specified for host 'node01', using 'node01'&lt;br /&gt;
 Destroying cluster on hosts: 'node02', 'node01'...&lt;br /&gt;
 node02: Successfully destroyed cluster&lt;br /&gt;
 node01: Successfully destroyed cluster&lt;br /&gt;
 Requesting remove 'pcsd settings' from 'node02', 'node01'&lt;br /&gt;
 node01: successful removal of the file 'pcsd settings'&lt;br /&gt;
 node02: successful removal of the file 'pcsd settings'&lt;br /&gt;
 Sending 'corosync authkey', 'pacemaker authkey' to 'node02', 'node01'&lt;br /&gt;
 node01: successful distribution of the file 'corosync authkey'&lt;br /&gt;
 node01: successful distribution of the file 'pacemaker authkey'&lt;br /&gt;
 node02: successful distribution of the file 'corosync authkey'&lt;br /&gt;
 node02: successful distribution of the file 'pacemaker authkey'&lt;br /&gt;
 Sending 'corosync.conf' to 'node02', 'node01'&lt;br /&gt;
 node01: successful distribution of the file 'corosync.conf'&lt;br /&gt;
 node02: successful distribution of the file 'corosync.conf'&lt;br /&gt;
 Cluster has been successfully set up.&lt;br /&gt;
&lt;br /&gt;
If everything went OK, there should be no errors in output. If this is the case, let's start cluster:&lt;br /&gt;
 [root@node01 ~]# pcs cluster start --all&lt;br /&gt;
 node02: Starting Cluster...&lt;br /&gt;
 node01: Starting Cluster...&lt;br /&gt;
 [root@node01 ~]# &lt;br /&gt;
&lt;br /&gt;
Enable cluster, this will enable pacemaker and corosync on all cluster nodes to start automatically after server reboot:&lt;br /&gt;
&lt;br /&gt;
 [root@node01]# pcs cluster enable  --all&lt;br /&gt;
 node01: Cluster Enabled&lt;br /&gt;
 node02: Cluster Enabled&lt;br /&gt;
&lt;br /&gt;
Now let's check if Corosync is happy and if there are no errors (issue this command on both nodes separately):&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# corosync-cfgtool -s&lt;br /&gt;
 Printing ring status.&lt;br /&gt;
 Local node ID 1&lt;br /&gt;
 RING ID 0&lt;br /&gt;
        id	= 192.168.0.152&lt;br /&gt;
        status	= ring 0 active with no faults&lt;br /&gt;
&lt;br /&gt;
 [root@node02 ~]# corosync-cfgtool -s&lt;br /&gt;
 Printing ring status.&lt;br /&gt;
 Local node ID 2&lt;br /&gt;
 RING ID 0&lt;br /&gt;
      id	= 192.168.0.200&lt;br /&gt;
      status	= ring 0 active with no faults&lt;br /&gt;
&lt;br /&gt;
If you see different output, you should investigate before proceeding. Now let's check membership and quorum APIs, you should see both nodes with status Joined&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# corosync-cmapctl | grep members&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.1.config_version (u64) = 0&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.1.ip (str) = r(0) ip(192.168.0.152) &lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.1.join_count (u32) = 1&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.1.status (str) = joined&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.2.config_version (u64) = 0&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.2.ip (str) = r(0) ip(192.168.0.200) &lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.2.join_count (u32) = 1&lt;br /&gt;
 runtime.totem.pg.mrp.srp.members.2.status (str) = joined&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Now disable STONITH and Ignore the Quorum Policy:&lt;br /&gt;
 [root@node01 ~]# pcs property set stonith-enabled=false&lt;br /&gt;
 [root@node01 ~]# pcs property set no-quorum-policy=ignore&lt;br /&gt;
 [root@node01 ~]# pcs property list&lt;br /&gt;
 Cluster Properties:&lt;br /&gt;
  cluster-infrastructure: corosync&lt;br /&gt;
  cluster-name: cluster_asterisk&lt;br /&gt;
  dc-version: 1.1.18-11.el7_5.3-2b07d5c5a9&lt;br /&gt;
  have-watchdog: false&lt;br /&gt;
  no-quorum-policy: ignore&lt;br /&gt;
  stonith-enabled: false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, let check cluster status:&lt;br /&gt;
 [root@node01 ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync svn update /usr/src/mor/sh_scripts&lt;br /&gt;
 /usr/src/mor/sh_scripts/corosync/corosync_install.sh&lt;br /&gt;
 systemctl enable corosync&lt;br /&gt;
 systemctl enable pacemaker&lt;br /&gt;
 Current DC: node02 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum&lt;br /&gt;
 Last updated: Wed Oct 17 07:34:20 2018&lt;br /&gt;
 Last change: Wed Oct 17 07:32:39 2018 by root via cibadmin on node01&lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 0 resources configured&lt;br /&gt;
 Online: [ node01 node02 ]&lt;br /&gt;
 No resources&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
   corosync: active/enabled&lt;br /&gt;
   pacemaker: active/enabled&lt;br /&gt;
   pcsd: active/enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that both nodes are online, all daemons (corosync, pacemaker, pcsd) are active.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Configuring Asterisk HA solution with Virtual IP==&lt;br /&gt;
&lt;br /&gt;
Before proceeding we need to prepare Asterisk to be managed by Corosync with Virtual IP.&lt;br /&gt;
&lt;br /&gt;
1. Make sure that Asterisk service is stopped and disabled on both nodes.&lt;br /&gt;
 [root@ALL ~]# systemctl disable asterisk&lt;br /&gt;
 [root@ALL ~]# systemctl stop asterisk&lt;br /&gt;
&lt;br /&gt;
2. Replace binaddr from 0.0.0.0 to VirtualIP in /etc/asterisk/sip.conf&lt;br /&gt;
&lt;br /&gt;
3. Add Virtual IP in file /etc/asterisk/manager.conf&lt;br /&gt;
&lt;br /&gt;
 permit=192.168.0.205/255.255.255.0&lt;br /&gt;
&lt;br /&gt;
4. Add VirtualIP in GUI Servers page and Global settings page.&lt;br /&gt;
&lt;br /&gt;
5. In file /etc/mor/system.conf add variable VIRTUAL_IP with correct virtual IP&lt;br /&gt;
&lt;br /&gt;
 VIRTUAL_IP=xx.xx.xx.xx &lt;br /&gt;
&lt;br /&gt;
This variable will be used by check scripts.&lt;br /&gt;
&lt;br /&gt;
=== Adding VirtualIP resource ===&lt;br /&gt;
Now when cluster is ready, we can add resources (Virtual IP, Asterisk, httpd, opensips, etc). In this section we will show how to add Virtual IP and Asterisk resources.&lt;br /&gt;
&lt;br /&gt;
Firstly, let's add Virtual IP resource. Do not forget replace '''ip''', '''cidr_netmask''' values and '''nic''' name with values from your setup. Use subnet of main IP for '''cidr_netmask'''.&lt;br /&gt;
Also, make sure that nic name is the same on both servers. If nic name is different, leave nic parameter out. System will find suitable nic for Virtual IP automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource create VirtualIP  ocf:heartbeat:IPaddr2 ip=192.168.0.205 cidr_netmask=32 nic=enp0s3 op monitor interval=30s&lt;br /&gt;
 [root@node01 ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: node02 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum&lt;br /&gt;
 Last updated: Wed Oct 17 07:49:56 2018&lt;br /&gt;
 Last change: Wed Oct 17 07:49:51 2018 by root via cibadmin on node01&lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 1 resource configured&lt;br /&gt;
 Online: [ node01 node02 ]&lt;br /&gt;
 Full list of resources:&lt;br /&gt;
  VirtualIP	(ocf::heartbeat:IPaddr2):	Started node01&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
   corosync: active/enabled&lt;br /&gt;
   pacemaker: active/enabled&lt;br /&gt;
   pcsd: active/enabled&lt;br /&gt;
&lt;br /&gt;
Now let's confirm that Virtual IP has indeed been assigned to interface:&lt;br /&gt;
 [root@node01 ~]# ip addr show&lt;br /&gt;
 1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000&lt;br /&gt;
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00&lt;br /&gt;
     inet 127.0.0.1/8 scope host lo&lt;br /&gt;
        valid_lft forever preferred_lft forever&lt;br /&gt;
     inet6 ::1/128 scope host &lt;br /&gt;
        valid_lft forever preferred_lft forever&lt;br /&gt;
 2: enp0s3: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000&lt;br /&gt;
     link/ether 08:00:27:90:37:9c brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
     inet 192.168.0.152/24 brd 192.168.0.255 scope global noprefixroute dynamic enp0s3&lt;br /&gt;
        valid_lft 564sec preferred_lft 564sec&lt;br /&gt;
     inet 192.168.0.205/24 brd 192.168.0.255 scope global enp0s3&lt;br /&gt;
        valid_lft forever preferred_lft forever&lt;br /&gt;
     inet6 fe80::eb74:dc5d:cdd:df23/64 scope link noprefixroute &lt;br /&gt;
        valid_lft forever preferred_lft forever&lt;br /&gt;
&lt;br /&gt;
If IP is not assigned, recheck if nic interface is correct. If nic was not used, check output of this command:&lt;br /&gt;
 ip -o -f inet route list match 1.2.3.4 scope link&lt;br /&gt;
Where 1.2.3.4 is Virtual IP. If output is empty, it means that system cannot find interface automatically, most likely main IP/mask is set incorrectly.&lt;br /&gt;
&lt;br /&gt;
=== Adding  Asterisk resource ===&lt;br /&gt;
&lt;br /&gt;
Once Virtual IP resource is setup correctly, it is time to add Asterisk resource (Install script will add Asterisk resource in directory /usr/lib/ocf/resource.d/heartbeat/).&lt;br /&gt;
&lt;br /&gt;
'''On Centos 7''':&lt;br /&gt;
&lt;br /&gt;
a) Legacy ocf:heartbeat:asterisk&lt;br /&gt;
&lt;br /&gt;
ocf:heartbeat:asterisk resource was default resource previously, use this option if for some reason you need to re(create) configuration as it was previously.&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource create asterisk ocf:heartbeat:asterisk op monitor timeout=&amp;quot;30&amp;quot;&lt;br /&gt;
&lt;br /&gt;
b) Use systemd:asterisk for new installs&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource create asterisk systemd:asterisk op monitor timeout=&amp;quot;30&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''On Rocky 9'''&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource create asterisk systemd:asterisk op monitor timeout=&amp;quot;30&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now add colocation so that both resources will start at the same node, and set ordering (so that VirtualIP would start before Asterisk):&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs constraint colocation add asterisk with VirtualIP score=INFINITY &lt;br /&gt;
 [root@node01 ~]# pcs constraint order VirtualIP then asterisk &lt;br /&gt;
 Adding VirtualIP asterisk (kind: Mandatory) (Options: first-action=start then-action=start)&lt;br /&gt;
&lt;br /&gt;
Let's check if Asterisk is running:&lt;br /&gt;
&lt;br /&gt;
 [root@localhost node01 ~]# pcs resource status&lt;br /&gt;
  VirtualIP	(ocf::heartbeat:IPaddr2):	Started node01&lt;br /&gt;
  asterisk	(ocf::heartbeat:asterisk):	Started node01&lt;br /&gt;
&lt;br /&gt;
Now make node01 preferd one. This means that if node01 fails and resources are moved node02, node01 will reclaim resources once it will be up again.&lt;br /&gt;
  [root@node01 ~]# pcs resource defaults resource-stickiness=0&lt;br /&gt;
  [root@node01 ~]# pcs constraint location asterisk prefers node01=50&lt;br /&gt;
&lt;br /&gt;
Run corosync check and fix all reported errors:&lt;br /&gt;
 /usr/src/k_framework/helpers/corosync/corosync_check.sh &lt;br /&gt;
&lt;br /&gt;
Reboot servers to make sure that resources are switching correctly and services are started as needed.&lt;br /&gt;
&lt;br /&gt;
==Configuring KSR HA solution with Virtual IP==&lt;br /&gt;
&lt;br /&gt;
Follow this for KSR, GERD, and KSR+GERD on the same server.&lt;br /&gt;
&lt;br /&gt;
1. Install Failover software as described [[#Install|here]].&lt;br /&gt;
&lt;br /&gt;
2. [[#Configuration | Configure the nodes]] and [[#Authenticate and Setup Cluster]]&lt;br /&gt;
&lt;br /&gt;
3. On all failover servers, In file /etc/m2/system.conf add variable VIRTUAL_IP with correct virtual IP&lt;br /&gt;
&lt;br /&gt;
VIRTUAL_IP=xx.xx.xx.xx &lt;br /&gt;
&lt;br /&gt;
4. Virtual IP should be in the GUI servers list. Physical IPs should be added too.&lt;br /&gt;
&lt;br /&gt;
5. Add [[#Adding_VirtualIP_resource | Virtual IP resource]].&lt;br /&gt;
&lt;br /&gt;
6. Make the main node the preferred node for VirtualIP:&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource defaults resource-stickiness=0&lt;br /&gt;
 [root@node01 ~]# pcs constraint location VirtualIP prefers node01=50&lt;br /&gt;
&lt;br /&gt;
7. Run /usr/src/m2/check.sh&lt;br /&gt;
 [root@ALL ~]# /usr/src/m2/check.sh&lt;br /&gt;
&lt;br /&gt;
8. Make changes as indicated by the check.&lt;br /&gt;
&lt;br /&gt;
9. (for KSR and GERDKSR severs) Manually grep for physical servers IP:&lt;br /&gt;
 [root@ALL ~]# grep -F 'physical IP' /etc/kamailio/kamailio.cfg /etc/sysconfig/rtpengine /usr/local/etc/sems/etc/b2bua_topology_hiding.sbcprofile.conf /usr/local/etc/sems/sems.conf&lt;br /&gt;
If grep found anything, replace IPs manually with virtual IP.&lt;br /&gt;
&lt;br /&gt;
10. Stop and disable services&lt;br /&gt;
If KSR is active&lt;br /&gt;
 [root@ALL ~]# systemctl disable kamailio&lt;br /&gt;
 [root@ALL ~]# systemctl stop kamailio&lt;br /&gt;
 [root@ALL ~]# systemctl disable sems&lt;br /&gt;
 [root@ALL ~]# systemctl stop sems&lt;br /&gt;
 [root@ALL ~]# systemctl disable rtpengine&lt;br /&gt;
 [root@ALL ~]# systemctl stop rtpengine&lt;br /&gt;
If GERD is active&lt;br /&gt;
 [root@ALL ~]# systemctl disable radiusd&lt;br /&gt;
 [root@ALL ~]# systemctl stop radiusd&lt;br /&gt;
&lt;br /&gt;
11. Create resources &lt;br /&gt;
&lt;br /&gt;
FOR KSR:&lt;br /&gt;
&lt;br /&gt;
 pcs resource create rtpengine systemd:rtpengine&lt;br /&gt;
 pcs resource create sems systemd:sems&lt;br /&gt;
 pcs resource create kamailio systemd:kamailio&lt;br /&gt;
&lt;br /&gt;
FOR GERD:&lt;br /&gt;
&lt;br /&gt;
 pcs resource create radiusd systemd:radiusd&lt;br /&gt;
&lt;br /&gt;
12. Create a new resource group (for example named ksr) and add all resources (including VirtualIP) into it. Resources in a group are started sequentially and stopped in the reverse order.&lt;br /&gt;
&lt;br /&gt;
For KSR:&lt;br /&gt;
&lt;br /&gt;
 pcs resource group add ksr VirtualIP rtpengine sems kamailio&lt;br /&gt;
&lt;br /&gt;
For GERD&lt;br /&gt;
&lt;br /&gt;
 pcs resource group add gerd VirtualIP radiusd&lt;br /&gt;
&lt;br /&gt;
For GERD+KSR on same server&lt;br /&gt;
&lt;br /&gt;
  pcs resource group add gerdksr VirtualIP radiusd rtpengine sems kamailio&lt;br /&gt;
&lt;br /&gt;
13. Check the output of pcs status. If any resource fails to start, subsequent will not start too. In such case, you will see an error like this (in this case example for rtpengine) in pcs status output&lt;br /&gt;
 Resource Group: ksr&lt;br /&gt;
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started ksr-45&lt;br /&gt;
     rtpengine  (systemd:rtpengine):    Stopped&lt;br /&gt;
     sems       (systemd:sems): Stopped&lt;br /&gt;
     kamailio   (systemd:kamailio):     Stopped&lt;br /&gt;
&lt;br /&gt;
 Failed Resource Actions:&lt;br /&gt;
 * rtpengine_start_0 on ksr-45 'unknown error' (1): call=20, status=complete, exitreason='',&lt;br /&gt;
     last-rc-change='Fri Nov 18 11:07:54 2022', queued=0ms, exec=2060ms&lt;br /&gt;
&lt;br /&gt;
To fix this, check failed resource logs to determine the reason (for example, wrong IP), fix it, and clear pcs with the command:&lt;br /&gt;
 pcs resource cleanup rtpengine&lt;br /&gt;
(use the appropriate resources in your scenario)&lt;br /&gt;
&lt;br /&gt;
If an error has been fixed, pcs will try to start service again, and all subsequent services:&lt;br /&gt;
 Resource Group: ksr&lt;br /&gt;
     VirtualIP  (ocf::heartbeat:IPaddr2):       Started ksr-45&lt;br /&gt;
     rtpengine  (systemd:rtpengine):    Started ksr-45&lt;br /&gt;
     sems       (systemd:sems): Started ksr-45&lt;br /&gt;
     kamailio   (systemd:kamailio):     Started ksr-45&lt;br /&gt;
&lt;br /&gt;
14. If all services running, make a test call, check the sip trace, etc. &lt;br /&gt;
&lt;br /&gt;
15. To test configuration on the backup node, use this command on the main node:&lt;br /&gt;
  [root@node01 ~]# pcs cluster stop&lt;br /&gt;
&lt;br /&gt;
And check the output on node02&lt;br /&gt;
&lt;br /&gt;
 [root@node02 ~]# pcs status&lt;br /&gt;
&lt;br /&gt;
If there are any errors, fix them as described in  10. step&lt;br /&gt;
If all services running, make a test call, check the sip trace, etc. &lt;br /&gt;
&lt;br /&gt;
16. To move services to the main node, start the cluster again on the main node:&lt;br /&gt;
 [root@node01 ~]# pcs cluster start&lt;br /&gt;
&lt;br /&gt;
and check the status:&lt;br /&gt;
  [root@node01 ~]# pcs status&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
17. After all tests, run m2/check.sh to check final configuration&lt;br /&gt;
 [root@ALL~]  /usr/src/m2/check.sh &lt;br /&gt;
&lt;br /&gt;
=Stickiness, constraints and moving resources=&lt;br /&gt;
If one node fails, resources will be moved to other node. After first node recovers, should we move resources back to first one or leave the running on second one? This can be controlled using stickiness, if we set stickiness &amp;gt; prefer score, this mean that Pacemaker will prefer to leave resources running and avoid moving them between nodes:&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]#  pcs resource defaults resource-stickiness=100&lt;br /&gt;
 Warning: Defaults do not apply to resources which override them with their own defined values&lt;br /&gt;
 [root@node01 ~]# pcs resource defaults&lt;br /&gt;
 resource-stickiness: 100&lt;br /&gt;
 [root@node01 ~]# &lt;br /&gt;
&lt;br /&gt;
With this settings, resources should not be moved back to original node if that node rebooted for example.&lt;br /&gt;
&lt;br /&gt;
It is possible to move resource manually using pcs recourse move command. For example, let's move resources from current node to the other one:&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource show&lt;br /&gt;
  VirtualIP	(ocf::heartbeat:IPaddr2):	Started node01&lt;br /&gt;
  asterisk	(ocf::heartbeat:asterisk):	Started node01&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource move VirtualIP&lt;br /&gt;
 Warning: Creating location constraint cli-ban-VirtualIP-on-node01 with a score of -INFINITY for resource VirtualIP on node node01.&lt;br /&gt;
 This will prevent VirtualIP from running on node01 until the constraint is removed. This will be the case even if node01 is the last node in the cluster.&lt;br /&gt;
 [root@node01 ~]# &lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs resource show&lt;br /&gt;
 VirtualIP	(ocf::heartbeat:IPaddr2):	Started node02&lt;br /&gt;
 asterisk	(ocf::heartbeat:asterisk):	Started node02&lt;br /&gt;
&lt;br /&gt;
As you can see, resources has been moved (as asterisk depends on VirtualIP, it is enough to move VirtualIP resource), however new location constraint has been created (cli-ban-VirtualIP-on-node01). We can check constraints this way: &lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]#  pcs constraint --full&lt;br /&gt;
 Location Constraints:&lt;br /&gt;
   Resource: VirtualIP&lt;br /&gt;
     Disabled on: node01 (score:-INFINITY) (role: Started) (id:cli-ban-VirtualIP-on-node01)&lt;br /&gt;
 Ordering Constraints:&lt;br /&gt;
   start VirtualIP then start asterisk (kind:Mandatory) (id:order-VirtualIP-asterisk-mandatory)&lt;br /&gt;
 Colocation Constraints:&lt;br /&gt;
   asterisk with VirtualIP (score:INFINITY) (id:colocation-asterisk-VirtualIP-INFINITY)&lt;br /&gt;
 Ticket Constraints:&lt;br /&gt;
&lt;br /&gt;
Now even if node02 will fail, resources will not be moved to node01. To remove constraint, we can use command  pcs constraint remove &amp;lt;constraint-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs constraint remove cli-ban-VirtualIP-on-node01&lt;br /&gt;
 [root@node01 ~]#  pcs constraint --full&lt;br /&gt;
 Location Constraints:&lt;br /&gt;
 Ordering Constraints:&lt;br /&gt;
   start VirtualIP then start asterisk (kind:Mandatory) (id:order-VirtualIP-asterisk-mandatory)&lt;br /&gt;
 Colocation Constraints:&lt;br /&gt;
   asterisk with VirtualIP (score:INFINITY) (id:colocation-asterisk-VirtualIP-INFINITY)&lt;br /&gt;
 Ticket Constraints:&lt;br /&gt;
&lt;br /&gt;
=Maintenance mode=&lt;br /&gt;
&lt;br /&gt;
There is time when we need to stop, inspect or do other maintenance work on resources without interference from cluster management software. We can achieve this by putting cluster in maintenance mode&lt;br /&gt;
 [root@node01 ~]# pcs property set maintenance-mode=true&lt;br /&gt;
 [root@node01 ~]# pcs property | grep -i maintenance&lt;br /&gt;
  maintenance-mode: true&lt;br /&gt;
&lt;br /&gt;
 [root@node01 ~]# pcs status &lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: node02 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum&lt;br /&gt;
 Last updated: Wed Oct 17 10:45:24 2018&lt;br /&gt;
 Last change: Wed Oct 17 10:39:18 2018 by root via cibadmin on node01&lt;br /&gt;
 &lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 2 resources configured&lt;br /&gt;
 &lt;br /&gt;
              *** Resource management is DISABLED ***&lt;br /&gt;
   The cluster will not attempt to start, stop or recover services&lt;br /&gt;
 &lt;br /&gt;
 Online: [ node01 node02 ] &lt;br /&gt;
 &lt;br /&gt;
 Full list of resources:&lt;br /&gt;
 &lt;br /&gt;
  VirtualIP	(ocf::heartbeat:IPaddr2):	Started node02 (unmanaged)&lt;br /&gt;
  asterisk	(ocf::heartbeat:asterisk):	Started node02 (unmanaged)&lt;br /&gt;
 &lt;br /&gt;
 Daemon Status:&lt;br /&gt;
   corosync: active/enabled&lt;br /&gt;
   pacemaker: active/enabled&lt;br /&gt;
   pcsd: active/enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To move back cluster to normal operation, simply set maintenance mode to false&lt;br /&gt;
 [root@node01 ~]# pcs property set maintenance-mode=false&lt;br /&gt;
 [root@node01 ~]# pcs property | grep -i maintenance&lt;br /&gt;
  maintenance-mode: false&lt;br /&gt;
 [root@node01 ~]#&lt;br /&gt;
&lt;br /&gt;
= Resource Clean Up =&lt;br /&gt;
If the asterisk does not start on the node, due to such errors:&lt;br /&gt;
 pcs status&lt;br /&gt;
  VirtualIP      (ocf::heartbeat:IPaddr2):       Started[ mor01 mor02 ]&lt;br /&gt;
  asterisk       (ocf::heartbeat:asterisk):      FAILED mor 01 (blocked) &lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 pcs status&lt;br /&gt;
 Failed Resource Actions:&lt;br /&gt;
 * asterisk_start_0 on mor01 'unknown error' (1): call=24, status=Error, exitreason='',&lt;br /&gt;
    last-rc-change='Sun Jun  5 03:18:00 2022', queued=0ms, exec=6175ms&lt;br /&gt;
&lt;br /&gt;
try to cleanup Asterisk resource&lt;br /&gt;
 [root@mor01 ~]# pcs resource cleanup asterisk &lt;br /&gt;
 Cleaned up asterisk on mor02&lt;br /&gt;
 Cleaned up asterisk on mor01&lt;br /&gt;
 Waiting for 1 reply from the CRMd. OK&lt;br /&gt;
&lt;br /&gt;
=Replacing a Corosync Node=&lt;br /&gt;
&lt;br /&gt;
Example based on situation when node'''01''' is being replaced.&lt;br /&gt;
&lt;br /&gt;
Disable selinux.&lt;br /&gt;
&lt;br /&gt;
Make sure the node'''01''' is completely stopped.&lt;br /&gt;
&lt;br /&gt;
Give the new machine the same '''hostname''' and '''IP''' address as the old one.&lt;br /&gt;
&lt;br /&gt;
Correct '''/etc/hosts''' on the node'''01'''.&lt;br /&gt;
&lt;br /&gt;
Install the cluster software on node'''01'''. Run commands bellow on both nodes to install Pacemaker and Corosync:&lt;br /&gt;
 svn update /usr/src/k_framework/&lt;br /&gt;
 /usr/src/k_framework/helpers/corosync/corosync_install.sh&lt;br /&gt;
 systemctl enable corosync&lt;br /&gt;
 systemctl enable pacemaker&lt;br /&gt;
&lt;br /&gt;
Copy ''/etc/corosync/corosync.conf'' from node'''02''' to node'''01'''.&lt;br /&gt;
&lt;br /&gt;
Copy password from node'''02''' to node'''01''':&lt;br /&gt;
 [root@node02 ~]#  scp /root/hacluster_password root@node01:/root/hacluster_password &lt;br /&gt;
And apply password on node'''01''':&lt;br /&gt;
 [root@node01 ~]# cat /root/hacluster_password | passwd --stdin hacluster&lt;br /&gt;
&lt;br /&gt;
Copy authkey from node'''02''' to node'''01''':&lt;br /&gt;
  [root@node02 ~]#  scp /etc/pacemaker/authkey root@node01:/etc/pacemaker/authkey&lt;br /&gt;
&lt;br /&gt;
Restart pcs Daemon on node'''02''':&lt;br /&gt;
 [root@node02 ~]# systemctl restart pcsd.service&lt;br /&gt;
&lt;br /&gt;
Now we can authenticate cluster:&lt;br /&gt;
 [root@node01 ~]#  pcs cluster auth node01 node02 -u hacluster -p $(cat /root/hacluster_password)&lt;br /&gt;
 node02: Authorized&lt;br /&gt;
 node01: Authorized&lt;br /&gt;
&lt;br /&gt;
If you get any other output, it means something went wrong and you should not proceed until this is fixed.&lt;br /&gt;
&lt;br /&gt;
Remove VirtualIP resource and create it again:&lt;br /&gt;
 [root@node01 ~]# pcs resource delete VirtualIP&lt;br /&gt;
 [root@node01 ~]# pcs resource create VirtualIP  ocf:heartbeat:IPaddr2 ip=192.168.0.205 cidr_netmask=32 nic=enp0s3 op monitor interval=30s&lt;br /&gt;
&lt;br /&gt;
Check more details about creating VirtualIP in the topics above.&lt;br /&gt;
&lt;br /&gt;
Now add colocation so that both resources will start at the same node, and set ordering (so that VirtualIP would start before Asterisk):&lt;br /&gt;
 [root@node01 ~]# pcs constraint colocation add asterisk with VirtualIP score=INFINITY &lt;br /&gt;
 [root@node01 ~]# pcs constraint order VirtualIP then asterisk &lt;br /&gt;
 Adding VirtualIP asterisk (kind: Mandatory) (Options: first-action=start then-action=start)&lt;br /&gt;
&lt;br /&gt;
Make sure that everything is enabled and working by executing command:&lt;br /&gt;
 [root@node01 ~]# pcs status&lt;br /&gt;
&lt;br /&gt;
=Increase token timeout=&lt;br /&gt;
Corosync runs in real-time priority, if corosync is not scheduled in time, such messages might appear&lt;br /&gt;
&lt;br /&gt;
 Corosync main process was not scheduled (@1687222876617) for 1587.5076 ms (threshold is 800.0000 ms). Consider token timeout increase.&lt;br /&gt;
 Corosync main process was not scheduled (@1687222961366) for 916.5676 ms (threshold is 800.0000 ms). Consider token timeout increase.&lt;br /&gt;
 Corosync main process was not scheduled (@1687222974600) for 2899.7456 ms (threshold is 800.0000 ms). Consider token timeout increase.&lt;br /&gt;
&lt;br /&gt;
This usually happens when a hypervisor (VM) is used. &lt;br /&gt;
&lt;br /&gt;
The procedure to increase timeout is:&lt;br /&gt;
&lt;br /&gt;
1. Edit corosync file on node01&lt;br /&gt;
 [root@node01 ~]# vi /etc/corosync/corosync.conf&lt;br /&gt;
 totem {&lt;br /&gt;
     version: 2&lt;br /&gt;
     cluster_name: cluster_asterisk&lt;br /&gt;
     secauth: off&lt;br /&gt;
     transport: udpu&lt;br /&gt;
     token: 5000  # &amp;lt;--- add this line with the proper value to your situation. The default value on Centos 7 is 1000, and the threshold is met at 80% of that value (so default is 800ms)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
2. Sync file automatically to other node:&lt;br /&gt;
 [root@node01 ~]# pcs cluster sync&lt;br /&gt;
3. Reload configuration (this will reload on both nodes automatically)&lt;br /&gt;
  [root@node01 ~]# pcs cluster reload corosync&lt;br /&gt;
4. Check if changes are applied:&lt;br /&gt;
 [root@node01 ~]# corosync-cmapctl | grep totem.token&lt;br /&gt;
 runtime.config.totem.token (u32) = 5000&lt;br /&gt;
 runtime.config.totem.token_retransmit (u32) = 1190&lt;br /&gt;
 runtime.config.totem.token_retransmits_before_loss_const (u32) = 4&lt;br /&gt;
 totem.token (u32) = 5000&lt;br /&gt;
&lt;br /&gt;
Incrasing might not help, if there are periodic freezes, for example, if the hypervisor takes VM backups periodically.&lt;br /&gt;
&lt;br /&gt;
= Moving from ofc Asterisk resource to systemd Asterisk =&lt;br /&gt;
&lt;br /&gt;
systemd Asterisk directly integrates with Asterisk systemd service and can better manage Asterisk sate (when it is up, stopped, etc).&lt;br /&gt;
&lt;br /&gt;
Moving from ofc to systemd will require Asterisk stop/start.&lt;br /&gt;
&lt;br /&gt;
1. Cleanup Asterisk resource to make sure it is in a clean state&lt;br /&gt;
 [root@node01 ~]# pcs resource delete asterisk&lt;br /&gt;
&lt;br /&gt;
2. Delete Asterisk resource ('''this will stop Asterisk!''')&lt;br /&gt;
 [root@node01 ~]# pcs resource delete asterisk&lt;br /&gt;
&lt;br /&gt;
3. Follow all instructions here (including constraints) https://wiki.kolmisoft.com/index.php/High_Availability_Configuration_with_Pacemaker_and_Corosync#Adding_Asterisk_resource&lt;br /&gt;
&lt;br /&gt;
  of course use '''systemd:asterisk'''&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' After Asterisk resource creation, it is likely that it will start on the backup node, but after adding constrains it will move to the main node.&lt;br /&gt;
&lt;br /&gt;
Example with all output (vmx17main = node1, vmx17backup = node2)&lt;br /&gt;
&lt;br /&gt;
 [root@vmx17main ~]# pcs resource cleanup asterisk      &lt;br /&gt;
 Cleaned up asterisk on vmx17backup&lt;br /&gt;
 Cleaned up asterisk on vmx17main&lt;br /&gt;
 [root@vmx17main ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: vmx17backup (version 1.1.23-1.el7_9.1-9acf116022) - partition with quorum&lt;br /&gt;
 Last updated: Fri Feb  7 12:03:46 2025&lt;br /&gt;
 Last change: Fri Feb  7 12:02:20 2025 by root via cibadmin on vmx17main&lt;br /&gt;
 &lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 2 resource instances configured &lt;br /&gt;
 Online: [ vmx17backup vmx17main ]&lt;br /&gt;
 Full list of resources:&lt;br /&gt;
 VirtualIP      (ocf::heartbeat:IPaddr2):       Started vmx17main&lt;br /&gt;
 asterisk       (ocf::heartbeat:asterisk):      Started vmx17main&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
  corosync: active/enabled&lt;br /&gt;
  pacemaker: active/enabled&lt;br /&gt;
  pcsd: active/enabled&lt;br /&gt;
 [root@vmx17main ~]# pcs resource delete asterisk&lt;br /&gt;
 Attempting to stop: asterisk... Stopped&lt;br /&gt;
 [root@vmx17main ~]# pcs resource create asterisk systemd:asterisk op monitor timeout=&amp;quot;30&amp;quot;&lt;br /&gt;
 [root@vmx17main ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: vmx17backup (version 1.1.23-1.el7_9.1-9acf116022) - partition with quorum&lt;br /&gt;
 Last updated: Fri Feb  7 12:04:28 2025&lt;br /&gt;
 Last change: Fri Feb  7 12:04:17 2025 by root via cibadmin on vmx17main&lt;br /&gt;
 &lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 2 resource instances configured&lt;br /&gt;
 &lt;br /&gt;
 Online: [ vmx17backup vmx17main ] &lt;br /&gt;
 Full list of resources:&lt;br /&gt;
 VirtualIP      (ocf::heartbeat:IPaddr2):       Started vmx17main&lt;br /&gt;
 asterisk       (systemd:asterisk):     Started vmx17backup&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
  corosync: active/enabled&lt;br /&gt;
  pacemaker: active/enabled&lt;br /&gt;
  pcsd: active/enabled&lt;br /&gt;
 [root@vmx17main ~]# pcs constraint colocation add asterisk with VirtualIP score=INFINITY &lt;br /&gt;
 [root@vmx17main ~]# pcs constraint order VirtualIP then asterisk &lt;br /&gt;
 Adding VirtualIP asterisk (kind: Mandatory) (Options: first-action=start then-action=start)&lt;br /&gt;
 [root@vmx17main ~]# pcs resource defaults resource-stickiness=0&lt;br /&gt;
 Warning: Defaults do not apply to resources which override them with their own defined values&lt;br /&gt;
 [root@vmx17main ~]# pcs constraint location asterisk prefers vmx17main=50&lt;br /&gt;
 [root@vmx17main ~]# pcs status&lt;br /&gt;
 Cluster name: cluster_asterisk&lt;br /&gt;
 Stack: corosync&lt;br /&gt;
 Current DC: vmx17backup (version 1.1.23-1.el7_9.1-9acf116022) - partition with quorum&lt;br /&gt;
 Last updated: Fri Feb  7 12:04:49 2025&lt;br /&gt;
 Last change: Fri Feb  7 12:04:46 2025 by root via cibadmin on vmx17main &lt;br /&gt;
 2 nodes configured&lt;br /&gt;
 2 resource instances configured&lt;br /&gt;
 Online: [ vmx17backup vmx17main ]&lt;br /&gt;
 Full list of resources:&lt;br /&gt;
  VirtualIP      (ocf::heartbeat:IPaddr2):       Started vmx17main&lt;br /&gt;
  asterisk       (systemd:asterisk):     Started vmx17main&lt;br /&gt;
 Daemon Status:&lt;br /&gt;
   corosync: active/enabled&lt;br /&gt;
   pacemaker: active/enabled&lt;br /&gt;
   pcsd: active/enabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Modifying Resource Timeout Parameters=&lt;br /&gt;
Resources have 3 main timeouts (monitor, start, and stop)&lt;br /&gt;
&lt;br /&gt;
Monitor timeout also has an interval parameter (how often execute monitor operation)&lt;br /&gt;
&lt;br /&gt;
For example, Asterisk resources by default have a monitor timeout of 30, with an interval of 60&lt;br /&gt;
 pcs resource show asterisk&lt;br /&gt;
 Resource: asterisk (class=systemd type=asterisk)&lt;br /&gt;
  Operations: monitor interval=60 timeout=30 (asterisk-monitor-interval-60)&lt;br /&gt;
&lt;br /&gt;
So if we want to increase the timeout, if it exceeds the interval, we should increase the interval too, to avoid overlapping monitoring.&lt;br /&gt;
&lt;br /&gt;
For example, If we simply increase monitor timeout to 120:&lt;br /&gt;
 [root@vmx17main ~]# pcs resource update asterisk op monitor  timeout=&amp;quot;120&amp;quot;&lt;br /&gt;
 [root@vmx17main ~]# pcs resource show asterisk&lt;br /&gt;
  Resource: asterisk (class=systemd type=asterisk)&lt;br /&gt;
   Operations: monitor interval=60s timeout=120 (asterisk-monitor-interval-60s)&lt;br /&gt;
&lt;br /&gt;
So we have a situation where the interval is less than the timeout. The correct update would be like this:&lt;br /&gt;
&lt;br /&gt;
 [root@vmx17main ~]# pcs resource update asterisk op monitor interval=&amp;quot;140&amp;quot; timeout=&amp;quot;120&amp;quot;&lt;br /&gt;
 [root@vmx17main ~]# pcs resource show asterisk&lt;br /&gt;
  Resource: asterisk (class=systemd type=asterisk)&lt;br /&gt;
   Operations: monitor interval=140 timeout=120 (asterisk-monitor-interval-140)&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT''' for systemd resources, monitor interval controls how long resource is down when it crashed, for example, more information [[High_Availability_Configuration_with_Pacemaker_and_Corosync#systemd_resources_and_automatic_restarts | here]]&lt;br /&gt;
&lt;br /&gt;
Start and stop actions always have an interval set to 0 (as it does not make sense otherwise), so we can only update the timeout, for example:&lt;br /&gt;
&lt;br /&gt;
 pcs resource update asterisk op start timeout=&amp;quot;60&amp;quot;&lt;br /&gt;
 pcs resource update asterisk op stop timeout=&amp;quot;60&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= systemd resources and automatic restarts =&lt;br /&gt;
&lt;br /&gt;
systemd units often have automatic restart functionality, for example, Asterisk unit:&lt;br /&gt;
 # safe_asterisk emulation&lt;br /&gt;
 Restart=always&lt;br /&gt;
 RestartSec=10&lt;br /&gt;
&lt;br /&gt;
When systemd resource is added in pcs, it automatically creates systemd configuration file which disables automatic restart, so that the cluster could fully control the resource.&lt;br /&gt;
&lt;br /&gt;
For example, for Asterisk resource, note # /run/systemd/system/asterisk.service.d/50-pacemaker.conf at the end:&lt;br /&gt;
&lt;br /&gt;
 [root@vmx17main ~]# systemctl cat asterisk&lt;br /&gt;
 # /etc/systemd/system/asterisk.service&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Asterisk PBX and telephony daemon&lt;br /&gt;
 Documentation=man:asterisk(8)&lt;br /&gt;
 Wants=network.target&lt;br /&gt;
 After=network.target &lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Type=simple&lt;br /&gt;
 User=root&lt;br /&gt;
 Group=root&lt;br /&gt;
 Environment=HOME=/var/lib/asterisk&lt;br /&gt;
 WorkingDirectory=/var/lib/asterisk&lt;br /&gt;
 ExecStart=/usr/sbin/asterisk -g -f -C /etc/asterisk/asterisk.conf&lt;br /&gt;
 ExecStop=/usr/sbin/asterisk -rx 'core stop now'&lt;br /&gt;
 ExecReload=/usr/bin/asterisk -rx 'core reload'&lt;br /&gt;
 LimitNOFILE=65536&lt;br /&gt;
 LimitCORE=infinity &lt;br /&gt;
 &lt;br /&gt;
 # safe_asterisk emulation&lt;br /&gt;
 Restart=always&lt;br /&gt;
 RestartSec=10&lt;br /&gt;
  &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
 # /run/systemd/system/asterisk.service.d/50-pacemaker.conf&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Cluster Controlled asterisk&lt;br /&gt;
 Before=pacemaker.service pacemaker_remote.service&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Restart=no&lt;br /&gt;
&lt;br /&gt;
which adds  Restart=no.&lt;br /&gt;
&lt;br /&gt;
This means that with systemd resources, resource monitor interval also controls how long we wait until the service is started after the crash.&lt;br /&gt;
&lt;br /&gt;
=More Information=&lt;br /&gt;
This guide is based on and more information can be found here:&lt;br /&gt;
&lt;br /&gt;
http://www.alexlinux.com/asterisk-high-availability-cluster-with-pacemaker-on-centos-7/&lt;br /&gt;
&lt;br /&gt;
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Overview/&lt;br /&gt;
&lt;br /&gt;
https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/ch05.html&lt;br /&gt;
&lt;br /&gt;
http://linux-ha.org/doc/man-pages/re-ra-IPaddr2.html&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Auto-Dialer_Addon&amp;diff=30090</id>
		<title>Auto-Dialer Addon</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Auto-Dialer_Addon&amp;diff=30090"/>
		<updated>2025-04-10T07:03:55Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
Auto-Dialer addon lets you call an array of [[Auto-Dialer_Addon#Numbers | numbers]] automatically. When call is answered, receiver hears  the audio message or he is in standby mode, it depends on what is set in Auto Dialer [[Auto-Dialer_Addon#Actions | actions]] (PLAY / IVR / WAIT).&lt;br /&gt;
This functionality can be used in telemarketing.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
When Auto-Dialer (AD) is installed, every user can use it and '''only users can create Campaigns. Admin cannot create Campaings.'''&lt;br /&gt;
&lt;br /&gt;
Auto-Dialer must be enabled in [[User Permissions]], otherwise User will not be able to use it.&lt;br /&gt;
&lt;br /&gt;
==From User==&lt;br /&gt;
&lt;br /&gt;
The user can find the AD menu under '''PERSONAL MENU -&amp;gt; Various -&amp;gt; Auto Dialer'''.&lt;br /&gt;
&lt;br /&gt;
The main window shows the user's campaigns:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:ad1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The user can Activate or Stop the Campaign by clicking the [[Image:icon_play.png]] or [[Image:icon_stop.png]] button near the Campaign's status.&lt;br /&gt;
&lt;br /&gt;
A Campaign can only be '''Activated''' if it has free (not-called) numbers AND some Actions. &lt;br /&gt;
&lt;br /&gt;
So please, before activating a Campaign, import some Numbers and create Actions.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' Auto Dialer starts in 5 minutes, so when you are starting this add-on, you need to wait 5 minutes before it starts.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Campaigns===&lt;br /&gt;
&lt;br /&gt;
Auto-Dialer can be found under '''PERSONAL MENU -&amp;gt; Various -&amp;gt; Auto Dialer'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:icon_add.png]] '''Add new campaign''' allows you to add a new campaign:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:autodialer1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The important fields here are:&lt;br /&gt;
&lt;br /&gt;
* '''Start/Stop Times''' – when calls will be made.&lt;br /&gt;
* '''Max Retries''' – how many times to retry an unsuccessful call.&lt;br /&gt;
* '''Retry Time''' – how many seconds the system should wait to retry the call.&lt;br /&gt;
* '''Wait Time''' – how long to wait till the call is answered. This field by default is 10 and cannot be made less. This is done to prevent ''missed call traffic'' and annoying multiple calls from Auto Dialer to the end user.&lt;br /&gt;
* '''Device''' – each Campaign should be assigned to a Device in order for MOR to bill the call.&lt;br /&gt;
* '''CallerID''' - what CallerID to put on calls.&lt;br /&gt;
* '''Allow duplicate numbers''' - when checked allows duplicate number import into the Auto-Dialer Campaign.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Numbers  ===&lt;br /&gt;
&lt;br /&gt;
Click on [[Image:icon_list.png]] in the '''Numbers''' column to check numbers which will be dialed on campaign:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:autodialer2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The user can import phone numbers from a TXT file. Numbers should be in correct dialing format.&lt;br /&gt;
&lt;br /&gt;
Example of numbers file:&lt;br /&gt;
&lt;br /&gt;
 442012345678&lt;br /&gt;
 442087654321&lt;br /&gt;
 442054987123&lt;br /&gt;
&lt;br /&gt;
In a new Campaign there are no numbers, so click on [[Image:icon_csv.png]] '''Import numbers from file''' and select the file to upload:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:autodialer3.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
After uploading the file, you will see the status of the imported numbers:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:autodialer4.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You can delete all numbers by clicking [[Image:icon_cross.png]] '''Delete all numbers'''. Also you can export details by clicking [[Image:excel.png]] '''Export IVR/poll results to CSV'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If a number is Completed, it is possible to reactivate it (tell the system to call it again) by clicking the [[Image:icon_reactivate.png]] icon near the number.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Actions ===&lt;br /&gt;
&lt;br /&gt;
Click [[Image:icon_actions.png]] in the Actions column to access the Campaign's actions:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:autodialer5.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In this window, the user programs the Actions for the Campaign:&lt;br /&gt;
&lt;br /&gt;
Types of Actions:&lt;br /&gt;
&lt;br /&gt;
* '''WAIT''' – how many seconds to wait.&lt;br /&gt;
* '''PLAY''' – play a file.&lt;br /&gt;
* '''IVR''' - send call to IVR. It can be used to connect to a real person and give the callee a greater choice. For example, it is possible to play an announcement and tell the user to press '1' to talk with a real person about this announcement (advertisement, debts, etc) or something similar.&lt;br /&gt;
** NOTE: admin or [[Reseller_Pro_Addon|Reseller PRO]] must check the option &amp;quot;All users can use it&amp;quot; on IVR to allow users to set that IVR on the AD campaign.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Redial all failed Calls===&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 9---&amp;gt;&lt;br /&gt;
You can redial all failed calls:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Autodialer_redial_all_failed_calls.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Autodialer Campaign statistics===&lt;br /&gt;
To view the Autodialer Campaign statistics, click on the bar chart icon in the '''Stats''' column.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Autodialer_Stats_icon.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
On the newly opened page, you will be able to see the desired Autodialer Campaign statistics with a search filter and a visual representation of data.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Autodialer_Stats_User.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==From Admin==&lt;br /&gt;
&lt;br /&gt;
When Auto-Dialer (AD) is installed, Admin can find it under the  '''ADDONS –&amp;gt; Auto Dialer''' menu. Here he can get a view of all users' campaigns:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:autodialer6.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The important information for each Campaign is:&lt;br /&gt;
&lt;br /&gt;
* Status – is the Campaign Active or Stopped?&lt;br /&gt;
* Run time – tells when calls will be made.&lt;br /&gt;
&lt;br /&gt;
All other fields are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
Admin can see the Actions for users' Campaigns. Just click on the [[Image:icon_actions.png]] '''Actions''' button. However, he cannot make any changes to the user's campaign. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Dynamic variables=&lt;br /&gt;
&lt;br /&gt;
Autodialer sets special Asterisk variables that can be used in other MOR functionalities.&lt;br /&gt;
&lt;br /&gt;
* '''MOR_AD_CAMPAING_ID''' - dialed campaign ID. &lt;br /&gt;
* '''MOR_AD_NUMBER_ID''' - dialed number ID.&lt;br /&gt;
* '''MOR_AD_NUM''' - dialed number.&lt;br /&gt;
&lt;br /&gt;
For example, MOR_AD_NUM can be used in IVR when forwarding the call to another Device.&lt;br /&gt;
&lt;br /&gt;
To do so, add 'Change CallerID (Number)' action in IVR and set value to '''${MOR_AD_NUM}'''.&lt;br /&gt;
&lt;br /&gt;
=Workflow=&lt;br /&gt;
&lt;br /&gt;
Every 5 minutes, the &amp;quot;cron job&amp;quot; is activated to check whether any campaigns are activated.&lt;br /&gt;
&lt;br /&gt;
If there are some active campaigns, the script creates call files for the future. &lt;br /&gt;
&lt;br /&gt;
It puts calls in Time Period in equal time periods, to balance the workload for Asterisk.&lt;br /&gt;
&lt;br /&gt;
For example, if you have 10 calls to make, the script will execute them in 6s intervals to start all calls in 1 minute.&lt;br /&gt;
&lt;br /&gt;
Variables in '''/etc/mor/system.conf''':&lt;br /&gt;
&lt;br /&gt;
'''calls_one_time''' - how many calls to distribute per one minute. (PLEASE NOTE, this value is not for simultaneous calls! It has a very different meaning, which is explained below).&lt;br /&gt;
&lt;br /&gt;
'''cron_interval''' - the interval of time (in minutes) in which we should 'put' calls. Do not set value higher than &amp;quot;4&amp;quot; as it would cause overlapping of Autodialer sessions.&lt;br /&gt;
&lt;br /&gt;
'''ad_disabled''' - when set to 1, disables Auto-Dialer functionality on a Server. '''Note:''' in multi-Asterisk systems all Asterisks but one must have this setting set to 1. This neeeds to be done in order to prevent duplicate calls. &lt;br /&gt;
&lt;br /&gt;
Example #1:&lt;br /&gt;
&lt;br /&gt;
 calls_one_time = 10&lt;br /&gt;
 cron_interval = 1&lt;br /&gt;
&lt;br /&gt;
That means that in 1 minute the script will put 10 calls. So each call will be executed at a 6s interval:&lt;br /&gt;
&lt;br /&gt;
 1st call: 0s&lt;br /&gt;
 2nd call: 6s&lt;br /&gt;
 3rd call: 12s&lt;br /&gt;
 ....&lt;br /&gt;
 9th call: 54s&lt;br /&gt;
 10th call: 60s&lt;br /&gt;
&lt;br /&gt;
Example #2:&lt;br /&gt;
&lt;br /&gt;
 calls_one_time = 5&lt;br /&gt;
 cron_interval = 2&lt;br /&gt;
&lt;br /&gt;
That means that in 1 minute the script will put 5 calls and it will do so for 2 minutes. So each call will be executed at a 12s interval:&lt;br /&gt;
&lt;br /&gt;
 1st call: 0s&lt;br /&gt;
 2nd call: 12s&lt;br /&gt;
 3rd call: 24s&lt;br /&gt;
 4rd call: 36s&lt;br /&gt;
 5th call: 48s&lt;br /&gt;
 6th call: 60s&lt;br /&gt;
 7th call: 72s&lt;br /&gt;
 8th call: 84s&lt;br /&gt;
 9th call: 96s&lt;br /&gt;
 10th call: 108s&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Limitations=&lt;br /&gt;
&lt;br /&gt;
Currently MOR does not support such functionality as to issue the Auto Dialer campaign only in that Asterisk &lt;br /&gt;
&lt;br /&gt;
server to which the device belongs (if you have multiple Asterisk servers). Now MOR just issues the campaign in all servers. If you want it to &lt;br /&gt;
&lt;br /&gt;
run only on one server you need to disable the Auto-Dialer functionality with the setting in '''/etc/mor/system.conf''': &lt;br /&gt;
  ad_disabled = 1&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Logs=&lt;br /&gt;
&lt;br /&gt;
Autodialer log can be found here:&lt;br /&gt;
 /var/log/mor/mor_ad_cron.log&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Problems =&lt;br /&gt;
&lt;br /&gt;
* [[MOR Server Speedup]] (to get more calls by AD)&lt;br /&gt;
* [[I have a problem with Auto Dialer]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Autodialer poll example]]&lt;br /&gt;
* [[Convert WAV file to Asterisk playable format]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[Sound files]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Configure_SSH_connection_between_servers&amp;diff=30087</id>
		<title>Configure SSH connection between servers</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Configure_SSH_connection_between_servers&amp;diff=30087"/>
		<updated>2025-04-02T09:23:27Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Manual configuration:&lt;br /&gt;
&lt;br /&gt;
On the GUI server:&lt;br /&gt;
&lt;br /&gt;
 # Make an SSH key set special for Passenger Apache&lt;br /&gt;
 mkdir -p /var/www/.ssh/&lt;br /&gt;
&lt;br /&gt;
 # Generate an RSA key with NO passcode&lt;br /&gt;
 ssh-keygen -f /var/www/.ssh/id_rsa -q -t rsa -N &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Make Apache the owner of the keys&lt;br /&gt;
 chown -R apache:apache /var/www/.ssh/&lt;br /&gt;
&lt;br /&gt;
 # Share the public key with the servers&lt;br /&gt;
 cat /var/www/.ssh/id_rsa.pub | ssh USER@SERVER_IP 'mkdir -p ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod -R 700 ~/.ssh'&lt;br /&gt;
 # Repeat this step for all the remote servers you want your GUI to connect to (change USER and SERVER_IP correspondingly, USER=root for GUI-&amp;gt;FS connection)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using Centos 7, add these additional commands:&lt;br /&gt;
  cp -a /var/www/.ssh/ /usr/share/httpd/&lt;br /&gt;
  echo &amp;quot;StrictHostKeyChecking no&amp;quot; &amp;gt;&amp;gt; /usr/share/httpd/.ssh/config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If keys are configured, but GUI still cannot connect, check gui debug log, if it shows similar error like this:&lt;br /&gt;
 Retrieve PCAP error: fingerprint 32:0f:3e:0e:3e:5f:04:be:a9:09:e3:82:28:44:89:64 does not match for &amp;quot;1.2.3.4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you need to remove 1.2.3.4 from /var/www/.ssh/known_hosts and/or /usr/share/httpd/.ssh/known_hosts &lt;br /&gt;
&lt;br /&gt;
If you are using different user to connect to server(not root), you might need to change it in Billing - Servers&lt;br /&gt;
&lt;br /&gt;
For connections between older Centos and Rocky 9, you may need to update crypto policy on R9:&lt;br /&gt;
 update-crypto-policies --set DEFAULT:SHA1&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Configure_SSH_connection_between_servers&amp;diff=30085</id>
		<title>Configure SSH connection between servers</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Configure_SSH_connection_between_servers&amp;diff=30085"/>
		<updated>2025-04-02T06:46:06Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Manual configuration:&lt;br /&gt;
&lt;br /&gt;
On the GUI server:&lt;br /&gt;
&lt;br /&gt;
 # Make an SSH key set special for Passenger Apache&lt;br /&gt;
 mkdir -p /var/www/.ssh/&lt;br /&gt;
&lt;br /&gt;
 # Generate an RSA key with NO passcode&lt;br /&gt;
 ssh-keygen -f /var/www/.ssh/id_rsa -q -t rsa -N &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Make Apache the owner of the keys&lt;br /&gt;
 chown -R apache:apache /var/www/.ssh/&lt;br /&gt;
&lt;br /&gt;
 # Share the public key with the servers&lt;br /&gt;
 cat /var/www/.ssh/id_rsa.pub | ssh USER@SERVER_IP 'mkdir -p ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod -R 700 ~/.ssh'&lt;br /&gt;
 # Repeat this step for all the remote servers you want your GUI to connect to (change USER and SERVER_IP correspondingly, USER=root for GUI-&amp;gt;FS connection)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using Centos 7, add these additional commands:&lt;br /&gt;
  cp -a /var/www/.ssh/ /usr/share/httpd/&lt;br /&gt;
  echo &amp;quot;StrictHostKeyChecking no&amp;quot; &amp;gt;&amp;gt; /usr/share/httpd/.ssh/config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If keys are configured, but GUI still cannot connect, check gui debug log, if it shows similar error like this:&lt;br /&gt;
 Retrieve PCAP error: fingerprint 32:0f:3e:0e:3e:5f:04:be:a9:09:e3:82:28:44:89:64 does not match for &amp;quot;1.2.3.4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
you need to remove 1.2.3.4 from /var/www/.ssh/known_hosts and/or /usr/share/httpd/.ssh/known_hosts &lt;br /&gt;
&lt;br /&gt;
If you are using different user to connect to server(not root), you might need to change it in Billing - Servers&lt;br /&gt;
&lt;br /&gt;
For connections between older Centos and Rocky 9, you may need to update crypto policy on R9:&lt;br /&gt;
 update-crypto-policies --set LEGACY&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Configuration_from_GUI&amp;diff=30033</id>
		<title>Configuration from GUI</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Configuration_from_GUI&amp;diff=30033"/>
		<updated>2025-03-05T14:28:04Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Visual */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Where I can find this settings menu?=&lt;br /&gt;
&lt;br /&gt;
You can find this menu in '''SETTINGS –&amp;gt; Setup –&amp;gt; Settings'''&lt;br /&gt;
&lt;br /&gt;
[[File:Settings_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Global ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; [[Global_Settings | Global]]'''&lt;br /&gt;
&lt;br /&gt;
* '''Company''' – name of the company.&lt;br /&gt;
* '''Company email''' – email address of the company.&lt;br /&gt;
* '''Version''' – version number.&lt;br /&gt;
* '''Copyright Title''' – copyright title supports html text format.&lt;br /&gt;
* '''Browser Title''' – browser title for MOR GUI.&lt;br /&gt;
* '''Front Page Text''' – some text to place on front page.&lt;br /&gt;
* '''Login Page Text''' – some text to place on login page&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Registration == &lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Registration'''&lt;br /&gt;
&lt;br /&gt;
* '''Enabled?''' – do we want to let users [[Online registration | register online]] automatically?&lt;br /&gt;
* '''Hide registration link in Login page?''' – tick this option if you do not want users to be able to register online.&lt;br /&gt;
* '''Default country'''&lt;br /&gt;
* '''Asterisk server IP''' – what IP should user connect his softphone/server to?&lt;br /&gt;
* '''Send Email to User after registration''' – just yes or no.&lt;br /&gt;
* '''Send Email to Admin after registration''' – just yes or no.&lt;br /&gt;
* '''Send Email To User after User was created''' – just yes or no.&lt;br /&gt;
* '''Send Email To Admin after User was created''' – just yes or no.&lt;br /&gt;
* '''[[ReCAPTCHA]] configuration'''&lt;br /&gt;
* '''[[User_Agreement|Terms and conditions]]'''&lt;br /&gt;
* '''Allow to create user and device with matching username and password''' – just yes or no. If this setting is not enabled - username and password from MOR GUI will have to be different than device's username and password.&lt;br /&gt;
* '''Enable VAT checking for EU companies''' – you can choose whether to check '''TAX Registration Number:''' during the [[Online registration]] or not. Done over [http://ec.europa.eu/taxation_customs/vies/?locale=lt EU page].&lt;br /&gt;
* '''Allow blank VAT for EU companies''' – allows to leave blank '''TAX Registration Number:''' field during the [[Online registration]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
* [[Default user]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Invoices ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Invoices'''&lt;br /&gt;
&lt;br /&gt;
Invoice configuration is divided into '''Prepaid''' and '''Postpaid'''. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Settings ===&lt;br /&gt;
&lt;br /&gt;
* '''Number start''' – how the invoice number should start.&lt;br /&gt;
* '''Number length''' – the length in digits AFTER Number Start – e.g. Number Start is not counted into this length. This value is active only for first number type.&lt;br /&gt;
* '''Number type''' – select more appropriate number format.&lt;br /&gt;
* '''Invoice period start''' – when invoices are issued, default is first day of the month.&lt;br /&gt;
* '''Show calls in detailed invoice''' – yes or no.&lt;br /&gt;
* '''[[Outstanding balance(Debt) | Show balance line]]''' – shows balance line in Invoice PDF files when Invoice is generated from first day of month till last one. &lt;br /&gt;
* '''Round finals to 2 decimals''' – round or not total in Invoices to 2 decimals.&lt;br /&gt;
* '''Use short file name'''&lt;br /&gt;
* '''Group Subscriptions''' - User's subscriptions will be grouped by service (only applies to PDF and XLSX invoice).&lt;br /&gt;
* '''Show Quantity''' - Show quantity of each service (only applies to PDF invoice).&lt;br /&gt;
* '''Invoice Page Limit:''' – invoice will be generated till this page limit. Additional page is added with an explanation that page limit was reached. &lt;br /&gt;
* ''' Rename 'DID owner cost' label in detailed PDF invoice:''' – text which will be used instead of '''DID owner cost''' in detailed PDF invoice.&lt;br /&gt;
* ''' Hide 'DID owner cost' line in detailed PDF invoice:''' – checkbox, which control whether or not DID owner cost should be shown in detailed PDF invoice.&lt;br /&gt;
* ''' Show Destination with Prefix in Detailed Invoice:''' - checkbox, if enabled, destination will be shown as '''Destination Name (prefix)'''.&lt;br /&gt;
* ''' Rename red 'INVOICE' label in Simplified PDF Invoice:''' &lt;br /&gt;
* ''' Rename red 'INVOICE' label in Detailed PDF Invoice:'''&lt;br /&gt;
* ''' Rename red 'INVOICE' label in PDF Invoice by CallerID:'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Details ===&lt;br /&gt;
&lt;br /&gt;
* '''Address format''' – changes field positioning in the invoice for the address. You must select it in order to show address in the invoice. &lt;br /&gt;
* '''Address line 1-4''' – address info.&lt;br /&gt;
* '''Bank details line 1-5''' – bank details info.&lt;br /&gt;
* '''Invoice balance line''' – line for balance (e.g. &amp;quot;Your current balance is&amp;quot;)&lt;br /&gt;
* '''Invoice to pay Line'''&lt;br /&gt;
* '''End title''' – a title for the end of your invoice.&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
* '''Add Average rate in detailed invoice''' – adds average rate in detailed invoice.&lt;br /&gt;
* '''Show Time in Minute''' – shows time in mm:ss instead of hh:mm:ss, for example, not 02:13:42 but 133:42.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Additional ===&lt;br /&gt;
&lt;br /&gt;
* '''Show additional details on separate page''' – enables additional custom page at the end of the invoice.&lt;br /&gt;
* '''Additional details''' – the information to be displayed in a custom page at the end of the invoice.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
&lt;br /&gt;
* '''Invoice allow recalculate after send''' – allows recalculating invoices after being sent. This setting also allows to delete sent invoices.&lt;br /&gt;
* '''Do not generate Invoices for blocked Users''' - if enabled Invoices will not be generated for blocked Users.&lt;br /&gt;
* '''Rename &amp;quot;Calls&amp;quot; label''' - changes 'Calls' name for Simplified Invoices and new Invoice XLSX. If you want to apply new 'Calls' name for old XLSX, you should go to Settings &amp;gt; Invoices &amp;gt; XLSX and mark 'New XLSX template apply for old Invoices'&lt;br /&gt;
* '''Start value for Invoice numbers''' - defines number from which Invoices numeration should start.&lt;br /&gt;
* '''Duration Format:''' - time format in invoice. This setting applies for XLSX type invoices (and PDF invoices generated from XLSX invoice) and Invoice Details page. Available options - 'H:M:S', 'H:M', 'M'. When option 'M' is used, sub option Decimal places appear, where you can select precision.&lt;br /&gt;
* '''Invoice Group By: Prefix / Destination'''&lt;br /&gt;
* '''Show Rates:No / Yes'''&lt;br /&gt;
* '''Show Calls in CID Invoice (CSV)''' - if enabled, then CSV Invoice by CallerID will show a list of calls.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XLSX ===&lt;br /&gt;
* '''XLSX Template''' - choose XLSX Template for Invoices.&lt;br /&gt;
* '''Send XLSX Invoices converted to PDF''' – If enabled XLSX invoices will be converted to PDF before sending over [[Invoices#Send_invoices_by_email_.28manual.29|Email]] or [[Cron_actions#Generate_Invoices_and_send_by_Email|using cron action]]&lt;br /&gt;
* '''Group regular Calls by Destination''' - Groups regular Calls be destination&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;
* [[Invoices]]&lt;br /&gt;
* [[Invoice configuration]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Emails ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Emails'''&lt;br /&gt;
&lt;br /&gt;
* ''' 	Sending globally enabled''' – if this is checked, you will be able to use Mass Mailing and the system will send emails upon user registration.&lt;br /&gt;
* ''' 	Add recipient first name and last name''' – if this is checked, it will show the user's first name and last name if they are entered in the User Settings.&lt;br /&gt;
* '''SMTP server''' – hostname of the server.&lt;br /&gt;
* '''Port''' – port of SMTP server.&lt;br /&gt;
* '''Login''' – username to your SMTP server.&lt;br /&gt;
* '''Password''' – password to your SMTP server.&lt;br /&gt;
* '''Batch size''' – value for Mass Mailing, or how many emails to send at once.&lt;br /&gt;
* '''From''' – email address to put into From: field in email. Acceptable formats are: '''example@email.com''' or '''John Smith &amp;lt;example@email.com&amp;gt;'''.&lt;br /&gt;
* '''Test email sending''' – save settings and press this to test email sending. Do not forget to save settings first!&lt;br /&gt;
* '''TLS''' – '''Auto''', '''Yes''' or '''No'''. Default '''Auto'''.&lt;br /&gt;
&lt;br /&gt;
'''P.S. Remember to set admin's e-mail in admin's personal settings. Without this test email sending will not work!'''&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;
* [[Emails|Mass Emails]]&lt;br /&gt;
* [[Email variables]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Various ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Various'''&lt;br /&gt;
&lt;br /&gt;
* '''Days for DID to close''' – how long to keep DID closed before making it free.&lt;br /&gt;
* '''Agreement number length''' – number length in digits.&lt;br /&gt;
* '''Change dahdi''' – Sometimes this is used to change &amp;quot;Zap&amp;quot; to something else in GUI, e.g. to &amp;quot;PSTN&amp;quot;, mainly because not everybody knows what Zap stands for. PSTN is more common.&lt;br /&gt;
* '''Device PIN length''' – length for automatically generated PIN codes for devices.&lt;br /&gt;
* '''Device range MIN''' – from which extension automatic extension assigning starts.&lt;br /&gt;
* '''Device range MAX''' – till which extension automatic extension assigning goes.&lt;br /&gt;
** For example, from this interval: [Device range MIN, Device range MAX] MOR will select extensions for newly created Devices.&lt;br /&gt;
* '''Random Device Extension''' – when creating device, random number from '''Device Range''' will be taken.&lt;br /&gt;
* '''Enable &amp;quot;Allowed addresses&amp;quot; option for Devices:'''  – allows [[Device_settings#Allowed_Addresses | Allowed Addresses]] functionality in Devices settings.&lt;br /&gt;
* '''Enable &amp;quot;Allowed addresses&amp;quot; option for Providers:''' – allows Allowed Addresses functionality in Providers settings.&lt;br /&gt;
* '''User wholesale tariff enabled''' – enables user wholesale tariffs.&lt;br /&gt;
* '''Play IVR for unauthenticated call'''&lt;br /&gt;
* '''Banned CLIs default IVR''' – default IVR to route banned numbers.&lt;br /&gt;
* '''Do not allow duplicate device user names'''&lt;br /&gt;
* '''Do not allow users to change their email addresses'''&lt;br /&gt;
* '''Logout link''' – a user will be redirected to this link after pressing &amp;quot;Logout&amp;quot;&lt;br /&gt;
* '''Change ANSWER to FAILED if HGC not equal to 16 for Users''' – changes the Hangupcause for users in call reports from Answered to Failed if Hangupcause is not 16.&lt;br /&gt;
* '''Inform when Devices are created or updated''' – check to get an email about every newly created or updated Device. &lt;br /&gt;
* '''Show Usernames on PDF/CSV Export Files in Last Calls''' – if checked, when a particular User in the Last Calls page search is selected, the Last Calls PDF/CSV file name will be composed also of the Name of selected User. If you are looking for All Users, no User Name will be used. (Name of the User will be shown in Name of the CSV/PDF file).&lt;br /&gt;
* '''Do not allow PREPAID User balance drop below zero (block them instead)'''&lt;br /&gt;
* '''Do not block POSTPAID User when balance goes bellow zero on subscription count'''&lt;br /&gt;
* '''Allow identical email addresses to different Users''' – allows creating Users or registering users with identical email addresses. After checking this setting you will be not able to check &lt;br /&gt;
* '''Show forgot password''', because this functionality requires a unique email in the system. The setting can be unchecked if all emails are unique in the system. &lt;br /&gt;
* '''Allow same IP and Port combinations in multiple Devices''' – allows creating Devices with the same IP and Port combination.&lt;br /&gt;
* '''Low Disk Space Alert''' – indicator when system should inform admin about low [[Multi_Server_support|Server]] space. By default 20%. Notice will appear in [[Integrity Check]] and every hour will send an email &amp;quot;Low Disk Space Alert&amp;quot;. Which template can be found and edited on [[Emails]] page. Information about the Server and the remaining free space will be provided.&lt;br /&gt;
* '''Limit PDF size in Last Calls''' - limits how many pages can be exported from Last Calls to PDF. It takes a lot of system resources to generate PDF files therefore this limit should be low enough to prevent high load on system.&lt;br /&gt;
* '''Google Maps API key''' - the setting is necessary for using the Google Maps functionality. For more on how to configure this key please check [[Get Google Maps key]].&lt;br /&gt;
* '''Allow login by email''' - allow users to log in by email instead of a username.&lt;br /&gt;
* '''Call Forwarding CallerID''' - allows to manage CallerID when [http://wiki.kolmisoft.com/index.php/Call_Flow#Change_Forward_action_by_Call forwarding is set by call].&lt;br /&gt;
** '''From Device''' - puts CallerID for the Device that is forwarding the call. If Device CallerID is empty, then the originator's CallerID will be used.&lt;br /&gt;
** '''Same as comes - unchanged''' - leaves the CallerID as it comes from the originator.&lt;br /&gt;
** '''Same as comes - with Diversion''' - leaves the CallerID as it comes from the original caller and additionally adds SIP header Diversion with CallerID from the Device that is forwarding the call (header will not be added if Device does not have CallerID set).&lt;br /&gt;
* '''DID for Unassigned DID''' - this feature is used for calls coming from providers to system DIDs. Allows redirecting call to specific DID if client dials nonexistent DID. If empty, then this feature is disabled and a call will be terminated with [http://wiki.kolmisoft.com/index.php/207_Not_clear_who_should_receive_call 207 Not clear who should receive call] hangup code.&lt;br /&gt;
* '''Default Music On Hold''' - allows to select Default Music On Hold.&lt;br /&gt;
* '''Use Extension in CallerID for Local Calls''' - overwrites original CallerID with Device Extension when making local calls. Outside calls are not affected by this setting.&lt;br /&gt;
*'''Send Recordings space warning Email''' - sends Email to Admin once a day if recordings exceed space limit.&lt;br /&gt;
*'''Hide Provider Payments from User Payment List''' - default off.&lt;br /&gt;
*'''Delete Tariff Jobs older than''' - deletes tariff jobs older than set days.&lt;br /&gt;
*'''Delete Automatic Tariff Import Inbox Messages older than''' - deletes automatic tariff import inbox messages older than set days.&lt;br /&gt;
&lt;br /&gt;
== Tax ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Tax'''&lt;br /&gt;
&lt;br /&gt;
Settings are explained here: [[Multi-Tax system]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Backups ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Backups'''&lt;br /&gt;
&lt;br /&gt;
Configuration is explained here: [[Backup system]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== API ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; API'''&lt;br /&gt;
&lt;br /&gt;
* '''Allow API''' – enable/disable API.&lt;br /&gt;
* '''Allow GET API''' – enable/disable GET in API - use only for testing!&lt;br /&gt;
* '''API Secret Key''' – secret key for API. This will be used as a password for signing queries to MOR API, check [[MOR_API | MOR API documentation]] for more information&lt;br /&gt;
* '''XML API Extension''' – .NET does not follow standards (surprise!); enable this setting if you are using it to get XML starting with HTTP tags.&lt;br /&gt;
* '''Allow API Login Redirect''' – enable/disable&lt;br /&gt;
* '''API allow registration''' – enable/disable registration through API&lt;br /&gt;
* '''API allow Payments''' – enable/disable payments through API&lt;br /&gt;
* '''API Payment confirmation''' – enable/disable payments confirmation through API&lt;br /&gt;
* '''[[Balance_in_phone|Allow devices to check balance over HTTP]]''' – enable/disable device balance checking&lt;br /&gt;
* '''[[MOR_API_rate_get|Allow devices to check rate over HTTP]]''' – enable/disable device rate checking&lt;br /&gt;
* '''Disable hash checking''' – lets you skip hash parameter using API&lt;br /&gt;
* '''Uniquehash''' – shows your uniquehash &lt;br /&gt;
* '''Send Email To Admin after API/Manual Payment''' - sends Email  to Admin after API/Manual payment. Email Template name:  manual_payment_email &lt;br /&gt;
* '''Send Email to User after API/Manual Payment''' - sends Email to User after API/Manual payment. Email Template name:  manual_payment_email_for_user &lt;br /&gt;
* '''Send Email To Admin after API/Balance Update''' - sends Email to Admin after API/Balance Update. Email Template name:  balance_update_email &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
[[MOR API]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functionality ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Functionality'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===FAX===&lt;br /&gt;
&lt;br /&gt;
* '''Fax device enabled''' – enable/disable Fax device in MOR. When admin enables FAX, Functionality tab appears in Reseller's GUI configuration. He can then enable or disabled fax for his own users himself. &lt;br /&gt;
* '''Fax2Email From Sender''' – there is a field &amp;quot;From:&amp;quot; in an email form. When MOR sends Fax to Email, &amp;quot;Fax2Email From Sender&amp;quot; value is displayed in &amp;quot;From:&amp;quot; field.&lt;br /&gt;
* '''Allow Users to change FAX email''' - allow simple Users to add/remove/edit FAX emails in FAX Devices.&lt;br /&gt;
* '''Fax2Email Email Template''' - [[Emails|email template]] to be used for Fax2Email emails. &amp;quot;None&amp;quot; means the default Asterisk template.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CSV===&lt;br /&gt;
&lt;br /&gt;
* '''CSV Column Separator''' – how columns are separated in imported/exported CSV files.&lt;br /&gt;
* '''CSV Decimal Separator''' – how decimal parts in numbers are separated in imported/exported CSV files.&lt;br /&gt;
* ''' Archive CSV file when size reaches''' – if CSV file reaches a certain size, the system will archive it to save time to download it (0 means to archive always)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Active Calls===&lt;br /&gt;
&lt;br /&gt;
* '''How many maximum [[Active_Calls|Active Calls]] to show in GUI''' – how many [[Active_Calls| Active Calls]] to show in GUI&lt;br /&gt;
* '''[[Active_Calls| Active Calls]] refresh interval''' – [[Active_Calls|Active Calls]] refresh interval in seconds&lt;br /&gt;
* '''Show [[Active_Calls|Active Calls]] for Users''' – tick if you want to allow users to see [[Active_Calls|Active Calls]]&lt;br /&gt;
* '''Show Servers in [[Active_Calls|Active Calls]]'''&lt;br /&gt;
* '''Show DIDs in [[Active_Calls|Active Calls]]'''&lt;br /&gt;
* '''Show localized Source in [[Active_Calls|Active Calls]]''' - if set, [[Active_Calls|Active Calls]] will show callerid number after localisations (if any) have been applied.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tariffs/Rates===&lt;br /&gt;
&lt;br /&gt;
* '''Show rates for users''' – allows users to see rates&lt;br /&gt;
* '''Show rates without Tax''' – shows rates without TAX&lt;br /&gt;
* '''Show [[Advanced_Rates|Advanced Rates]] for users''' – allows users to see [[Advanced_Rates|Advanced Rates]]&lt;br /&gt;
* '''Show zero rates in LCR tariff export:''' – shows zero rates in LCR tariff exported file.&lt;br /&gt;
* '''Show Ghost percent column in Tariffs:''' – if enabled, the Ghost percent column will be shown in the tariff. Default disabled.&lt;br /&gt;
NOTE: if [[Custom Rates]] and/or Tariff Rates are set for the user, only the custom rates will be shown in the details of destination rates. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Statement of Account===&lt;br /&gt;
* ''' PDF Settings ''' - allows to put Address lines of PDF file for Statement of Account.&lt;br /&gt;
*Address line 1: Street Address&lt;br /&gt;
*Address line 2: City, Country&lt;br /&gt;
*Address line 3: Phone, fax&lt;br /&gt;
*Address line 4: Web, email&lt;br /&gt;
*Bank details line 1&lt;br /&gt;
*Bank details line 2&lt;br /&gt;
*Bank details line 3&lt;br /&gt;
*Bank details line 4&lt;br /&gt;
*Bank details line 5&lt;br /&gt;
*Bank details line 6&lt;br /&gt;
*Bank details line 7&lt;br /&gt;
*Bank details line 8&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Privacy==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Privacy'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Privacy_to_hide_Destination_ends|Privacy to hide Destination ends]]'''&lt;br /&gt;
* '''[[GDPR]] Activated''' – hides User data with notification &amp;quot;Data hidden due GDPR. Press to show data (action will be logged)&amp;quot;. Valid for Admin, Accountant, Reseller and Partner.&lt;br /&gt;
&lt;br /&gt;
== Visual ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Visual'''&lt;br /&gt;
&lt;br /&gt;
* '''Items per page''' – the number of items to display per one page&lt;br /&gt;
* '''[[Global_date_format| Default date format]]''' – System default date format&lt;br /&gt;
* '''Default Time Format''' – System default time format&lt;br /&gt;
* '''Default Hour Format''' - System default hour format&lt;br /&gt;
* '''Number digits''' – how many digits to display after a comma&lt;br /&gt;
* '''Hide Quick Stats in Start page''' – hide Quick stats from start page&lt;br /&gt;
* '''Hide device passwords for users''' – do not display device passwords for users&lt;br /&gt;
* '''Hide &amp;quot;Information about this page&amp;quot; link''' – hide HELP banner in GUI&lt;br /&gt;
* '''Hide &amp;quot;I want to&amp;quot; help links'''&lt;br /&gt;
* '''[[Remove_Manual_link_from_admin_GUI|Hide &amp;quot;Manual&amp;quot; link]]''' – hides &amp;quot;Manual&amp;quot; link&lt;br /&gt;
* '''Show logo on first page''' - untick to hide logo on the start page&lt;br /&gt;
* '''Show Full Source (CallerID Name and Number)'''&lt;br /&gt;
* '''Use &amp;lt;&amp;gt; brackets in CDR export''' - changes brackets in CDR export&lt;br /&gt;
* '''Hide payment options for postpaid users''' - will hide the payment option for all postpaid users (including Resellers if they are postpaid).&lt;br /&gt;
* '''Hide non-completed payments for user''' – hides non-completed payments (the ones which are started in MOR, but are not completed in a payment gateway website)&lt;br /&gt;
* '''Show only main page''' – this is a very advanced feature for those who want to hide default MOR menu tree on the left so that they could build their own menu using advanced techniques without modifying MOR GUI sources.&lt;br /&gt;
* '''Show forgot password''' – turns on '''[[MOR_forgot_user_password | Forgot password]]''' functionality.&lt;br /&gt;
* '''Hide Recordings for all users''' – hides recordings for all system users from menu and device settings.&lt;br /&gt;
* '''Show recordings with zero billsec''' – shows recordings with zero billsec&lt;br /&gt;
* '''Default Number Decimal''' – with this option you can set default number decimal for all GUI&lt;br /&gt;
* '''Show user_billsec for Users instead of billsec''' – shows user_billsec instead of billsec in Users invoices and last calls. Notice that Billsec shows real Call duration, user_billsec shows Call duration after minimal time or increment applied. For example, if user tariff has 60 sec minimal time and user made a Call for 20 sec, then billsec will show 20 sec and user_billsec will show 60 sec (minimal time is applied).&lt;br /&gt;
&amp;lt;!--- from X5---&amp;gt;&lt;br /&gt;
* '''Show Calls statistics to User for last''' – number of Calls statistics to show in days. For example, if you enter 5 days, users will only see 5 days old calls, they will not be able to check older calls.  &lt;br /&gt;
* '''Show Device and it's CallerID in Last Calls''' – shows additional column in [[Last Calls]] page with Device and its CallerID information. Click to reach that Device settings page..&lt;br /&gt;
* '''Allow User to assign DID to Device''' – lets User to assign DID to Device.&lt;br /&gt;
* '''Allow User to assign DID to Trunk''' – lets User to Assign DID to Trunk.&lt;br /&gt;
* '''Show DID User instead of Device User in Last Calls''' - if enabled, always shows DID User name in Last Calls.&lt;br /&gt;
* '''New Menu Active''' - if enabled, changes main menu to the new structure.&lt;br /&gt;
* '''Show Replication Broken warning only for Admin''' - if enabled, shows Replication Broken warning message only for Admin account.&lt;br /&gt;
* '''Dropdown field in User's subscriptions''' - enables old style Service selection in Subscription form.&lt;br /&gt;
* '''Show detailed Quick Stats''' - shows modified quick stats of first page.&lt;br /&gt;
* '''Show Terminated by in Last Calls''' - show Terminated  By column in [[Last Calls]], calls CSV/PDF export, and adds the possibility to select this column in [[CDR Export Templates]].&lt;br /&gt;
* '''Show entered Destination only for Users''' - show the Destination numbers for Users that were entered by them and not Destination numbers after Localization.&lt;br /&gt;
* '''Show Company Name column in Users page''' - show &amp;quot;Company Name&amp;quot; column in Users list page.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Server load ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Server load'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Settings for GUI Server and Database Server&lt;br /&gt;
&lt;br /&gt;
* '''HDD utilisation higher than''' – Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device).&lt;br /&gt;
* '''CPU General Load higher than''' – CPU General load higher than – Percentage of the CPU for user processes.&lt;br /&gt;
* '''CPU Load Stats 1 higher than''' – average load per one minute on the system&lt;br /&gt;
* '''CPU MySQL process higher than''' –  Percentage of the CPU for MySQL process&lt;br /&gt;
* '''CPU Ruby process higher than''' –  Percentage of the CPU for Ruby process&lt;br /&gt;
* '''CPU Asterisk process (if present) higher than''' – Percentage of the CPU for Asterisk process&lt;br /&gt;
* '''Delete Server Load Stats older than''' – deletes internal servers load statistics older than defined number of days.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Calls ==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Calls'''&lt;br /&gt;
* '''Retrieve PCAP files from the Proxy Server''' – default off. Works only when CCL module is activated.&lt;br /&gt;
&amp;lt;!--- from X18---&amp;gt;&lt;br /&gt;
* '''SQL Max Execution Time''' - max execution time in seconds for SQL query. The default time is 300 seconds (5 minutes). Used in Statistics pages (Calls List export and similar).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Archived calls]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FTP ==&lt;br /&gt;
Please fill up FTP server details if you want to store Archived calls or/and Backups to FTP server.&lt;br /&gt;
&lt;br /&gt;
* '''IP''' - Enter FTP server IP.&lt;br /&gt;
* '''Port''' - Enter FTP server Port.&lt;br /&gt;
* '''Username''' - Enter FTP server Username.&lt;br /&gt;
* '''Password''' - Enter FTP server Password.&lt;br /&gt;
* '''Path for Archived Calls''' - Enter Path for Archived Calls.&lt;br /&gt;
* '''Path for Backups''' - Enter path for Backups.&lt;br /&gt;
* '''Path for CDR Export''' - Enter path where to export CDRs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SFTP ==&lt;br /&gt;
Please fill up SFTP server details if you want to use SFTP for [[Automatic CDR Export]].&lt;br /&gt;
&lt;br /&gt;
* '''IP''' - IP of the SFTP server.&lt;br /&gt;
* '''Port''' - Port of the SFTP server.&lt;br /&gt;
* '''Username''' - Username to connect to SFTP server.&lt;br /&gt;
* '''Password''' - Password to connect to SFTP server. &lt;br /&gt;
* '''Use SSH key''' - Use SSH key configured as described [[Configure SSH connection between servers|here]].&lt;br /&gt;
* '''Path for CDR Export''' - Path in SFTP server where to export CDRs.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
* '''Allow short passwords in devices'''&lt;br /&gt;
* '''Use strong passwords for users'''&lt;br /&gt;
* '''Admin login with approved IP only''' - security measure which allows to approve IP's that try to [[MOR_Login_with_approved_IP%27s|login with Admin Account]].&lt;br /&gt;
* '''Enable IP report warning on login failure''' - show [[MOR_Login_Failure_Report|warning]] on unsuccessful login attempts.&lt;br /&gt;
* '''Logout after password change''' - terminates all sessions of the User whose password is changed.&lt;br /&gt;
* '''Logout after closing browser window''' - terminates all sessions of the User after closing browser window.&lt;br /&gt;
* '''Do not logout on session IP change''' - do not logout from MOR GUI if IP is changed.&lt;br /&gt;
* '''2FA Enabled''' - Enables two factors authentication. Two factors authentication requires to enter emailed code during login to user account. '''2FA Enabled must be also enable on individual [[User_Details|User settings]] to make it work for that User.'''&lt;br /&gt;
** '''Email Template''' - [[Emails|email template]] used to send the code.&lt;br /&gt;
** '''Code length (digits)''' - code length.&lt;br /&gt;
** '''Code Enter Attempts Allowed''' - number of attempts to enter the code correctly. Code expires after this number of failed attempts.&lt;br /&gt;
** '''Code Enter Time Allowed''' - code is valid for this amount of time.&lt;br /&gt;
** '''Send Notification Email to Admin on Login''' - allows admin to get email notification on login.&lt;br /&gt;
*** '''Email Template''' - [[Emails|email template]] used to notify admin.&lt;br /&gt;
*** '''On Admin Login''' - get notification on login to Admin's account.&lt;br /&gt;
*** '''On User Login''' - get notification on login to User's accounts.&lt;br /&gt;
** '''Send Notification Email on Login''' - allows this mailbox to get email notification on login.&lt;br /&gt;
*** '''Email Template''' - [[Emails|email template]] used to notify.&lt;br /&gt;
*** '''On Admin Login''' - get notification on login to Admin's account.&lt;br /&gt;
*** '''On User Login''' - get notification on login to User's accounts.&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;
* [[Server is overloaded]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_user_details_update&amp;diff=30032</id>
		<title>MOR API user details update</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_user_details_update&amp;diff=30032"/>
		<updated>2025-03-05T14:15:44Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 11---&amp;gt;&lt;br /&gt;
[[MOR API]] Update user from params. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If Admin has checked Allow Resellers to use Admin Tariffs in [[API Configuration]] then using this API Reseller can set for his Users Wholesale or Retail Tariffs which belongs to Admin.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Please note that it is not necessary to send ALL user parameters - you can send only those you need to update.'''&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;
* From '''MOR X4''' call: '''/api/user_details_update'''&lt;br /&gt;
* For Backwards-compatibility old name 'user_update_api' is also usable. Call: '''/api/user_update_api'''&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash (if it is used):&lt;br /&gt;
&lt;br /&gt;
* user_id - Users ID in MOR database, whose details we want to change. '''REQUIRED'''.&lt;br /&gt;
* u0 - vat number&lt;br /&gt;
* u1 - lcr id&lt;br /&gt;
* u2 - warning email hour&lt;br /&gt;
* u3 - hide destination end&lt;br /&gt;
* u4 - currency id&lt;br /&gt;
* u5 - tariff id&lt;br /&gt;
* u6 - warning email balance&lt;br /&gt;
* u7 - spy device id&lt;br /&gt;
* u8 - language&lt;br /&gt;
* u9 - username&lt;br /&gt;
* u10 - warning balance call [0-off, 1-on]&lt;br /&gt;
* u11 - acc group id&lt;br /&gt;
* u12 - generate invoice&lt;br /&gt;
* u13 - usertype&lt;br /&gt;
* u14 - taxation country ([[Directions_and_Destinations#Directions|Direction]] id)&lt;br /&gt;
* u15 - blocked&lt;br /&gt;
* u16 - quickforwards rule id&lt;br /&gt;
* u17 - last name&lt;br /&gt;
* u18 - call limit&lt;br /&gt;
* u19 - clientid (Company/Personal ID)&lt;br /&gt;
* u20 - recording hdd quota&lt;br /&gt;
* u21 - cyberplat active&lt;br /&gt;
* u22 - recordings email&lt;br /&gt;
* u23 - first name&lt;br /&gt;
* u24 - warning balance sound file id&lt;br /&gt;
* u25 - postpaid&lt;br /&gt;
* u26 - accounting number&lt;br /&gt;
* u27 - agreement number&lt;br /&gt;
* u28 - hidden&lt;br /&gt;
* ay - agr_date year&lt;br /&gt;
* am - agr_date month&lt;br /&gt;
* ad - agr_date day&lt;br /&gt;
* by - block at date year2011&lt;br /&gt;
* bm - block at date month&lt;br /&gt;
* bd - block at date day&lt;br /&gt;
* pswd - password&lt;br /&gt;
* user_warning_email_hour&lt;br /&gt;
* pgui - privacy gui [0-off, 1-on]&lt;br /&gt;
* pcsv - privacy csv [0-off, 1-on]&lt;br /&gt;
* ppdf - privacy pdf [0-off, 1-on]&lt;br /&gt;
* recording_forced_enabled - [0-off, 1-on]&lt;br /&gt;
* i4 - invoice detailed csv [0-off, 16-on]&lt;br /&gt;
* tax4_enabled - [0-off, 1-on]&lt;br /&gt;
* tax2_enabled - [0-off, 1-on]&lt;br /&gt;
* accountant_type_invalid &lt;br /&gt;
* block_at_conditional - 15&lt;br /&gt;
* tax3_enabled - [0-off, 1-on]&lt;br /&gt;
* accountant_type &lt;br /&gt;
* tax1_value - float&lt;br /&gt;
* show_zero_calls - [0-off, 1-on]&lt;br /&gt;
* warning_email_active - [0-off, 1-on]&lt;br /&gt;
* compound_tax - [0-off, 1-on]&lt;br /&gt;
* tax4_name - &lt;br /&gt;
* allow_loss_calls - [0-off, 1-on]&lt;br /&gt;
* tax3_name - &lt;br /&gt;
* tax2_name - &lt;br /&gt;
* credit - float&lt;br /&gt;
* tax1_name - &lt;br /&gt;
* total_tax_name - &lt;br /&gt;
* tax2_value - float&lt;br /&gt;
* tax4_value - float&lt;br /&gt;
* i1 - invoice pdf [0-off, 2-on]&lt;br /&gt;
* tax3_value - float&lt;br /&gt;
* cyberplat_active - [0-off, 1-on]&lt;br /&gt;
* i2 - invoice csv [0-off, 4-on]&lt;br /&gt;
* i3 - invoice detailed pdf [0-off, 8-on]&lt;br /&gt;
* recording_enabled - [0-off, 1-on]&lt;br /&gt;
* email_warning_sent_test - [0-off, 1-on]&lt;br /&gt;
* own_providers - [0-off, 1-on]&lt;br /&gt;
* a0 - address&lt;br /&gt;
* a1 - city&lt;br /&gt;
* a2 - postcode&lt;br /&gt;
* a3 - county&lt;br /&gt;
* a4 - mob_phone&lt;br /&gt;
* a5 - fax&lt;br /&gt;
* a6 - Country, direction id ([[Directions_and_Destinations#Directions|Direction]] id)&lt;br /&gt;
* a7 - phone&lt;br /&gt;
* a8 - email&lt;br /&gt;
* a9 - state&lt;br /&gt;
* company_name&lt;br /&gt;
&lt;br /&gt;
'''Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''REQUIRED'''.&lt;br /&gt;
* u - username of the user who can modify details (admin, reseller, or accountant). '''REQUIRED'''.&lt;br /&gt;
* u29 - pbx pool id&lt;br /&gt;
* u30 - hide non-answered calls&lt;br /&gt;
* u31 - responsible accountant id (use -1 in order to unassign Responsible Accountant).&lt;br /&gt;
* u32 - daily balance limit; 0 or less means unlimited.&lt;br /&gt;
* u33 - comment&lt;br /&gt;
* ignore_global_monitorings - [0-off, 1-on]&lt;br /&gt;
* time_zone - time zone (all available references are listed on Time Zone list at the time zone name column. See more:  http://wiki.kolmisoft.com/index.php/Time_Zone_list)&lt;br /&gt;
* allow_change_callerid - [0-off, 1-on]&lt;br /&gt;
* enable_static_source_list - Blacklist / Whitelist options, Enable Static Source [&amp;quot;no&amp;quot; - No, &amp;quot;blacklist&amp;quot; - Blacklist, &amp;quot;whitelist&amp;quot; - Whitelist]&lt;br /&gt;
* static_source_list_id - Blacklist / Whitelist options, Enable Static Source - Number Pool [Number Pool ID]&lt;br /&gt;
* enable_static_list - Blacklist / Whitelist options, Enable Static Destination [&amp;quot;no&amp;quot; - No, &amp;quot;blacklist&amp;quot; - Blacklist, &amp;quot;whitelist&amp;quot; - Whitelist]&lt;br /&gt;
* static_list_id - Blacklist / Whitelist options, Enable Static Destination - Number Pool [Number Pool ID]&lt;br /&gt;
* credit_unlimited - if set to 1, the user's credit will be set to unlimited&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Additional feature''' &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If API setting '''Allow Resellers to use Admin Quick Forward Rules''' is enabled:&amp;lt;br&amp;gt;Reseller is able to set Quick Forward Rules inherited from Admin. '''u16''' should be used as a parameter for Quick Forward Rules.&amp;lt;br&amp;gt;&lt;br /&gt;
If API setting '''Allow Resellers to use Admin Tariffs''' is enabled:&amp;lt;br&amp;gt;Reseller is able to set Tariff inherited from Admin. '''u5''' should be used as a parameter for Tariff.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reguest===&lt;br /&gt;
&lt;br /&gt;
We have user_id = 123, API Secret Key = 456789, u15=1 (we want to block user)&lt;br /&gt;
&lt;br /&gt;
We send:&lt;br /&gt;
 HTML POST: http://&amp;lt;server_ip&amp;gt;/billing/api/user_details_update?u=username&amp;amp;user_id=123&amp;amp;u15=1&amp;amp;hash=0ab3ede4e93a55c38855a2cc9b9e169d35442c48&lt;br /&gt;
&lt;br /&gt;
'''* Note that username and password are not included in hash'''&lt;br /&gt;
&lt;br /&gt;
Other examples:&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;server_ip&amp;gt;/billing/api/user_update_api?u15=1&amp;amp;user_id=789&amp;amp;u=admin&amp;amp;u15=1&amp;amp;hash=0in2w8n01rwnodv4t0y5zzfp1h5hdp1fyk7z&lt;br /&gt;
&lt;br /&gt;
This request blocks (u15=1) user with ID 789 (user_id=789). User belongs to admin (u=admin).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;server_ip&amp;gt;/billing/api/user_update_api?u16=3&amp;amp;user_id=789&amp;amp;u=admin&amp;amp;u15=1&amp;amp;hash=0in2w8n01rwnodv4t0y5zzfp1h5hdp1fyk7z&lt;br /&gt;
&lt;br /&gt;
This request changes user quickforwards rule to rule with ID 3 (u16=3) user with ID 789 (user_id=789). User belongs to admin (u=admin).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
   &amp;lt;status&amp;gt;User was updated&amp;lt;/status&amp;gt;&lt;br /&gt;
  &amp;lt;/page&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
'''Errors'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;User was not found&amp;lt;/error&amp;gt; - User was not found using user_id. Use correct user id.&lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.&lt;br /&gt;
* &amp;lt;error&amp;gt;Access Denied&amp;lt;/error&amp;gt; - Check params and permissions. &lt;br /&gt;
* &amp;lt;error&amp;gt;You have no editing permission&amp;lt;/error&amp;gt; - Accountant dont have permission.&lt;br /&gt;
* &amp;lt;error&amp;gt;Tariff not found&amp;lt;/error&amp;gt; - Tariff was not found using param u5.&lt;br /&gt;
* &amp;lt;error&amp;gt;User was not updated&amp;lt;/error&amp;gt;&lt;br /&gt;
* &amp;lt;error&amp;gt;Responsible accountant is not valid&amp;lt;/error&amp;gt; Responsible accountant id was not correct using param u31.&lt;br /&gt;
* &amp;lt;message&amp;gt;problem message&amp;lt;/message&amp;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;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_user_details_update&amp;diff=30031</id>
		<title>MOR API user details update</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_user_details_update&amp;diff=30031"/>
		<updated>2025-03-05T14:15:08Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 11---&amp;gt;&lt;br /&gt;
[[MOR API]] Update user from params. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
If Admin has checked Allow Resellers to use Admin Tariffs in [[API Configuration]] then using this API Reseller can set for his Users Wholesale or Retail Tariffs which belongs to Admin.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Please note that it is not necessary to send ALL user parameters - you can send only those you need to update.'''&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;
* From '''MOR X4''' call: '''/api/user_details_update'''&lt;br /&gt;
* For Backwards-compatibility old name 'user_update_api' is also usable. Call: '''/api/user_update_api'''&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash (if it is used):&lt;br /&gt;
&lt;br /&gt;
* user_id - Users ID in MOR database, whose details we want to change. '''REQUIRED'''.&lt;br /&gt;
* u0 - vat number&lt;br /&gt;
* u1 - lcr id&lt;br /&gt;
* u2 - warning email hour&lt;br /&gt;
* u3 - hide destination end&lt;br /&gt;
* u4 - currency id&lt;br /&gt;
* u5 - tariff id&lt;br /&gt;
* u6 - warning email balance&lt;br /&gt;
* u7 - spy device id&lt;br /&gt;
* u8 - language&lt;br /&gt;
* u9 - username&lt;br /&gt;
* u10 - warning balance call [0-off, 1-on]&lt;br /&gt;
* u11 - acc group id&lt;br /&gt;
* u12 - generate invoice&lt;br /&gt;
* u13 - usertype&lt;br /&gt;
* u14 - taxation country ([[Directions_and_Destinations#Directions|Direction]] id)&lt;br /&gt;
* u15 - blocked&lt;br /&gt;
* u16 - quickforwards rule id&lt;br /&gt;
* u17 - last name&lt;br /&gt;
* u18 - call limit&lt;br /&gt;
* u19 - clientid (Company/Personal ID)&lt;br /&gt;
* u20 - recording hdd quota&lt;br /&gt;
* u21 - cyberplat active&lt;br /&gt;
* u22 - recordings email&lt;br /&gt;
* u23 - first name&lt;br /&gt;
* u24 - warning balance sound file id&lt;br /&gt;
* u25 - postpaid&lt;br /&gt;
* u26 - accounting number&lt;br /&gt;
* u27 - agreement number&lt;br /&gt;
* u28 - hidden&lt;br /&gt;
* ay - agr_date year&lt;br /&gt;
* am - agr_date month&lt;br /&gt;
* ad - agr_date day&lt;br /&gt;
* by - block at date year2011&lt;br /&gt;
* bm - block at date month&lt;br /&gt;
* bd - block at date day&lt;br /&gt;
* pswd - password&lt;br /&gt;
* user_warning_email_hour&lt;br /&gt;
* pgui - privacy gui [0-off, 1-on]&lt;br /&gt;
* pcsv - privacy csv [0-off, 1-on]&lt;br /&gt;
* ppdf - privacy pdf [0-off, 1-on]&lt;br /&gt;
* recording_forced_enabled - [0-off, 1-on]&lt;br /&gt;
* i4 - invoice detailed csv [0-off, 16-on]&lt;br /&gt;
* tax4_enabled - [0-off, 1-on]&lt;br /&gt;
* tax2_enabled - [0-off, 1-on]&lt;br /&gt;
* accountant_type_invalid &lt;br /&gt;
* block_at_conditional - 15&lt;br /&gt;
* tax3_enabled - [0-off, 1-on]&lt;br /&gt;
* accountant_type &lt;br /&gt;
* tax1_value - float&lt;br /&gt;
* show_zero_calls - [0-off, 1-on]&lt;br /&gt;
* warning_email_active - [0-off, 1-on]&lt;br /&gt;
* compound_tax - [0-off, 1-on]&lt;br /&gt;
* tax4_name - &lt;br /&gt;
* allow_loss_calls - [0-off, 1-on]&lt;br /&gt;
* tax3_name - &lt;br /&gt;
* tax2_name - &lt;br /&gt;
* credit - float&lt;br /&gt;
* tax1_name - &lt;br /&gt;
* total_tax_name - &lt;br /&gt;
* tax2_value - float&lt;br /&gt;
* tax4_value - float&lt;br /&gt;
* i1 - invoice pdf [0-off, 2-on]&lt;br /&gt;
* tax3_value - float&lt;br /&gt;
* cyberplat_active - [0-off, 1-on]&lt;br /&gt;
* i2 - invoice csv [0-off, 4-on]&lt;br /&gt;
* i3 - invoice detailed pdf [0-off, 8-on]&lt;br /&gt;
* recording_enabled - [0-off, 1-on]&lt;br /&gt;
* email_warning_sent_test - [0-off, 1-on]&lt;br /&gt;
* own_providers - [0-off, 1-on]&lt;br /&gt;
* a0 - address&lt;br /&gt;
* a1 - city&lt;br /&gt;
* a2 - postcode&lt;br /&gt;
* a3 - county&lt;br /&gt;
* a4 - mob_phone&lt;br /&gt;
* a5 - fax&lt;br /&gt;
* a6 - Country, direction id ([[Directions_and_Destinations#Directions|Direction]] id)&lt;br /&gt;
* a7 - phone&lt;br /&gt;
* a8 - email&lt;br /&gt;
* a9 - state&lt;br /&gt;
* company_name -&lt;br /&gt;
&lt;br /&gt;
'''Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''REQUIRED'''.&lt;br /&gt;
* u - username of the user who can modify details (admin, reseller, or accountant). '''REQUIRED'''.&lt;br /&gt;
* u29 - pbx pool id&lt;br /&gt;
* u30 - hide non-answered calls&lt;br /&gt;
* u31 - responsible accountant id (use -1 in order to unassign Responsible Accountant).&lt;br /&gt;
* u32 - daily balance limit; 0 or less means unlimited.&lt;br /&gt;
* u33 - comment&lt;br /&gt;
* ignore_global_monitorings - [0-off, 1-on]&lt;br /&gt;
* time_zone - time zone (all available references are listed on Time Zone list at the time zone name column. See more:  http://wiki.kolmisoft.com/index.php/Time_Zone_list)&lt;br /&gt;
* allow_change_callerid - [0-off, 1-on]&lt;br /&gt;
* enable_static_source_list - Blacklist / Whitelist options, Enable Static Source [&amp;quot;no&amp;quot; - No, &amp;quot;blacklist&amp;quot; - Blacklist, &amp;quot;whitelist&amp;quot; - Whitelist]&lt;br /&gt;
* static_source_list_id - Blacklist / Whitelist options, Enable Static Source - Number Pool [Number Pool ID]&lt;br /&gt;
* enable_static_list - Blacklist / Whitelist options, Enable Static Destination [&amp;quot;no&amp;quot; - No, &amp;quot;blacklist&amp;quot; - Blacklist, &amp;quot;whitelist&amp;quot; - Whitelist]&lt;br /&gt;
* static_list_id - Blacklist / Whitelist options, Enable Static Destination - Number Pool [Number Pool ID]&lt;br /&gt;
* credit_unlimited - if set to 1, the user's credit will be set to unlimited&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Additional feature''' &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If API setting '''Allow Resellers to use Admin Quick Forward Rules''' is enabled:&amp;lt;br&amp;gt;Reseller is able to set Quick Forward Rules inherited from Admin. '''u16''' should be used as a parameter for Quick Forward Rules.&amp;lt;br&amp;gt;&lt;br /&gt;
If API setting '''Allow Resellers to use Admin Tariffs''' is enabled:&amp;lt;br&amp;gt;Reseller is able to set Tariff inherited from Admin. '''u5''' should be used as a parameter for Tariff.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reguest===&lt;br /&gt;
&lt;br /&gt;
We have user_id = 123, API Secret Key = 456789, u15=1 (we want to block user)&lt;br /&gt;
&lt;br /&gt;
We send:&lt;br /&gt;
 HTML POST: http://&amp;lt;server_ip&amp;gt;/billing/api/user_details_update?u=username&amp;amp;user_id=123&amp;amp;u15=1&amp;amp;hash=0ab3ede4e93a55c38855a2cc9b9e169d35442c48&lt;br /&gt;
&lt;br /&gt;
'''* Note that username and password are not included in hash'''&lt;br /&gt;
&lt;br /&gt;
Other examples:&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;server_ip&amp;gt;/billing/api/user_update_api?u15=1&amp;amp;user_id=789&amp;amp;u=admin&amp;amp;u15=1&amp;amp;hash=0in2w8n01rwnodv4t0y5zzfp1h5hdp1fyk7z&lt;br /&gt;
&lt;br /&gt;
This request blocks (u15=1) user with ID 789 (user_id=789). User belongs to admin (u=admin).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;server_ip&amp;gt;/billing/api/user_update_api?u16=3&amp;amp;user_id=789&amp;amp;u=admin&amp;amp;u15=1&amp;amp;hash=0in2w8n01rwnodv4t0y5zzfp1h5hdp1fyk7z&lt;br /&gt;
&lt;br /&gt;
This request changes user quickforwards rule to rule with ID 3 (u16=3) user with ID 789 (user_id=789). User belongs to admin (u=admin).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
   &amp;lt;status&amp;gt;User was updated&amp;lt;/status&amp;gt;&lt;br /&gt;
  &amp;lt;/page&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
'''Errors'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;User was not found&amp;lt;/error&amp;gt; - User was not found using user_id. Use correct user id.&lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.&lt;br /&gt;
* &amp;lt;error&amp;gt;Access Denied&amp;lt;/error&amp;gt; - Check params and permissions. &lt;br /&gt;
* &amp;lt;error&amp;gt;You have no editing permission&amp;lt;/error&amp;gt; - Accountant dont have permission.&lt;br /&gt;
* &amp;lt;error&amp;gt;Tariff not found&amp;lt;/error&amp;gt; - Tariff was not found using param u5.&lt;br /&gt;
* &amp;lt;error&amp;gt;User was not updated&amp;lt;/error&amp;gt;&lt;br /&gt;
* &amp;lt;error&amp;gt;Responsible accountant is not valid&amp;lt;/error&amp;gt; Responsible accountant id was not correct using param u31.&lt;br /&gt;
* &amp;lt;message&amp;gt;problem message&amp;lt;/message&amp;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;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_user_register&amp;diff=30030</id>
		<title>MOR API user register</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_user_register&amp;diff=30030"/>
		<updated>2025-03-05T14:14:12Z</updated>

		<summary type="html">&lt;p&gt;Nerijuss: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
[[MOR API]] Create new user from params. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* Call: /api/user_register&lt;br /&gt;
* Methods: POST, GET(if allowed, not recomended)&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* '''email''' - New user email. '''Required'''.&lt;br /&gt;
* '''id''' - User UNIQUEHASH in MOR database. '''Required'''. &amp;lt;u&amp;gt;If uniquehash is not used, user will end up at admin account&amp;lt;/u&amp;gt;.&lt;br /&gt;
Uniquehash can be found in SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; API tab (last setting) or after log out of MOR in the address field of the browser, for example:&lt;br /&gt;
 http://SERVERIP/billing/callc/login/kljsdfg54kl where kljsdfg54kl is the uniquehash.&lt;br /&gt;
* '''lcr_id'''&lt;br /&gt;
* '''device_type''' - Device type [SIP, IAX2, Virtual]. '''Required'''.&lt;br /&gt;
* '''username''' - New user username. '''Required'''.&lt;br /&gt;
* '''first_name''' - New user first name.&lt;br /&gt;
* '''last_name''' - New user last name. &lt;br /&gt;
* '''caller_id''' - CallerID for Device (It can include letters, numbers and signs. If empty value is passed CallerID will be used the same as in Default User settings. If empty in Default User settings and in request - it will not be used).&lt;br /&gt;
* '''state'''&lt;br /&gt;
* '''device_location_id'''&lt;br /&gt;
* '''company_name'''&lt;br /&gt;
&lt;br /&gt;
'''Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Parameters which are '''not included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* '''[[MOR API hash construction | hash]]''' - SHA1 hash constructed using '''parameters''' which are listed above. Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''password''' - New user password. '''Required'''.&lt;br /&gt;
* '''password2''' - New user password confirmation. '''Required'''.&lt;br /&gt;
* '''country_id''' - New user country (please check table below). '''Required'''.&lt;br /&gt;
* '''mob_phone''' - Mobile phone number.&lt;br /&gt;
* '''phone - Phone number. &lt;br /&gt;
* '''fax''' - Fax. &lt;br /&gt;
* '''client_id''' - Company/Personal ID.&lt;br /&gt;
* '''vat_number''' - TAX Registration Number.&lt;br /&gt;
* '''county'''&lt;br /&gt;
* '''city'''&lt;br /&gt;
* '''postcode''' - Postcode/ZIP.&lt;br /&gt;
* '''address'''&lt;br /&gt;
* '''usertype''' - allowed values: reseller, accountant, user.&lt;br /&gt;
* '''permission_group''' - Reseller or Accountant Permission Group '''ID''' (depending what usertype is sended)&lt;br /&gt;
* '''accounting_number''' - Accounting Number&lt;br /&gt;
* '''call_limit''' - Call limit (how many simultaneous Calls the new User can make by default?)&lt;br /&gt;
* '''credit_limit''' - Credit limit&lt;br /&gt;
* '''tariff''' - Tariff ID from database. &lt;br /&gt;
* '''currency_id''' - Currency ID from database.&lt;br /&gt;
* '''postpaid''' - If postpaid=1, then User will be created as postpaid. If postpaid =0, then User will be created as prepaid. If parameter is not used, then User will be created according Default User settings.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/user_register?id=kljsdfg54kl&amp;amp;username=username&amp;amp;password=pass&amp;amp;password2=pass&amp;amp;first_name=first&lt;br /&gt;
 &amp;amp;last_name=last&amp;amp;country_id=10&amp;amp;email=email@email.com&amp;amp;device_type=SIP&amp;amp;hash=sd5g16sd1g6s&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;page&amp;gt;&lt;br /&gt;
   &amp;lt;status&amp;gt;&lt;br /&gt;
     &amp;lt;success&amp;gt;Registration successful&amp;lt;/success&amp;gt;&lt;br /&gt;
   &amp;lt;/status&amp;gt;&lt;br /&gt;
   &amp;lt;user_device_settings&amp;gt;&lt;br /&gt;
     &amp;lt;email&amp;gt;Registration email&amp;lt;/email&amp;gt; - If email sending enabled.&lt;br /&gt;
     &amp;lt;user_id&amp;gt; user id&amp;lt;/user_id&amp;gt; &amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
     &amp;lt;device_type&amp;gt; device type [SIP|IAX2]&amp;lt;/device_type&amp;gt;&lt;br /&gt;
     &amp;lt;device_id&amp;gt; device id &amp;lt;/device_id&amp;gt; &amp;lt;!---This functionality is available from MOR 12---&amp;gt;&lt;br /&gt;
     &amp;lt;username&amp;gt; device username &amp;lt;/username&amp;gt;&lt;br /&gt;
     &amp;lt;password&amp;gt; device password &amp;lt;/password&amp;gt;&lt;br /&gt;
     &amp;lt;pin&amp;gt; device pin &amp;lt;/pin&amp;gt;&lt;br /&gt;
     &amp;lt;server_ip&amp;gt; Asterisk Server IP &amp;lt;/server_ip&amp;gt;&lt;br /&gt;
     &amp;lt;registration_notice&amp;gt; Registration notice which is set in Settings &amp;lt;/registration_notice&amp;gt;&lt;br /&gt;
   &amp;lt;/user_device_settings&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
'''Errors'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;Incorrect hash&amp;lt;/error&amp;gt; - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.&lt;br /&gt;
* &amp;lt;error&amp;gt;Registration over API is disabled&amp;lt;/error&amp;gt; - Setting: Settings-&amp;gt;API-&amp;gt;API allow Registration, is off. Turn on API allow Registration.&lt;br /&gt;
* &amp;lt;error&amp;gt;Access Denied&amp;lt;/error&amp;gt; - User with UNIQUEHASH not found or params id not send. Enter correct id.&lt;br /&gt;
* &amp;lt;error&amp;gt;Please enter username&amp;lt;/error&amp;gt; - Params username is not send. Enter correct username.&lt;br /&gt;
* &amp;lt;error&amp;gt;Enter device type&amp;lt;/error&amp;gt; - device_type is not send. Enter correct device_type.&lt;br /&gt;
* &amp;lt;error&amp;gt;Such username is already taken&amp;lt;/error&amp;gt; - Duplicate of username. Change username.&lt;br /&gt;
* &amp;lt;error&amp;gt;Passwords do not match&amp;lt;/error&amp;gt; - Enter correct passwords.&lt;br /&gt;
* &amp;lt;error&amp;gt;Password must be longer than (...) characters&amp;lt;/error&amp;gt; - Enter correct password.&lt;br /&gt;
* &amp;lt;error&amp;gt;Please enter first name&amp;lt;/error&amp;gt; - Enter first_name.&lt;br /&gt;
* &amp;lt;error&amp;gt;Please enter last name&amp;lt;/error&amp;gt; - Enter last_name.&lt;br /&gt;
* &amp;lt;error&amp;gt;Please select country&amp;lt;/error&amp;gt; - Enter country_id.&lt;br /&gt;
* &amp;lt;error&amp;gt;Please enter email&amp;lt;/error&amp;gt; - Email address is not valid or not send. Enter correct email.&lt;br /&gt;
* &amp;lt;error&amp;gt;This email address is already in use&amp;lt;/error&amp;gt; - Change email address.&lt;br /&gt;
* &amp;lt;error&amp;gt;User with mobile phone already exists&amp;lt;/error&amp;gt; - Change mobile phone.&lt;br /&gt;
* &amp;lt;error&amp;gt;User with phone already exists&amp;lt;/error&amp;gt; - Change phone.&lt;br /&gt;
* &amp;lt;error&amp;gt;User with fax already exists&amp;lt;/error&amp;gt; - Change fax.&lt;br /&gt;
* &amp;lt;error&amp;gt;Default user is not present&amp;lt;/error&amp;gt; - [[Default_user | Default User's]] settings are not saved in database. &lt;br /&gt;
* &amp;lt;error&amp;gt;LCR was not found&amp;lt;/error&amp;gt; - LCR id incorrect or does not exist&lt;br /&gt;
* &amp;lt;error&amp;gt;Location was not found&amp;lt;/error&amp;gt; - Location id incorrect or does not exist&lt;br /&gt;
* &amp;lt;error&amp;gt;Password must be longer than 7 characters or short passwords in Devices should be allowed&amp;lt;/error&amp;gt; - Use longer password or allow short passwords in devices&lt;br /&gt;
* &amp;lt;error&amp;gt;Password must contain at least one numeric value, capital and lowercase symbol - Use more secure password with at least one numeric value, capital and lowercase symbol&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List of Country IDs ===&lt;br /&gt;
&lt;br /&gt;
1 - Afghanistan&lt;br /&gt;
&lt;br /&gt;
2 - Albania&lt;br /&gt;
&lt;br /&gt;
3 - Algeria&lt;br /&gt;
&lt;br /&gt;
4 - American Samoa&lt;br /&gt;
&lt;br /&gt;
5 - Andorra&lt;br /&gt;
&lt;br /&gt;
6 - Angola &lt;br /&gt;
&lt;br /&gt;
7 - Anguilla &lt;br /&gt;
&lt;br /&gt;
8 - Antarctica &lt;br /&gt;
&lt;br /&gt;
9 - Antigua And Barbuda&lt;br /&gt;
&lt;br /&gt;
10 - Argentina&lt;br /&gt;
&lt;br /&gt;
11 - Armenia&lt;br /&gt;
&lt;br /&gt;
12 - Aruba&lt;br /&gt;
&lt;br /&gt;
13 - Australia&lt;br /&gt;
&lt;br /&gt;
14 - Austria&lt;br /&gt;
&lt;br /&gt;
15 - Azerbaijan &lt;br /&gt;
&lt;br /&gt;
16 - Bahamas&lt;br /&gt;
&lt;br /&gt;
17 - Bahrain&lt;br /&gt;
&lt;br /&gt;
18 - Bangladesh &lt;br /&gt;
&lt;br /&gt;
19 - Barbados &lt;br /&gt;
&lt;br /&gt;
20 - Belarus&lt;br /&gt;
&lt;br /&gt;
21 - Belgium&lt;br /&gt;
&lt;br /&gt;
22 - Belize &lt;br /&gt;
&lt;br /&gt;
23 - Benin&lt;br /&gt;
&lt;br /&gt;
24 - Bermuda&lt;br /&gt;
&lt;br /&gt;
25 - Bhutan &lt;br /&gt;
&lt;br /&gt;
26 - Bolivia&lt;br /&gt;
&lt;br /&gt;
27 - Bosnia And Herzegovina &lt;br /&gt;
&lt;br /&gt;
28 - Botswana &lt;br /&gt;
&lt;br /&gt;
30 - Brazil &lt;br /&gt;
&lt;br /&gt;
32 - Brunei Darussalam&lt;br /&gt;
&lt;br /&gt;
33 - Bulgaria &lt;br /&gt;
&lt;br /&gt;
34 - Burkina Faso &lt;br /&gt;
&lt;br /&gt;
35 - Burundi&lt;br /&gt;
&lt;br /&gt;
36 - Cambodia &lt;br /&gt;
&lt;br /&gt;
37 - Cameroon &lt;br /&gt;
&lt;br /&gt;
38 - Canada &lt;br /&gt;
&lt;br /&gt;
39 - Cape Verde &lt;br /&gt;
&lt;br /&gt;
40 - Cayman Islands &lt;br /&gt;
&lt;br /&gt;
41 - Central African Republic &lt;br /&gt;
&lt;br /&gt;
42 - Chad &lt;br /&gt;
&lt;br /&gt;
43 - Chile&lt;br /&gt;
&lt;br /&gt;
44 - China&lt;br /&gt;
&lt;br /&gt;
45 - Christmas Island &lt;br /&gt;
&lt;br /&gt;
46 - Cocos (Keeling) Islands&lt;br /&gt;
&lt;br /&gt;
47 - Colombia &lt;br /&gt;
&lt;br /&gt;
48 - Comoros&lt;br /&gt;
&lt;br /&gt;
49 - Congo&lt;br /&gt;
&lt;br /&gt;
50 - Congo, The Democratic Republic Of The&lt;br /&gt;
&lt;br /&gt;
51 - Cook Islands &lt;br /&gt;
&lt;br /&gt;
52 - Costa Rica &lt;br /&gt;
&lt;br /&gt;
53 - Ivory Cost &lt;br /&gt;
&lt;br /&gt;
54 - Croatia&lt;br /&gt;
&lt;br /&gt;
55 - Cuba &lt;br /&gt;
&lt;br /&gt;
56 - Cyprus &lt;br /&gt;
&lt;br /&gt;
57 - Czech Republic &lt;br /&gt;
&lt;br /&gt;
58 - Denmark&lt;br /&gt;
&lt;br /&gt;
59 - Djibouti &lt;br /&gt;
&lt;br /&gt;
60 - Dominica &lt;br /&gt;
&lt;br /&gt;
61 - Dominican Republic &lt;br /&gt;
&lt;br /&gt;
62 - Ecuador&lt;br /&gt;
&lt;br /&gt;
63 - Egypt&lt;br /&gt;
&lt;br /&gt;
64 - El Salvador&lt;br /&gt;
&lt;br /&gt;
65 - Equatorial Guinea&lt;br /&gt;
&lt;br /&gt;
66 - Eritrea&lt;br /&gt;
&lt;br /&gt;
67 - Estonia&lt;br /&gt;
&lt;br /&gt;
68 - Ethiopia &lt;br /&gt;
&lt;br /&gt;
69 - Falkland Islands (Malvinas)&lt;br /&gt;
&lt;br /&gt;
70 - Faroe Islands&lt;br /&gt;
&lt;br /&gt;
71 - Fiji &lt;br /&gt;
&lt;br /&gt;
72 - Finland&lt;br /&gt;
&lt;br /&gt;
73 - France &lt;br /&gt;
&lt;br /&gt;
74 - French Guiana&lt;br /&gt;
&lt;br /&gt;
75 - French Polynesia &lt;br /&gt;
&lt;br /&gt;
77 - Gabon&lt;br /&gt;
&lt;br /&gt;
78 - Gambia &lt;br /&gt;
&lt;br /&gt;
79 - Georgia&lt;br /&gt;
&lt;br /&gt;
80 - Germany&lt;br /&gt;
&lt;br /&gt;
81 - Ghana&lt;br /&gt;
&lt;br /&gt;
82 - Gibraltar&lt;br /&gt;
&lt;br /&gt;
83 - Greece &lt;br /&gt;
&lt;br /&gt;
84 - Greenland&lt;br /&gt;
&lt;br /&gt;
85 - Grenada&lt;br /&gt;
&lt;br /&gt;
86 - Guadeloupe &lt;br /&gt;
&lt;br /&gt;
87 - Guam &lt;br /&gt;
&lt;br /&gt;
88 - Guatemala&lt;br /&gt;
&lt;br /&gt;
89 - Guinea &lt;br /&gt;
&lt;br /&gt;
90 - Guinea-Bissau&lt;br /&gt;
&lt;br /&gt;
91 - Guyana &lt;br /&gt;
&lt;br /&gt;
92 - Haiti&lt;br /&gt;
&lt;br /&gt;
94 - Vatican City &lt;br /&gt;
&lt;br /&gt;
95 - Honduras &lt;br /&gt;
&lt;br /&gt;
96 - Hong Kong&lt;br /&gt;
&lt;br /&gt;
97 - Hungary&lt;br /&gt;
&lt;br /&gt;
98 - Iceland&lt;br /&gt;
&lt;br /&gt;
99 - India&lt;br /&gt;
&lt;br /&gt;
100 - Indonesia&lt;br /&gt;
&lt;br /&gt;
101 - Iran &lt;br /&gt;
&lt;br /&gt;
102 - Iraq &lt;br /&gt;
&lt;br /&gt;
103 - Ireland&lt;br /&gt;
&lt;br /&gt;
104 - Israel &lt;br /&gt;
&lt;br /&gt;
105 - Italy&lt;br /&gt;
&lt;br /&gt;
106 - Jamaica&lt;br /&gt;
&lt;br /&gt;
107 - Japan&lt;br /&gt;
&lt;br /&gt;
108 - Jordan &lt;br /&gt;
&lt;br /&gt;
109 - Kazakhstan &lt;br /&gt;
&lt;br /&gt;
110 - Kenya&lt;br /&gt;
&lt;br /&gt;
111 - Kiribati &lt;br /&gt;
&lt;br /&gt;
112 - Korea, Democratic People's Republic Of &lt;br /&gt;
&lt;br /&gt;
113 - Korea, Republic of &lt;br /&gt;
&lt;br /&gt;
114 - Kuwait &lt;br /&gt;
&lt;br /&gt;
115 - Kyrgyzstan &lt;br /&gt;
&lt;br /&gt;
116 - Laos &lt;br /&gt;
&lt;br /&gt;
117 - Latvia &lt;br /&gt;
&lt;br /&gt;
118 - Lebanon&lt;br /&gt;
&lt;br /&gt;
119 - Lesotho&lt;br /&gt;
&lt;br /&gt;
120 - Liberia&lt;br /&gt;
&lt;br /&gt;
121 - Libyan Arab Jamahiriya &lt;br /&gt;
&lt;br /&gt;
122 - Liechtenstein&lt;br /&gt;
&lt;br /&gt;
123 - Lithuania&lt;br /&gt;
&lt;br /&gt;
124 - Luxembourg &lt;br /&gt;
&lt;br /&gt;
125 - Macao&lt;br /&gt;
&lt;br /&gt;
126 - Macedonia&lt;br /&gt;
&lt;br /&gt;
127 - Madagascar &lt;br /&gt;
&lt;br /&gt;
128 - Malawi &lt;br /&gt;
&lt;br /&gt;
129 - Malaysia &lt;br /&gt;
&lt;br /&gt;
130 - Maldives &lt;br /&gt;
&lt;br /&gt;
131 - Mali &lt;br /&gt;
&lt;br /&gt;
132 - Malta&lt;br /&gt;
&lt;br /&gt;
133 - Marshall islands &lt;br /&gt;
&lt;br /&gt;
134 - Martinique &lt;br /&gt;
&lt;br /&gt;
135 - Mauritania &lt;br /&gt;
&lt;br /&gt;
136 - Mauritius&lt;br /&gt;
&lt;br /&gt;
137 - Mayotte&lt;br /&gt;
&lt;br /&gt;
138 - Mexico &lt;br /&gt;
&lt;br /&gt;
139 - Micronesia &lt;br /&gt;
&lt;br /&gt;
140 - Moldova&lt;br /&gt;
&lt;br /&gt;
141 - Monaco &lt;br /&gt;
&lt;br /&gt;
142 - Mongolia &lt;br /&gt;
&lt;br /&gt;
143 - Montserrat &lt;br /&gt;
&lt;br /&gt;
144 - Morocco&lt;br /&gt;
&lt;br /&gt;
145 - Mozambique &lt;br /&gt;
&lt;br /&gt;
146 - Myanmar&lt;br /&gt;
&lt;br /&gt;
147 - Namibia&lt;br /&gt;
&lt;br /&gt;
148 - Nauru&lt;br /&gt;
&lt;br /&gt;
149 - Nepal&lt;br /&gt;
&lt;br /&gt;
150 - Netherlands&lt;br /&gt;
&lt;br /&gt;
151 - Netherlands Antilles &lt;br /&gt;
&lt;br /&gt;
152 - New Caledonia&lt;br /&gt;
&lt;br /&gt;
153 - New Zealand&lt;br /&gt;
&lt;br /&gt;
154 - Nicaragua&lt;br /&gt;
&lt;br /&gt;
155 - Niger&lt;br /&gt;
&lt;br /&gt;
156 - Nigeria&lt;br /&gt;
&lt;br /&gt;
157 - Niue &lt;br /&gt;
&lt;br /&gt;
158 - Norfolk Island &lt;br /&gt;
&lt;br /&gt;
159 - Northern Mariana Islands &lt;br /&gt;
&lt;br /&gt;
160 - Norway &lt;br /&gt;
&lt;br /&gt;
161 - Oman &lt;br /&gt;
&lt;br /&gt;
162 - Pakistan &lt;br /&gt;
&lt;br /&gt;
163 - Palau&lt;br /&gt;
&lt;br /&gt;
164 - Palestine&lt;br /&gt;
&lt;br /&gt;
165 - Panama &lt;br /&gt;
&lt;br /&gt;
166 - Papua New Guinea &lt;br /&gt;
&lt;br /&gt;
167 - Paraguay &lt;br /&gt;
&lt;br /&gt;
168 - Peru &lt;br /&gt;
&lt;br /&gt;
169 - Philippines&lt;br /&gt;
&lt;br /&gt;
171 - Poland &lt;br /&gt;
&lt;br /&gt;
172 - Portugal &lt;br /&gt;
&lt;br /&gt;
173 - Puerto Rico&lt;br /&gt;
&lt;br /&gt;
174 - Qatar&lt;br /&gt;
&lt;br /&gt;
175 - Reunion&lt;br /&gt;
&lt;br /&gt;
176 - Romania&lt;br /&gt;
&lt;br /&gt;
177 - Russian Federation &lt;br /&gt;
&lt;br /&gt;
178 - Rwanda &lt;br /&gt;
&lt;br /&gt;
179 - Saint Helena &lt;br /&gt;
&lt;br /&gt;
180 - Saint Kitts And Nevis&lt;br /&gt;
&lt;br /&gt;
181 - Saint Lucia&lt;br /&gt;
&lt;br /&gt;
182 - Saint Pierre And Miquelon&lt;br /&gt;
&lt;br /&gt;
183 - Saint Vincent And The Grenadines &lt;br /&gt;
&lt;br /&gt;
184 - Samoa&lt;br /&gt;
&lt;br /&gt;
185 - San Marino &lt;br /&gt;
&lt;br /&gt;
186 - Sao Tome And Principe&lt;br /&gt;
&lt;br /&gt;
187 - Saudi Arabia &lt;br /&gt;
&lt;br /&gt;
188 - Senegal&lt;br /&gt;
&lt;br /&gt;
189 - Seychelles &lt;br /&gt;
&lt;br /&gt;
190 - Sierra Leone &lt;br /&gt;
&lt;br /&gt;
191 - Singapore&lt;br /&gt;
&lt;br /&gt;
192 - Slovakia &lt;br /&gt;
&lt;br /&gt;
193 - Slovenia &lt;br /&gt;
&lt;br /&gt;
194 - Solomon Islands&lt;br /&gt;
&lt;br /&gt;
195 - Somalia&lt;br /&gt;
&lt;br /&gt;
196 - South Africa &lt;br /&gt;
&lt;br /&gt;
198 - Spain&lt;br /&gt;
&lt;br /&gt;
199 - Sri Lanka&lt;br /&gt;
&lt;br /&gt;
200 - Sudan&lt;br /&gt;
&lt;br /&gt;
201 - Suriname &lt;br /&gt;
&lt;br /&gt;
203 - Swaziland&lt;br /&gt;
&lt;br /&gt;
204 - Sweden &lt;br /&gt;
&lt;br /&gt;
205 - Switzerland&lt;br /&gt;
&lt;br /&gt;
206 - Syrian Arab Republic &lt;br /&gt;
&lt;br /&gt;
207 - Taiwan &lt;br /&gt;
&lt;br /&gt;
208 - Tajikistan &lt;br /&gt;
&lt;br /&gt;
209 - Tanzania &lt;br /&gt;
&lt;br /&gt;
210 - Thailand &lt;br /&gt;
&lt;br /&gt;
212 - Togo &lt;br /&gt;
&lt;br /&gt;
213 - Tokelau&lt;br /&gt;
&lt;br /&gt;
214 - Tonga&lt;br /&gt;
&lt;br /&gt;
215 - Trinidad And Tobago&lt;br /&gt;
&lt;br /&gt;
216 - Tunisia&lt;br /&gt;
&lt;br /&gt;
217 - Turkey &lt;br /&gt;
&lt;br /&gt;
218 - Turkmenistan &lt;br /&gt;
&lt;br /&gt;
219 - Turks And Caicos Islands &lt;br /&gt;
&lt;br /&gt;
220 - Tuvalu &lt;br /&gt;
&lt;br /&gt;
221 - Uganda &lt;br /&gt;
&lt;br /&gt;
222 - Ukraine&lt;br /&gt;
&lt;br /&gt;
223 - United Arab Emirates &lt;br /&gt;
&lt;br /&gt;
224 - United Kingdom &lt;br /&gt;
&lt;br /&gt;
225 - United States&lt;br /&gt;
&lt;br /&gt;
227 - Uruguay&lt;br /&gt;
&lt;br /&gt;
228 - Uzbekistan &lt;br /&gt;
&lt;br /&gt;
229 - Vanuatu&lt;br /&gt;
&lt;br /&gt;
230 - Venezuela&lt;br /&gt;
&lt;br /&gt;
231 - Vietnam&lt;br /&gt;
&lt;br /&gt;
232 - Virgin Islands, British&lt;br /&gt;
&lt;br /&gt;
233 - Virgin Islands, U.S. &lt;br /&gt;
&lt;br /&gt;
234 - Wallis And Futuna&lt;br /&gt;
&lt;br /&gt;
236 - Yemen&lt;br /&gt;
&lt;br /&gt;
238 - Zambia &lt;br /&gt;
&lt;br /&gt;
239 - Zimbabwe &lt;br /&gt;
&lt;br /&gt;
240 - Ascension Island &lt;br /&gt;
&lt;br /&gt;
241 - Diego Garcia &lt;br /&gt;
&lt;br /&gt;
242 - Inmarsat &lt;br /&gt;
&lt;br /&gt;
243 - East Timor &lt;br /&gt;
&lt;br /&gt;
246 - Iridium&lt;br /&gt;
&lt;br /&gt;
247 - Serbia and Montenegro&lt;br /&gt;
&lt;br /&gt;
250 - Emsat&lt;br /&gt;
&lt;br /&gt;
251 - Ellipso-3&lt;br /&gt;
&lt;br /&gt;
252 - Globalstar &lt;br /&gt;
&lt;br /&gt;
253 - Montenegro &lt;br /&gt;
&lt;br /&gt;
254 - Kosovo&lt;br /&gt;
&lt;br /&gt;
255 - South Sudan&lt;br /&gt;
&lt;br /&gt;
256 - Thuraya&lt;br /&gt;
&lt;br /&gt;
==== Possible Issues ====&lt;br /&gt;
&lt;br /&gt;
The list above is default list of Country IDs in MOR. If you change something in database IDs can be changed too and you might get &amp;quot;Please select country&amp;quot; response from API. Also, if you add new direction from GUI, new ID will be assinged to it too. In both cases, you can find real Country/Direction ID from GUI in SETTINGS -&amp;gt; Billing -&amp;gt; Directions page '''Directions edit''' or '''Destinations list''' URL end:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:directions_id.png]]&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;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Nerijuss</name></author>
	</entry>
</feed>