<?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=Vladislav</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=Vladislav"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php/Special:Contributions/Vladislav"/>
	<updated>2026-04-26T05:40:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Backup_system&amp;diff=20076</id>
		<title>Backup system</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Backup_system&amp;diff=20076"/>
		<updated>2015-09-08T06:42:08Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 8---&amp;gt;&lt;br /&gt;
The backup system backs up the MOR database and allows it to be restored at any time. This functionality is available just for System Admin.&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'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Settings_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on '''Backups''' tab and here you can configure settings of Backups.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:backups1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If '''Run Backup according below schedule''' is checked, the following settings become active:&lt;br /&gt;
* '''Month''' – in which month backup should be made.&lt;br /&gt;
* '''Day of every month''' – which day of every month backup should be made.&lt;br /&gt;
* '''Day of week''' – which day of the week backup should be made.&lt;br /&gt;
* '''Hour''' – which hour backup should be made.&lt;br /&gt;
* '''Keep on local server''' – how many backups to keep on the server. The system deletes the oldest one if the limit is reached.&lt;br /&gt;
* '''Don't start backup if disk space less than''' – checks disk space before making an auto backup.&lt;br /&gt;
&lt;br /&gt;
You can find '''Backups''' folder on server by path: '''/usr/local/mor/backups'''. Archived DB Backups are named as '''db_dump_DateTime.sql.tar.gz'''. You can also find another configuration/Asterisk/GUI/etc files backup folders as well.&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; Backups'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:backups_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all Backups:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:backups_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You can download the backup by clicking the '''Download''' icon or restore the backup by clicking the '''Restore''' icon. When Scheduler (which runs every hour) makes an auto backup, it is seen as type = '''auto''' in the backups list. Click [[Image:icon_add.png]]'''New Backup''' to create a new Manual Backup. Enter any comment and click on '''Create'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=NOTE= &lt;br /&gt;
The Backup file contains only Database archived dump. Separate configuration/Asterisk/GUI/etc files are not included in this Backup file.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* [[I have a problem with Backups]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Backup_system&amp;diff=20075</id>
		<title>Backup system</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Backup_system&amp;diff=20075"/>
		<updated>2015-09-08T06:41:28Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 8---&amp;gt;&lt;br /&gt;
The backup system backs up the MOR database and allows it to be restored at any time. This functionality is available just for System Admin.&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'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Settings_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Click on '''Backups''' tab and here you can configure settings of Backups.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:backups1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If '''Run Backup according below schedule''' is checked, the following settings become active:&lt;br /&gt;
* '''Month''' – in which month backup should be made.&lt;br /&gt;
* '''Day of every month''' – which day of every month backup should be made.&lt;br /&gt;
* '''Day of week''' – which day of the week backup should be made.&lt;br /&gt;
* '''Hour''' – which hour backup should be made.&lt;br /&gt;
* '''Keep on local server''' – how many backups to keep on the server. The system deletes the oldest one if the limit is reached.&lt;br /&gt;
* '''Don't start backup if disk space less than''' – checks disk space before making an auto backup.&lt;br /&gt;
&lt;br /&gt;
You can find '''Backups''' folder on server by path: '''/usr/local/mor/backups'''. Archived DB Backups are named as '''db_dump_DateTime.sql.tar.gz'''. You can also find another configuration/Asterisk/GUI/etc files backup folders as well.&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; Backups'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:backups_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Here you can see list of all Backups:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:backups_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You can download the backup by clicking the '''Download''' icon or restore the backup by clicking the '''Restore''' icon. When Scheduler (which runs every hour) makes an auto backup, it is seen as type = '''auto''' in the backups list. Click [[Image:icon_add.png]]'''New Backup''' to create a new Manual Backup. Enter any comment and click on '''Create'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' The Backup file contains only Database archived dump. Separate configuration/Asterisk/GUI/etc files are not included in this Backup file.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* [[I have a problem with Backups]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=I_see_Apache_test_on_Start_page&amp;diff=20020</id>
		<title>I see Apache test on Start page</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=I_see_Apache_test_on_Start_page&amp;diff=20020"/>
		<updated>2015-08-24T12:19:24Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First solution:&lt;br /&gt;
&lt;br /&gt;
Use http://&amp;lt;your server IP&amp;gt;/billing instead of http://&amp;lt;your server IP&amp;gt;/.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Second solution:&lt;br /&gt;
&lt;br /&gt;
If you want to see MOR billing on Start page, please create file&lt;br /&gt;
&lt;br /&gt;
 /var/www/html/index.html&lt;br /&gt;
&lt;br /&gt;
with following content:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;MOR&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;meta HTTP-EQUIV=&amp;quot;REFRESH&amp;quot; content=&amp;quot;0; url=http://'''127.0.0.1'''/billing&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: '''127.0.0.1''' should be changed to your server IP.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=I_see_Apache_test_on_Start_page&amp;diff=20019</id>
		<title>I see Apache test on Start page</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=I_see_Apache_test_on_Start_page&amp;diff=20019"/>
		<updated>2015-08-24T12:18:53Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First solution:&lt;br /&gt;
&lt;br /&gt;
Use http://&amp;lt;your server IP&amp;gt;/billing instead of http://&amp;lt;your server IP&amp;gt;/.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Second solution:&lt;br /&gt;
&lt;br /&gt;
If you want to see MOR billing on Start page, please create file&lt;br /&gt;
&lt;br /&gt;
 /var/www/html/index.html&lt;br /&gt;
&lt;br /&gt;
with following content:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;&amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;MOR&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;meta HTTP-EQUIV=&amp;quot;REFRESH&amp;quot; content=&amp;quot;0; url=http://'''127.0.0.1'''/billing&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: '''127.0.0.1''' should be changed to your server IP.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=I_see_Apache_test_on_Start_page&amp;diff=20018</id>
		<title>I see Apache test on Start page</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=I_see_Apache_test_on_Start_page&amp;diff=20018"/>
		<updated>2015-08-24T12:17:52Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First solution:&lt;br /&gt;
&lt;br /&gt;
Use http://&amp;lt;your server IP&amp;gt;/billing instead of http://&amp;lt;your server IP&amp;gt;/.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Second solution:&lt;br /&gt;
&lt;br /&gt;
If you want to see MOR billing on Start page, please create file&lt;br /&gt;
&lt;br /&gt;
 /var/www/html/index.html&lt;br /&gt;
&lt;br /&gt;
with following content:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt; html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;MOR&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;meta HTTP-EQUIV=&amp;quot;REFRESH&amp;quot; content=&amp;quot;0; url=http://'''127.0.0.1'''/billing&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: '''127.0.0.1''' should be changed to your server IP.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Postpaid_logic&amp;diff=19957</id>
		<title>Postpaid logic</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Postpaid_logic&amp;diff=19957"/>
		<updated>2015-08-17T08:36:44Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Postpaid users by default can go into minus balance.&lt;br /&gt;
&lt;br /&gt;
However, if you set a [[Balance and Credit | credit]] limit, a postpaid User will not be able to make more calls when the limit is reached.&lt;br /&gt;
&lt;br /&gt;
Current call will be cut when credit limit will be reached.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' This logic is applied only if there is only one simultaneous Call at a time. If there are more then 1 (one) sim. Calls then Calls will be NOT cut.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Extending_Fail2Ban_configuration&amp;diff=19808</id>
		<title>Extending Fail2Ban configuration</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Extending_Fail2Ban_configuration&amp;diff=19808"/>
		<updated>2015-07-20T10:49:13Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Extending Fail2Ban to send you an email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About = &lt;br /&gt;
This page explains how to tune/extend Fail2Ban the right way, so that Kolmisoft update scripts would not overwrite your changes.&lt;br /&gt;
&lt;br /&gt;
Please note that in order for these extended rules to work Fail2Ban has to be updated. You can update Fail2Ban by running the following script:&lt;br /&gt;
&lt;br /&gt;
/usr/src/mor/sh_scripts/fail2ban_install.sh&lt;br /&gt;
&lt;br /&gt;
== Fail2Ban configuration options explained ==&lt;br /&gt;
===/etc/fail2ban/jail.conf===&lt;br /&gt;
&lt;br /&gt;
For example we will take HGC 200 ban configurations which by default ban IP's sending unauthenticated (devices are not registered to MOR system and IP based authentication is not selected) calls after 20 attempts/ 1 minute:&lt;br /&gt;
&lt;br /&gt;
 [ast-hgc-200]&lt;br /&gt;
 enabled  = true           &lt;br /&gt;
 filter   = asterisk_hgc_200     &lt;br /&gt;
 action   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all]&lt;br /&gt;
           sendmail-banned[name=Asterisk_HGC_200]&lt;br /&gt;
 logpath  = /var/log/asterisk/messages&lt;br /&gt;
 maxretry = 20&lt;br /&gt;
 bantime = -1&lt;br /&gt;
&lt;br /&gt;
'''Options explained'''&lt;br /&gt;
&lt;br /&gt;
'''enabled'''  = {true,false}  - filter enabled or not.&lt;br /&gt;
&lt;br /&gt;
'''filter'''   = asterisk_hgc_200    # Filter name. This name matches file /etc/fail2ban/filter.d/asterisk_hgc_200.conf . This file structure is very simple and is self explaining. It contains patterns the fail2ban has to scan in log files. You have to be able read / write perl regexp syntax in order to modify this file.&lt;br /&gt;
&lt;br /&gt;
'''action'''   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all] # Action configuration, it matches file /etc/fail2ban/action.d/iptables-allports&lt;br /&gt;
&lt;br /&gt;
sendmail-banned[name=Asterisk_HGC_200] # Action configuration, it matches file /etc/fail2ban/action.d/sendmail-banned&lt;br /&gt;
&lt;br /&gt;
'''logpath'''  = /var/log/asterisk/messages # Which log has to be scanned by filter&lt;br /&gt;
&lt;br /&gt;
'''maxretry''' = 20 # How many attempts we tolerate per minute. If there are more entries in log file than defined maxretry value = actions configuration files defined above are launched.&lt;br /&gt;
&lt;br /&gt;
'''bantime''' = -1 # &amp;lt;0 - ban will be forever (till you restart fail2ban/system). &amp;gt;0 - seconds.&lt;br /&gt;
&lt;br /&gt;
== Writing your own modifications for Fail2Ban==&lt;br /&gt;
&lt;br /&gt;
In order Kolmisoft update scripts would not overwrite your changes - you have to put it in file named the same way except the extension - it has to be named &amp;quot;.local&amp;quot; at the end instead of &amp;quot;.conf&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For example - if you would like to modify main configuration jail.conf - you would have to create your own configuration file named jail.local. Put all your changes there and Fail2Ban will use your configuration instead of Kolmisoft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Important - you don't have to copy the whole jail.conf file to jail.local, you can just put there only one section you would like to behave differently. For example - default Kolmisoft Fail2Ban configuration file jail.conf has these rules:&lt;br /&gt;
&lt;br /&gt;
 [ast-hgc-200]&lt;br /&gt;
 enabled  = true           &lt;br /&gt;
 filter   = asterisk_hgc_200     &lt;br /&gt;
 action   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all]&lt;br /&gt;
           sendmail-banned[name=Asterisk_HGC_200]&lt;br /&gt;
 logpath  = /var/log/asterisk/messages&lt;br /&gt;
 maxretry = 20&lt;br /&gt;
 bantime = -1&lt;br /&gt;
&lt;br /&gt;
If you are an experienced user and you know that there should not be any unauthenticated calls in your system - it is advised to modify this configuration to look like this:&lt;br /&gt;
&lt;br /&gt;
 [ast-hgc-200]&lt;br /&gt;
 enabled  = true           &lt;br /&gt;
 filter   = asterisk_hgc_200     &lt;br /&gt;
 action   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all]&lt;br /&gt;
           sendmail-banned[name=Asterisk_HGC_200]&lt;br /&gt;
