MOR PRO v0.5 documentation
These are notes which should be in MOR PRO v0.5 Manual.
Several IPs from Provider
If your provider providers different IP/PORT for Incomming calls - you should create such device with these settings in /etc/asterisk/sip.conf (for SIP).
zap prefix change for Asterisk
/etc/asterisk/mor.conf
- zap technology change
zap_change = lvx
change lvx to anything you want zap should be changed when dialing zap device. This feature let's user use other technology apart from Zap.
Subscriptions
NOTE: service is billed from Activation Start till Activation End. And from invoice period start till end. Time period which fits in both previous periods is actual period which will be billed.
Troubleshooting Invoice
If trying to open PDF invoice you get error - make sure your logo PNG file is without ALPHA layer - that means without transparency layer.
CDR import
On step 2 you can see necessary fields to select. They are marked by *(star). You can select to enter Date/Time in one line OR Date AND Time in separate lines. Without selecting at least one field marked by * you will not be able to continue import process.
Admin email on user registration
If you set every setting to send email to admin when new user registers but no email arrives - check if you have email set for admin user.
Registration to provider
Add register +>…. line in [globals] section. If you add it to the end of file - it will not be active. To check if registration is active - execute sip show registry or iax2 show registry in Asterisk CLI.
If IP of your device can change - then you need to register. You don't need to register when you know static IP's of your devices.
Rounding
Rounding in MOR GUI is done only when showing final result. All values are not rounded in database. Example: 0.027 + 0.027 = 0.054 rounded is 0.05, if you are rounding each step, then you get: 0.03 + 0.03 = 0.06 which is not so right as 0.05.
Email variables
These variables can be used in emails:
- <%= server_ip %> - Server IP where your users should register their SIP/IAX2 devices
- <%= device_type %> - Used on user registration - shows device's type user had selected
- <%= device_username %> - Used on user registration - shows device's username
- <%= device_password %> - Used on user registration - shows device's password
- <%= login_url %> - GUI login url
- <%= login_username %> - User's username to login to GUI
- <%= login_password %> - User's password to login to GUI
- <%= username %> - same as login_username
- <%= first_name %> - First name of the user
- <%= last_name %> - Last name of the user
- <%= full_name %> - First name and last name of the user
Destinations from CSV file to Destination Groups
When you import some csv file and new Destinations are created they do not belong to any Destination Group. In order Call Tracing, Invoice generation and Dialing to work properly - you need to add these Destinations to appropriate Destination Groups.
Otherwise:
- Call can be dropped
- Detailed invoice will have errors
- Call Tracing will report bad call (when it is good)
Extension interval
If you want to change interval in which extensions are selected do following steps.
Find file /home/mor/app/controllers/application.rb
Make backup of this file!
Find line with:
for i in 104..9999
and change it to something you want.
Restart Apache.
This can be changed in GUI in 0.6 version: SETTINGS - Setup - Settings - Various - Device range MIN/MAX
IP Authentication for Provider/Device
Press to check IP Authentication in Provider's/Device's setting window to use IP to authenticate them.
username and secret are not used in IP Authentication.
Make sure you put correct Hostname/IP adress for Provider/Device!
How LCR works
Example:
- We have 2 providers A and B.
- Dialed destination is 921XXXXXXXXXX
- Provider A has such rates for prefixes(destinations):
- 92 rate 0.1
- No other destination starts with 92
- Provider B has such rates for prefixes:
- 92 rate 0.05
- 921 rate 0.2
So LCR in MOR will group this providers in following order:
- Provider A with rate 0.1 (92)
- Provider B with rate 0.2 (921)
It first dials through Provider A, if call fails, Provider B will be used to send the call.
If call is ANSWERED, BUSY or there's NO ANSWER - then call ends. And Provider B is not used.
It is used ONLY when call fails - CONGESTION.
Localization
Main idea of Localization: No matter how user dials number (destination) when localized it should be in e.164 format.
Localization has nothing in common with numbers you send to providers. It operates with numbers received from caller.
Port
Port in Device/Provider's settings is SOURCE port, that means FROM which port call is coming, NOT TO which port is coming.
Sell minutes to only one country
If you want to sell traffic to only 1 country (or several) create tariff for user which has rates for these destinations only.
How do I change admin password
- Login as admin
- Go to SETTINGS - Users
- Press on Edit for System Administrator
- Enter new password
- Press Change
How to view user's stats in Realtime Stats
- Add user to some Group
- Go to: MANAGEMENT - <Group Name> - Member Stats
- Check Show in Realtime Stats
Realtime Stats Usage
This window can be shown on big LCD screen for Call Center agents to check their performance as seen in photo on one Call Center in Lithuania:
How to create Zap/H323 providers
Zap and H323 does not have Realtime support in Asterisk. In order to configure them you should do following steps:
1. Create provider in GUI
2. Write down just created provider's device accountcode which can be found in provider's edit window in
Device ID: field.
3. In zapata.conf or h323.conf (ooh323.conf or similar) file look for context field. As example (in zapata.conf):
;Sangoma A101 port 1 [slot:2 bus:2 span: 1] switchtype=euroisdn context=from_pstn group=0 signalling=pri_cpe channel => 1-15 channel => 17-31
NOTE: context=from_pstn
4. In extensions.conf
[from_pstn] exten => _X.,1,Set(CDR(ACCOUNTCODE)=X) exten => _X.,2,Goto(mor,${EXTEN},1)
Where X(variable) is Device ID from Provider's settings, example:
Here X == 1. (It is example! In your configuration X will have other value!)
NOTE: [from-pstn] is same context as in zapata.conf
5. Add accountcode = X to just created provider (peer/friend) in .conf file where X is the Device ID created in
GUI
6. Reload Asterisk and you are ready to go!
H323 connection configuration example
Example configuration for 2 H323 gateways: MERA and QUINTUM
/etc/asterisk/h323.conf
[global] userbyalias=no
[mera] type=friend host=23.45.67.89 fastStart=no context=from_mera
[quintum] type=friend host=192.168.10.5 fastStart=no context=from_quintum
/etc/asterisk/extensions.conf
[from_mera] exten => _X.,2,Set(CDR(ACCOUNTCODE)=X) exten => _X.,3,Goto(mor,${EXTEN},1)
[from_quintum] exten => _X.,2,Set(CDR(ACCOUNTCODE)=Y) exten => _X.,3,Goto(mor,${EXTEN},1)
Note accountcodes X and Y - they should be equal to devices ID in MOR GUI to tie this configuration with MOR.
Troubleshooting
If you hear "Congratulation from asterisk ...." message that means you forget to set context = mor in zapata.conf or h323.conf file for your provider.
Provider Rules examples
Example 1
- If calling to USA/Canada, Provider accepts number in format: 1+number
- If calling INTERNATIONAL number (everything else except USA/Canada), Provider accepts number in format: 011 + E164 format number (country code + number)
In Provider Rules should be such rules:
Explanation:
- It is IMPORTANT to remember that number from MOR to Provider Rules (pior going to Provider) comes in E164 format
- Rules are grouped by LENGTH of CUT field - it is important!
- Let's say user dials 123456789012. Number length is 12 (12 digits). So both rules apply. But USA/Canada Specific rule has higher priority, because CUT field LENGTH is 1 (1 digit) and in Int.prefix it is empty (0 digits). So USA/Canada Specific rule will be applied.
- When any other number comes, starting not from 1, e.g. 23456789012, only Int.Prefix rule is applied. Because number does not starts with '1' as described in USA/Canada Specific rule.
ANI - Automatic Number Identification
ANI is action which is used to authenticate who is calling by CallerID.
When call comes into MOR, CallerID is checked with all available CLI's in DB. If match is found - call is authorized and assigned to the device which CLI is matched against CallerID of the call.
What is the difference between CallerID and CLI
CallerID is for outgoing calls, CLI are for incoming calls when call comes over Trunk/Provider with ANI.