Difference between revisions of "Mobile Number Portability Addon"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 91: Line 91:
"numbers" menu item will appear after that.
"numbers" menu item will appear after that.


Click on this (numbers) menu item to manage number table.
Click on "numbers" menu item to manage number table.


Now click on "Insert" tab on the top of page.
Now click on "Insert" tab at the top of page.


Fields number and prefix will appears.
Fields number and prefix will appear.


Enter desired values and click "Go" to insert these values.
Enter desired values and click "Go" to insert these values.
Line 101: Line 101:
Done!
Done!
<br><br>
<br><br>
=See also=
=See also=
* [[MOR Addons]]
* [[MOR Addons]]
<br><br>
<br><br>

Revision as of 14:32, 16 May 2011

This addon is available starting from MOR 8

Mobile number portability (MNP) enables mobile telephone users to retain their mobile telephone numbers when changing from one mobile network operator to another.


MNP Addon for MOR allows system owner to check number if it belongs to other network and if so - route it through different providers or bill it with different price.

Current implementation allows to save numbers in MySQL database on any server (possible not on local server).

Before each call MOR MNP Addon checks dialed number and if number is found in database - some prefix is added in front of it.

By prefix MOR can set different routing(LCR) or billing(Tariff) for this number.

Detailed technique is described here: LCR/Tariff change based on call prefix

MNP Addon for MOR is available from MOR v8

As Kolmisoft cannot make one unique database for all MNP services in all countries all over the world. MOR admin has to

manually enter numbers in MNP database (process described below) in order for this solution to work. mor_mnp database has

to contain only the necessary data (telephone numbers).



NOTE: It is important to take care of various number formats user can use to dial a number. As a solution to it is to insert MNP number into DB in several possible formats.



Installation

Do such steps:

  1. Upgrade MOR
  2. cd /usr/src/mor/sh_scripts
  3. ./install_mnp.sh 



Upgrade

After Upgrade MOR run /usr/src/mor/upgrade/9/mnp_reenable.sh



Database

Config to DB in: /usr/local/mor/mor_mnp.conf

It should be MySQL database mor_mnp:

DROP TABLE IF EXISTS `numbers`;
CREATE TABLE `numbers` (
 `number` varchar(50) NOT NULL,
 `prefix` varchar(20) NOT NULL,
 PRIMARY KEY  (`number`),
 UNIQUE KEY `number` (`number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




Make sure you have set correct MySQL permissions for mor_mnp database and also local or remote asterisk must have correct settings in /usr/local/mor/mor_mnp.conf . If your number is still not recognized, double check if you have it in your mor_mnp database!

An example how to set MySQL permissions:


GRANT REPLICATION SLAVE , REPLICATION CLIENT ON * . * TO 'mor'@'localhost' IDENTIFIED BY 'mor' WITH MAX_QUERIES_PER_HOUR 0
MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT ALL PRIVILEGES ON `mor_mnp` . * TO 'mor'@'localhost' WITH GRANT OPTION ;



How to use MNP

You need to insert two values in mor_mnp database. These values are number and prefix.

To manage mor_mnp database you can use PhpMyAdmin:

http://<your server IP>/phpmyadmin

PhpMyAdmin login details can be found in file /root/phpMyAdminPassword

After login to PhpMyAdmin, MySQL login page will appear.

Use these details to login MySQL:

username: mor

password: mor

Now click "_mnp (1)" menu item on the left to select mor_mnp database.

"numbers" menu item will appear after that.

Click on "numbers" menu item to manage number table.

Now click on "Insert" tab at the top of page.

Fields number and prefix will appear.

Enter desired values and click "Go" to insert these values.

Done!

See also