&lt;br /&gt;
 logpath  = /var/log/asterisk/messages&lt;br /&gt;
 maxretry = 1&lt;br /&gt;
 bantime = -1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to put this configuration to '''/etc/fail2ban/jail.local'''. This modification will ensure, that the offender will get ban from the first try.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Important'''&lt;br /&gt;
&lt;br /&gt;
Every Fail2Ban configuration can be extended the same way - just create another file with same name with &amp;quot;.local&amp;quot; as file extension.&lt;br /&gt;
&lt;br /&gt;
= Extending Fail2Ban to send you an email =&lt;br /&gt;
&lt;br /&gt;
In order Fail2Ban would send you an email on various events you can extend existing Fail2Ban rules by creating jail.local file and adding modified configuration. For example in order on HGC 200 attack you would get an email - you should extend the configuration of jail.local like this:&lt;br /&gt;
 [ast-hgc-200]&lt;br /&gt;
 enabled  = true           &lt;br /&gt;
 filter   = asterisk_hgc_200     &lt;br /&gt;
 action   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all]&lt;br /&gt;
           sendmail-banned[name=Asterisk_HGC_200]&lt;br /&gt;
           sendmail[name=Asterisk_HGC_200, dest=your@mail.com]&lt;br /&gt;
 logpath  = /var/log/asterisk/messages&lt;br /&gt;
 maxretry = 1&lt;br /&gt;
 bantime = -1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The important line here is this: '''sendmail[name=Asterisk_HGC_200, dest=your@mail.com]'''&lt;br /&gt;
&lt;br /&gt;
Or, if you need modified email template, you need to modifye the action '''sendmail-banned''' or the one you use for specific rule. In our Example it is '''sendmail-banned'''.&lt;br /&gt;
It can be modified in /etc/fail2ban/action.d/sendmail-banned. The exact function is '''actionban''':&lt;br /&gt;
&lt;br /&gt;
 actionban = printf %%b &amp;quot;Subject: [Fail2Ban] &amp;lt;name&amp;gt;: banned &amp;lt;ip&amp;gt;&lt;br /&gt;
             From: Fail2Ban &amp;lt;&amp;lt;sender&amp;gt;&amp;gt;&lt;br /&gt;
             To: &amp;lt;dest&amp;gt;\n&lt;br /&gt;
             Hi,\n&lt;br /&gt;
             The IP &amp;lt;ip&amp;gt; has just been banned by Fail2Ban after&lt;br /&gt;
             &amp;lt;failures&amp;gt; attempts against &amp;lt;name&amp;gt;.\n\n&lt;br /&gt;
             Here are more information about &amp;lt;ip&amp;gt;:\n&lt;br /&gt;
             `/usr/bin/whois &amp;lt;ip&amp;gt;`\n&lt;br /&gt;
             Regards,\n&lt;br /&gt;
             Fail2Ban&amp;quot; | /usr/sbin/sendmail -f &amp;lt;sender&amp;gt; &amp;lt;dest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end of file, '''DO NOT FORGET''' to change the destination email in same file:&lt;br /&gt;
&lt;br /&gt;
 # Defaut name of the chain&lt;br /&gt;
 #&lt;br /&gt;
 name = default&lt;br /&gt;
 # Destination/Addressee of the mail&lt;br /&gt;
 #&lt;br /&gt;
 dest = your@mail.com&lt;br /&gt;
 # Sender of the mail&lt;br /&gt;
 #&lt;br /&gt;
 sender = valid@senderMail.com&lt;br /&gt;
&lt;br /&gt;
Note, if you use action (like sendmail-banned which will send the email) you do not need the '''sendmail[name=Asterisk_HGC_200, dest=your@mail.com]''' in a rule anymore.&lt;br /&gt;
After any fail2ban configuration changes, restart is required to apply changes.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=There_is_no_Invoice_PDF_button_from_User_login_page&amp;diff=19731</id>
		<title>There is no Invoice PDF button from User login page</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=There_is_no_Invoice_PDF_button_from_User_login_page&amp;diff=19731"/>
		<updated>2015-07-07T08:11:32Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: Created page with 'PDF icon is not showed only for invoices which are for manual payments. As for manual payment  invoice is simply one line with amount for manual payment, pdf is not really needed…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PDF icon is not showed only for invoices which are for manual payments. As for manual payment&lt;br /&gt;
&lt;br /&gt;
invoice is simply one line with amount for manual payment, pdf is not really needed for such invoice.&lt;br /&gt;
&lt;br /&gt;
Since X6 admin and users can view invoice details in browser, there they can clearly see the&lt;br /&gt;
&lt;br /&gt;
amount of manual payment.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=I_have_a_problem_with_Invoices&amp;diff=19730</id>
		<title>I have a problem with Invoices</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=I_have_a_problem_with_Invoices&amp;diff=19730"/>
		<updated>2015-07-07T08:10:40Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;What problem do you have? &lt;br /&gt;
&lt;br /&gt;
* [[Cannot generate Invoice]]&lt;br /&gt;
* [[Detailed Invoice does not match simple Invoice]]&lt;br /&gt;
* [[Detailed Invoice does not include CDRs]]&lt;br /&gt;
* [[Rerating does not work]]&lt;br /&gt;
* [[Invoice_limit_reached|Invoice reach limit: 20]]&lt;br /&gt;
* [[Invoice by CallerID does not include Incoming calls]]&lt;br /&gt;
* [[Cannot generate PDF]]&lt;br /&gt;
* [[Balance, Calls and Invoices are zero]]&lt;br /&gt;
* [[There is no Invoice PDF button from User login page]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= See also =&lt;br /&gt;
* [[MOR_Manual#Accounting | Accounting - Invoices]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Ports_which_should_be_opened&amp;diff=19615</id>
		<title>Ports which should be opened</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Ports_which_should_be_opened&amp;diff=19615"/>
		<updated>2015-06-11T12:54:56Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For server some ports should be opened '''or forwarded''' to M2/MOR server:&lt;br /&gt;
&lt;br /&gt;
* TCP 80 - for GUI/HTTP&lt;br /&gt;
* TCP 22 - for SSH connection&lt;br /&gt;
* TCP 25/465 - for SMTP / SMTP over SSL (TLS)&lt;br /&gt;
* TCP 443 - for GUI/HTTPS&lt;br /&gt;
* UDP 694 - for Heartbeat.&lt;br /&gt;
* TCP 3306 - for MySQL replication&lt;br /&gt;
* TCP 3690 - for SVN connections&lt;br /&gt;
* UDP 4569 - for IAX2 connection&lt;br /&gt;
* UDP 5060 to 5070, 10000-20000(10000-50000 in M2) - for SIP connection &lt;br /&gt;
* TCP/UDP 123 - Network Time Protocol&lt;br /&gt;
* TCP/UDP 1720 - for H.323 Protocol&lt;br /&gt;
* TCP/UDP 5038 - for Asterisk manager interface&lt;br /&gt;
* TCP/UDP 10050 - for Zabbix monitoring&lt;br /&gt;
* UDP 4000 - 4999 for T.38 support&lt;br /&gt;
You can test which TCP ports are opened using nmap tool:&lt;br /&gt;
&lt;br /&gt;
 nmap -vv -P0 your MOR server's IP address&lt;br /&gt;
&lt;br /&gt;
https://www.virtualizationhero.com/docs/manuals/linux/RHL-9-Manual/security-guide/s1-server-ports.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iptables config ===&lt;br /&gt;
 &lt;br /&gt;
For Asterisk server:&lt;br /&gt;
&lt;br /&gt;
 iptables -A INPUT -p tcp --dport ssh -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p tcp --dport 5038 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 5038 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 4569 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 1720 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 5060:5070 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 10000:20000 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 4000:4999 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -j DROP&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Ports_which_should_be_opened&amp;diff=19614</id>
		<title>Ports which should be opened</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Ports_which_should_be_opened&amp;diff=19614"/>
		<updated>2015-06-11T12:54:32Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For server some ports should be opened '''or forwarded''' to M2/MOR server:&lt;br /&gt;
&lt;br /&gt;
* TCP 80 - for GUI/HTTP&lt;br /&gt;
* TCP 22 - for SSH connection&lt;br /&gt;
* TCP 25/465 - for SMTP / SMTP over SSL (TLS)&lt;br /&gt;
* TCP 443 - for GUI/HTTPS&lt;br /&gt;
* UDP 694 - for Heartbeat.&lt;br /&gt;
* TCP 3306 - for MySQL replication&lt;br /&gt;
* TCP 3690 - for SVN connections&lt;br /&gt;
* UDP 4569 - for IAX2 connection&lt;br /&gt;
* UDP 5060 to 5070, 10000-20000 - for SIP connection (10000-50000 for M2)&lt;br /&gt;
* TCP/UDP 123 - Network Time Protocol&lt;br /&gt;
* TCP/UDP 1720 - for H.323 Protocol&lt;br /&gt;
* TCP/UDP 5038 - for Asterisk manager interface&lt;br /&gt;
* TCP/UDP 10050 - for Zabbix monitoring&lt;br /&gt;
* UDP 4000 - 4999 for T.38 support&lt;br /&gt;
You can test which TCP ports are opened using nmap tool:&lt;br /&gt;
&lt;br /&gt;
 nmap -vv -P0 your MOR server's IP address&lt;br /&gt;
&lt;br /&gt;
https://www.virtualizationhero.com/docs/manuals/linux/RHL-9-Manual/security-guide/s1-server-ports.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== iptables config ===&lt;br /&gt;
 &lt;br /&gt;
For Asterisk server:&lt;br /&gt;
&lt;br /&gt;
 iptables -A INPUT -p tcp --dport ssh -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p tcp --dport 5038 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 5038 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 4569 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 1720 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 5060:5070 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 10000:20000 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -p udp --dport 4000:4999 -j ACCEPT&lt;br /&gt;
 iptables -A INPUT -j DROP&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_user_calls_get&amp;diff=19589</id>
		<title>MOR API user calls get</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_user_calls_get&amp;diff=19589"/>
		<updated>2015-06-04T10:13:21Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!---This functionality is available from MOR 8---&amp;gt;&lt;br /&gt;
=Description=&lt;br /&gt;
Retrieves list of calls in selected time period for specified User/Device.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Admin''' - can get any user calls&lt;br /&gt;
&lt;br /&gt;
'''Reseller''' - can get his and his users calls.&lt;br /&gt;
&lt;br /&gt;
'''User''' - can get his own calls.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X4''' call: '''/api/user_calls_get'''&lt;br /&gt;
* For Backwards-compatibility old name 'user_calls' is also usable. Call: '''/api/user_calls'''&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;
* period_start - Unix timestamp of calls period starting date. (Default: Today at 00:00). &amp;lt;!---Nuo MOR 8---&amp;gt;&lt;br /&gt;
* period_end - Unix timestamp of calls period end date. (Default: Today at 23:59). &amp;lt;!---Nuo MOR 8---&amp;gt; &lt;br /&gt;
* s_user - User's ID in MOR database. '''Required, if s_reseller is not used'''. &amp;lt;!---Nuo MOR 8. Nuo mor 9 iš user_id tapo s_user---&amp;gt;&lt;br /&gt;
* s_call_type - Call type. Possible values [all, answered, no answer, failed, busy]. (Default: all) &amp;lt;!---Nuo MOR 8. Nuo mor 9 s_call_type---&amp;gt;&lt;br /&gt;
* s_device - Device ID in MOR database. Possible values [all, numeric value of device_id]. (Default: all). &amp;lt;!---Nuo MOR 8. Nuo mor 9 s_device---&amp;gt;&lt;br /&gt;
* s_provider - Provider ID in MOR database. Possible values [all, numeric value of provider_id]. (Default: all).Only for Admin and Reseller PRO.  &amp;lt;!---Nuo MOR 9. From mor 10 works with reseller if has own_providers---&amp;gt;&lt;br /&gt;
* s_hgc - Hangup cause code ID in MOR database. Possible values [all, numeric value of hangup_cause_code_id]. (Default: all). Only for Admin and Reseller if Show HGC for Resellers is ON.  &amp;lt;!---Nuo MOR 9---&amp;gt;&lt;br /&gt;
* s_did - show calls made through specific DID. Possible values [all, calls.did_id]. (Default: all). Only for Admin.  &amp;lt;!---Nuo MOR 9---&amp;gt;&lt;br /&gt;
* s_destination - prefix.  &amp;lt;!---Nuo MOR 9---&amp;gt;&lt;br /&gt;
* order_desc - Possible values [0,1]. (Default: 0).  &amp;lt;!---Nuo MOR 9---&amp;gt;&lt;br /&gt;
* only_did - show calls that only went through did. Possible values [0,1]. (Default: 0).   &amp;lt;!---Nuo MOR 11---&amp;gt;&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 above and API_Secret_Key ([[MOR API hash construction | More described in Constructing hash]]). '''Required''' (if setting '''Disable hash checking''' is not checked). &lt;br /&gt;
* u - username  for authentication. '''Required'''. &amp;lt;!---NUO x4 password nereikalaujamas---&amp;gt;&lt;br /&gt;
* order_by - Possible values [time, src, dst, prefix, nice_billsec, hgc, server, p_name, p_rate, p_price, reseller, r_rate, r_price, user, u_rate, u_price, number, d_provider, d_inc, d_owner]. (Default: time).  &amp;lt;!---Nuo MOR 9---&amp;gt;&lt;br /&gt;
* &amp;lt;!---Nuo MOR X6---&amp;gt; s_reseller - Reseller type User ID in MOR database.  (Default: all).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;!---Nuo MOR 8 buvo, o nuo MOR 9 nebėra direction---&amp;gt; &amp;lt;!---Iki nuo 11 buvo s_did_pattern, s_reseller_did, vėliau nebeliko---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
If you want find s_call_type=all calls for s_user = 5, through s_device=7 in period from 2011-11-01 23:59:59 till 2011-11-30 23:59:59, and your API Secret Key = 456789&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/user_calls_get?u=username&amp;amp;s_user=5&amp;amp;period_start=1320191999&amp;amp;period_end=1322697599&amp;amp;s_device=7&amp;amp;s_call_type=all&amp;amp;hash=df2983700ffecb52e6649f0cb3981b66537083a4 &lt;br /&gt;
&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;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success:''' Everything is ok. You get the list of calls if there is any:&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;pagename&amp;gt;Calls&amp;lt;/pagename&amp;gt;&lt;br /&gt;
  &amp;lt;language&amp;gt;en&amp;lt;/language&amp;gt;&lt;br /&gt;
  &amp;lt;error_msg&amp;gt;&amp;lt;/error_msg&amp;gt;&lt;br /&gt;
  &amp;lt;userid&amp;gt;0&amp;lt;/userid&amp;gt;&lt;br /&gt;
  &amp;lt;username&amp;gt;admin&amp;lt;/username&amp;gt;&lt;br /&gt;
  &amp;lt;total_calls&amp;gt;1&amp;lt;/total_calls&amp;gt;&lt;br /&gt;
  &amp;lt;currency&amp;gt;USD&amp;lt;/currency&amp;gt;&lt;br /&gt;
  &amp;lt;calls_stat&amp;gt;&lt;br /&gt;
    &amp;lt;period&amp;gt;&lt;br /&gt;
      &amp;lt;period_start&amp;gt;2008-03-07 11:48:18&amp;lt;/period_start&amp;gt;&lt;br /&gt;
      &amp;lt;period_end&amp;gt;2012-03-07 11:46:01&amp;lt;/period_end&amp;gt;&lt;br /&gt;
    &amp;lt;/period&amp;gt;&lt;br /&gt;
    &amp;lt;show_user&amp;gt;all&amp;lt;/show_user&amp;gt;&lt;br /&gt;
    &amp;lt;show_device&amp;gt;all&amp;lt;/show_device&amp;gt;&lt;br /&gt;
    &amp;lt;show_status&amp;gt;all&amp;lt;/show_status&amp;gt;&lt;br /&gt;
    &amp;lt;show_provider&amp;gt;4&amp;lt;/show_provider&amp;gt;&lt;br /&gt;
    &amp;lt;show_hgc&amp;gt;all&amp;lt;/show_hgc&amp;gt;&lt;br /&gt;
    &amp;lt;show_did&amp;gt;1&amp;lt;/show_did&amp;gt;&lt;br /&gt;
    &amp;lt;calls&amp;gt;&lt;br /&gt;
      &amp;lt;call&amp;gt;&lt;br /&gt;
        &amp;lt;calldate2&amp;gt;2009-01-02 00:00:01&amp;lt;/calldate2&amp;gt;&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x3---&amp;gt;        &amp;lt;timezone&amp;gt;GMT+02:00&amp;lt;/timezone&amp;gt;&lt;br /&gt;
        &amp;lt;clid&amp;gt;37046246362&amp;lt;/clid&amp;gt;&lt;br /&gt;
        &amp;lt;destination&amp;gt;Lithuania MOB Lithuania mobile&amp;lt;/destination&amp;gt;&lt;br /&gt;
        &amp;lt;did&amp;gt;37063042438&amp;lt;/did&amp;gt;&lt;br /&gt;
        &amp;lt;did_inc_price&amp;gt;1.0&amp;lt;/did_inc_price&amp;gt;&lt;br /&gt;
        &amp;lt;did_price&amp;gt;1.0&amp;lt;/did_price&amp;gt;&lt;br /&gt;
        &amp;lt;did_prov_price&amp;gt;1.0&amp;lt;/did_prov_price&amp;gt;&lt;br /&gt;
        &amp;lt;dispod&amp;gt;ANSWERED(16)&amp;lt;/dispod&amp;gt;&lt;br /&gt;
        &amp;lt;dst&amp;gt;37063042438&amp;lt;/dst&amp;gt;&lt;br /&gt;
        &amp;lt;nice_billsec&amp;gt;20.0&amp;lt;/nice_billsec&amp;gt;&lt;br /&gt;
        &amp;lt;nice_reseller&amp;gt; &amp;lt;/nice_reseller&amp;gt;&lt;br /&gt;
        &amp;lt;prefix&amp;gt;3706&amp;lt;/prefix&amp;gt;&lt;br /&gt;
        &amp;lt;profit&amp;gt;4&amp;lt;/profit&amp;gt;&lt;br /&gt;
        &amp;lt;provider_name&amp;gt;Test Provider&amp;lt;/provider_name&amp;gt;&lt;br /&gt;
        &amp;lt;provider_price&amp;gt;1.0&amp;lt;/provider_price&amp;gt;&lt;br /&gt;
        &amp;lt;provider_rate&amp;gt;0.0&amp;lt;/provider_rate&amp;gt;&lt;br /&gt;
        &amp;lt;reseller_price&amp;gt;0.0&amp;lt;/reseller_price&amp;gt;&lt;br /&gt;
        &amp;lt;reseller_rate&amp;gt;0.0&amp;lt;/reseller_rate&amp;gt;&lt;br /&gt;
        &amp;lt;server_id&amp;gt;1&amp;lt;/server_id&amp;gt;&lt;br /&gt;
        &amp;lt;src&amp;gt;37046246362&amp;lt;/src&amp;gt;&lt;br /&gt;
        &amp;lt;user&amp;gt;&amp;lt;/user&amp;gt;&lt;br /&gt;
        &amp;lt;user_price&amp;gt;2.0&amp;lt;/user_price&amp;gt;&lt;br /&gt;
        &amp;lt;user_rate&amp;gt;0.0&amp;lt;/user_rate&amp;gt;&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR x4---&amp;gt;        &amp;lt;uniqueid&amp;gt;1232113379.3&amp;lt;/uniqueid&amp;gt;&lt;br /&gt;
      &amp;lt;/call&amp;gt;&lt;br /&gt;
    &amp;lt;/calls&amp;gt;&lt;br /&gt;
  &amp;lt;/calls_stat&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''' that calldate is in system(server) Time Zone.&lt;br /&gt;
&lt;br /&gt;
'''Errors:'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;API Requests are disabled&amp;lt;/error&amp;gt; – '''Allow API globally''' setting is unchecked.&lt;br /&gt;
* &amp;lt;error&amp;gt;Access Denied&amp;lt;/error&amp;gt; – Such username does not exist in the database or it was not specified.&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;User was not found&amp;lt;/error&amp;gt; – User was not found using user_id. Use correct user_id.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;status&amp;gt;&lt;br /&gt;
    &amp;lt;error&amp;gt;API Requests are disabled&amp;lt;/error&amp;gt;&lt;br /&gt;
  &amp;lt;/status&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>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Voicemail&amp;diff=19565</id>
		<title>Voicemail</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Voicemail&amp;diff=19565"/>
		<updated>2015-05-26T09:02:29Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &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;
&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 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;
= Email body and other options =&lt;br /&gt;
&lt;br /&gt;
Email body and other options can be changed on /etc/asterisk/voicemail.conf directly.&lt;br /&gt;
&lt;br /&gt;
Description of variables can be found here:&lt;br /&gt;
&lt;br /&gt;
http://astbook.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/asterisk-APP-D-SECT-41.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;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;
= See also = &lt;br /&gt;
&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;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Multi-Level_Resellers_Addon&amp;diff=19558</id>
		<title>Multi-Level Resellers Addon</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Multi-Level_Resellers_Addon&amp;diff=19558"/>
		<updated>2015-05-22T07:11:34Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- From MOR X6---&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Multi-Lever Resellers is a part of Reseller PRO add-on'''&lt;br /&gt;
