What is Least Cost Routing?
The technical definition of Least cost routing (LCR) is the
process of selecting the path of outbound communications traffic based
on cost.
What are the key components of LCR? Within the NetSapiens platform LCR is achieved by uploading the various rate decks that are available to you and then associating them with their respective connections. Then these are associated with the call routes for which you want to employ LCR. There are some key components that are necessary to set up LCR:
- NAS (NetSapiens Accounting Server) account
- NMS Connection to the NAS
Rate Decks
Rate Decks are the prices for various origination or termination destinations (usually a per minute rate). In order to be uploaded to the NAS they must be in a CSV format. The Rate Deck Import function in the NAS supports a variety of common
formats and will attempt to recognize the format in the CSV files by
the header row.
Manually save the Rate Decks as a CSV file, if they are not already in CSV, with <Header Fields> in the 1st Row, using a combination of some of the
recognized fields as shown in the table below. Upper or lower case does not matter, but you may
need to tweak some of the Header Fields to match, e.g. from "New
Rate" or "RATES" to "RATE". Delete any extra rows above the row with the
column headers
Type |
Header Fields |
Internt'l |
Domestic |
Carrier |
Comments |
1 |
"PREFIX" or "PATTERN" and
"RATE" in any order
|
yes |
yes |
Generic |
Take <PREFIX> or
<PATTERN> as Prefix
Update Country/Locale Name from
<COUNTRY> or <LATA NAME>
|
2 |
"NPA" and "NXX" and "RATE"
in any order |
no |
yes |
Generic |
Form Prefix as
1<NPA><NXX>
Update Country/Locale Name from
<COUNTRY> or <LATA NAME>
|
3 |
"NPANXX" and "RATE" in any
order
|
no |
yes |
Generic
|
Form Prefix as
1<NPANXX>
Update Country/Locale Name from
<COUNTRY> or <LATA NAME>
|
4 |
"OCN" and "LATA" and "RATE"
in any order |
no |
yes |
Generic |
Look up <NPA> and <NXX> from LERG Table with
<OCN> & <LATA>
Form Prefix as 1<NPA><NXX>
|
5
|
("OCNLATA" or "OCN_LATA")
and "RATE" in any order |
no
|
yes
|
Generic |
Look up <NPA> and <NXX> from LERG Table with
<OCNLATA>
Form Prefix as 1<NPA><NXX> |
6
|
("LATAOCN" or "LATA_OCN")
and "RATE" in any order |
no |
yes
|
Generic |
Look up <NPA> and <NXX> from LERG Table with
<LATAOCN>
Form Prefix as 1<NPA><NXX>
|
7 |
"SWITCH" and "RATE" in any
order |
no |
yes |
Generic |
Look up <NPA> and <NXX> from LERG Table with
<SWITCH>
Form Prefix as 1<NPA><NXX>
|
8
|
"NPA","NXX","THOUSAND","RATE" in any order |
no
|
yes
|
Generic |
Form
Prefix as 1<NPA><NXX><THOUSAND> |
10 |
Exactly
("NPA","NXX","Interstate Termination","Intrastate Termination") |
no |
yes |
Starview |
Form Prefix as
1<NPA><NXX> |
11 |
Exactly ("Place","Location
ID","Pattern(s)","Rate","Change","Effective Date")
|
yes |
no |
TDM CARR |
Extract each <Pattern>
in <Pattern(s)> as a Prefix
Each <Pattern> is separated by a <comma> in
<Pattern(s)>
Update Country/Locale Name from
<Place>
|
12
|
Exactly
("Region","Place","Location ID","Previous Rate","New Rates") |
no |
yes |
TDM CARR |
Parse <SWITCH> from <Place>
Look up <NPA> and
<NXX> from LERG Table with <SWITCH>
Form Prefix as 1<NPA><NXX>
|
13 |
Exactly ("Region","Dial
Codes","Current Rate ($/Min)","New Rate ($/Min)","First Increment
Seconds","Increment Seconds","Status","Notification Date","Effective
Date") |
yes |
no |
Phonetime Network |
Take <Dial Codes> as
Prefix
Update Country/Locale Name from
<Region>
|
14
|
Exactly
("Country","1+","Code","Rate")
|
yes |
no |
NovaTel |
Form Prefix as
<1+><Code>
<1+> are mostly a NULL string
Update Country/Locale Name from
<Country>
|
15
|
Exactly
("STATE","LATA","LATA NAME","OCN","PARENT COMPANY
NAME","NPA","NXX","Block ID","MTA 1","MTA 2","Actual Switch ID","WTS
Status","Rate per MOU") |
no |
yes |
Hybercube |
Form Prefix as
1<NPA><NXX><Block ID>
Update Country/Locale Name from
<LATA NAME>
|
Formats that are different but close to one of the supported formats
could be touched up manually before the import. Support for additional formats can be implemented as needed.
Rate Table
From the NAS "System"-"Export/Import"-"Import Rate Deck", import Rate
Decks into NAS's Rate Table. One Rate Table per Carrier, but use the
same <Domain> for all the imported Rate Tables.
"LCR" would be a
good convention to use as <Domain> for all Rate Plans meant for
the
LCR. For International Rate
Decks, select "Don't Care" for "Inter-State" and "Inter-LATA". For
Domestic Rate Deck, select "Don't Care" for "International."
Steps to
Create/Update Route Table from Rate Decks
Create Country Codes Table for the Domain (Applies to International Rate Decks)
Create new NAS Country Code (i.e. Union
of all Prefix) for the <Domain>
that own all the Rate Tables from imported Rate Decks by clicking the
"Create" button in the corresponding entry in the NAS's "Country Codes"
page. Should apply the "Purge" before the "Create" to flush the Country
Codes
for
the specific domain before adding new ones.
Create NMS Route
Table
Skeleton
Export new NMS Route Table Skeleton
from the new NAS Country Code from
NAS "System"-"Export/Import"-"Export NMS Route". Import this Route
Skeleton into the NMS from the NMS's "System"-"Export/Import"-"Import
Routes". Should purge the route table beforehand by exporting the full
NMS route table and then importing the exported file with the "Purge" function.
**WARNING* Here comes some technical stuff;outside of the system!!!**
To import the Route Skeleton to the NMS, check the
sizing for the
following in "/etc/php.ini"
("httpd"
need to be restarted for any change to in "php.ini" to take effect)
; Maximum execution time of each script, in seconds
max_execution_time = 300
; Maximum amount of time each script may spend parsing request data
max_input_time = 300
; Maximum amount of memory a script may consume (16MB)
memory_limit = 64M
; Maximum size of POST data that PHP will accept.
post_max_size = 64M
; Maximum allowed size for uploaded files.
upload_max_filesize = 64M
|
|
Create NAS Account
Create an account on your NAS server in order to associate it with each Termination and assign the
corresponding Rate Plan imported from the associated Rate Deck or Decks.
This account must maintain a Valid Period and some amount of Minimum
Balance.
Create NMS Connection
A Connection on your NMS server needs to be created with it's Domain and Rate Account
set to the corresponding information in your NAS Account associated with the intended Rate Plan.
Populate
Connection
into NMS Route Table
View the LCR from the NMS's "Dial
Planning"-"Call Routing" page.
Un-check "Fixed" and "Percentage" to show the "Least Cost" view, and
make available the "Update Connection" and "Purge Connection" buttons.
Add new connection by hitting the "Update Connection" button, and
select one of the existing Connection. With the System Parameter
"LcrGetCostWhenAdd"
set to "yes" , the NAS will be queried for the cost of the added
connection for each route as it is added. This can take a very long
time, but the system should continue to function and route while
connection is being added and cost is being looked up.
Cost for each connection can re-queried
from the NAS, if the System Parameter "LcrGetCostWhenUpdate" is set to
yes, by hitting the "Update Connection" button and select the specific
connection.
NMS Route Table
and
Connections
System Performance
Tuning
Configuration
Parameters |
Values |
Default |
Descriptions
|
Configuration for LCR
|
LcrGetCostWhenAdd |
yes or no |
no
|
Query NAS for Connection Cost when new Connection is added to a
route |
yes
|
LcrGetCostWhenUpdate |
yes or no |
no
|
Query NAS for Connection Cost when an existing Connection is updated
|
yes
|
LergRouting |
yes or no |
no
|
Control whether to apply LERG for Routing |
yes
|
Pool Size
Parameters |
Values |
Default |
Descriptions
|
Suggested Configuration for 1000 Active Call
|
LegPoolSize |
integer
|
4000
|
Number of session legs to allocate in the Session Leg Pool |
4000
|
PacketPoolSize |
integer |
20000
|
Number of packets to allocate in the Packet Pool
Its about 20M/10KPacket |
20000
|
SessionPoolSize |
integer |
2000
|
Number of session to allocate in the Session Pool.
Its about 300M/1KSession |
3000 |
UacPoolSize |
integer |
1000
|
Number of transactions to allocate in the UAC Transaction Pool |
12000
|
UasPoolSize |
integer |
1000
|
Number of transactions to allocate in the UAS Transaction Pool |
3000
|
Time Out
Parameters |
Values |
Default |
Descriptions
|
Suggested Configuration for 1000 Active Call |
SessionDisconnectTO |
integer
|
32
|
Time Out in second for the Session Disconnect State
|
6
|
SessionTerminateTO |
integer
|
32
|
Time Out in second for the Session Terminate State
|
4
|
TOResponse
|
integer |
6
|
Time Out in second for the UAC to wati for a Response |
3
|
Operations
NMS Routing
The NMS Routing has the options to be
- Fixed - Connections for each route
are tried sequentially based on their index ordering until either
success or no more connection
- Percentange - Connection for each
route are selected randomly based
on the weighted proportion. The maximum number of alternate route is
configured by the system parameter "AltPerRouteMax"
- Least
Cost - Connections for each route are tried sequentially
based on their least cost ordering until either success or no more
connection.
Rate Margin
"Rate Margin" constraints the LCR to exclude Routes that cost more then
what will be charged to the "Origination Connection".
- Lookup <Cost Ratio> and <Fixed Margin> from
"Origination Connection".
- NMS queries <Charge Rate>
associated with the "Origination
Connection" from NAS via "RateQuote".
- Apply (<Charge Rate>
* <Cost Ratio> - <Fixed
Margin>) as <Cost Threshold> in LCR lookup
Notes:
- <Cost Ratio> should less then 1
and <Fixed Margin> should be greater then 0 to imply some profit.
- System
Parameters <RateOrigLogi> and <RateTermLogi> are
referenced by the "RateQuote" logic to select the <Charge Rate>
based on the logical or physical Origination and Termination URI
Rate Ceiling"Rate Ceiling" prevents connecting calls beyond what an "Origination Connection" willing to pay.
- Lookup <Max Rate> from "Origination Connection".
- If <Max Rate> is not <NULL>, and selected Route is
configured for Least Cost, apply <Max Rate> as <Cost
Threshold> to constraint the Connection selection with cost no
greater then the <Max Rate>
Notes:
- <NULL> <Max Rate> is an empty string, and "0.0" is not <NULL>
- <Max Rate> is ignored for Route configured for Fixed or Percentage routing.
Minimum Call Duration
Upon BYE received during a Conversation, enforce the Minimum Call
Duration configured for the surviving Connection, if Auto Next Call is
NOT applicable.
CDR's Release Time and Rating Release will be
applied at the end of the enforcement.
Enforcement is not
applicable upon BYEs received from both parties !
UI
Configuration
Parameter |
Description |
Default
|
UI_SELECT_GW_MIN_DURATION_LIMIT
|
Maximum value for Connection's Minimum Call Duration drop-down
|
60
|
UI_SHOW_GW_MIN_DURATIOAN
|
To showConnection's Minimum Call Duration |
no
|
Connection Configuration
Parameter |
Description |
Default
|
Min Duration
|
Minimum Call Duration (in second) to be enforced
|
0
|
|