&lt;br /&gt;
In Multi-level structure – Resellers are divided on 2 levels and have different rights. This functionality allows you to sell traffic and services to smaller companies that do not have their own switches or billing platforms yet but they want do VoIP business. These smaller companies in our product are defined as Partner Type Users who are able to create and configure their own Resellers (sub-resellers). &lt;br /&gt;
&lt;br /&gt;
Partners are able to set for created Resellers their own Tariffs, Prepaid or Postpaid user type, credit limits and so on, also add Payments, generate and send Invoices, follow Calls and their Financial Statistics.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Billing hierarchy===&lt;br /&gt;
&lt;br /&gt;
Simple User Pays for Reseller =&amp;gt; Reseller Pays for Partner =&amp;gt; Partner Pays for Admin =&amp;gt; Admin Pays for Provider&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; Users''', click [[Image:icon_add.png]]'''Add new''' and you will reach User create form. There you have to choose &amp;quot;partner&amp;quot; User Type:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:partner_create.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
And fill all other parameters which are needed.&lt;br /&gt;
&lt;br /&gt;
After pressing '''Create''' you will have Partner Type User.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Useful Notes=&lt;br /&gt;
&lt;br /&gt;
* Partners' Resellers will use admins' '''[[Reseller_Permissions|Resellers' Permissions Groups]]''', so be sure that you have them, otherwise Partner will be not able to create Reseller.&lt;br /&gt;
* For Partners' Resellers' Users '''Calls''' will be used Admins' [[LCR]] with all his [[Providers]], which have to be assigned in Partners' create or edit form.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Can%27t_open_phpMyAdmin&amp;diff=19531</id>
		<title>Can't open phpMyAdmin</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Can%27t_open_phpMyAdmin&amp;diff=19531"/>
		<updated>2015-05-18T11:33:20Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* The configuration file now needs a secret passphrase (blowfish_secret) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It can be reached in: http://&amp;lt;IP&amp;gt;/phpmyadmin&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
&lt;br /&gt;
===The configuration file now needs a secret passphrase (blowfish_secret)===&lt;br /&gt;
&lt;br /&gt;
Login to your server over SSH&lt;br /&gt;
&lt;br /&gt;
If you have Centos/Fedora go to: &lt;br /&gt;
&lt;br /&gt;
 /var/www/html/phpmyadmin&lt;br /&gt;
&lt;br /&gt;
If you have Debian go to: &lt;br /&gt;
&lt;br /&gt;
 /var/www/phpmyadmin&lt;br /&gt;
&lt;br /&gt;
From MOR X5 link is changed to:&lt;br /&gt;
&lt;br /&gt;
 /var/www/html/mordbadmin&lt;br /&gt;
&lt;br /&gt;
Open file ''config.inc.php'' '''(make sure it is not empty)''', find line:&lt;br /&gt;
&lt;br /&gt;
 $cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
And enter any characters between single commas. Example:&lt;br /&gt;
&lt;br /&gt;
 $cfg['blowfish_secret'] = 'mun9b8y7tv6cr5ex4'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */&lt;br /&gt;
&lt;br /&gt;
Save the file, go to webrowser, press CTRL+F5 and access phpMyAdmin.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19428</id>
		<title>Fax is not received</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19428"/>
		<updated>2015-04-24T11:31:24Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= mor_fax2email: ERROR! Not connected to database =&lt;br /&gt;
After trying to use Fax2Email functionality in Asterisk CLI you see:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email: MOR Fax2Email v0.1.3 AGI script started.&lt;br /&gt;
 mor_fax2email: Failed to connect database server. Check debug for more info.&lt;br /&gt;
 mor_fax2email: ERROR! Not connected to database.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In '''/var/lib/asterisk/agi-bin/mor.conf''' correct DB connection settings.&lt;br /&gt;
&lt;br /&gt;
* Check permissions on /var/spool/asterisk/faxes&lt;br /&gt;
* Make sure UDTP range 4000-4999 is open on the firewall.&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;
== __ast_pbx_run: Channel 'Local/999@mor_local-1217,2' sent into invalid extension 'fax' in context 'mor_fax2email', but no invalid handler ==&lt;br /&gt;
&lt;br /&gt;
Make sure /etc/asterisk/extensions_mor.conf has such line:&lt;br /&gt;
&lt;br /&gt;
 [mor_fax2email]&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; _X.,1,Answer&lt;br /&gt;
 exten =&amp;gt; _X.,2,StopPlaytones&lt;br /&gt;
 exten =&amp;gt; _X.,3,Playback(beep)&lt;br /&gt;
 exten =&amp;gt; _X.,4,Set(FAXFILE=${CDR(UNIQUEID)})&lt;br /&gt;
 exten =&amp;gt; _X.,5,RxFax(/var/spool/asterisk/faxes/${FAXFILE}.tif)&lt;br /&gt;
&lt;br /&gt;
 '''exten =&amp;gt; fax,1,Goto(mor_fax2email,111,1)'''&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; h,1,DeadAGI(mor_fax2email)&lt;br /&gt;
 exten =&amp;gt; h,2,Hangup&lt;br /&gt;
&lt;br /&gt;
If not - add such line (marked in bold) and reload Asterisk.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= ERROR! TIF file does not exist! =&lt;br /&gt;
If you get a similar output in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email:&lt;br /&gt;
 mor_fax2email: MOR Fax2Email AGI script started.&lt;br /&gt;
 mor_fax2email: Successfully connected to database.&lt;br /&gt;
 mor_fax2email: from sender: , fax file: 1311285609.5, faxsender: 311043455xx, fax_id :14, pdf file: /var/spool/asterisk/faxes/1311285609.5.pdf, tif file: /var/spool/asterisk/faxes/1311285609.5.tif&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:168 process_call_details: RTPAUDIOQOS: ssrc=655552979;themssrc=428650528;lp=0;rxjitter=0.006493;rxcount=4511;txjitter=0.002304;txcount=541;rlp=0;rtt=0.020000&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:186 process_call_details: PDD:&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor.c:2407 mor_acct_stop: Reseller's balance will be deducted by: 0.000000, and frozen balance by: 0.000000.&lt;br /&gt;
 mor_fax2email: '''ERROR! TIF file does not exist!'''&lt;br /&gt;
 -- AGI Script mor_fax2email completed, returning 0&lt;br /&gt;
 -- Executing [h@mor_fax2email:2] Hangup(&amp;quot;Local/910007@mor_local-1f39,2&amp;quot;, &amp;quot;&amp;quot;) in new stack&lt;br /&gt;
 == Spawn extension (mor_fax2email, h, 2) exited non-zero on 'Local/91000x@mor_local-1f39,2'&lt;br /&gt;
&lt;br /&gt;
the problem can be anywhere if you get this error. Please see this page: [[Fax_over_VoIP|FAX over VoIP]]&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;
= Make sure T38 was not enabled =&lt;br /&gt;
&lt;br /&gt;
If you face a problem with FAX not being received, two ways to detect this problem:&lt;br /&gt;
&lt;br /&gt;
* Fax call takes about 30 seconds, and faxes not trains (if the codec is G729, call takes a little bit more than 40seconds and fails)&lt;br /&gt;
&lt;br /&gt;
* Make a SIP debug, and you will see like this:&lt;br /&gt;
&lt;br /&gt;
 v=0.&lt;br /&gt;
 o=CiscoSystemsSIP-GW-UserAgent 7568 7687 IN IP4 195.62.x.x.&lt;br /&gt;
 s=SIP Call.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 t=0 0.&lt;br /&gt;
 m=image 52972 udptl t38.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 a=T38FaxVersion:0.&lt;br /&gt;
 a=T38MaxBitRate:14400.&lt;br /&gt;
 a=T38FaxFillBitRemoval:0.&lt;br /&gt;
 a=T38FaxTranscodingMMR:0.&lt;br /&gt;
 a=T38FaxTranscodingJBIG:0.&lt;br /&gt;
 a=T38FaxRateManagement:transferredTCF.&lt;br /&gt;
 a=T38FaxMaxBuffer:200.&lt;br /&gt;
 a=T38FaxMaxDatagram:72.&lt;br /&gt;
 a=T38FaxUdpEC:t38UDPRedundancy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solution, check in sip.conf:&lt;br /&gt;
&lt;br /&gt;
 t38pt_udptl = no (be sure, it's NOT yes)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= FAX is not received on ZAP channel =&lt;br /&gt;
&lt;br /&gt;
When ZAP channel is used, FAX device should be assigned to Asterisk server which has ZAP/DAHDI cards installed. Please make sure that correct Asterisk server is specified in &amp;quot;Server&amp;quot; drop-down list on FAX device settings.&lt;br /&gt;
&lt;br /&gt;
It can be an issue when you have more than one Asterisk server only.&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;
= Timing module is not loaded =&lt;br /&gt;
&lt;br /&gt;
If Timing module is not working or if not loaded at all, FAX will fail and you will see ERROR like:&lt;br /&gt;
&lt;br /&gt;
 ERROR[14592]: res_fax_spandsp.c:464 spandsp_fax_new: Channel 'Local/1054@mor_local-00012b63;2' FAX session '253' failed to create timing source.&lt;br /&gt;
 ERROR[14592]: res_fax.c:893 fax_session_new: FAX session failed to initialize.&lt;br /&gt;
 ERROR[14592]: res_fax.c:1183 generic_fax_exec: Can't create a FAX session, FAX attempt failed.&lt;br /&gt;
&lt;br /&gt;
* Check Timing module first:&lt;br /&gt;
&lt;br /&gt;
 sip*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Failed to open timing fd&lt;br /&gt;
 '''Command 'timing test 50' failed.'''&lt;br /&gt;
 sip*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If you see that Timing failed like in an example above, than it seems your Timing module is not working or is missing at all. To check Timing module do like this in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 asterisk1*CLI&amp;gt; module show like res_timing&lt;br /&gt;
 Module                         Description                              Use Count &lt;br /&gt;
 '''0 modules loaded'''&lt;br /&gt;
&lt;br /&gt;
This means that you have no Timing modules loaded at all. To load Timing module, check if there are any possible Timing modules:&lt;br /&gt;
&lt;br /&gt;
 [root@VM ]$ cd /usr/lib/asterisk/modules/&lt;br /&gt;
 [root@VM ]$ ll | grep res_timing&lt;br /&gt;
 -rwxr-xr-x 1 root root  179896 Oct  2  2014 res_timing_pthread.so&lt;br /&gt;
 -rwxr-xr-x 1 root root  165310 Oct  2  2014 res_timing_timerfd.so&lt;br /&gt;
 [root@VM ]$ &lt;br /&gt;
&lt;br /&gt;
In example there are two Timing modules available/compiled. We load timerfd module:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so =&amp;gt; (timerfd Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If only pthread module is available, then we do:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_pthread.so &lt;br /&gt;
 Loaded res_timing_pthread.so&lt;br /&gt;
 Loaded res_timing_pthread.so =&amp;gt; (pthread Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After module is loaded, Timing should work already. To check it, Timing test should show something like:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Using the 'timerfd' timing module for this test.&lt;br /&gt;
 It has been 1000 milliseconds, and we got 50 timer ticks&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The error should be now resolved and not happen again.&lt;br /&gt;
&lt;br /&gt;
*Make sure Timing module will be loaded after Asterisk/Server restart.&lt;br /&gt;
&lt;br /&gt;
Check the /etc/asterisk/modules.conf file. If you see something like:&lt;br /&gt;
&lt;br /&gt;
 noload =&amp;gt; res_timing_pthread.so&lt;br /&gt;
&lt;br /&gt;
Comment it or remove. This will prevent from NOLOADING the module once Asterisk starts again.&lt;br /&gt;
&lt;br /&gt;
= See also = &lt;br /&gt;
* [[I have a problem with Fax]]&lt;br /&gt;
* [[Fax over VoIP]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19426</id>
		<title>Fax is not received</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19426"/>
		<updated>2015-04-24T11:30:27Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= mor_fax2email: ERROR! Not connected to database =&lt;br /&gt;
After trying to use Fax2Email functionality in Asterisk CLI you see:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email: MOR Fax2Email v0.1.3 AGI script started.&lt;br /&gt;
 mor_fax2email: Failed to connect database server. Check debug for more info.&lt;br /&gt;
 mor_fax2email: ERROR! Not connected to database.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In '''/var/lib/asterisk/agi-bin/mor.conf''' correct DB connection settings.&lt;br /&gt;
&lt;br /&gt;
* Check permissions on /var/spool/asterisk/faxes&lt;br /&gt;
* Make sure UDTP range 4000-4999 is open on the firewall.&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;
== __ast_pbx_run: Channel 'Local/999@mor_local-1217,2' sent into invalid extension 'fax' in context 'mor_fax2email', but no invalid handler ==&lt;br /&gt;
&lt;br /&gt;
Make sure /etc/asterisk/extensions_mor.conf has such line:&lt;br /&gt;
&lt;br /&gt;
 [mor_fax2email]&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; _X.,1,Answer&lt;br /&gt;
 exten =&amp;gt; _X.,2,StopPlaytones&lt;br /&gt;
 exten =&amp;gt; _X.,3,Playback(beep)&lt;br /&gt;
 exten =&amp;gt; _X.,4,Set(FAXFILE=${CDR(UNIQUEID)})&lt;br /&gt;
 exten =&amp;gt; _X.,5,RxFax(/var/spool/asterisk/faxes/${FAXFILE}.tif)&lt;br /&gt;
&lt;br /&gt;
 '''exten =&amp;gt; fax,1,Goto(mor_fax2email,111,1)'''&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; h,1,DeadAGI(mor_fax2email)&lt;br /&gt;
 exten =&amp;gt; h,2,Hangup&lt;br /&gt;
&lt;br /&gt;
If not - add such line (marked in bold) and reload Asterisk.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= ERROR! TIF file does not exist! =&lt;br /&gt;
If you get a similar output in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email:&lt;br /&gt;
 mor_fax2email: MOR Fax2Email AGI script started.&lt;br /&gt;
 mor_fax2email: Successfully connected to database.&lt;br /&gt;
 mor_fax2email: from sender: , fax file: 1311285609.5, faxsender: 311043455xx, fax_id :14, pdf file: /var/spool/asterisk/faxes/1311285609.5.pdf, tif file: /var/spool/asterisk/faxes/1311285609.5.tif&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:168 process_call_details: RTPAUDIOQOS: ssrc=655552979;themssrc=428650528;lp=0;rxjitter=0.006493;rxcount=4511;txjitter=0.002304;txcount=541;rlp=0;rtt=0.020000&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:186 process_call_details: PDD:&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor.c:2407 mor_acct_stop: Reseller's balance will be deducted by: 0.000000, and frozen balance by: 0.000000.&lt;br /&gt;
 mor_fax2email: '''ERROR! TIF file does not exist!'''&lt;br /&gt;
 -- AGI Script mor_fax2email completed, returning 0&lt;br /&gt;
 -- Executing [h@mor_fax2email:2] Hangup(&amp;quot;Local/910007@mor_local-1f39,2&amp;quot;, &amp;quot;&amp;quot;) in new stack&lt;br /&gt;
 == Spawn extension (mor_fax2email, h, 2) exited non-zero on 'Local/91000x@mor_local-1f39,2'&lt;br /&gt;
&lt;br /&gt;
the problem can be anywhere if you get this error. Please see this page: [[Fax_over_VoIP|FAX over VoIP]]&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;
= Make sure T38 was not enabled =&lt;br /&gt;
&lt;br /&gt;
If you face a problem with FAX not being received, two ways to detect this problem:&lt;br /&gt;
&lt;br /&gt;
* Fax call takes about 30 seconds, and faxes not trains (if the codec is G729, call takes a little bit more than 40seconds and fails)&lt;br /&gt;
&lt;br /&gt;
* Make a SIP debug, and you will see like this:&lt;br /&gt;
&lt;br /&gt;
 v=0.&lt;br /&gt;
 o=CiscoSystemsSIP-GW-UserAgent 7568 7687 IN IP4 195.62.x.x.&lt;br /&gt;
 s=SIP Call.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 t=0 0.&lt;br /&gt;
 m=image 52972 udptl t38.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 a=T38FaxVersion:0.&lt;br /&gt;
 a=T38MaxBitRate:14400.&lt;br /&gt;
 a=T38FaxFillBitRemoval:0.&lt;br /&gt;
 a=T38FaxTranscodingMMR:0.&lt;br /&gt;
 a=T38FaxTranscodingJBIG:0.&lt;br /&gt;
 a=T38FaxRateManagement:transferredTCF.&lt;br /&gt;
 a=T38FaxMaxBuffer:200.&lt;br /&gt;
 a=T38FaxMaxDatagram:72.&lt;br /&gt;
 a=T38FaxUdpEC:t38UDPRedundancy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solution, check in sip.conf:&lt;br /&gt;
&lt;br /&gt;
 t38pt_udptl = no (be sure, it's NOT yes)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= FAX is not received on ZAP channel =&lt;br /&gt;
&lt;br /&gt;
When ZAP channel is used, FAX device should be assigned to Asterisk server which has ZAP/DAHDI cards installed. Please make sure that correct Asterisk server is specified in &amp;quot;Server&amp;quot; drop-down list on FAX device settings.&lt;br /&gt;
&lt;br /&gt;
It can be an issue when you have more than one Asterisk server only.&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;
= Timing module is not loaded =&lt;br /&gt;
&lt;br /&gt;
If Timing module is not working or if not loaded at all, FAX will fail and you will see ERROR like:&lt;br /&gt;
&lt;br /&gt;
 ERROR[14592]: res_fax_spandsp.c:464 spandsp_fax_new: Channel 'Local/1054@mor_local-00012b63;2' FAX session '253' failed to create timing source.&lt;br /&gt;
 ERROR[14592]: res_fax.c:893 fax_session_new: FAX session failed to initialize.&lt;br /&gt;
 ERROR[14592]: res_fax.c:1183 generic_fax_exec: Can't create a FAX session, FAX attempt failed.&lt;br /&gt;
&lt;br /&gt;
* Check Timing module first:&lt;br /&gt;
&lt;br /&gt;
 sip*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Failed to open timing fd&lt;br /&gt;
 '''Command 'timing test 50' failed.'''&lt;br /&gt;
 sip*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If you see that Timing failed like in an example above, than it seems your Timing module is not working or is missing at all. To check Timing module do like this in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 asterisk1*CLI&amp;gt; module show like res_timing.so&lt;br /&gt;
 Module                         Description                              Use Count &lt;br /&gt;
 '''0 modules loaded'''&lt;br /&gt;
&lt;br /&gt;
This means that you have no Timing modules loaded at all. To load Timing module, check if there are any possible Timing modules:&lt;br /&gt;
&lt;br /&gt;
 [root@VM ]$ cd /usr/lib/asterisk/modules/&lt;br /&gt;
 [root@VM ]$ ll | grep res_timing&lt;br /&gt;
 -rwxr-xr-x 1 root root  179896 Oct  2  2014 res_timing_pthread.so&lt;br /&gt;
 -rwxr-xr-x 1 root root  165310 Oct  2  2014 res_timing_timerfd.so&lt;br /&gt;
 [root@VM ]$ &lt;br /&gt;
&lt;br /&gt;
In example there are two Timing modules available/compiled. We load timerfd module:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so =&amp;gt; (timerfd Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If only pthread module is available, then we do:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_pthread.so &lt;br /&gt;
 Loaded res_timing_pthread.so&lt;br /&gt;
 Loaded res_timing_pthread.so =&amp;gt; (pthread Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After module is loaded, Timing should work already. To check it, Timing test should show something like:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Using the 'timerfd' timing module for this test.&lt;br /&gt;
 It has been 1000 milliseconds, and we got 50 timer ticks&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The error should be now resolved and not happen again.&lt;br /&gt;
&lt;br /&gt;
*Make sure Timing module will be loaded after Asterisk/Server restart.&lt;br /&gt;
&lt;br /&gt;
Check the /etc/asterisk/modules.conf file. If you see something like:&lt;br /&gt;
&lt;br /&gt;
 noload =&amp;gt; res_timing_pthread.so&lt;br /&gt;
&lt;br /&gt;
Comment it or remove. This will prevent from NOLOADING the module once Asterisk starts again.&lt;br /&gt;
&lt;br /&gt;
= See also = &lt;br /&gt;
* [[I have a problem with Fax]]&lt;br /&gt;
* [[Fax over VoIP]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19425</id>
		<title>Fax is not received</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19425"/>
		<updated>2015-04-24T11:26:57Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= mor_fax2email: ERROR! Not connected to database =&lt;br /&gt;
After trying to use Fax2Email functionality in Asterisk CLI you see:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email: MOR Fax2Email v0.1.3 AGI script started.&lt;br /&gt;
 mor_fax2email: Failed to connect database server. Check debug for more info.&lt;br /&gt;
 mor_fax2email: ERROR! Not connected to database.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In '''/var/lib/asterisk/agi-bin/mor.conf''' correct DB connection settings.&lt;br /&gt;
&lt;br /&gt;
* Check permissions on /var/spool/asterisk/faxes&lt;br /&gt;
* Make sure UDTP range 4000-4999 is open on the firewall.&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;
== __ast_pbx_run: Channel 'Local/999@mor_local-1217,2' sent into invalid extension 'fax' in context 'mor_fax2email', but no invalid handler ==&lt;br /&gt;
&lt;br /&gt;
Make sure /etc/asterisk/extensions_mor.conf has such line:&lt;br /&gt;
&lt;br /&gt;
 [mor_fax2email]&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; _X.,1,Answer&lt;br /&gt;
 exten =&amp;gt; _X.,2,StopPlaytones&lt;br /&gt;
 exten =&amp;gt; _X.,3,Playback(beep)&lt;br /&gt;
 exten =&amp;gt; _X.,4,Set(FAXFILE=${CDR(UNIQUEID)})&lt;br /&gt;
 exten =&amp;gt; _X.,5,RxFax(/var/spool/asterisk/faxes/${FAXFILE}.tif)&lt;br /&gt;
&lt;br /&gt;
 '''exten =&amp;gt; fax,1,Goto(mor_fax2email,111,1)'''&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; h,1,DeadAGI(mor_fax2email)&lt;br /&gt;
 exten =&amp;gt; h,2,Hangup&lt;br /&gt;
&lt;br /&gt;
If not - add such line (marked in bold) and reload Asterisk.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= ERROR! TIF file does not exist! =&lt;br /&gt;
If you get a similar output in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email:&lt;br /&gt;
 mor_fax2email: MOR Fax2Email AGI script started.&lt;br /&gt;
 mor_fax2email: Successfully connected to database.&lt;br /&gt;
 mor_fax2email: from sender: , fax file: 1311285609.5, faxsender: 311043455xx, fax_id :14, pdf file: /var/spool/asterisk/faxes/1311285609.5.pdf, tif file: /var/spool/asterisk/faxes/1311285609.5.tif&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:168 process_call_details: RTPAUDIOQOS: ssrc=655552979;themssrc=428650528;lp=0;rxjitter=0.006493;rxcount=4511;txjitter=0.002304;txcount=541;rlp=0;rtt=0.020000&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:186 process_call_details: PDD:&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor.c:2407 mor_acct_stop: Reseller's balance will be deducted by: 0.000000, and frozen balance by: 0.000000.&lt;br /&gt;
 mor_fax2email: '''ERROR! TIF file does not exist!'''&lt;br /&gt;
 -- AGI Script mor_fax2email completed, returning 0&lt;br /&gt;
 -- Executing [h@mor_fax2email:2] Hangup(&amp;quot;Local/910007@mor_local-1f39,2&amp;quot;, &amp;quot;&amp;quot;) in new stack&lt;br /&gt;
 == Spawn extension (mor_fax2email, h, 2) exited non-zero on 'Local/91000x@mor_local-1f39,2'&lt;br /&gt;
&lt;br /&gt;
the problem can be anywhere if you get this error. Please see this page: [[Fax_over_VoIP|FAX over VoIP]]&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;
= Make sure T38 was not enabled =&lt;br /&gt;
&lt;br /&gt;
If you face a problem with FAX not being received, two ways to detect this problem:&lt;br /&gt;
&lt;br /&gt;
* Fax call takes about 30 seconds, and faxes not trains (if the codec is G729, call takes a little bit more than 40seconds and fails)&lt;br /&gt;
&lt;br /&gt;
* Make a SIP debug, and you will see like this:&lt;br /&gt;
&lt;br /&gt;
 v=0.&lt;br /&gt;
 o=CiscoSystemsSIP-GW-UserAgent 7568 7687 IN IP4 195.62.x.x.&lt;br /&gt;
 s=SIP Call.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 t=0 0.&lt;br /&gt;
 m=image 52972 udptl t38.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 a=T38FaxVersion:0.&lt;br /&gt;
 a=T38MaxBitRate:14400.&lt;br /&gt;
 a=T38FaxFillBitRemoval:0.&lt;br /&gt;
 a=T38FaxTranscodingMMR:0.&lt;br /&gt;
 a=T38FaxTranscodingJBIG:0.&lt;br /&gt;
 a=T38FaxRateManagement:transferredTCF.&lt;br /&gt;
 a=T38FaxMaxBuffer:200.&lt;br /&gt;
 a=T38FaxMaxDatagram:72.&lt;br /&gt;
 a=T38FaxUdpEC:t38UDPRedundancy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solution, check in sip.conf:&lt;br /&gt;
&lt;br /&gt;
 t38pt_udptl = no (be sure, it's NOT yes)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= FAX is not received on ZAP channel =&lt;br /&gt;
&lt;br /&gt;
When ZAP channel is used, FAX device should be assigned to Asterisk server which has ZAP/DAHDI cards installed. Please make sure that correct Asterisk server is specified in &amp;quot;Server&amp;quot; drop-down list on FAX device settings.&lt;br /&gt;
&lt;br /&gt;
It can be an issue when you have more than one Asterisk server only.&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;
= Timing module is not loaded =&lt;br /&gt;
&lt;br /&gt;
If Timing module is not working or if not loaded at all, FAX will fail and you will see ERROR like:&lt;br /&gt;
&lt;br /&gt;
 ERROR[14592]: res_fax_spandsp.c:464 spandsp_fax_new: Channel 'Local/1054@mor_local-00012b63;2' FAX session '253' failed to create timing source.&lt;br /&gt;
 ERROR[14592]: res_fax.c:893 fax_session_new: FAX session failed to initialize.&lt;br /&gt;
 ERROR[14592]: res_fax.c:1183 generic_fax_exec: Can't create a FAX session, FAX attempt failed.&lt;br /&gt;
&lt;br /&gt;
* Check Timing module first:&lt;br /&gt;
&lt;br /&gt;
 sip*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Failed to open timing fd&lt;br /&gt;
 '''Command 'timing test 50' failed.'''&lt;br /&gt;
 sip*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If you see that Timing failed like in an example above, than it seems your Timing module is not working or is missing at all. To check Timing module do like this in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 asterisk1*CLI&amp;gt; module show like res_timing_dahdi.so&lt;br /&gt;
 Module                         Description                              Use Count &lt;br /&gt;
 '''0 modules loaded'''&lt;br /&gt;
&lt;br /&gt;
This means that you have no Timing modules loaded at all. To load Timing module, check if there are any possible Timing modules:&lt;br /&gt;
&lt;br /&gt;
 [root@VM ]$ cd /usr/lib/asterisk/modules/&lt;br /&gt;
 [root@VM ]$ ll | grep res_timing&lt;br /&gt;
 -rwxr-xr-x 1 root root  179896 Oct  2  2014 res_timing_pthread.so&lt;br /&gt;
 -rwxr-xr-x 1 root root  165310 Oct  2  2014 res_timing_timerfd.so&lt;br /&gt;
 [root@VM ]$ &lt;br /&gt;
&lt;br /&gt;
In example there are two Timing modules available/compiled. We timerfd module:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so =&amp;gt; (timerfd Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If only pthread module is available, then we do:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_pthread.so &lt;br /&gt;
 Loaded res_timing_pthread.so&lt;br /&gt;
 Loaded res_timing_pthread.so =&amp;gt; (pthread Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After module is loaded, Timing should work already. To check it, Timing test should show something like:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Using the 'timerfd' timing module for this test.&lt;br /&gt;
 It has been 1000 milliseconds, and we got 50 timer ticks&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The error should be now resolved and not happen again.&lt;br /&gt;
&lt;br /&gt;
*Make sure Timing module will be loaded after Asterisk/Server restart.&lt;br /&gt;
&lt;br /&gt;
Check the /etc/asterisk/modules.conf file. If you see something like:&lt;br /&gt;
&lt;br /&gt;
 noload =&amp;gt; res_timing_pthread.so&lt;br /&gt;
&lt;br /&gt;
Comment it or remove. This will prevent from NOLOADING the module once Asterisk starts again.&lt;br /&gt;
&lt;br /&gt;
= See also = &lt;br /&gt;
* [[I have a problem with Fax]]&lt;br /&gt;
* [[Fax over VoIP]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19424</id>
		<title>Fax is not received</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19424"/>
		<updated>2015-04-24T11:24:20Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= mor_fax2email: ERROR! Not connected to database =&lt;br /&gt;
After trying to use Fax2Email functionality in Asterisk CLI you see:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email: MOR Fax2Email v0.1.3 AGI script started.&lt;br /&gt;
 mor_fax2email: Failed to connect database server. Check debug for more info.&lt;br /&gt;
 mor_fax2email: ERROR! Not connected to database.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In '''/var/lib/asterisk/agi-bin/mor.conf''' correct DB connection settings.&lt;br /&gt;
&lt;br /&gt;
* Check permissions on /var/spool/asterisk/faxes&lt;br /&gt;
* Make sure UDTP range 4000-4999 is open on the firewall.&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;
== __ast_pbx_run: Channel 'Local/999@mor_local-1217,2' sent into invalid extension 'fax' in context 'mor_fax2email', but no invalid handler ==&lt;br /&gt;
&lt;br /&gt;
Make sure /etc/asterisk/extensions_mor.conf has such line:&lt;br /&gt;
&lt;br /&gt;
 [mor_fax2email]&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; _X.,1,Answer&lt;br /&gt;
 exten =&amp;gt; _X.,2,StopPlaytones&lt;br /&gt;
 exten =&amp;gt; _X.,3,Playback(beep)&lt;br /&gt;
 exten =&amp;gt; _X.,4,Set(FAXFILE=${CDR(UNIQUEID)})&lt;br /&gt;
 exten =&amp;gt; _X.,5,RxFax(/var/spool/asterisk/faxes/${FAXFILE}.tif)&lt;br /&gt;
&lt;br /&gt;
 '''exten =&amp;gt; fax,1,Goto(mor_fax2email,111,1)'''&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; h,1,DeadAGI(mor_fax2email)&lt;br /&gt;
 exten =&amp;gt; h,2,Hangup&lt;br /&gt;
&lt;br /&gt;
If not - add such line (marked in bold) and reload Asterisk.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= ERROR! TIF file does not exist! =&lt;br /&gt;
If you get a similar output in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email:&lt;br /&gt;
 mor_fax2email: MOR Fax2Email AGI script started.&lt;br /&gt;
 mor_fax2email: Successfully connected to database.&lt;br /&gt;
 mor_fax2email: from sender: , fax file: 1311285609.5, faxsender: 311043455xx, fax_id :14, pdf file: /var/spool/asterisk/faxes/1311285609.5.pdf, tif file: /var/spool/asterisk/faxes/1311285609.5.tif&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:168 process_call_details: RTPAUDIOQOS: ssrc=655552979;themssrc=428650528;lp=0;rxjitter=0.006493;rxcount=4511;txjitter=0.002304;txcount=541;rlp=0;rtt=0.020000&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:186 process_call_details: PDD:&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor.c:2407 mor_acct_stop: Reseller's balance will be deducted by: 0.000000, and frozen balance by: 0.000000.&lt;br /&gt;
 mor_fax2email: '''ERROR! TIF file does not exist!'''&lt;br /&gt;
 -- AGI Script mor_fax2email completed, returning 0&lt;br /&gt;
 -- Executing [h@mor_fax2email:2] Hangup(&amp;quot;Local/910007@mor_local-1f39,2&amp;quot;, &amp;quot;&amp;quot;) in new stack&lt;br /&gt;
 == Spawn extension (mor_fax2email, h, 2) exited non-zero on 'Local/91000x@mor_local-1f39,2'&lt;br /&gt;
&lt;br /&gt;
the problem can be anywhere if you get this error. Please see this page: [[Fax_over_VoIP|FAX over VoIP]]&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;
= Make sure T38 was not enabled =&lt;br /&gt;
&lt;br /&gt;
If you face a problem with FAX not being received, two ways to detect this problem:&lt;br /&gt;
&lt;br /&gt;
* Fax call takes about 30 seconds, and faxes not trains (if the codec is G729, call takes a little bit more than 40seconds and fails)&lt;br /&gt;
&lt;br /&gt;
* Make a SIP debug, and you will see like this:&lt;br /&gt;
&lt;br /&gt;
 v=0.&lt;br /&gt;
 o=CiscoSystemsSIP-GW-UserAgent 7568 7687 IN IP4 195.62.x.x.&lt;br /&gt;
 s=SIP Call.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 t=0 0.&lt;br /&gt;
 m=image 52972 udptl t38.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 a=T38FaxVersion:0.&lt;br /&gt;
 a=T38MaxBitRate:14400.&lt;br /&gt;
 a=T38FaxFillBitRemoval:0.&lt;br /&gt;
 a=T38FaxTranscodingMMR:0.&lt;br /&gt;
 a=T38FaxTranscodingJBIG:0.&lt;br /&gt;
 a=T38FaxRateManagement:transferredTCF.&lt;br /&gt;
 a=T38FaxMaxBuffer:200.&lt;br /&gt;
 a=T38FaxMaxDatagram:72.&lt;br /&gt;
 a=T38FaxUdpEC:t38UDPRedundancy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solution, check in sip.conf:&lt;br /&gt;
&lt;br /&gt;
 t38pt_udptl = no (be sure, it's NOT yes)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= FAX is not received on ZAP channel =&lt;br /&gt;
&lt;br /&gt;
When ZAP channel is used, FAX device should be assigned to Asterisk server which has ZAP/DAHDI cards installed. Please make sure that correct Asterisk server is specified in &amp;quot;Server&amp;quot; drop-down list on FAX device settings.&lt;br /&gt;
&lt;br /&gt;
It can be an issue when you have more than one Asterisk server only.&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;
= Timing module is not loaded =&lt;br /&gt;
&lt;br /&gt;
If Timing module is not working or if not loaded at all, FAX will fail and you will see ERROR like:&lt;br /&gt;
&lt;br /&gt;
 ERROR[14592]: res_fax_spandsp.c:464 spandsp_fax_new: Channel 'Local/1054@mor_local-00012b63;2' FAX session '253' failed to create timing source.&lt;br /&gt;
 ERROR[14592]: res_fax.c:893 fax_session_new: FAX session failed to initialize.&lt;br /&gt;
 ERROR[14592]: res_fax.c:1183 generic_fax_exec: Can't create a FAX session, FAX attempt failed.&lt;br /&gt;
&lt;br /&gt;
* Check Timing module first:&lt;br /&gt;
&lt;br /&gt;
 sip*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Failed to open timing fd&lt;br /&gt;
 '''Command 'timing test 50' failed.'''&lt;br /&gt;
 sip*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If you see that Timing failed like in an example above, than it seems your Timing module is not working or is missing at all. To check Timing module do like this in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 asterisk1*CLI&amp;gt; module show like res_timing_dahdi.so&lt;br /&gt;
 Module                         Description                              Use Count &lt;br /&gt;
 '''0 modules loaded'''&lt;br /&gt;
&lt;br /&gt;
This means that you have no Timing modules loaded at all. To load Timing module, check if there are any possible Timing modules:&lt;br /&gt;
&lt;br /&gt;
 [root@VM ]$ cd /usr/lib/asterisk/modules/&lt;br /&gt;
 [root@VM ]$ ll | grep res_timing&lt;br /&gt;
 -rwxr-xr-x 1 root root  179896 Oct  2  2014 res_timing_pthread.so&lt;br /&gt;
 -rwxr-xr-x 1 root root  165310 Oct  2  2014 res_timing_timerfd.so&lt;br /&gt;
 [root@VM ]$ &lt;br /&gt;
&lt;br /&gt;
In example there are two Timing modules available/compiled. We timerfd module:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so =&amp;gt; (timerfd Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If only pthread module is available, then we do:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_pthread.so &lt;br /&gt;
 Loaded res_timing_pthread.so&lt;br /&gt;
 Loaded res_timing_pthread.so =&amp;gt; (pthread Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After module is loaded, Timing should work already. To check it, Timing test should show something like:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Using the 'timerfd' timing module for this test.&lt;br /&gt;
 It has been 1000 milliseconds, and we got 50 timer ticks&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The error should be now resolved and not happen again.&lt;br /&gt;
&lt;br /&gt;
= See also = &lt;br /&gt;
* [[I have a problem with Fax]]&lt;br /&gt;
* [[Fax over VoIP]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19423</id>
		<title>Fax is not received</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Fax_is_not_received&amp;diff=19423"/>
		<updated>2015-04-24T11:15:38Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;After trying to use Fax2Email functionality in Asterisk CLI you see:&lt;br /&gt;
&lt;br /&gt;
* Check permissions on /var/spool/asterisk/faxes&lt;br /&gt;
* Make sure UDTP range 4000-4999 is open on the firewall.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&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;
 mor_fax2email: MOR Fax2Email v0.1.3 AGI script started.&lt;br /&gt;
 mor_fax2email: Failed to connect database server. Check debug for more info.&lt;br /&gt;
 mor_fax2email: ERROR! Not connected to database.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In '''/var/lib/asterisk/agi-bin/mor.conf''' correct DB connection settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== __ast_pbx_run: Channel 'Local/999@mor_local-1217,2' sent into invalid extension 'fax' in context 'mor_fax2email', but no invalid handler ==&lt;br /&gt;
&lt;br /&gt;
Make sure /etc/asterisk/extensions_mor.conf has such line:&lt;br /&gt;
&lt;br /&gt;
 [mor_fax2email]&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; _X.,1,Answer&lt;br /&gt;
 exten =&amp;gt; _X.,2,StopPlaytones&lt;br /&gt;
 exten =&amp;gt; _X.,3,Playback(beep)&lt;br /&gt;
 exten =&amp;gt; _X.,4,Set(FAXFILE=${CDR(UNIQUEID)})&lt;br /&gt;
 exten =&amp;gt; _X.,5,RxFax(/var/spool/asterisk/faxes/${FAXFILE}.tif)&lt;br /&gt;
&lt;br /&gt;
 '''exten =&amp;gt; fax,1,Goto(mor_fax2email,111,1)'''&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; h,1,DeadAGI(mor_fax2email)&lt;br /&gt;
 exten =&amp;gt; h,2,Hangup&lt;br /&gt;
&lt;br /&gt;
If not - add such line (marked in bold) and reload Asterisk.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= ERROR! TIF file does not exist! =&lt;br /&gt;
If you get a similar output in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 mor_fax2email:&lt;br /&gt;
 mor_fax2email: MOR Fax2Email AGI script started.&lt;br /&gt;
 mor_fax2email: Successfully connected to database.&lt;br /&gt;
 mor_fax2email: from sender: , fax file: 1311285609.5, faxsender: 311043455xx, fax_id :14, pdf file: /var/spool/asterisk/faxes/1311285609.5.pdf, tif file: /var/spool/asterisk/faxes/1311285609.5.tif&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:168 process_call_details: RTPAUDIOQOS: ssrc=655552979;themssrc=428650528;lp=0;rxjitter=0.006493;rxcount=4511;txjitter=0.002304;txcount=541;rlp=0;rtt=0.020000&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor_debug.c:186 process_call_details: PDD:&lt;br /&gt;
 [2011-07-22 00:01:52] NOTICE[3316]: app_mor.c:2407 mor_acct_stop: Reseller's balance will be deducted by: 0.000000, and frozen balance by: 0.000000.&lt;br /&gt;
 mor_fax2email: '''ERROR! TIF file does not exist!'''&lt;br /&gt;
 -- AGI Script mor_fax2email completed, returning 0&lt;br /&gt;
 -- Executing [h@mor_fax2email:2] Hangup(&amp;quot;Local/910007@mor_local-1f39,2&amp;quot;, &amp;quot;&amp;quot;) in new stack&lt;br /&gt;
 == Spawn extension (mor_fax2email, h, 2) exited non-zero on 'Local/91000x@mor_local-1f39,2'&lt;br /&gt;
&lt;br /&gt;
the problem can be anywhere if you get this error. Please see this page: [[Fax_over_VoIP|FAX over VoIP]]&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;
= Make sure T38 was not enabled =&lt;br /&gt;
&lt;br /&gt;
If you face a problem with FAX not being received, two ways to detect this problem:&lt;br /&gt;
&lt;br /&gt;
* Fax call takes about 30 seconds, and faxes not trains (if the codec is G729, call takes a little bit more than 40seconds and fails)&lt;br /&gt;
&lt;br /&gt;
* Make a SIP debug, and you will see like this:&lt;br /&gt;
&lt;br /&gt;
 v=0.&lt;br /&gt;
 o=CiscoSystemsSIP-GW-UserAgent 7568 7687 IN IP4 195.62.x.x.&lt;br /&gt;
 s=SIP Call.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 t=0 0.&lt;br /&gt;
 m=image 52972 udptl t38.&lt;br /&gt;
 c=IN IP4 ip.add.re.ss.&lt;br /&gt;
 a=T38FaxVersion:0.&lt;br /&gt;
 a=T38MaxBitRate:14400.&lt;br /&gt;
 a=T38FaxFillBitRemoval:0.&lt;br /&gt;
 a=T38FaxTranscodingMMR:0.&lt;br /&gt;
 a=T38FaxTranscodingJBIG:0.&lt;br /&gt;
 a=T38FaxRateManagement:transferredTCF.&lt;br /&gt;
 a=T38FaxMaxBuffer:200.&lt;br /&gt;
 a=T38FaxMaxDatagram:72.&lt;br /&gt;
 a=T38FaxUdpEC:t38UDPRedundancy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solution, check in sip.conf:&lt;br /&gt;
&lt;br /&gt;
 t38pt_udptl = no (be sure, it's NOT yes)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= FAX is not received on ZAP channel =&lt;br /&gt;
&lt;br /&gt;
When ZAP channel is used, FAX device should be assigned to Asterisk server which has ZAP/DAHDI cards installed. Please make sure that correct Asterisk server is specified in &amp;quot;Server&amp;quot; drop-down list on FAX device settings.&lt;br /&gt;
&lt;br /&gt;
It can be an issue when you have more than one Asterisk server only.&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;
= Timing module is not loaded =&lt;br /&gt;
&lt;br /&gt;
If Timing module is not working or if not loaded at all, FAX will fail and you will see ERROR like:&lt;br /&gt;
&lt;br /&gt;
 ERROR[14592]: res_fax_spandsp.c:464 spandsp_fax_new: Channel 'Local/1054@mor_local-00012b63;2' FAX session '253' failed to create timing source.&lt;br /&gt;
 ERROR[14592]: res_fax.c:893 fax_session_new: FAX session failed to initialize.&lt;br /&gt;
 ERROR[14592]: res_fax.c:1183 generic_fax_exec: Can't create a FAX session, FAX attempt failed.&lt;br /&gt;
&lt;br /&gt;
* Check Timing module first:&lt;br /&gt;
&lt;br /&gt;
 sip*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Failed to open timing fd&lt;br /&gt;
 '''Command 'timing test 50' failed.'''&lt;br /&gt;
 sip*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If you see that Timing failed like in an example above, than it seems your Timing module is not working or is missing at all. To check Timing module do like this in Asterisk CLI:&lt;br /&gt;
&lt;br /&gt;
 asterisk1*CLI&amp;gt; module show like res_timing_dahdi.so&lt;br /&gt;
 Module                         Description                              Use Count &lt;br /&gt;
 '''0 modules loaded'''&lt;br /&gt;
&lt;br /&gt;
This means that you have no Timing modules loaded at all. To load Timing module, check if there are any possible Timing modules:&lt;br /&gt;
&lt;br /&gt;
 [root@VM ]$ cd /usr/lib/asterisk/modules/&lt;br /&gt;
 [root@VM ]$ ll | grep res_timing&lt;br /&gt;
 -rwxr-xr-x 1 root root  179896 Oct  2  2014 res_timing_pthread.so&lt;br /&gt;
 -rwxr-xr-x 1 root root  165310 Oct  2  2014 res_timing_timerfd.so&lt;br /&gt;
 [root@VM ]$ &lt;br /&gt;
&lt;br /&gt;
In example there are two Timing modules available/compiled. We timerfd module:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so&lt;br /&gt;
 Loaded res_timing_timerfd.so =&amp;gt; (timerfd Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If only pthread module is available, then we do:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; module load res_timing_pthread.so &lt;br /&gt;
 Loaded res_timing_pthread.so&lt;br /&gt;
 Loaded res_timing_pthread.so =&amp;gt; (pthread Timing Interface)&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After module is loaded, Timing should work already. To check it, Timing test should show something like:&lt;br /&gt;
&lt;br /&gt;
 VM*CLI&amp;gt; timing test 50&lt;br /&gt;
 Attempting to test a timer with 50 ticks per second.&lt;br /&gt;
 Using the 'timerfd' timing module for this test.&lt;br /&gt;
 It has been 1000 milliseconds, and we got 50 timer ticks&lt;br /&gt;
 VM*CLI&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The error should be now resolved and not happen again.&lt;br /&gt;
&lt;br /&gt;
= See also = &lt;br /&gt;
* [[I have a problem with Fax]]&lt;br /&gt;
* [[Fax over VoIP]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Call_Flow&amp;diff=19389</id>
		<title>Call Flow</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Call_Flow&amp;diff=19389"/>
		<updated>2015-04-21T10:21:14Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description = &lt;br /&gt;
&lt;br /&gt;
Call Flow is set of rules on how a call should behave when it is trying to reach a device. From MOR X4 PBX addon is required for Call Flow functionality.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;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;&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;
* '''Fax detect''' (only for the Before Call state)&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; Users –&amp;gt; Devices'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:devices_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Call Flow can be reached by clicking [[Image:icon_call_flow.png]] '''Call Flow''' link in Devices list or Details:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:devices_list.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
When you reach Call Flow window, you are able to manage actions for states: Before Call, No Answer, Busy and Failed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:call_flow1.png]]&lt;br /&gt;
&amp;lt;br&amp;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. It is the default in most cases.&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:call_flow_forward.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Device Timeout''' is only available in the '''No Answer''' state. It decides for how long a device should ring before the system decides that it is unreachable (when to activate the No Answer state).&lt;br /&gt;
&lt;br /&gt;
The system owner (admin) can select any device he likes. If a user edits his devices' Call Flow, he can only select his own devices.&lt;br /&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 for the device that is forwarding the call.&lt;br /&gt;
* '''Same as comes - unchanged''' - leaves the CallerID as it comes from the original caller.&lt;br /&gt;
* '''From DID''' - selects a CallerID from available DIDs.&lt;br /&gt;
* '''Custom''' - enters any CallerID.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Forwarding example ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's make a chain of forwards: when someone calls to a device (extension) and until the device timeout there is no answer the call is forwarded to another device, if there is still no answer then forwared to the next extension. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[file:callflow1.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In ''Forward to'' select the second extension. Then go to Devices main page and make the same call flow to that second extension just in ''Forward to'' select the third extension:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Callflow2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
the parameters of ringing before forwarding can be changed in &amp;lt;code&amp;gt;/etc/asterisk/indications.conf&amp;lt;/code&amp;gt; in this line of an appropriate nation's block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ringing tone 440+480Hz 1 sec. on ,2 sec. off&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''on'' - length of tone&amp;lt;br&amp;gt;&lt;br /&gt;
''off'' - length of pause between two tones.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Voicemail ===&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:call_flow_vm.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This action sends the call directly to voicemail. It's simple. Put in Before Call, and if a call never reaches a device, it will go directly to voicemail.&lt;br /&gt;
&lt;br /&gt;
You can put it in the No Answer/Busy/Failed state to achieve a different functionality.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Voicemail options (only in No Answer/Busy/Failed states):'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Skip intro message''' - when checked, skips intro message &amp;quot;please leave your message after the tone&amp;quot;. This is useful when user has recorded his own custom voicemail intro message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fax detect ===&lt;br /&gt;
&lt;br /&gt;
This action can be set ONLY in the Before Call state and only if a Fax device is enabled in Settings:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:call_flow_fax.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
You can select only a FAX device to route the call if a Fax is detected. MOR will use fax detection when this action is set. &lt;br /&gt;
&lt;br /&gt;
If a fax is detected, it routes calls to the set fax device. Otherwise, they go to the basic device.&lt;br /&gt;
&lt;br /&gt;
'''NOTE: [[Fax over VoIP]] is not reliable and this setting should be used only for testing.'''&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;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_subscription_create&amp;diff=19356</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=19356"/>
		<updated>2015-04-15T14:05:08Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Parametres */&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;
===Parametres===&lt;br /&gt;
&lt;br /&gt;
Parameters which are '''included''' into hash:&lt;br /&gt;
&lt;br /&gt;
* service_id - Service ID. '''Required'''.&lt;br /&gt;
* user_id - User 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. '''Required'''.&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 cancel (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 month. (0 - off, 1 - on, default - off). '''Only for Flat Rate'''. &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=username&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;/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;User has insufficient balance&amp;lt;/error&amp;gt; - Subscription price is bigger than Subscription User balance.&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;
=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>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Install_Dahdi&amp;diff=19219</id>
		<title>Install Dahdi</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Install_Dahdi&amp;diff=19219"/>
		<updated>2015-03-26T08:31:03Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Alternative setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is DAHDI =&lt;br /&gt;
&lt;br /&gt;
DAHDI is the new name for 'Zaptel' as of May 19th 2008.&lt;br /&gt;
&lt;br /&gt;
More information can be found [http://www.voip-info.org/wiki/view/DAHDI here]&lt;br /&gt;
&lt;br /&gt;
= Install your kernel devel package =&lt;br /&gt;
 &lt;br /&gt;
 yum -y install kernel-devel-$(uname -r)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 yum -y install kernel-PAE-devel&lt;br /&gt;
&lt;br /&gt;
if PAE kernel is used on machine.&lt;br /&gt;
&lt;br /&gt;
= Download DAHDI =&lt;br /&gt;
&lt;br /&gt;
This manual assumes that you already have MOR billing installed!&lt;br /&gt;
&lt;br /&gt;
 cd /usr/src&lt;br /&gt;
&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack sources&lt;br /&gt;
&lt;br /&gt;
 tar xvfz dahdi-linux-current.tar.gz&lt;br /&gt;
&lt;br /&gt;
= Download DAHDI tools =&lt;br /&gt;
&lt;br /&gt;
 cd /usr/src&lt;br /&gt;
&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-current.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack sources&lt;br /&gt;
 &lt;br /&gt;
 tar xvfz dahdi-tools-current.tar.gz&lt;br /&gt;
&lt;br /&gt;
= Build DAHDI linux = &lt;br /&gt;
&lt;br /&gt;
 cd /usr/src/dahdi-linux-2.5.0.1&lt;br /&gt;
&lt;br /&gt;
 make clean&lt;br /&gt;
 &lt;br /&gt;
 make &lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
= Build DAHDI tools =&lt;br /&gt;
 &lt;br /&gt;
 cd /usr/src/dahdi-tools-2.5.0.1&lt;br /&gt;
 &lt;br /&gt;
 ./configure&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
 make config&lt;br /&gt;
&lt;br /&gt;
= Alternative setup =&lt;br /&gt;
 &lt;br /&gt;
Download the complete Dahdi package which includes both the DAHDI module and tools. If you need to influence the installation&lt;br /&gt;
&lt;br /&gt;
of both the DAHDI linux and tools use above steps&lt;br /&gt;
&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.6.1+2.6.1.tar.gz&lt;br /&gt;
&lt;br /&gt;
 tar xvfz dahdi-linux-complete-2.5.0.1+2.5.0.1.tar.gz&lt;br /&gt;
&lt;br /&gt;
 cd dahdi-linux-complete-2.5.0.1&lt;br /&gt;
&lt;br /&gt;
 make all &lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
 make config&lt;br /&gt;
&lt;br /&gt;
= Recompile Asterisk for DAHDI support =&lt;br /&gt;
&lt;br /&gt;
 cd /usr/src/ASTERISKLOCATIONFOLDER&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 &lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
 make menuconfig&lt;br /&gt;
&lt;br /&gt;
Go to &amp;quot;Channel Drivers&amp;quot; and make sure that &amp;quot;chan_dahdi&amp;quot; is checked.&lt;br /&gt;
&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
 make config&lt;br /&gt;
&lt;br /&gt;
= How to use Zap instead of DAHDI =&lt;br /&gt;
&lt;br /&gt;
As ZAPTEL is now not used in Asterisk, systems that are still using ZAP channels can be configured to use Dahdi.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/asterisk/asterisk.conf file and add this line:&lt;br /&gt;
&lt;br /&gt;
 dahdichanname = no&lt;br /&gt;
&lt;br /&gt;
Adding this entry solves a few issues:&lt;br /&gt;
&lt;br /&gt;
All CLI commands that begin with 'zap' are now available as 'dahdi'&lt;br /&gt;
commands as well; the 'zap' variants will report that they are&lt;br /&gt;
deprecated the first time you use each one in an Asterisk instance,&lt;br /&gt;
but they will otherwise operate just as they did in previous versions&lt;br /&gt;
&lt;br /&gt;
Channel configurations will be read from &lt;br /&gt;
&lt;br /&gt;
 /etc/asterisk/zapata.conf&lt;br /&gt;
&lt;br /&gt;
So if you use &amp;quot;dahdichanname = no&amp;quot; - make sure to enter channel configuration in that file.&lt;br /&gt;
&lt;br /&gt;
Source [http://svn.ohnosec.org/svn/projects/allstar/astsrc-1.4.23-pre/trunk/asterisk/Zaptel-to-DAHDI.txt]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_Change_default_passwords&amp;diff=19181</id>
		<title>MOR Change default passwords</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_Change_default_passwords&amp;diff=19181"/>
		<updated>2015-03-25T06:30:17Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Applying new DB password */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Its really not important to change Database password as by default only local connections are accepted (for root and mor users).'''&lt;br /&gt;
==MOR DB password==&lt;br /&gt;
&lt;br /&gt;
After MOR installation you need to change MySQL passwords for root (which is empty) and for mor (which is 'mor').&lt;br /&gt;
&lt;br /&gt;
First, execute the following command in Bash:&lt;br /&gt;
&lt;br /&gt;
 mysql -u mor –pmor&lt;br /&gt;
&lt;br /&gt;
you should be now in MySql management console. Type in the following command:&lt;br /&gt;
&lt;br /&gt;
 SET PASSWORD FOR 'mor'@'localhost' = PASSWORD('NewPassword');&lt;br /&gt;
&lt;br /&gt;
Where NewPassword – is your new password for mor DB.&lt;br /&gt;
&lt;br /&gt;
next type “quit” and test new DB password using command:&lt;br /&gt;
&lt;br /&gt;
 '''mysql -u mor -pNewPassword'''&lt;br /&gt;
&lt;br /&gt;
==Applying new DB password==&lt;br /&gt;
&lt;br /&gt;
Next you need to change password in following places:&lt;br /&gt;
&lt;br /&gt;
 /home/mor/config/database.yml (if you have password with symbols like ! , make sure you leave your password in quotes. For example &amp;quot;my*!@Password^&amp;quot;&lt;br /&gt;
 /etc/asterisk/mor.conf&lt;br /&gt;
 /etc/asterisk/res_mysql.conf&lt;br /&gt;
 /var/lib/asterisk/agi-bin/mor.conf&lt;br /&gt;
 /etc/asterisk/res_config_mysql.conf&lt;br /&gt;
&lt;br /&gt;
==Asterisk Manager Password==&lt;br /&gt;
&lt;br /&gt;
Change the password for user mor in&lt;br /&gt;
 &lt;br /&gt;
 /etc/asterisk/manager.conf&lt;br /&gt;
&lt;br /&gt;
 [mor]&lt;br /&gt;
 secret = NEW_PSW_HERE&lt;br /&gt;
 deny=0.0.0.0/0.0.0.0&lt;br /&gt;
 permit=127.0.0.1/255.255.255.0&lt;br /&gt;
 read = system,call,log,verbose,command,agent,user,config&lt;br /&gt;
 write = system,call,log,verbose,command,agent,user,config&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In MOR GUI go to Billing - Servers and change manager password for appropriate server. After that - reload Asterisk.&lt;br /&gt;
&lt;br /&gt;
==Finally==&lt;br /&gt;
&lt;br /&gt;
Restart Asterisk:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/asterisk restart&lt;br /&gt;
&lt;br /&gt;
And Apache:&lt;br /&gt;
&lt;br /&gt;
Debian:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/apache2 restart&lt;br /&gt;
&lt;br /&gt;
Centos/Fedora:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/httpd restart&lt;br /&gt;
&lt;br /&gt;
=== Test new DB password ===&lt;br /&gt;
&lt;br /&gt;
Test it in bash using command:&lt;br /&gt;
&lt;br /&gt;
 '''mysql -u mor -pPASSWORD'''&lt;br /&gt;
&lt;br /&gt;
Where PASSWORD is your new password.&lt;br /&gt;
&lt;br /&gt;
==MOR GUI password==&lt;br /&gt;
&lt;br /&gt;
* Change from admin/admin to more secure&lt;br /&gt;
* Also change psw for user 101&lt;br /&gt;
&lt;br /&gt;
==Change DB==&lt;br /&gt;
&lt;br /&gt;
If you want to change DB name from mor to another one, make sure to edit '''/etc/asterisk/extconfig.conf''' and change mor to your new DB name.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_user_logout&amp;diff=19178</id>
		<title>MOR API user logout</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_user_logout&amp;diff=19178"/>
		<updated>2015-03-24T14:27:21Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
&lt;br /&gt;
[[MOR API]] Logs out user from MOR&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
* From '''MOR X4''' call: '''/api/user_logout'''&lt;br /&gt;
* For Backwards-compatibility old name 'logout' is also usable. Call: '''/api/logout'''&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;
* '''[[MOR API hash construction | hash]]''' - SHA1 hash constructed using '''parameters''' which are listed above. You are able to use these parameter one by one or both at a time. If you use them both at a time 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. '''Required'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/user_logout?u=username&amp;amp;hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Result===&lt;br /&gt;
&lt;br /&gt;
'''Success''' if User is logged out from the system.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;action&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;logout&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;status&amp;gt;ok&amp;lt;/status&amp;gt;&lt;br /&gt;
  &amp;lt;/action&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Error'''.This means that wrong username and/or password and user can't be authenticated and logged out from the system.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
  &amp;lt;action&amp;gt;&lt;br /&gt;
    &amp;lt;name&amp;gt;logout&amp;lt;/name&amp;gt;&lt;br /&gt;
    &amp;lt;status&amp;gt;failed&amp;lt;/status&amp;gt;&lt;br /&gt;
  &amp;lt;/action&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>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=PayPal_Website_Payments_Pro_technical_details&amp;diff=19159</id>
		<title>PayPal Website Payments Pro technical details</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=PayPal_Website_Payments_Pro_technical_details&amp;diff=19159"/>
		<updated>2015-03-19T09:39:01Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Configuration from MOR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description =&lt;br /&gt;
[[Image:paypalpro_logo.jpg|right|100px]] &lt;br /&gt;
http://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=What do you need to get started?=&lt;br /&gt;
&lt;br /&gt;
In order to use PayPal Website Payments Pro in MOR, you need to generate a PayPal Live certificate.&lt;br /&gt;
Here is what you need to do:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
1. Log in to https://www.paypal.com.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
2. Click on &amp;quot;My Account&amp;quot; then &amp;quot;Profile&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
3. Click the API Certificate Request link.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
4. Enter API Username(from paypal page) in Login field in MOR PayPal payments PRO gateway.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
5. Enter API Password(from paypal page) in Password field in MOR PayPal payments PRO gateway&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
6. Enter Signature in(from paypal page) in Signature field in MOR PayPal payments PRO gateway&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Configuration from MOR=&lt;br /&gt;
&lt;br /&gt;
Go to '''ADDONS –&amp;gt; Payment gateways''' and click on PayPal Website Payments Pro (US) logo. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:payment_gateways_path.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Configuration settings will appear:  &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:paypal_pro.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
*'''Default currency''' – United States Currency will be used for Payments. During the payment, there is ability to choose one of active Currencies during the payment, but it will be converted to USD and payment will be send in USD. &lt;br /&gt;
*'''Enabled''' – check to activate PayPal Pro Payment Gateway.&lt;br /&gt;
*'''Login''' – username of PayPal Pro account.&lt;br /&gt;
*'''Password''' – password of PayPal Pro account.&lt;br /&gt;
*'''Signature''' - signature of your PayPal Pro account. &lt;br /&gt;
*'''Tax in amount''' – &amp;quot;Include&amp;quot; tax into amount that user has to pay or &amp;quot;Exclude&amp;quot; if you want to exclude the tax from the amount that is added to user's balance.&lt;br /&gt;
*'''Minimum amount''' – minimum amount which should be paid.&lt;br /&gt;
*'''Maximum amount''' – maximum amount which client should be able to pay.&lt;br /&gt;
''*Note - when executing Payment, Minimum and Maximum amount will be displayed in Currency which User has selected for this specific Payment''&lt;br /&gt;
*'''Payment confirmation by you'''&lt;br /&gt;
** '''Not required''' – No confirmation is required. Every payment is added to clients balance immediately.&lt;br /&gt;
** '''Required for suspicious payments''' – currently iDeal doesn't provide enough info to calculate suspiciousness. &lt;br /&gt;
** '''Required for all payments''' – When payments are completed they must be confirmed manually. &lt;br /&gt;
*'''Notify by email''' – check if you want to be notified by email after each payment.	&lt;br /&gt;
*'''Logo''' – you can choose your own logo, which will be on the Start Page.&lt;br /&gt;
*'''Test mode''' – Turns on the test mode. Use this option only if you know what you are doing. In test mode MOR will send payment requests to bank's test environment, so the payments will not transfer actual money. On the other hand MOR still counts these payments as real and updates user's balance. &lt;br /&gt;
*'''PayPal custom redirect''' – check to redirect client after successful payment.&lt;br /&gt;
*'''Return URL on successful payment''' – address of page where client should be redirected after successful payment.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
*[[PayPal_payments_do_not_work|PayPal payments do not work]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Payment Gateway Addon]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19055</id>
		<title>M4 Regexp Examples</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19055"/>
		<updated>2015-03-10T11:19:02Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Regexp is used to allow/deny CallerID/Destinations for [[M2 Origination Points | Origination Points]], [[M2 Termination Points | Termination Points]] and [[M2 Dial Peers | Dial Peers]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Regexp''' || '''Explanation''' &lt;br /&gt;
|- &lt;br /&gt;
| .* || everything&lt;br /&gt;
|- &lt;br /&gt;
| ^[0-9]+$ || only digits&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{9,}$ || only digits, number more than 8 digits (9, 10, 11...)&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{0,9}$ || only digits, number less than 9 digits (1, 2, 3, 4, 5, 6, 7, 8)&lt;br /&gt;
|-&lt;br /&gt;
| ^\+?[0-9]+$ || optional + sign and only digits&lt;br /&gt;
|- &lt;br /&gt;
| ^370[0-9]+$ || only digits starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^370.*$ || anything starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^(37[0-1])&amp;amp;#124;(44)[0-9]*$|| only digits starting with 370 or 371 or 44&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67&amp;amp;#124;97&amp;amp;#124;68&amp;amp;#124;98))&amp;amp;#124;(998[0-9])*$ || only digits starting with 380(67,97,68,98) and 998(0-9), where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9) = 9980,...,9988,9989.&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67&amp;amp;#124;97&amp;amp;#124;68&amp;amp;#124;98)){17}&amp;amp;#124;(998[0-9]){16}$ || only digits starting with 380(67,97,68,98) and 998(0-9), but number of digits after each prefix should be exactly 12.&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;
= See also =&lt;br /&gt;
* Standard: http://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended&lt;br /&gt;
* Check your regexp: http://regex101.com/&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19054</id>
		<title>M4 Regexp Examples</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19054"/>
		<updated>2015-03-10T11:18:37Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Regexp is used to allow/deny CallerID/Destinations for [[M2 Origination Points | Origination Points]], [[M2 Termination Points | Termination Points]] and [[M2 Dial Peers | Dial Peers]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Regexp''' || '''Explanation''' &lt;br /&gt;
|- &lt;br /&gt;
| .* || everything&lt;br /&gt;
|- &lt;br /&gt;
| ^[0-9]+$ || only digits&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{9,}$ || only digits, number more than 8 digits (9, 10, 11...)&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{0,9}$ || only digits, number less than 9 digits (1, 2, 3, 4, 5, 6, 7, 8)&lt;br /&gt;
|-&lt;br /&gt;
| ^\+?[0-9]+$ || optional + sign and only digits&lt;br /&gt;
|- &lt;br /&gt;
| ^370[0-9]+$ || only digits starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^370.*$ || anything starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^(37[0-1])&amp;amp;#124;(44)[0-9]*$|| only digits starting with 370 or 371 or 44&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67&amp;amp;#124;97&amp;amp;#124;68&amp;amp;#124;98))&amp;amp;#124;(998[0-9])*$ || only digits starting with 380(67,97,68,98) and 998(0-9), where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9) = 9980,...,9988,9989.&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67&amp;amp;#124;97&amp;amp;#124;68&amp;amp;#124;98)){17}&amp;amp;#124;(998[0-9]){16}$ || only digits starting with 380(67,97,68,98) and 998(0-9), but digits number after each prefix should be exactly 12.&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;
= See also =&lt;br /&gt;
* Standard: http://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended&lt;br /&gt;
* Check your regexp: http://regex101.com/&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19053</id>
		<title>M4 Regexp Examples</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19053"/>
		<updated>2015-03-10T11:14:38Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Regexp is used to allow/deny CallerID/Destinations for [[M2 Origination Points | Origination Points]], [[M2 Termination Points | Termination Points]] and [[M2 Dial Peers | Dial Peers]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Regexp''' || '''Explanation''' &lt;br /&gt;
|- &lt;br /&gt;
| .* || everything&lt;br /&gt;
|- &lt;br /&gt;
| ^[0-9]+$ || only digits&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{9,}$ || only digits, number more than 8 digits (9, 10, 11...)&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{0,9}$ || only digits, number less than 9 digits (1, 2, 3, 4, 5, 6, 7, 8)&lt;br /&gt;
|-&lt;br /&gt;
| ^\+?[0-9]+$ || optional + sign and only digits&lt;br /&gt;
|- &lt;br /&gt;
| ^370[0-9]+$ || only digits starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^370.*$ || anything starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^(37[0-1])&amp;amp;#124;(44)[0-9]*$|| only digits starting with 370 or 371 or 44&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67|97|68|98))|(998[0-9])*$ || only digits starting with 380(67,97,68,98) and 998(0-9), where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9) = 9980,...,9988,9989.&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67|97|68|98)){17}|(998[0-9]){16}$ || only digits starting with 380(67,97,68,98) and 998(0-9), but digits number after each prefix should be exactly 12.&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;
= See also =&lt;br /&gt;
* Standard: http://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended&lt;br /&gt;
* Check your regexp: http://regex101.com/&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19052</id>
		<title>M4 Regexp Examples</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19052"/>
		<updated>2015-03-10T11:08:37Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Regexp is used to allow/deny CallerID/Destinations for [[M2 Origination Points | Origination Points]], [[M2 Termination Points | Termination Points]] and [[M2 Dial Peers | Dial Peers]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Regexp''' || '''Explanation''' &lt;br /&gt;
|- &lt;br /&gt;
| .* || everything&lt;br /&gt;
|- &lt;br /&gt;
| ^[0-9]+$ || only digits&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{9,}$ || only digits, number more than 8 digits (9, 10, 11...)&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{0,9}$ || only digits, number less than 9 digits (1, 2, 3, 4, 5, 6, 7, 8)&lt;br /&gt;
|-&lt;br /&gt;
| ^\+?[0-9]+$ || optional + sign and only digits&lt;br /&gt;
|- &lt;br /&gt;
| ^370[0-9]+$ || only digits starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^370.*$ || anything starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^(37[0-1])&amp;amp;#124;(44)[0-9]*$|| only digits starting with 370 or 371 or 44&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67|97|68|98))|(998[0-9])*$|| only digits starting with 380(67,97,68,98) and 998(0-9), where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9) = 9980,...,9988,9989.&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67|97|68|98)){17}|(998[0-9]){16}$|| only digits starting with 380(67,97,68,98) and 998(0-9), but digits number after each prefix should be exactly 12.&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;
= See also =&lt;br /&gt;
* Standard: http://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended&lt;br /&gt;
* Check your regexp: http://regex101.com/&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19051</id>
		<title>M4 Regexp Examples</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19051"/>
		<updated>2015-03-10T11:07:28Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Regexp is used to allow/deny CallerID/Destinations for [[M2 Origination Points | Origination Points]], [[M2 Termination Points | Termination Points]] and [[M2 Dial Peers | Dial Peers]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Regexp''' || '''Explanation''' &lt;br /&gt;
|- &lt;br /&gt;
| .* || everything&lt;br /&gt;
|- &lt;br /&gt;
| ^[0-9]+$ || only digits&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{9,}$ || only digits, number more than 8 digits (9, 10, 11...)&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{0,9}$ || only digits, number less than 9 digits (1, 2, 3, 4, 5, 6, 7, 8)&lt;br /&gt;
|-&lt;br /&gt;
| ^\+?[0-9]+$ || optional + sign and only digits&lt;br /&gt;
|- &lt;br /&gt;
| ^370[0-9]+$ || only digits starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^370.*$ || anything starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^(37[0-1])&amp;amp;#124;(44)[0-9]*$|| only digits starting with 370 or 371 or 44&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67|97|68|98))|(998[0-9])*$|| only digits starting with 380(67,97,68,98) and 998(0-9], where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9) = 9980,...,9988,9989.&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;
= See also =&lt;br /&gt;
* Standard: http://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended&lt;br /&gt;
* Check your regexp: http://regex101.com/&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19050</id>
		<title>M4 Regexp Examples</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Regexp_Examples&amp;diff=19050"/>
		<updated>2015-03-10T11:05:20Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Regexp is used to allow/deny CallerID/Destinations for [[M2 Origination Points | Origination Points]], [[M2 Termination Points | Termination Points]] and [[M2 Dial Peers | Dial Peers]].&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; &lt;br /&gt;
| '''Regexp''' || '''Explanation''' &lt;br /&gt;
|- &lt;br /&gt;
| .* || everything&lt;br /&gt;
|- &lt;br /&gt;
| ^[0-9]+$ || only digits&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{9,}$ || only digits, number more than 8 digits (9, 10, 11...)&lt;br /&gt;
|-&lt;br /&gt;
| ^[0-9]{0,9}$ || only digits, number less than 9 digits (1, 2, 3, 4, 5, 6, 7, 8)&lt;br /&gt;
|-&lt;br /&gt;
| ^\+?[0-9]+$ || optional + sign and only digits&lt;br /&gt;
|- &lt;br /&gt;
| ^370[0-9]+$ || only digits starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^370.*$ || anything starting with 370&lt;br /&gt;
|-&lt;br /&gt;
| ^(37[0-1])&amp;amp;#124;(44)[0-9]*$|| only digits starting with 370 or 371 or 44&lt;br /&gt;
|-&lt;br /&gt;
| ^(380(67|97|68|98))|(998[0-9])*$|| only digits starting with 380(67,97,68,98) and 998(0-9], where 380(67,97,68,98) = 38067,38097,38068,38098 and 998(0-9] = 9980,...,9988,9989.&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;
= See also =&lt;br /&gt;
* Standard: http://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended&lt;br /&gt;
* Check your regexp: http://regex101.com/&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Last_Calls&amp;diff=18900</id>
		<title>Last Calls</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Last_Calls&amp;diff=18900"/>
		<updated>2015-02-05T14:22:06Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Faster Page Loading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Last Calls =&lt;br /&gt;
'''STATISTICS –&amp;gt; Calls –&amp;gt; Last Calls''' shows the most recent calls in the system. It is used in [[MOR_Manual#Troubleshooting | Troubleshooting]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:last_calls_page.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last Calls search is available both for users and administrators.&lt;br /&gt;
You can make search by '''User''', '''Device''', call '''Status''', '''Hangup Couse''', '''Provider''', '''DID Provider''', '''Source''', '''Destination''' or '''DID'''. &amp;lt;br&amp;gt;&lt;br /&gt;
There is possible to find calls by '''Reseller'''. '''Reseller in any DIDs''' lets one search for all calls made through specific reseller's DID or range of DIDs. &amp;lt;br&amp;gt;&lt;br /&gt;
You can search calls by Calling Cards information with '''Card number''', '''Card PIN''' or '''Card ID''' parameters. End user can see these fields only when he is the distributor for at least one Calling Card. '''Card PIN''' will not be visible if option '''Hide Calling Card PIN''' is checked in [http://wiki.kolmisoft.com/index.php/Calling_Card_Distributor Calling Cards] settings.&amp;lt;br&amp;gt;  &lt;br /&gt;
'''DID Provider''' searches for calls made through specific DID provider while '''Provider''' shows you calls made only through specific call provider. &lt;br /&gt;
&lt;br /&gt;
Please note that when occurs a call where DID is involved it consists of two legs (call from DID to MOR and call from MOR to Destination).  They will be shown seperately in ''Last Calls'' list.&lt;br /&gt;
&lt;br /&gt;
= Faster Page Loading =&lt;br /&gt;
&lt;br /&gt;
Functionality can be enabled in '''STATISTICS -&amp;gt; Setup -&amp;gt; Settings -&amp;gt; Visual tab''' by checking '''Count Last Calls total values only after click''' option.&lt;br /&gt;
&lt;br /&gt;
It allows to load table data separately from total data which highly increases page loading time.&lt;br /&gt;
&lt;br /&gt;
[[File:last_calls_total_line.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When functionality is active click bottom table row in order to calculate total values.&lt;br /&gt;
&lt;br /&gt;
= CSV =&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Using the &amp;quot;Export to CSV&amp;quot; icon you can export your currently displayed calls into CSV&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= PDF =&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Using the &amp;quot;Export to PDF&amp;quot; icon you can export your currently displayed calls into PDF&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Call information representation =&lt;br /&gt;
&lt;br /&gt;
When call is initiated by the caller, at least one call leg is created - from user agent client(UAC) to user agent server(UAS) - usually called LEG A. Based on routing rules, call may be canceled(in case there is no suficcient funds, no appropriate rule etc.) or one more call leg may be created - from UAS to destination another UAC (LEG B). Many call legs may be created depending on routing rules and whether call to destination was succesfull. For instance:&amp;lt;br&amp;gt;&lt;br /&gt;
1. User A dials user B&amp;lt;br&amp;gt;&lt;br /&gt;
* call leg from user A to PBX is created&amp;lt;br&amp;gt;&lt;br /&gt;
* PBX can route call to user B&amp;lt;br&amp;gt;&lt;br /&gt;
* call leg from PBX to user B is created&amp;lt;br&amp;gt;&lt;br /&gt;
* when user B answer these two legs are bridged&amp;lt;br&amp;gt;&lt;br /&gt;
* there we have two bridged legs and one call&amp;lt;br&amp;gt;&lt;br /&gt;
2. User A dials user B.&amp;lt;br&amp;gt;&lt;br /&gt;
* call leg from user A to PBX is created&amp;lt;br&amp;gt;&lt;br /&gt;
* PBX cannot route call to destination and the call is canceled&amp;lt;br&amp;gt;&lt;br /&gt;
* there we have one failed call and one call leg (LEG A - OK, LEG B - FAILED)&amp;lt;br&amp;gt;&lt;br /&gt;
3. User A dials user B&amp;lt;br&amp;gt;&lt;br /&gt;
* call leg from user A to PBX is created&amp;lt;br&amp;gt;&lt;br /&gt;
* PBX can route call to user B through provider C&amp;lt;br&amp;gt;&lt;br /&gt;
* C fails to route the call&amp;lt;br&amp;gt;&lt;br /&gt;
* but PBX can route the call through another provider D&amp;lt;br&amp;gt;&lt;br /&gt;
* D succeeds in routing the call&amp;lt;br&amp;gt;&lt;br /&gt;
* user B answers&amp;lt;br&amp;gt;&lt;br /&gt;
* there we have three call legs, two of them were bridged and we would say that there was only one call which was connected.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If user A is interested only in calls made, information, about how many attempts were made to call user B, has no interest for him. Majority of users will be interested only in call duration, who terminated the call etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Hence this is how call information is represented in call statistics, trying not to overwhelm users with too much technical details, only information about successful call is presented, ignoring details about made call legs (FAILED or NOT, etc). Provided you want to check the information on FAILED and connected call LEGS, you can use the [[Call Info]] page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Search usage =&lt;br /&gt;
&lt;br /&gt;
Destination field allows to search by Exact destination, by first digits and by matching pattern.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
*'''370123''' will return all calls where number '''is''' &amp;quot;370123&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
*'''370%''' will return all calls where number '''begins with''' &amp;quot;370&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
*'''%70%''' will return all calls where number '''contains''' &amp;quot;70&amp;quot;.&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;
* [[MOR_Manual#Troubleshooting | Troubleshooting]]&lt;br /&gt;
* [[MOR_Manual#Reporting | Reporting]]&lt;br /&gt;
* [[Call list]]&lt;br /&gt;
* [[Providers Calls]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Last_Calls&amp;diff=18899</id>
		<title>Last Calls</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Last_Calls&amp;diff=18899"/>
		<updated>2015-02-05T14:21:53Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Faster Page Loading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Last Calls =&lt;br /&gt;
'''STATISTICS –&amp;gt; Calls –&amp;gt; Last Calls''' shows the most recent calls in the system. It is used in [[MOR_Manual#Troubleshooting | Troubleshooting]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:last_calls_page.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Last Calls search is available both for users and administrators.&lt;br /&gt;
You can make search by '''User''', '''Device''', call '''Status''', '''Hangup Couse''', '''Provider''', '''DID Provider''', '''Source''', '''Destination''' or '''DID'''. &amp;lt;br&amp;gt;&lt;br /&gt;
There is possible to find calls by '''Reseller'''. '''Reseller in any DIDs''' lets one search for all calls made through specific reseller's DID or range of DIDs. &amp;lt;br&amp;gt;&lt;br /&gt;
You can search calls by Calling Cards information with '''Card number''', '''Card PIN''' or '''Card ID''' parameters. End user can see these fields only when he is the distributor for at least one Calling Card. '''Card PIN''' will not be visible if option '''Hide Calling Card PIN''' is checked in [http://wiki.kolmisoft.com/index.php/Calling_Card_Distributor Calling Cards] settings.&amp;lt;br&amp;gt;  &lt;br /&gt;
'''DID Provider''' searches for calls made through specific DID provider while '''Provider''' shows you calls made only through specific call provider. &lt;br /&gt;
&lt;br /&gt;
Please note that when occurs a call where DID is involved it consists of two legs (call from DID to MOR and call from MOR to Destination).  They will be shown seperately in ''Last Calls'' list.&lt;br /&gt;
&lt;br /&gt;
= Faster Page Loading =&lt;br /&gt;
&lt;br /&gt;
Functionality can be enabled in '''STATISTICS -&amp;gt; Setup -&amp;gt; Settings -&amp;gt; Visual tab'''by checking '''Count Last Calls total values only after click''' option.&lt;br /&gt;
&lt;br /&gt;
It allows to load table data separately from total data which highly increases page loading time.&lt;br /&gt;
&lt;br /&gt;
[[File:last_calls_total_line.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
When functionality is active click bottom table row in order to calculate total values.&lt;br /&gt;
&lt;br /&gt;
= CSV =&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Using the &amp;quot;Export to CSV&amp;quot; icon you can export your currently displayed calls into CSV&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= PDF =&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Using the &amp;quot;Export to PDF&amp;quot; icon you can export your currently displayed calls into PDF&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Call information representation =&lt;br /&gt;
&lt;br /&gt;
When call is initiated by the caller, at least one call leg is created - from user agent client(UAC) to user agent server(UAS) - usually called LEG A. Based on routing rules, call may be canceled(in case there is no suficcient funds, no appropriate rule etc.) or one more call leg may be created - from UAS to destination another UAC (LEG B). Many call legs may be created depending on routing rules and whether call to destination was succesfull. For instance:&amp;lt;br&amp;gt;&lt;br /&gt;
1. User A dials user B&amp;lt;br&amp;gt;&lt;br /&gt;
* call leg from user A to PBX is created&amp;lt;br&amp;gt;&lt;br /&gt;
* PBX can route call to user B&amp;lt;br&amp;gt;&lt;br /&gt;
* call leg from PBX to user B is created&amp;lt;br&amp;gt;&lt;br /&gt;
* when user B answer these two legs are bridged&amp;lt;br&amp;gt;&lt;br /&gt;
* there we have two bridged legs and one call&amp;lt;br&amp;gt;&lt;br /&gt;
2. User A dials user B.&amp;lt;br&amp;gt;&lt;br /&gt;
* call leg from user A to PBX is created&amp;lt;br&amp;gt;&lt;br /&gt;
* PBX cannot route call to destination and the call is canceled&amp;lt;br&amp;gt;&lt;br /&gt;
* there we have one failed call and one call leg (LEG A - OK, LEG B - FAILED)&amp;lt;br&amp;gt;&lt;br /&gt;
3. User A dials user B&amp;lt;br&amp;gt;&lt;br /&gt;
* call leg from user A to PBX is created&amp;lt;br&amp;gt;&lt;br /&gt;
* PBX can route call to user B through provider C&amp;lt;br&amp;gt;&lt;br /&gt;
* C fails to route the call&amp;lt;br&amp;gt;&lt;br /&gt;
* but PBX can route the call through another provider D&amp;lt;br&amp;gt;&lt;br /&gt;
* D succeeds in routing the call&amp;lt;br&amp;gt;&lt;br /&gt;
* user B answers&amp;lt;br&amp;gt;&lt;br /&gt;
* there we have three call legs, two of them were bridged and we would say that there was only one call which was connected.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If user A is interested only in calls made, information, about how many attempts were made to call user B, has no interest for him. Majority of users will be interested only in call duration, who terminated the call etc.&amp;lt;br&amp;gt;&lt;br /&gt;
Hence this is how call information is represented in call statistics, trying not to overwhelm users with too much technical details, only information about successful call is presented, ignoring details about made call legs (FAILED or NOT, etc). Provided you want to check the information on FAILED and connected call LEGS, you can use the [[Call Info]] page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Search usage =&lt;br /&gt;
&lt;br /&gt;
Destination field allows to search by Exact destination, by first digits and by matching pattern.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
*'''370123''' will return all calls where number '''is''' &amp;quot;370123&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
*'''370%''' will return all calls where number '''begins with''' &amp;quot;370&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
*'''%70%''' will return all calls where number '''contains''' &amp;quot;70&amp;quot;.&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;
* [[MOR_Manual#Troubleshooting | Troubleshooting]]&lt;br /&gt;
* [[MOR_Manual#Reporting | Reporting]]&lt;br /&gt;
* [[Call list]]&lt;br /&gt;
* [[Providers Calls]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=M4_Switch_Manual&amp;diff=18871</id>
		<title>M4 Switch Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=M4_Switch_Manual&amp;diff=18871"/>
		<updated>2015-01-29T11:28:38Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= General Info =&lt;br /&gt;
* [[M2 Switch | Introduction]]&lt;br /&gt;
* [[M2 Switch Stress Test | Stress Test]]&lt;br /&gt;
* [[M2 Roadmap| Roadmap]]&lt;br /&gt;
* [[M2 Network Architecture | Network Architecture]]&lt;br /&gt;
* [[M2 Supported Codecs | Supported Codecs]]&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;
* [[M2 Users | Users]]&lt;br /&gt;
* [[m2.conf]]&lt;br /&gt;
* [[Move MOR Database to M2]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Routing =&lt;br /&gt;
* [[M2 Routing Logic | Routing Logic]]&lt;br /&gt;
* [[M2 Regexp Examples|Regexp Examples]]&lt;br /&gt;
* [[M2 Origination Points | Origination Points (OP) ]]&lt;br /&gt;
* [[M2 Termination Points | Termination Points (TP) ]]&lt;br /&gt;
* [[M2 Routing Groups | Routing Groups (RG) ]]&lt;br /&gt;
* [[M2 Dial Peers | Dial Peers (DP) ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Billing =&lt;br /&gt;
&lt;br /&gt;
* [[Code Decks]]&lt;br /&gt;
* [[M2 Tariffs| Tariffs]]&lt;br /&gt;
* [[M2 Rates | Rates]]&lt;br /&gt;
* [[M2 Rate Notification | Rate Notifications]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Accounting =&lt;br /&gt;
* [[M2 Payments | Payments]]&lt;br /&gt;
* [[M2 Customer Invoices| Customer Invoices]]&lt;br /&gt;
* [[M2 Supplier Invoices| Supplier Invoices]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Reporting =&lt;br /&gt;
Reports, Stats&lt;br /&gt;
&lt;br /&gt;
* [[M2 Balance Report | Balance Report]]&lt;br /&gt;
* [[M2 Financial Status|Financial Status]]&lt;br /&gt;
* [[M2 CSV Export | CSV Export]]&lt;br /&gt;
* [[M2 reports examples | reports examples]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Maintenance =&lt;br /&gt;
* [[M2 Access Levels | Access Levels]]&lt;br /&gt;
* [[M2 Hangupcause Codes | Hangupcause Codes]]&lt;br /&gt;
* [[M2 Warning Balance | Warning Balance]]&lt;br /&gt;
* [[M2 Alerts | Alerts]]&lt;br /&gt;
* [[Freeswitch]]&lt;br /&gt;
** [https://wiki.freeswitch.org/wiki/Codecs#Transcodable_codecs Freeswitch Codecs]&lt;br /&gt;
** [https://wiki.freeswitch.org/wiki/Codec_Negotiation Freeswitch Codec Negotiation]&lt;br /&gt;
* [[M2 Number Pools|Number Pools]]&lt;br /&gt;
* [[M2 Directions | Directions]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= User Portal =&lt;br /&gt;
* [[M2 User Dashboard | Dashboard]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tutorials = &lt;br /&gt;
* [[M2 How to make first call | How to make first call]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Callback_Addon&amp;diff=18827</id>
		<title>Callback Addon</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Callback_Addon&amp;diff=18827"/>
		<updated>2015-01-19T13:34:25Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Callback Using ANI (Automatic Number Identification) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!---This functionality is available from MOR 11---&amp;gt;&lt;br /&gt;
= About =&lt;br /&gt;
'''Callback''' functionality comes as Addon and must be purchased separately.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Definition = &lt;br /&gt;
&lt;br /&gt;
From [http://en.wikipedia.org/wiki/Callback_%28telecommunications%29 Wikipedia], the free encyclopedia&amp;lt;br&amp;gt;&lt;br /&gt;
In telecommunications, a callback (also written as call-back) occurs when the originator of a call is immediately called back in a second call as a response.&lt;br /&gt;
&lt;br /&gt;
In order to use a callback service, a subscriber is allocated a unique number, which must first be dialled in order to trigger a return call. This is known as a Direct Inbound Dialing (DID) number (Access Number). Where Caller ID is available, it may be possible to use the same DID number for many different subscribers, as the callback system will be able to recognize each subscriber's registered number.&lt;br /&gt;
&lt;br /&gt;
On hearing a ringing tone for a few seconds, the subscriber simply hangs up and awaits the callback. On receiving this, usually within a few seconds, the customer picks up the phone and dials the required number.&lt;br /&gt;
&lt;br /&gt;
The cost of making a telephone call via callback consists of two parts, as the caller is effectively paying for an outbound and an inbound call at the same time. If it costs 20 US cents a minute to call Nigeria from the US, and 8 cents a minute to call Spain from the US, then the caller will pay a total of 28 US cents a minute.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you want to use Callback, make sure your DID provider sends correct CallerID information. Without CallerID, you will not be able to use Callback.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Callback Settings =&lt;br /&gt;
&lt;br /&gt;
Go to: '''ADDONS''' -&amp;gt; '''Callback''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Callback settings.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If ''Send Source as CID'' is selected an additional field '''WEB Callback CID'' appears. If it is left empty default CID will be used.&lt;br /&gt;
&lt;br /&gt;
* '''Active for users?''' - set if Callback is active for users&lt;br /&gt;
* '''Max Retries''' - number of maximum retries&lt;br /&gt;
* '''Retry Time''' - time of waiting until the retrying of the Call&lt;br /&gt;
* '''Wait Time''' - time of waiting until the answer of the Call&lt;br /&gt;
* '''Callback Server''' - server though which will go Callback Calls&lt;br /&gt;
* &amp;lt;!---from X5---&amp;gt; - '''Busy IVR''' - when a User receives the leg A callback and the leg B destination is busy this IVR will be played before hanging up leg A&lt;br /&gt;
* &amp;lt;!---from X5---&amp;gt; - '''Failed IVR''' - when a User dials an unreachable number, this IVR will be played before hanging up the call. &lt;br /&gt;
* '''Send Device CID''' - send Device CallerID number&lt;br /&gt;
* '''Send Source as CID''' - send Source as CallerID&lt;br /&gt;
* '''Callback CID''' - send another CallerID&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Common Callback diagram = &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:common_callback_diagram.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Implementation in MOR = &lt;br /&gt;
&lt;br /&gt;
Callback in MOR is implemented in very simple way. It's enough to tell the system the Access Number (DID) and the way Callback should act. All of this will be described in following paragraphs.&lt;br /&gt;
&lt;br /&gt;
Supported Callback methods in MOR, listed by initialization method (which triggers Callback), are:&lt;br /&gt;
&lt;br /&gt;
* Call&lt;br /&gt;
* [[WEB Callback | Over GUI]]&lt;br /&gt;
* [[Callback over Email | Over Email]]&lt;br /&gt;
* [[MOR API callback init| Over API]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Who pays for not authenticated call? =&lt;br /&gt;
&lt;br /&gt;
First of all, by the nature of Callback it is important to know that before calling back to the user, the system does not know who the user is  (when not using ANI). For example, it does not know whether the user is a client, whether he has an account in the system, and so on.&lt;br /&gt;
&lt;br /&gt;
This means that when the system makes the callback to the user and the user picks up, the call is ANSWERED, but the system still does not know who the user is. Let's say the user  unsuccessfully tries to enter a PIN several times. Then he hangs up. The call is ANSWERED. Does the user pay for this call? No. Who pays? You, as the owner of the system. It's sad, but true.&lt;br /&gt;
&lt;br /&gt;
If system recognizes the User which initiates callback (using Calling Cards Pinless or ANI/PIN), then this User will be charged for Callback initiation call.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Callback User, Callback Device and Callback Tariff =&lt;br /&gt;
&lt;br /&gt;
In order to keep track of Callback calls, you need to configure MOR in the proper way. For this we need:&lt;br /&gt;
&lt;br /&gt;
# Callback User&lt;br /&gt;
# Callback Device&lt;br /&gt;
# Callback Tariff&lt;br /&gt;
&lt;br /&gt;
'''Callback User''' is the user who will pay for answered but not authenticated calls to the user. 100% of the time, this user is the system owner. But creating a new user in MOR lets you keep track of all Callback activity in your system. The other reason to have Callback User (and not use the System Admin account) is the ability to create and assign a Callback Tariff to this user.&lt;br /&gt;
&lt;br /&gt;
'''Callback Device''' is the necessary entity in MOR which will actually 'make' callback calls to user. The type and other details do not matter. This device is pure virtual.&lt;br /&gt;
&lt;br /&gt;
'''Callback Tariff''' – a separate tariff which should be assigned to the Callback User. In this tariff you enter rates only to those destinations from which you expect the user will make an Initiation Call. This is important! Make sure you do not have some Inmarsat rates defined here. Guess how much you will pay if the user initiates a callback from Inmarsat and, when he gets the call, enters the PIN several times incorrectly and hangs up? In short, this tariff decides from which destinations you allow users to initiate callback.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: '''LEG A''' (system calls back to initiator) is '''charged by User or Calling Card tariff''' if User or Calling card was recognized. If User or Calling Card was '''not recognized''', System owner will be charged for a '''LEG A'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Types of Callback in MOR =&lt;br /&gt;
&lt;br /&gt;
Callback in MOR can be classified three ways depending on how the user is authenticated/authorized:&lt;br /&gt;
&lt;br /&gt;
# By User Device's PIN.&lt;br /&gt;
# Using ANI (Automatic Number Identification).&lt;br /&gt;
# By the Calling Card's Number/PIN (or just the PIN).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Callback with Device's PIN authentication/authorization =&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:callback_with_pin_auth_schema.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main part here is that user gets authenticated/authorized when he enters Device PIN. System checks for such PIN in database and if user is found – user can proceed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Callback Using ANI (Automatic Number Identification) = &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Callback+ANI_new_Scheme20150109.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This way of Callback is extended User auth. by PIN Callback. In order to ask user for Device's PIN system checks user's CallerID (ANI). If such CallerID is found in database – user gets authenticated/authorized and can proceed entering destination. If CallerID is not found – Callback is not initiated to User.&lt;br /&gt;
&lt;br /&gt;
'''Attention! It is very easy to fake CallerID so be careful when you are enabling Callback with ANI. Anybody can put anybodies CallerID and use your service for free.'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Callback By Calling Card's Number/PIN (or only PIN) =&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:callback_with_cc_schema.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This type of Callback lets user enter Calling Card's Number/PIN to get authenticated/authorized. System checks for such Calling Card in database. If call is made – it is assigned to particular Calling Card.&lt;br /&gt;
&lt;br /&gt;
Rule about Users and Cards:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
'''Users and cards are not related at all. That means:'''&lt;br /&gt;
&lt;br /&gt;
# '''User (as entity in MOR) can't have Cards.'''&lt;br /&gt;
# '''Card (as entity in MOR) can't belong to some User.'''&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Setting Callback in MOR=&lt;br /&gt;
&lt;br /&gt;
In order to setup Callback in the MOR you need:&lt;br /&gt;
&lt;br /&gt;
# Callback User&lt;br /&gt;
# Callback Device&lt;br /&gt;
# Callback Tariff&lt;br /&gt;
# Access Number (DID)&lt;br /&gt;
# Calling Card or Auth. by PIN Dial Plan&lt;br /&gt;
&lt;br /&gt;
The work flow is as follows:&lt;br /&gt;
&lt;br /&gt;
# Create Callback User&lt;br /&gt;
# Create Callback Device to the Callback User&lt;br /&gt;
# Create Callback Tariff and fill it with rates to destinations from which you want to allow users to initiate callback&lt;br /&gt;
# Assign Callback Tariff to Callback User&lt;br /&gt;
# Make sure you have Calling Card or Auth. by PIN Dial Plan&lt;br /&gt;
# Create Callback Dial Plan and assign Calling Card or Auth. by PIN Dial-Plan to Callback Dial Plan&lt;br /&gt;
# Assign Callback Dial Plan to some DID&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Callback Hangup Cause==&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
Starting from MOR 10 you can change the Hangup Cause Code which will be used then dropping the call before calling back.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:Callback_dial_plan_hangup_cause_code.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:Callback_dial_plan_hangup_cause_code2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''MOR supports these Hangup Cause Codes:'''&lt;br /&gt;
        &lt;br /&gt;
*1 unallocated number / 404 Not Found&lt;br /&gt;
*2 no route to network / 404 Not Found&lt;br /&gt;
*3 no route to destination / 404 Not Found   &lt;br /&gt;
*17 user busy / 486 Busy here&lt;br /&gt;
*18 no user responding / 408 Request Timeout&lt;br /&gt;
*19 no answer from the user / 480 Temporarily unavailable&lt;br /&gt;
*20 subscriber absent / 480 Temporarily unavailable&lt;br /&gt;
*21 call rejected / 403 Forbidden&lt;br /&gt;
*22 number changed (w/ diagnostic) / 301 Moved Permanently&lt;br /&gt;
*23 redirection to new destination / 410 Gone&lt;br /&gt;
*26 non-selected user clearing / 404 Not Found  &lt;br /&gt;
*27 destination out of order / 502 Bad Gateway&lt;br /&gt;
*28 address incomplete / 484 Address incomplete&lt;br /&gt;
*29 facility rejected / 501 Not implemented&lt;br /&gt;
*31 normal unspecified / 480 Temporarily unavailable&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
* [[WEB Callback]]&lt;br /&gt;
* [[Callback over Email]]&lt;br /&gt;
* [[MOR API callback init | API Callback_init]]&lt;br /&gt;
* [[Callback setup example]]&lt;br /&gt;
* [[217 Callback not initiated because device not found by ANI]]&lt;br /&gt;
* [[Can't setup callback]]&lt;br /&gt;
* [[Callback and Calling Cards]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Callback_Addon&amp;diff=18826</id>
		<title>Callback Addon</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Callback_Addon&amp;diff=18826"/>
		<updated>2015-01-19T13:33:43Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Callback Using ANI (Automatic Number Identification) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!---This functionality is available from MOR 11---&amp;gt;&lt;br /&gt;
= About =&lt;br /&gt;
'''Callback''' functionality comes as Addon and must be purchased separately.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Definition = &lt;br /&gt;
&lt;br /&gt;
From [http://en.wikipedia.org/wiki/Callback_%28telecommunications%29 Wikipedia], the free encyclopedia&amp;lt;br&amp;gt;&lt;br /&gt;
In telecommunications, a callback (also written as call-back) occurs when the originator of a call is immediately called back in a second call as a response.&lt;br /&gt;
&lt;br /&gt;
In order to use a callback service, a subscriber is allocated a unique number, which must first be dialled in order to trigger a return call. This is known as a Direct Inbound Dialing (DID) number (Access Number). Where Caller ID is available, it may be possible to use the same DID number for many different subscribers, as the callback system will be able to recognize each subscriber's registered number.&lt;br /&gt;
&lt;br /&gt;
On hearing a ringing tone for a few seconds, the subscriber simply hangs up and awaits the callback. On receiving this, usually within a few seconds, the customer picks up the phone and dials the required number.&lt;br /&gt;
&lt;br /&gt;
The cost of making a telephone call via callback consists of two parts, as the caller is effectively paying for an outbound and an inbound call at the same time. If it costs 20 US cents a minute to call Nigeria from the US, and 8 cents a minute to call Spain from the US, then the caller will pay a total of 28 US cents a minute.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you want to use Callback, make sure your DID provider sends correct CallerID information. Without CallerID, you will not be able to use Callback.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Callback Settings =&lt;br /&gt;
&lt;br /&gt;
Go to: '''ADDONS''' -&amp;gt; '''Callback''':&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Callback settings.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
If ''Send Source as CID'' is selected an additional field '''WEB Callback CID'' appears. If it is left empty default CID will be used.&lt;br /&gt;
&lt;br /&gt;
* '''Active for users?''' - set if Callback is active for users&lt;br /&gt;
* '''Max Retries''' - number of maximum retries&lt;br /&gt;
* '''Retry Time''' - time of waiting until the retrying of the Call&lt;br /&gt;
* '''Wait Time''' - time of waiting until the answer of the Call&lt;br /&gt;
* '''Callback Server''' - server though which will go Callback Calls&lt;br /&gt;
* &amp;lt;!---from X5---&amp;gt; - '''Busy IVR''' - when a User receives the leg A callback and the leg B destination is busy this IVR will be played before hanging up leg A&lt;br /&gt;
* &amp;lt;!---from X5---&amp;gt; - '''Failed IVR''' - when a User dials an unreachable number, this IVR will be played before hanging up the call. &lt;br /&gt;
* '''Send Device CID''' - send Device CallerID number&lt;br /&gt;
* '''Send Source as CID''' - send Source as CallerID&lt;br /&gt;
* '''Callback CID''' - send another CallerID&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Common Callback diagram = &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:common_callback_diagram.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Implementation in MOR = &lt;br /&gt;
&lt;br /&gt;
Callback in MOR is implemented in very simple way. It's enough to tell the system the Access Number (DID) and the way Callback should act. All of this will be described in following paragraphs.&lt;br /&gt;
&lt;br /&gt;
Supported Callback methods in MOR, listed by initialization method (which triggers Callback), are:&lt;br /&gt;
&lt;br /&gt;
* Call&lt;br /&gt;
* [[WEB Callback | Over GUI]]&lt;br /&gt;
* [[Callback over Email | Over Email]]&lt;br /&gt;
* [[MOR API callback init| Over API]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Who pays for not authenticated call? =&lt;br /&gt;
&lt;br /&gt;
First of all, by the nature of Callback it is important to know that before calling back to the user, the system does not know who the user is  (when not using ANI). For example, it does not know whether the user is a client, whether he has an account in the system, and so on.&lt;br /&gt;
&lt;br /&gt;
This means that when the system makes the callback to the user and the user picks up, the call is ANSWERED, but the system still does not know who the user is. Let's say the user  unsuccessfully tries to enter a PIN several times. Then he hangs up. The call is ANSWERED. Does the user pay for this call? No. Who pays? You, as the owner of the system. It's sad, but true.&lt;br /&gt;
&lt;br /&gt;
If system recognizes the User which initiates callback (using Calling Cards Pinless or ANI/PIN), then this User will be charged for Callback initiation call.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Callback User, Callback Device and Callback Tariff =&lt;br /&gt;
&lt;br /&gt;
In order to keep track of Callback calls, you need to configure MOR in the proper way. For this we need:&lt;br /&gt;
&lt;br /&gt;
# Callback User&lt;br /&gt;
# Callback Device&lt;br /&gt;
# Callback Tariff&lt;br /&gt;
&lt;br /&gt;
'''Callback User''' is the user who will pay for answered but not authenticated calls to the user. 100% of the time, this user is the system owner. But creating a new user in MOR lets you keep track of all Callback activity in your system. The other reason to have Callback User (and not use the System Admin account) is the ability to create and assign a Callback Tariff to this user.&lt;br /&gt;
&lt;br /&gt;
'''Callback Device''' is the necessary entity in MOR which will actually 'make' callback calls to user. The type and other details do not matter. This device is pure virtual.&lt;br /&gt;
&lt;br /&gt;
'''Callback Tariff''' – a separate tariff which should be assigned to the Callback User. In this tariff you enter rates only to those destinations from which you expect the user will make an Initiation Call. This is important! Make sure you do not have some Inmarsat rates defined here. Guess how much you will pay if the user initiates a callback from Inmarsat and, when he gets the call, enters the PIN several times incorrectly and hangs up? In short, this tariff decides from which destinations you allow users to initiate callback.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: '''LEG A''' (system calls back to initiator) is '''charged by User or Calling Card tariff''' if User or Calling card was recognized. If User or Calling Card was '''not recognized''', System owner will be charged for a '''LEG A'''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Types of Callback in MOR =&lt;br /&gt;
&lt;br /&gt;
Callback in MOR can be classified three ways depending on how the user is authenticated/authorized:&lt;br /&gt;
&lt;br /&gt;
# By User Device's PIN.&lt;br /&gt;
# Using ANI (Automatic Number Identification).&lt;br /&gt;
# By the Calling Card's Number/PIN (or just the PIN).&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Callback with Device's PIN authentication/authorization =&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:callback_with_pin_auth_schema.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main part here is that user gets authenticated/authorized when he enters Device PIN. System checks for such PIN in database and if user is found – user can proceed.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Callback Using ANI (Automatic Number Identification) = &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Callback+ANI_new_Scheme20150109.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This way of Callback is extended User auth. by PIN Callback. In order to ask user for Device's PIN system checks user's CallerID (ANI). If such CallerID is found in database – user gets authenticated/authorized and can proceed entering destination. If CallerID is not found – user is asked to enter his Device's PIN number.&lt;br /&gt;
&lt;br /&gt;
'''Attention! It is very easy to fake CallerID so be careful when you are enabling Callback with ANI. Anybody can put anybodies CallerID and use your service for free.'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Callback By Calling Card's Number/PIN (or only PIN) =&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:callback_with_cc_schema.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This type of Callback lets user enter Calling Card's Number/PIN to get authenticated/authorized. System checks for such Calling Card in database. If call is made – it is assigned to particular Calling Card.&lt;br /&gt;
&lt;br /&gt;
Rule about Users and Cards:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;&lt;br /&gt;
'''Users and cards are not related at all. That means:'''&lt;br /&gt;
&lt;br /&gt;
# '''User (as entity in MOR) can't have Cards.'''&lt;br /&gt;
# '''Card (as entity in MOR) can't belong to some User.'''&lt;br /&gt;
&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Setting Callback in MOR=&lt;br /&gt;
&lt;br /&gt;
In order to setup Callback in the MOR you need:&lt;br /&gt;
&lt;br /&gt;
# Callback User&lt;br /&gt;
# Callback Device&lt;br /&gt;
# Callback Tariff&lt;br /&gt;
# Access Number (DID)&lt;br /&gt;
# Calling Card or Auth. by PIN Dial Plan&lt;br /&gt;
&lt;br /&gt;
The work flow is as follows:&lt;br /&gt;
&lt;br /&gt;
# Create Callback User&lt;br /&gt;
# Create Callback Device to the Callback User&lt;br /&gt;
# Create Callback Tariff and fill it with rates to destinations from which you want to allow users to initiate callback&lt;br /&gt;
# Assign Callback Tariff to Callback User&lt;br /&gt;
# Make sure you have Calling Card or Auth. by PIN Dial Plan&lt;br /&gt;
# Create Callback Dial Plan and assign Calling Card or Auth. by PIN Dial-Plan to Callback Dial Plan&lt;br /&gt;
# Assign Callback Dial Plan to some DID&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Callback Hangup Cause==&lt;br /&gt;
&amp;lt;!---This functionality is available from MOR 10---&amp;gt;&lt;br /&gt;
Starting from MOR 10 you can change the Hangup Cause Code which will be used then dropping the call before calling back.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:Callback_dial_plan_hangup_cause_code.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[image:Callback_dial_plan_hangup_cause_code2.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''MOR supports these Hangup Cause Codes:'''&lt;br /&gt;
        &lt;br /&gt;
*1 unallocated number / 404 Not Found&lt;br /&gt;
*2 no route to network / 404 Not Found&lt;br /&gt;
*3 no route to destination / 404 Not Found   &lt;br /&gt;
*17 user busy / 486 Busy here&lt;br /&gt;
*18 no user responding / 408 Request Timeout&lt;br /&gt;
*19 no answer from the user / 480 Temporarily unavailable&lt;br /&gt;
*20 subscriber absent / 480 Temporarily unavailable&lt;br /&gt;
*21 call rejected / 403 Forbidden&lt;br /&gt;
*22 number changed (w/ diagnostic) / 301 Moved Permanently&lt;br /&gt;
*23 redirection to new destination / 410 Gone&lt;br /&gt;
*26 non-selected user clearing / 404 Not Found  &lt;br /&gt;
*27 destination out of order / 502 Bad Gateway&lt;br /&gt;
*28 address incomplete / 484 Address incomplete&lt;br /&gt;
*29 facility rejected / 501 Not implemented&lt;br /&gt;
*31 normal unspecified / 480 Temporarily unavailable&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=See also=&lt;br /&gt;
* [[WEB Callback]]&lt;br /&gt;
* [[Callback over Email]]&lt;br /&gt;
* [[MOR API callback init | API Callback_init]]&lt;br /&gt;
* [[Callback setup example]]&lt;br /&gt;
* [[217 Callback not initiated because device not found by ANI]]&lt;br /&gt;
* [[Can't setup callback]]&lt;br /&gt;
* [[Callback and Calling Cards]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=File:Callback%2BANI_new_Scheme20150109.png&amp;diff=18825</id>
		<title>File:Callback+ANI new Scheme20150109.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=File:Callback%2BANI_new_Scheme20150109.png&amp;diff=18825"/>
		<updated>2015-01-19T13:32:55Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Extending_Fail2Ban_configuration&amp;diff=18793</id>
		<title>Extending Fail2Ban configuration</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Extending_Fail2Ban_configuration&amp;diff=18793"/>
		<updated>2015-01-05T08:37:30Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Extending Fail2Ban to send you an email */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About = &lt;br /&gt;
This page explains how to tune/extend Fail2Ban the right way, so that Kolmisoft update scripts would not overwrite your changes.&lt;br /&gt;
&lt;br /&gt;
Please note that in order for these extended rules to work Fail2Ban has to be updated. You can update Fail2Ban by running the following script:&lt;br /&gt;
&lt;br /&gt;
/usr/src/mor/sh_scripts/fail2ban_install.sh&lt;br /&gt;
&lt;br /&gt;
== Fail2Ban configuration options explained ==&lt;br /&gt;
===/etc/fail2ban/jail.conf===&lt;br /&gt;
&lt;br /&gt;
For example we will take HGC 200 ban configurations which by default ban IP's sending unauthenticated (devices are not registered to MOR system and IP based authentication is not selected) calls after 20 attempts/ 1 minute:&lt;br /&gt;
&lt;br /&gt;
 [ast-hgc-200]&lt;br /&gt;
 enabled  = true           &lt;br /&gt;
 filter   = asterisk_hgc_200     &lt;br /&gt;
 action   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all]&lt;br /&gt;
           sendmail-banned[name=Asterisk_HGC_200]&lt;br /&gt;
 logpath  = /var/log/asterisk/messages&lt;br /&gt;
 maxretry = 20&lt;br /&gt;
 bantime = -1&lt;br /&gt;
&lt;br /&gt;
'''Options explained'''&lt;br /&gt;
&lt;br /&gt;
'''enabled'''  = {true,false}  - filter enabled or not.&lt;br /&gt;
&lt;br /&gt;
'''filter'''   = asterisk_hgc_200    # Filter name. This name matches file /etc/fail2ban/filter.d/asterisk_hgc_200.conf . This file structure is very simple and is self explaining. It contains patterns the fail2ban has to scan in log files. You have to be able read / write perl regexp syntax in order to modify this file.&lt;br /&gt;
&lt;br /&gt;
'''action'''   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all] # Action configuration, it matches file /etc/fail2ban/action.d/iptables-allports&lt;br /&gt;
&lt;br /&gt;
sendmail-banned[name=Asterisk_HGC_200] # Action configuration, it matches file /etc/fail2ban/action.d/sendmail-banned&lt;br /&gt;
&lt;br /&gt;
'''logpath'''  = /var/log/asterisk/messages # Which log has to be scanned by filter&lt;br /&gt;
&lt;br /&gt;
'''maxretry''' = 20 # How many attempts we tolerate per minute. If there are more entries in log file than defined maxretry value = actions configuration files defined above are launched.&lt;br /&gt;
&lt;br /&gt;
'''bantime''' = -1 # &amp;lt;0 - ban will be forever (till you restart fail2ban/system). &amp;gt;0 - seconds.&lt;br /&gt;
&lt;br /&gt;
== Writing your own modifications for Fail2Ban==&lt;br /&gt;
&lt;br /&gt;
In order Kolmisoft update scripts would not overwrite your changes - you have to put it in file named the same way except the extension - it has to be named &amp;quot;.local&amp;quot; at the end instead of &amp;quot;.conf&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For example - if you would like to modify main configuration jail.conf - you would have to create your own configuration file named jail.local. Put all your changes there and Fail2Ban will use your configuration instead of Kolmisoft.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Important - you don't have to copy the whole jail.conf file to jail.local, you can just put there only one section you would like to behave differently. For example - default Kolmisoft Fail2Ban configuration file jail.conf has these rules:&lt;br /&gt;
&lt;br /&gt;
 [ast-hgc-200]&lt;br /&gt;
 enabled  = true           &lt;br /&gt;
 filter   = asterisk_hgc_200     &lt;br /&gt;
 action   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all]&lt;br /&gt;
           sendmail-banned[name=Asterisk_HGC_200]&lt;br /&gt;
 logpath  = /var/log/asterisk/messages&lt;br /&gt;
 maxretry = 20&lt;br /&gt;
 bantime = -1&lt;br /&gt;
&lt;br /&gt;
If you are an experienced user and you know that there should not be any unauthenticated calls in your system - it is advised to modify this configuration to look like this:&lt;br /&gt;
&lt;br /&gt;
 [ast-hgc-200]&lt;br /&gt;
 enabled  = true           &lt;br /&gt;
 filter   = asterisk_hgc_200     &lt;br /&gt;
 action   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all]&lt;br /&gt;
           sendmail-banned[name=Asterisk_HGC_200]&lt;br /&gt;
&lt;br /&gt;
 logpath  = /var/log/asterisk/messages&lt;br /&gt;
 maxretry = 1&lt;br /&gt;
 bantime = -1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to put this configuration to '''/etc/fail2ban/jail.local'''. This modification will ensure, that the offender will get ban from the first try.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Important'''&lt;br /&gt;
&lt;br /&gt;
Every Fail2Ban configuration can be extended the same way - just create another file with same name with &amp;quot;.local&amp;quot; as file extension.&lt;br /&gt;
&lt;br /&gt;
= Extending Fail2Ban to send you an email =&lt;br /&gt;
&lt;br /&gt;
In order Fail2Ban would send you an email on various events you can extend existing Fail2Ban rules by creating jail.local file and adding modified configuration. For example in order on HGC 200 attack you would get an email - you should extend the configuration of jail.local like this:&lt;br /&gt;
 [ast-hgc-200]&lt;br /&gt;
 enabled  = true           &lt;br /&gt;
 filter   = asterisk_hgc_200     &lt;br /&gt;
 action   = iptables-allports[name=AST_HGC_200, port=5060, protocol=all]&lt;br /&gt;
           sendmail-banned[name=Asterisk_HGC_200]&lt;br /&gt;
           sendmail[name=Asterisk_HGC_200, dest=your@mail.com]&lt;br /&gt;
 logpath  = /var/log/asterisk/messages&lt;br /&gt;
 maxretry = 1&lt;br /&gt;
 bantime = -1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The important line here is this: '''sendmail[name=Asterisk_HGC_200, dest=your@mail.com]'''&lt;br /&gt;
&lt;br /&gt;
Or, if you need modified email template, you need to modifye the action '''senmail-banned''' or the one you use for specific rule. In our Example it is '''sendmail-banned'''.&lt;br /&gt;
It can be modified in /etc/fail2ban/action.d/sendmail-banned. The exact function is '''actionban''':&lt;br /&gt;
&lt;br /&gt;
 actionban = printf %%b &amp;quot;Subject: [Fail2Ban] &amp;lt;name&amp;gt;: banned &amp;lt;ip&amp;gt;&lt;br /&gt;
             From: Fail2Ban &amp;lt;&amp;lt;sender&amp;gt;&amp;gt;&lt;br /&gt;
             To: &amp;lt;dest&amp;gt;\n&lt;br /&gt;
             Hi,\n&lt;br /&gt;
             The IP &amp;lt;ip&amp;gt; has just been banned by Fail2Ban after&lt;br /&gt;
             &amp;lt;failures&amp;gt; attempts against &amp;lt;name&amp;gt;.\n\n&lt;br /&gt;
             Here are more information about &amp;lt;ip&amp;gt;:\n&lt;br /&gt;
             `/usr/bin/whois &amp;lt;ip&amp;gt;`\n&lt;br /&gt;
             Regards,\n&lt;br /&gt;
             Fail2Ban&amp;quot; | /usr/sbin/sendmail -f &amp;lt;sender&amp;gt; &amp;lt;dest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end of file, '''DO NOT FORGET''' to change the destination email in same file:&lt;br /&gt;
&lt;br /&gt;
 # Defaut name of the chain&lt;br /&gt;
 #&lt;br /&gt;
 name = default&lt;br /&gt;
 # Destination/Addressee of the mail&lt;br /&gt;
 #&lt;br /&gt;
 dest = your@mail.com&lt;br /&gt;
 # Sender of the mail&lt;br /&gt;
 #&lt;br /&gt;
 sender = valid@senderMail.com&lt;br /&gt;
&lt;br /&gt;
Note, if you use action (like sendmail-banned which will send the email) you do not need the '''sendmail[name=Asterisk_HGC_200, dest=your@mail.com]''' in a rule anymore.&lt;br /&gt;
After any fail2ban configuration changes, restart is required to apply changes.&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_Quickforwards_update&amp;diff=18777</id>
		<title>MOR API Quickforwards update</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_Quickforwards_update&amp;diff=18777"/>
		<updated>2014-12-22T07:36:53Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= NOTE: Available from MOR X5 =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
[[MOR API]] Quickforward DID edit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''User''' - can edit his Quickforward DID which he is able to use.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X5''' call: '''api/quickforwards_did_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;
===Parameters===  &lt;br /&gt;
&lt;br /&gt;
* u - username for authentication. '''Required'''.&lt;br /&gt;
* did - DID number which will be edited. '''Required'''.&lt;br /&gt;
* forward_to - did, admin assigned you, will be forwarded to forward_to number.&lt;br /&gt;
* description - new description.&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''' (if setting '''Disable hash checking''' is not checked). &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://192.168.0.40/billing/api/quickforwards_did_update?u=USERNAME&amp;amp;did=DID&amp;amp;forward_to=NUMBER&amp;amp;description=DESCRIPTION&amp;amp;hash=HASH&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
We have ''username = admin'', ''did=37060503666'', ''forward_to=37066603777'', ''description=abyss'' and ''API Secret Key = 123456''&lt;br /&gt;
&lt;br /&gt;
You send:&lt;br /&gt;
&lt;br /&gt;
 http://127.0.0.1/billing/api/quickforwards_did_update?u=admin&amp;amp;did=37060503666&amp;amp;forward_to=37066603777&amp;amp;description=abyss&amp;amp;hash=b12dbb15d59356af0fd75dc413ebd07a5b852d15&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;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success:'''&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;new_quickforward_did&amp;gt;&lt;br /&gt;
    &amp;lt;did&amp;gt;37060503666&amp;lt;/did&amp;gt;&lt;br /&gt;
    &amp;lt;forward_to&amp;gt;37066603777&amp;lt;/forward_to&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;abyss&amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;/new_quickforward_did&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''Errors:'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;DID was not found&amp;lt;/error&amp;gt; – Specified DID was not found.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to use Quickforwards&amp;lt;/error&amp;gt; – Such username does not exist in the database or it was not specified.&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;User was not found&amp;lt;/error&amp;gt; – User was not found using username. Use correct username.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_Quickforwards_update&amp;diff=18776</id>
		<title>MOR API Quickforwards update</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_Quickforwards_update&amp;diff=18776"/>
		<updated>2014-12-22T07:35:49Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= NOTE: Available from MOR X5 =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
[[MOR API]] Quickforward DID edit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''User''' - can edit his Quickforward DID which he is able to use.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X5''' call: '''api/quickforwards_did_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;
===Parameters===  &lt;br /&gt;
&lt;br /&gt;
* u - username for authentication. '''Required'''.&lt;br /&gt;
* did - DID number which will be edited. '''Required'''.&lt;br /&gt;
* forward_to - did, admin assigned you, will be forwarded to forward_to number.&lt;br /&gt;
* description - new description.&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''' (if setting '''Disable hash checking''' is not checked). &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://192.168.0.40/billing/api/quickforwards_did_update?u=USERNAME&amp;amp;did=DID&amp;amp;forward_to=NUMBER&amp;amp;description=DESCRIPTION&amp;amp;hash=HASH&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
We have ''username = admin'', ''did=37060503666'', ''forward_to=37066603777'', ''description=abyss'' and ''API Secret Key = 123456''&lt;br /&gt;
&lt;br /&gt;
You send:&lt;br /&gt;
&lt;br /&gt;
 http://127.0.0.1/billing/api/quickforwards_did_update?u=admin&amp;amp;did=37060503666&amp;amp;forward_to=37066603777&amp;amp;description=abyss&amp;amp;hash=b12dbb15d59356af0fd75dc413ebd07a5b852d15&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;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success:'''&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;new_quickforward_did&amp;gt;&lt;br /&gt;
    &amp;lt;did&amp;gt;37060503666&amp;lt;/did&amp;gt;&lt;br /&gt;
    &amp;lt;forward_to&amp;gt;37066603777&amp;lt;/forward_to&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;abyss&amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;/new_quickforward_did&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''Errors:'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;DID was not found&amp;lt;/error&amp;gt; – Specified DID was not found.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to use Quickforwards&amp;lt;/error&amp;gt; – Such username does not exist in the database or it was not specified.&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;User was not found&amp;lt;/error&amp;gt; – User was not found using user_id. Use correct user_id.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_Quickforwards_update&amp;diff=18775</id>
		<title>MOR API Quickforwards update</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_Quickforwards_update&amp;diff=18775"/>
		<updated>2014-12-22T07:08:26Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= NOTE: Available from MOR X5 =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
[[MOR API]] Quickforward DID edit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''User''' - can edit his Quickforward DID which he is able to use.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X5''' call: '''api/quickforwards_did_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;
===Parameters===  &lt;br /&gt;
&lt;br /&gt;
* u - username for authentication. '''Required'''.&lt;br /&gt;
* did - DID number which will be edited. '''Required'''.&lt;br /&gt;
* forward_to - did, admin assigned you, will be forwarded to forward_to number.&lt;br /&gt;
* description - new description.&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''' (if setting '''Disable hash checking''' is not checked). &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/quickforwards_dids_update?username=USERNAME&amp;amp;did=DID&amp;amp;forward_to=NUMBER&amp;amp;description=DESCRIPTION&amp;amp;hash=HASH&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
We have ''username = admin'', ''did=37060503666'', ''forward_to=37066603777'', ''description=abyss'' and ''API Secret Key = 123456''&lt;br /&gt;
&lt;br /&gt;
You send:&lt;br /&gt;
&lt;br /&gt;
 http://127.0.0.1/billing/api/quickforwards_dids_update?u=admin&amp;amp;did=37060503666&amp;amp;forward_to=37066603777&amp;amp;description=abyss&amp;amp;hash=b12dbb15d59356af0fd75dc413ebd07a5b852d15&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;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success:'''&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;new_quickforward_did&amp;gt;&lt;br /&gt;
    &amp;lt;did&amp;gt;37060503666&amp;lt;/did&amp;gt;&lt;br /&gt;
    &amp;lt;forward_to&amp;gt;37066603777&amp;lt;/forward_to&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;abyss&amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;/new_quickforward_did&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''Errors:'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;DID was not found&amp;lt;/error&amp;gt; – Specified DID was not found.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to use Quickforwards&amp;lt;/error&amp;gt; – Such username does not exist in the database or it was not specified.&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;User was not found&amp;lt;/error&amp;gt; – User was not found using user_id. Use correct user_id.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_Quickforwards_update&amp;diff=18774</id>
		<title>MOR API Quickforwards update</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_Quickforwards_update&amp;diff=18774"/>
		<updated>2014-12-22T07:07:55Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Request */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= NOTE: Available from MOR X5 =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
[[MOR API]] Quickforward DID edit.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''User''' - can edit his Quickforward DID which he is able to use.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
* From '''MOR X5''' call: '''api/quickforwards_did_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;
===Parameters===  &lt;br /&gt;
&lt;br /&gt;
* u - username for authentication. '''Required'''.&lt;br /&gt;
* did - DID number which will be edited. '''Required'''.&lt;br /&gt;
* forward_to - did, admin assigned you, will be forwarded to forward_to number.&lt;br /&gt;
* description - new description.&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''' (if setting '''Disable hash checking''' is not checked). &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Request===&lt;br /&gt;
&lt;br /&gt;
 HTML POST: http://&amp;lt;SERVER_IP&amp;gt;/billing/api/quickforwards_dids_update?username=USERNAME&amp;amp;did=DID&amp;amp;forward_to=NUMBER&amp;amp;description=DESCRIPTION&amp;amp;hash=HASH&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
We have ''username = admin'', ''did=37060503666'', ''forward_to=37066603777'', ''description=abyss'' and ''API Secret Key = 123456''&lt;br /&gt;
&lt;br /&gt;
You send:&lt;br /&gt;
&lt;br /&gt;
 http://127.0.0.1/billing/api/quickforwards_dids_get?u=admin&amp;amp;did=37060503666&amp;amp;forward_to=37066603777&amp;amp;description=abyss&amp;amp;hash=b12dbb15d59356af0fd75dc413ebd07a5b852d15&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;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&lt;br /&gt;
'''Success:'''&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;new_quickforward_did&amp;gt;&lt;br /&gt;
    &amp;lt;did&amp;gt;37060503666&amp;lt;/did&amp;gt;&lt;br /&gt;
    &amp;lt;forward_to&amp;gt;37066603777&amp;lt;/forward_to&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;abyss&amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;/new_quickforward_did&amp;gt;&lt;br /&gt;
 &amp;lt;/page&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''Errors:'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;error&amp;gt;DID was not found&amp;lt;/error&amp;gt; – Specified DID was not found.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to use Quickforwards&amp;lt;/error&amp;gt; – Such username does not exist in the database or it was not specified.&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;User was not found&amp;lt;/error&amp;gt; – User was not found using user_id. Use correct user_id.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[MOR API]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Configuration_from_GUI&amp;diff=18747</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=18747"/>
		<updated>2014-12-04T13:40:41Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Various */&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;
* '''[[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;
* '''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;
&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.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;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;
* '''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. It is required to fill in(correctly) this field if email sending is enabled.&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;
&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;
== 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;
* '''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;
* '''Allow short passwords in devices'''&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;
* '''Archive Calls older than''' – how old Calls should be archived?&lt;br /&gt;
* '''Archive Calls every day at''' – when Calls should be archive process started?&lt;br /&gt;
* '''Stop Archiving Calls at''' – when Calls should be archive process stopped ?&lt;br /&gt;
* '''Show Usernames on PDF/CSV Export Files in Last Calls''' – if checked, when particular User in Last Calls page search is selected, Last Calls PDF/CSV file name will be composed also from Name of selected User. If you are looking for All Users, no User Name will be used. (Name of User will be shown in Name of CSV/PDF file).&lt;br /&gt;
* '''Do not allow PREPAID User balance drop below zero (block them instead)'''&lt;br /&gt;
&amp;lt;!---from X5---&amp;gt;&lt;br /&gt;
* '''Do not block POSTPAID User when balance goes bellow zero on subscription count'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&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;
&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;
&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;
&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;
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;
==Privacy==&lt;br /&gt;
&lt;br /&gt;
'''SETTINGS –&amp;gt; Setup –&amp;gt; Settings –&amp;gt; Privacy'''&lt;br /&gt;
&lt;br /&gt;
Settings are explained here: [[Privacy_to_hide_Destination_ends|Privacy to hide Destination ends]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;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;
* '''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 HELP banner''' – 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;
* '''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.&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;
&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;
&amp;lt;br&amp;gt;&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;
=See also=&lt;br /&gt;
&lt;br /&gt;
* [[Server is overloaded]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=18718</id>
		<title>Device settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=Device_settings&amp;diff=18718"/>
		<updated>2014-12-03T08:22:04Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Advanced */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=General=&lt;br /&gt;
&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 noone called to that device.&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. Leave 0 for unlimited. Minimal value is 10 seconds.&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 – Is this device Trunk with/without ANI?&lt;br /&gt;
* '''[[Simultaneous call limitation | Call Limit]]''' – how many simultaneous calls can a user make?&lt;br /&gt;
* '''[[Multi_Server_support | Server]]''' – allows to choose server in multiple servers system. (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;
&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;
&lt;br /&gt;
* '''IP Address''' – Device IP address in one of the following formats: &lt;br /&gt;
** '''IP''' – understands simple IP address, IP address with it's Subnet Mask and IP address with it's Range. For example ''192.168.0.1'', ''192.168.0.1/24'' and ''192.168.0.0-255''. &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;
&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.&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 by his first available DID (selected from database by lowest ID).&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;
&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;
&lt;br /&gt;
* '''Unknown''' - This option lets you set CallerID number to unknown. &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 often to &amp;quot;ask&amp;quot; the device about availability. 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;
&amp;lt;br&amp;gt;&amp;lt;br&amp;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;
=Allowed Addresses=&lt;br /&gt;
&lt;br /&gt;
'''IP, MASK''' – permits traffic from this IP only. You can find a detailed explanation [http://www.voip-info.org/wiki/index.php?page=Asterisk+sip+permit-deny-mask here].&lt;br /&gt;
&lt;br /&gt;
You can enable multiple allowed addresses however this option should be turned on to be visible in main device settings window. Go to '''SETTINGS''' -&amp;gt; '''Setup''' -&amp;gt; '''Settings''' -&amp;gt; '''Various''' tab and choose ''Yes'' for ''Enable &amp;quot;Allowed addresses&amp;quot; option for Devices:''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Settings visual advanced.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
And click ''Save changes''.&lt;br /&gt;
&lt;br /&gt;
Now you will see an additional section in SIP and IAX2 Devices edit window:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Deviceconfig allowedaddr.png]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Allowed addresses''' describes from what IP's or defined subnets accept traffic. &lt;br /&gt;
NOTE that this setting take effect only for '''Dynamic authentication''' devices. For '''IP authentication''' devices, this setting is not applied.&lt;br /&gt;
&lt;br /&gt;
If you do not clearly understand what these settings are used for, leave them with default values.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced=&lt;br /&gt;
&lt;br /&gt;
* '''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 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;
* '''[[SIP 302 Redirect Support | SIP 302 Redirect support]]''' – SIP Redirect support for the device. Disabled by default.&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 &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;
* '''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''.&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;
* '''Limit up to (number) calls, during (number) seconds''' – allows to set calls per second limit in some period. [[File:call_limit_per_period.png]]&lt;br /&gt;
* '''Outbound Proxy''' – send outbound signaling to this proxy, not directly to the peer (Internal Asterisk option).&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;
* '''Save Call Log''' - saves whole call log on database. Log can be overviewed by click [[File:Icon_callinfo.png]] in [[Last Calls]].&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;
=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;
* [[Grace_time | Grace time]]&lt;br /&gt;
* [[PAP_device_configuration | PAP device configuration]]&lt;br /&gt;
* [[H323 Device settings]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=How_to_change_server%27s_IP&amp;diff=18716</id>
		<title>How to change server's IP</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=How_to_change_server%27s_IP&amp;diff=18716"/>
		<updated>2014-12-02T11:05:24Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:warning.png|left|250px]] &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''WARNING!''' '''MOR license will NOT work after IP change. Please contact Kolmisoft before procedure to schedule license re-activation.'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Main instructions =&lt;br /&gt;
&lt;br /&gt;
The basic files which should be changed:&lt;br /&gt;
* /etc/asterisk/h323.conf&lt;br /&gt;
* /etc/asterisk/sip.conf&lt;br /&gt;
* /home/mor/config/environment.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In /etc/asterisk/h323.conf change bindaddr variable:&lt;br /&gt;
 bindaddr = '''YOUR NEW IP'''&lt;br /&gt;
&lt;br /&gt;
In /etc/asterisk/sip.conf bindaddr&lt;br /&gt;
 bindaddr = '''YOUR NEW IP'''&lt;br /&gt;
&lt;br /&gt;
Then restart asterisk:&lt;br /&gt;
 /usr/src/mor/sh_scripts/asterisk_nice_restart.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In /home/mor/config/environment.rb change:&lt;br /&gt;
 Recordings_Folder = &amp;quot;http://'''YOUR NEW IP'''/billing/recordings/&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 Web_URL = &amp;quot;http://'''YOUR NEW IP'''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then restart HTTP server:&lt;br /&gt;
 /etc/init.d/httpd restart&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;
= Serial change =&lt;br /&gt;
&lt;br /&gt;
Please contact Kolmisoft to activate license under new IP address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= I need to add additional Network Interface Controller (NIC, also known as a network interface card, network adapter, LAN adapter, and by similar terms) =&lt;br /&gt;
&lt;br /&gt;
If all details of current interface will remain same, there will be no problems. &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;
= For MOR users who uses more than 1 MOR billing server =&lt;br /&gt;
&lt;br /&gt;
*If server is Asterisk server and GUI on another server:&lt;br /&gt;
**In GUI's menu: Billing - Asterisk Servers change Hostname and Server IP variables there.&amp;lt;br&amp;gt;&lt;br /&gt;
**In Asterisk server open file /etc/asterisk/manager.conf and add the permit='''YOUR GUI IP'''/'''NETMASK'''&lt;br /&gt;
&lt;br /&gt;
By default it looks something like this:&lt;br /&gt;
&lt;br /&gt;
 [mor]&lt;br /&gt;
 secret = morsecret&lt;br /&gt;
 deny=0.0.0.0/0.0.0.0&lt;br /&gt;
 permit=127.0.0.1/255.255.255.0&lt;br /&gt;
 read = system,call,log,verbose,command,agent,user,config&lt;br /&gt;
 write = system,call,log,verbose,command,agent,user,config&lt;br /&gt;
&lt;br /&gt;
After the change it should look something like that:&lt;br /&gt;
&lt;br /&gt;
 [mor]&lt;br /&gt;
 secret = morsecret&lt;br /&gt;
 deny=0.0.0.0/0.0.0.0&lt;br /&gt;
 permit=127.0.0.1/255.255.255.0&lt;br /&gt;
 permit=123.123.123.123/255.255.255.0 ; This is just an example! permit='''YOUR GUI IP'''/'''NETMASK'''&lt;br /&gt;
 read = system,call,log,verbose,command,agent,user,config&lt;br /&gt;
 write = system,call,log,verbose,command,agent,user,config&lt;br /&gt;
&lt;br /&gt;
* If Replication?&lt;br /&gt;
Lets say you have servers A and B, and you want to give new ip to server B . Login to MySQL in both servers as root, then stop replication link in server A:&lt;br /&gt;
 mysql&amp;gt; '''STOP SLAVE;'''&lt;br /&gt;
In server A run:&lt;br /&gt;
 mysql&amp;gt;CHANGE MASTER TO MASTER_HOST=''''New IP of server B'''', MASTER_USER=''''replication_user'''', MASTER_PASSWORD=''''replication_pass'''', MASTER_LOG_FILE=''''BINLOG'''', MASTER_LOG_POS='''NEW_POSITION''';  &lt;br /&gt;
&lt;br /&gt;
An example how it might look ('''DO NOT USE THIS LINE FOR YOUR SERVER'''):&lt;br /&gt;
 CHANGE MASTER TO MASTER_HOST='111.111.111.111', MASTER_USER='rep2', MASTER_PASSWORD='rep2', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=98; &lt;br /&gt;
Then restart replication link:&lt;br /&gt;
 mysql&amp;gt; START SLAVE;&lt;br /&gt;
Check if everything is fine by checking running:&lt;br /&gt;
 mysql&amp;gt; SHOW SLAVE STATUS\G;&lt;br /&gt;
You should see:&lt;br /&gt;
 Slave_IO_State: Waiting for master to send event&lt;br /&gt;
 Slave_IO_Running: Yes&lt;br /&gt;
 Slave_SQL_Running: Yes&lt;br /&gt;
&lt;br /&gt;
* If Heartbeat?&lt;br /&gt;
If you want to change shared ip (also known as virtual IP), you have to stop HeartBeat first (in both servers):&lt;br /&gt;
 /etc/init.d/heartbeat stop&lt;br /&gt;
Then edit /etc/ha.d/haresources file, you will see something like that (in both servers):&lt;br /&gt;
 MASTER '''OLD IP''' asterisk&lt;br /&gt;
You need to enter new ip there and start heartbeat again (in both servers):&lt;br /&gt;
 /etc/init.d/heartbeat start&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== See also===&lt;br /&gt;
&lt;br /&gt;
*[[How_to_change_server_IP_address_from_DHCP_to_static%3F|Changing server IP from DHCP to static]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=How_to_upload_sound_file%3F&amp;diff=18715</id>
		<title>How to upload sound file?</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=How_to_upload_sound_file%3F&amp;diff=18715"/>
		<updated>2014-12-02T06:39:05Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TILL MOR X4 release:&lt;br /&gt;
&lt;br /&gt;
'''Go to SETTINGS -&amp;gt; Billing -&amp;gt; DIDs -&amp;gt; IVR -&amp;gt; Voices. For MOR X5 go to SETTINGS -&amp;gt; Setup -&amp;gt; Voices.'''&lt;br /&gt;
&lt;br /&gt;
FROM MOR X5 release:&lt;br /&gt;
&lt;br /&gt;
'''Go to SETTINGS -&amp;gt; Setup -&amp;gt; Voices'''&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;New Voice&amp;quot; on the top of page;&lt;br /&gt;
&lt;br /&gt;
Fill &amp;quot;Short Name&amp;quot; field. You can put &amp;quot;myaudio&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Click Edit icon in newly created &amp;quot;myaudio&amp;quot; line;&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;New Sound File&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Choose file&amp;quot; and specify your file. It should be in wav or mp3 format;&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Upload file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Thant is all. Now you can use your audio file in IVR system or as DID greeting.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Read also=&lt;br /&gt;
&lt;br /&gt;
* [[Sound files]]&lt;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_device_create&amp;diff=18704</id>
		<title>MOR API device create</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_device_create&amp;diff=18704"/>
		<updated>2014-11-27T16:44:18Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
[[MOR API]] Create Device&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;
* Call: /api/device_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;
* user_id - User ID in MOR database, for which user device should be created. '''Required'''.&lt;br /&gt;
* description - string&lt;br /&gt;
* pin - [number. '']. If pin param not send -&amp;gt; random_numbers . If blank -&amp;gt; pinless&lt;br /&gt;
* type - Device type [SIP, IAX2, FAX, Virtual,H323, ZAP, Skype, '']. When is '' -&amp;gt; default device type. If default device type is empty -&amp;gt; 'SIP'&lt;br /&gt;
* devicegroup_id - device group ID &lt;br /&gt;
* caller_id - CallerID&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;
* '''extension''' - Device Extension&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 user_id = 2, 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/device_create?u=admin&amp;amp;user_id=2&amp;amp;description=desription1&amp;amp;pin=3&amp;amp;hash=6e79d4a82f68102f43be11d873177f47817f84df&lt;br /&gt;
&lt;br /&gt;
*Now we can find these Devices in GUI Devices 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;
&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;Device created&amp;lt;/status&amp;gt;&lt;br /&gt;
   &amp;lt;id&amp;gt;id of new device&amp;lt;/id&amp;gt;&lt;br /&gt;
   &amp;lt;username&amp;gt;username of new device&amp;lt;/username&amp;gt;&lt;br /&gt;
   &amp;lt;password&amp;gt;password of new device&amp;lt;/password&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;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;Dont be so smart&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;Device type invalid&amp;lt;/error&amp;gt; - Enter correct type.&lt;br /&gt;
* &amp;lt;error&amp;gt;Device group invalid&amp;lt;/error&amp;gt; - Device group with id not found. Enter group id.&lt;br /&gt;
* &amp;lt;error&amp;gt;Pin is already used&amp;lt;/error&amp;gt; - Enter onother pin.&lt;br /&gt;
* &amp;lt;error&amp;gt;Pin must be numeric&amp;lt;/error&amp;gt; - Enter correct pin.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to manage callerid&amp;lt;/error&amp;gt; - User does not have permissions to manage CallerID option.&lt;br /&gt;
* &amp;lt;error&amp;gt;Device was not created&amp;lt;/error&amp;gt;&lt;br /&gt;
** &amp;lt;message&amp;gt;problem message&amp;lt;/message&amp;gt;&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;error&amp;gt;Error message&amp;lt;/error&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;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_device_create&amp;diff=18703</id>
		<title>MOR API device create</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmisoft.com/index.php?title=MOR_API_device_create&amp;diff=18703"/>
		<updated>2014-11-27T16:40:25Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Description=&lt;br /&gt;
[[MOR API]] Create Device&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;
* Call: /api/device_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;
* user_id - User ID in MOR database, for which user device should be created. '''Required'''.&lt;br /&gt;
* description - string&lt;br /&gt;
* pin - [number. '']. If pin param not send -&amp;gt; random_numbers . If blank -&amp;gt; pinless&lt;br /&gt;
* type - Device type [SIP, IAX2, FAX, Virtual,H323, ZAP, Skype, '']. When is '' -&amp;gt; default device type. If default device type is empty -&amp;gt; 'SIP'&lt;br /&gt;
* devicegroup_id - device group ID &lt;br /&gt;
* caller_id - CallerID&lt;br /&gt;
* extension - Device extension&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;
* '''extension''' - Device Extension&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 user_id = 2, 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/device_create?u=admin&amp;amp;user_id=2&amp;amp;description=desription1&amp;amp;pin=3&amp;amp;hash=6e79d4a82f68102f43be11d873177f47817f84df&lt;br /&gt;
&lt;br /&gt;
*Now we can find these Devices in GUI Devices 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;
&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;Device created&amp;lt;/status&amp;gt;&lt;br /&gt;
   &amp;lt;id&amp;gt;id of new device&amp;lt;/id&amp;gt;&lt;br /&gt;
   &amp;lt;username&amp;gt;username of new device&amp;lt;/username&amp;gt;&lt;br /&gt;
   &amp;lt;password&amp;gt;password of new device&amp;lt;/password&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;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;Dont be so smart&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;Device type invalid&amp;lt;/error&amp;gt; - Enter correct type.&lt;br /&gt;
* &amp;lt;error&amp;gt;Device group invalid&amp;lt;/error&amp;gt; - Device group with id not found. Enter group id.&lt;br /&gt;
* &amp;lt;error&amp;gt;Pin is already used&amp;lt;/error&amp;gt; - Enter onother pin.&lt;br /&gt;
* &amp;lt;error&amp;gt;Pin must be numeric&amp;lt;/error&amp;gt; - Enter correct pin.&lt;br /&gt;
* &amp;lt;error&amp;gt;You are not authorized to manage callerid&amp;lt;/error&amp;gt; - User does not have permissions to manage CallerID option.&lt;br /&gt;
* &amp;lt;error&amp;gt;Device was not created&amp;lt;/error&amp;gt;&lt;br /&gt;
** &amp;lt;message&amp;gt;problem message&amp;lt;/message&amp;gt;&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;error&amp;gt;Error message&amp;lt;/error&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;/div&gt;</summary>
		<author><name>Vladislav</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmisoft.com/index.php?title=MOR_API_Services_get&amp;diff=18557</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=18557"/>
		<updated>2014-10-23T13:18:56Z</updated>

		<summary type="html">&lt;p&gt;Vladislav: /* 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;name&amp;gt;Test_periodic_service&amp;lt;/name&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;/service&amp;gt;&lt;br /&gt;
    &amp;lt;service&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;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;/service&amp;gt;&lt;br /&gt;
    &amp;lt;service&amp;gt;&lt;br /&gt;
      &amp;lt;name&amp;gt;Test_flat_rate_service&amp;lt;/name&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;/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>Vladislav</name></author>
	</entry>
</feed>