root/doc/RATING.txt

Revision 1658, 29.2 KB (checked in by Adrian Georgescu <ag@ag-projects.com>, 3 weeks ago)

Update documentation about ICE

Line 
1
2CDRTool rating engine
3---------------------
4
5CDRTool provides on-the-fly rating of CDRs from multiple data-sources like
6OpenSIPS, Asterisk or Cisco gateways based on easy to build rating plan,
7which can be provisioned in a web interface or imported from csv files.
8
9A Call Detail Record (CDR) is one record from the radius radacct table. The
10CDR contains all information related to a session, its duration, the calling
11and called party and media information. The rating engine calculates the
12price of the session. The calculation is done once and its results are saved
13in the CDR table for later use. It is possible to re-calculated the prices
14at a later time for example when having to change the tariffs.
15
16Based on exceptions, different rates may be applied per caller party
17identified by source IP, domain or subscriber.
18
19Rating is applied only after the call has ended. CDRTool considers that a
20call has ended when there is a stop time.
21
22In case of missing BYEs, CDRTool relies on the fact that MediaProxy will
23update the CDR with the proper stop time information based on the last
24moment the media stream passed through the media proxy. This functionality
25is not available when the end-points have negotiated using ICE another
26candidate than MediaProxy.
27
28The rates are linked with profiles corresponding with different time of the
29day, day of the week or holidays. For rating calls, which span multiple
30profiles, the right rate is selected and applied for the call duration
31within each profile. Each customer may be assigned its own dedicated rating
32plans destination id and names. Chained profiles are possible to enable
33exception based rating. Multiple customers may share a common rate list,
34while some destinations may be rated differently, only the differences must
35be provisioned. Multiple time zones are supported for multiple billing
36parties hosted on the same platform.
37
38
39Rating logic
40------------
41
42Different customers can have different rating plans. A rating plan is a
43unique combination of holidays, day of week, time of day, destination ids,
44and associated costs.
45
46The following steps are performed to rate a CDR:
47
481. Determination of the billing party
492. Determination of the destination id
503. Determination of the costs
51
52The steps are described in detail below.
53
54
551. Determination of the billing party
56-------------------------------------
57
58
59To be able to calculate the Price for a call the rating engine must
60determine whose rating plan to use.
61
62The rating engine does this by performing a match against entries in the
63billing_customers table for the the BillingPartyId field of the the CDR
64(radacct.UserName for radius based datasources) in the following order:
65
66a. SIP account user@domain
67b. SIP domain of the SIP account
68c. Source IP of the session
69d. Default (when none of the above matches)
70
71The first match is considered to be the billing party for which the rating
72plan is determined.
73
74The rating plan is further derived from the profiles associated with the
75entry found in the billing_customers.
76
77Note
78
79The billing_customers table field that matches the Source IP is called
80gateway. "gateway" or "trusted peer" terms are used interchangeably in this
81document. They both relate to the source IP address that generated the SIP
82session.
83
84If you want to use the multi-tenant features for OpenSIPS accounting you
85must create an integer reseller_id column in the trusted and domain tables.
86Traffic generated by IP addresses from the trusted peers table and local
87domains will be marked as belonging to their correspondent reseller_id. The
88reseller_id is then later used to lookup destinations and rates belonging to
89the reseller_id.
90
91
922. Determination of the destination id
93--------------------------------------
94
95The rating engine identifies the 'destination id', which has associated
96rates depending on day of week and time of day.
97
98The 'destination id' is for example a country prefix like '31' for the
99Netherlands. This 'destination id' has prices associated with it so all
100calls to the Netherlands will have prices associated with prefix '31'.
101
102The 'destination id' is derived from the logical destination the SIP session
103has been routed to. In SIP headers and Radius records there are multiple
104places that contain information related to the destination. Some of them are
105generated by the SIP User-Agents (hence cannot be trusted and must not be
106used for accounting purposes) and others are generated by the SIP Proxy
107configured by the operator and are suitable for accounting purposes.
108
109The rating engine considers the destination to be the first non-empty CDR
110field in this order:
111
112a. CanonicalURI (the destination after all lookups inside the SIP Proxy)
113b. SipTranslatedRequestURI (the Request URI as presented by the SIP UA)
114c. CalledStationId (the content of the To header, used as a last resort)
115
116The CanonicalURI is the preferred because is reliable information generated
117by the operator based on the logic configured in the SIP Proxy and the
118subscriber cannot control it. OpenSIPS must be configured to send the
119CanonicalURI Radius attribute when creating the radius accounting START
120record. Instructions for this are available in INSTALL.txt file.
121
122The 'destination id' is then calculated based on the longest match of this
123destination field in the billing_destinations table.
124
125The longest match for the chosen destination field is performed by the
126E164_class, which by default uses E164_Europe that defines an European
127numbering plan. It assumes the destinations start with a zero for a national
128call and with double zero for an international call. See cdr_generic.php for
129the actual logic.
130
131If your dialing plan is different, you must use other provided class like
132E164_US or create a custom class and point to it in global.inc for each
133datasource as follows:
134
135'E164_class'=>'MyE164Class',
136
137For example the pre-defined E164_US class from cdr_generic.php matches the
138American dialing plan.
139
140Destinations are uploaded into destination table. Each reseller_id can have
141its own list of destinations. If the reseller_id of trusted peers and domain
142tables have been set, then the rating engine will apply the rating
143information belonging to them.
144
145Each destination has also a set of properties that can be used to alter the
146calculation of the price. These properties are:
147
148- increment: the call duration is rounded to the next increment in seconds,
149  this is only used for rating, the actual CDR duration is not modified
150- min_duration: set the duration to min_duration if the CDR duration is
151  smaller than min_duration, this is only used for rating, the actual CDR
152  duration is not modified
153- max_duration: limit the duration to max_duration if CDR duration is
154  bigger than max_duration, this is only used for rating, the actual CDR
155  duration is not modified
156- max_price: the price is set to max_price per call if the calculated price
157  is bigger than the max_price
158
159
1603. Determination of the costs
161-----------------------------
162
163The following steps are taken to determine the cost for the calls based on
164the 'destination id' and the billing party determined at the previous steps.
165
1661. Lookup the billing profiles in cdrtool.billing_customers table in the
167   following order: subscriber,domain,gateway (based on $this->dayofweek):
168   (as explained in "Determination of the billing party" above)
169
170   - profile_name1 matches week days [1-5]
171   - profile_name1_alt matches week days [1-5] if no rates for profile_name1
172     are found
173   - profile_name2 matches week-ends [6-0]
174   - profile_name2_alt matches week-ends [6-0] if no rates for profile_name2
175     are found
176   - profile_name2 matches also holidays from billing_holidays table
177   
178   The week starts with 0 (Sunday) and ends with 6 (Saturday)
179
180   This step determines which rates should be applied based on the day of
181   the week when the call started.
182
1832. Using the profile_name found, lookup the rate_name based
184   on $this->hourofday in cdrtool.billing_profiles table
185
186   If no rate_name is found for the given profiles a second set of profiles
187   are used, profile_name1_alt and profile_name2_alt.
188
189   - the day may be split in maximum 4 periods
190   - the days starts with hour 0 and ends with hour 24
191   - rate_name1 defines the first interval after hour 0
192   - rate_name2 defines the first interval after rate_name1
193   - rate_name3 defines the first interval after rate_name2
194   - rate_name4 defines the first interval after rate_name3
195
196   When the hour matches an interval use the rate_nameX found to lookup the
197   rate in billing_rates, if no record is found use the rate called
198   'default'
199
200   This step determines which rate should be applied for the time of day
201   when the call started.
202
2033. Lookup in the cdrtool.billing_rates table the record having same name
204   found at point 2 having billing_rates.destination = 'destination id'
205   and billing_rates.application = application type found in the steps above.
206
207   - return an array with all the rating values and the duration rated
208
209   No rate will be returned if no 'destination id' is found. Make sure each
210   possible destination has a 'corresponding id' and name in the destinations
211   table.
212
213   This step determines the costs within the current time span associated
214   with the time of day and destination id. If the call duration exceeds
215   this time span (that is a new interval for which another rate applies is
216   reached), step 4 is performed.
217
2184. If the duration rated at point 3 is less than total call duration, apply
219   point 3 again for the remaining call duration in the next profile. A
220   maximum of 10 spans (different rates depending of time of day, day of the
221   week) can be calculated using this mechanism. After 10 spans, the engine
222   bails out to avoid loops caused by invalid tables provisioning.
223
2245. Calculate the total call Price based on its duration and connection fees.
225
226   In global.inc there are several variables that affect how the price is
227   calculated. These settings are global per CDRTool installation but some
228   can be overwritten with per customer values in the billing_customers
229   table.
230
231   $RatingEngine=array(
232           "priceDenominator"        => 10000, // Rates units (global setting)
233           "priceDecimalDigits"      => 4,     // Decimal information (global setting)
234           "minimumDurationCharged"  => 0,     // Rate a minimum of X seconds (per customer)
235           "minimumDuration"         => 0,     // Minimum duration to rate, if call duration is shorter the price is zero (per customer)
236           "durationPeriodRated"     => 60     // Rate is per 60 seconds (global setting)
237           "trafficSizeRated"        => 1024,  // Default we rate per 1 MB (global setting)
238           "reportMissingRates"      => 0      // Send emails to administrator in case of missing rates
239            );
240
241   Pricing formula
242   ---------------
243
244   if min_duration then
245        minimumDurationCharged = min_duration
246   else if minimumDurationCharged set in global inc
247        use minimumDurationCharged from global.inc
248   else
249        minimumDurationCharged = call duration
250
251   if increment then
252        durationForRating = round to the next increment
253   else
254        durationForRating = call duration
255
256   if durationForRating >= minimumDurationCharged then
257        Price = connectCost/priceDenominator+
258        durationRate*durationForRating/durationPeriodRated/priceDenominator
259   else
260        Price = 0
261
262
263   ENUM discounts
264   --------------
265
266   The rating engine can apply a discount associated with the ENUM top
267   level domain that returned the final destination.
268
269   Price = Price - Price * ENUM discount / 100
270
271   To apply ENUM based discounts, the ENUM TLD must be saved with each CDR
272   and the TLDs with their corespondent discounts must be provisioned in the
273   Rating tables section. See ENUM TLD discounts section for more
274   information.
275
276
277   Purchasing price
278   ----------------
279
280   A second price called 'Price in' is calculated using the same formula but
281   based on connectCostIn and durationRateIn values. It can be used to match
282   the purchasing price and calculate the margin between purchasing and
283   selling prices. The information about both prices is stored in the
284   RateInfo field of the CDR.  The values for connectCostIn and
285   durationRateIn must be provisioned in the billing_rates and
286   billing_rates_history tables using the web interface or by importing csv
287   files.
288
289
2907. Save the calculated Price, billing party and 'destination id' for each
291   call in the CDR table. Having the price stored in the database, it is
292   possible to build statistics to display consolidated revenues per country
293   code, network or subscriber.
294
295
296Testing the rating engine
297-------------------------
298
299You can test the rating engine by telneting to the IP and port configured in
300global.inc. Type 'help' once connected to see the available commands. Use
301'ShowPrice' command to simulate the rating of one session, for example:
302
303adigeo@w1:/var/www/CDRTool/doc$ telnet ws1 9024
304Trying 10.0.0.1 ...
305Connected to 10.0.0.1.
306Escape character is '^]'.
307
308ShowPrice From=sip:123@example.com To=sip:0031650222333@example.com Gateway=10.0.0.1 Duration=59
3090.2023
310Duration: 59 s
311         App: audio
312 Destination: 31650
313    Customer: domain=example.com
314     Connect: 0.0450
315   StartTime: 2009-01-03 14:29:10
316--
317        Span: 1
318    Duration: 59 s
319   ProfileId: 442 / weekend
320      RateId: 442 / 0-24h
321        Rate: 0.1600 / 60 s
322       Price: 0.1573
323
324
325Below is a description of the fields that must be separated by one or more
326spaces:
327
328 * From - must contain the caller party
329 * Gateway - must contain the source IP of the session
330 * To - must contain the full CanonicalURI destination, its format must be synced
331   with the E164 class logic used to determine the 'destination id'
332 * Duration - the duration of the session in seconds
333
334Check the syslog for any errors, most the of the configuration errors like
335missing rates are logged to the syslog.
336
337       
338Importing and exporting of rating files
339---------------------------------------
340
341It is important to set the impersonate field corectly for the login
342accounts. To access in the CDRTool Rating web page all the rates table for
343all resellers in the system you must set the impersonate field of the login
344account to 0.0
345
346There are different data files needed for rating. The data files are
347imported into their corresponding MySQL tables.
348
349The files must be uploaded to /var/spool/cdrtool directory. To load the
350files into the database run the following command:
351
352/var/www/CDRTool/scripts/importRatingTables.php
353
354Data partitioning for multiple resellers
355
356The reseller_id column present in all rating tables is used to filter access
357based on Login account impersonate field.
358
359You may create numerical sub-directories under /var/spool/cdrtool directory.
360When importing a file from such numerical directory, the reseller_id field
361in all imported records is set to the directory name.
362
363The import script knows to import the files only once so you may dump
364several files over time with the same name and safely run the import script
365from cron. The import script detects whether each file have been imported by
366building a unique key out of the filename and the hash of the file content.
367So you may use the same filenames as long as the content differs and
368viceversa. If the import file has changed any records, the rating engine is
369automatically instructed to reload the changes.
370
371Sample csv files are found in the setup directory. The CSV field order is
372described in setup/*.csv sample files. The first element on each line
373specifies the operation will be performed with the current record. The
374operation can be 2 (update/insert), 1 (insert) or 3 (delete).
375
376The updates are performed based on a unique key present in each table:
377
378billing_customers     - cust_idx      (reseller,gateway,domain,subscriber)
379destinations          - cust_dest_idx (reseller,gateway,domain,subscriber,dest_id)
380billing_profiles      - profile_idx   (reseller,name)
381billing_rates         - rate_idx      (reseller,name,destination,application)
382billing_rates_history - rate_idx      (reseller,name,destination,application,startDate,endDate)
383
384The content of the rating tables can be exported in the Rating tables page.
385
386The import script detects the type of file to import based on its filename.
387
388The filename must comply with the following naming convention:
389
3901. Must start with the name of the table without the billing_
3912. May optionally contain extra characters after the name
3923. Must end with .csv extension
393
394Examples:
395
396- rates.csv or rates20061201.cvs will be loaded into the rates table
397- profiles.csv or profiles20061201.cvs will be loaded into the profiles table
398- destinations200601.csv will be loaded in the destinations table
399- ratesHistory200801.csv will be loaded in the rates_history table
400
401Do not use 'billing_' prefix in front of the file name.
402
403It is advisable to name the files in a consistent manner like tableYYYYMMDD.csv
404
405The results of the import operation is logged in the database and can be
406viewed in the Log section of the web interface and the syslog.
407
408
409MySQL schema
410------------
411
412To see the rating tables and their structures connect to the cdrtool
413database using mysql client.
414
415Run 'show tables' and 'describe table_name':
416 
417billing_customers
418+-------------------+
419| Field             |
420+-------------------+
421| id                |
422| reseller_id       |
423| gateway           |
424| domain            |
425| subscriber        |
426| profile_name1     |
427| profile_name1_alt |
428| profile_name2     |
429| profile_name2_alt |
430| timezone          |
431+-------------------+
432
433billing_profiles
434+------------+
435| Field      |
436+------------+
437| id         |
438| reseller_id|
439| name       |
440| rate_name1 |
441| hour1      |
442| rate_name2 |
443| hour2      |
444| rate_name3 |
445| hour3      |
446| rate_name4 |
447| hour4      |
448+------------+
449
450billing_rates
451+-----------------+
452| Field           |
453+-----------------+
454| id              |
455| reseller_id     |
456| name            |
457| destination     |
458| application     |
459| connectCost     |
460| durationRate    |
461| connectCostIn   |
462| durationRateIn  |
463+-----------------+
464
465billing_rates_history
466+-----------------+
467| Field           |
468+-----------------+
469| id              |
470| reseller_id     |
471| name            |
472| destination     |
473| application     |
474| connectCost     |
475| durationRate    |
476| connectCostIn   |
477| durationRateIn  |
478| startDate       |
479| endDate         |
480+-----------------+
481
482destinations
483+--------------+
484| Field        |
485+--------------+
486| id           |
487| reseller_id  |
488| gateway      |
489| domain       |
490| subscriber   |
491| dest_id      |
492| dest_name    |
493| increment    |
494| min_duration |
495| max_duration |
496| max_price    |
497+--------------+
498
499billing_holidays
500+-------+
501| Field |
502+-------+
503| day   |
504+-------+
505
506prepaid
507+------------------+
508| Field            |
509+------------------+
510| id               |
511| reseller_id      |
512| account          |
513| domain           |   
514| balance          |
515| change_date      |
516| active_sessions  |
517| session_counter  |
518+------------------+
519
520prepaid_history
521+-------------+
522| Field       |
523+-------------+
524| id          |
525| reseller_id |
526| username    |
527| domain      |
528| action      |
529| number      |
530| value       |
531| balance     |
532| date        |
533+-------------+
534
535billing_enum_tlds
536+-------------+
537| Field       |
538+-------------+
539| id          |
540| reseller_id |
541| gateway     |
542| domain      |
543| subscriber  |
544| enum_tld    |
545| e164_regexp |
546| discount    |
547+-------------+
548
549
550Web based rating tables management
551----------------------------------
552
553The rating tables can be edited from the web, click on Rating tables link.
554One may insert/update/delete records or apply changes on selections. For
555example it is possible to increase with XX units the rate for a specific
556destination.
557
558Numeric fields support mathematical operators [+-*/], one may update
559using absolute or relative values the fields in the rating tables.
560
561The rates may be copied in bulk and start quickly working with a fresh
562new rating table. Select in the Rates PSTN table by filtering on rate
563name. A new button appears which allows the copy of all selected rates
564into a new set. The rates are copied under the old rate id with _N
565suffix where N is the next available number for which same rate id does
566not exist.
567
568The content of the rating tables can be exported into comma separated
569files. The CSV format has the same structure as the import file, is
570fairly easy to modify an exported batch file into an external
571application and load it back into CDRTool.
572
573Note
574
575When $RatingEngine['split_rating_table'] is true, after changing the rates
576in the web interface or by importing them, you must run the script
577scripts/splitRatingTables.php to split the central billing_rates table into
578individual tables for each rate id. You do not need this feature if you have
579less than 100K rates in your system.
580
581
582ENUM TLD discounts
583------------------
584
585To apply discounts based on ENUM certain conditions must be met.
586
5871. The username part of the result of the ENUM lookup must be numeric and
588   contain a fully qualified E164 number, optional with a numeric prefix.
589
590   Example:
591
592   The user dialed 020800001, the SIP Proxy has normalized the destination
593   based on local policy by stripping 0 and adding country code 31 to obtain
594   the fully qualified E164 number 3120800001, than it performed an ENUM
595   lookup under top level domain e164.example.com for +3120800001. The ENUM
596   server responsable for e164.example.com returned a response with the
597   destination sip:01131208000011@gateway.example.com
598
599   In the CDR, ENUMtld is stored as e164.example.com
600
601   The rating logic checks if the TLD exists in the billing_enum_tlds table.
602   If it does, the rating engine tries to match the regexp field against the
603   username part of the destination from the ENUM response, which has been
604   saved in the Canonical URI. The match must return a fully qualified E164
605   number otherwise the call is considered to have ended to a no E164
606   destination and the call will be free of charge.
607
6082. In the ENUM tld table you must provision (for the example above):
609
610    - TLD: e164.example.com
611    - Regexp: 011([1-9][0-9]{7,})
612    - Discount: 25
613
614   The parenthesis of the Regexp field indicate the E164 number returned by
615   the match and discount is a percentage that will be subtracted form the
616   total price of the call. The formula is described in the PSTN rating
617   section.
618
619
620Reloading rating tables
621-----------------------
622
623The rating engine loads some of the rating tables in the memory, when the
624tables change a reload is needed. Reload of rating tables is possible
625without stopping the daemon by connecting to it and issuing the reload
626command. The init.d script can also be used for reloading the rating engine
627with the current values from the rating database.
628
629There are 3 ways of reloading the rating tables:
630
631a. Each change executed in the WEB interface for rate management may update
632the rating tables. If there is a change made to the database that requires a
633reload the link 'Reload rating tables' appears in red color on web page.
634Click on the link to execute the reload.
635
636b. Telnet to the IP address and port number specified for the Rating engine
637in global.inc. Type help to see the list of commands available. Locate the
638reload rates command and execute it followed by \n. You may see the result
639of the command in syslog. The results displayed by syslog will show how many
640entries have been reloaded from the rating table.
641
642c. Run /etc/init.d/cdrtool reload command
643
644
645Troubleshooting
646---------------
647
648To examine the rate information for a rated call click on the Id field on
649the leftmost column. (Java script support in browser is required). A blue
650area will open under the CDR line containing more information about the SIP
651session.
652
653If you see no price in the CDR or no rating information appears in the call
654details it means that either no destination was found in the destinations
655table or no rate has been associated with that destination. Make sure that
656for each entry in the destinations table there is a corespondent entry in
657the rates table. CDRTool rating engine can send warning emails if it finds
658missing entries in the rating tables if the system where CDRTool runs is
659properly configured to send emails and the e-mail notification addresses are
660set in global.inc:
661 
662$CDRTool['provider']['toEmail']  = "support@example.com";
663$CDRTool['provider']['bccEmail'] = "cdrtool@example.com";
664
665To log to syslog about missing rates or incorrect setup of the rating tables
666enable 'reportMissingRates' in $CDRTool['rating'] section of global.inc
667
668
669Renormalizing CDRs and historical rating
670----------------------------------------
671
672Sometime is useful to be able to change the rates for calls that have been
673already normalized and rated, for example after changing the rating tables
674you wish to apply the changes for the previous month for a customer.
675
676To re-rate the CDRs do the following:
677
6781. Change the current rates by using cvs files/WEB interface or add rates
679   valid for specific dates/destinations in the rates_history table
680
6812. Re-normalize the calls to be re-rated by either selecting ReNormalize
682   check-box in the search screen or by changing the Normalized field in the
683   CDR MySQL table (e.g. radacct):
684
685   Examples:
686
687   a) Re-rate calls for this month (2004-12) SIP domain example.com:   
688   UPDATE radacct set Normalized = '0' where Realm = 'example.com'
689   and AcctStartTime >= '2004-12-01'
690
691   b) Re-rate calls for SIP subscriber sip01@example.com:       
692   UPDATE radacct set Normalized = '0' where UserName = 'sip01@example.com'
693
6943. Apply rating again using command:
695
696   /var/www/CDRTool/scripts/normalize.php
697
698Notes
699
700Renormalization process can take long time during which your database
701(radacct table) will be intermitently locked. Perform this operation
702only during low traffic periods.
703
704It is advisable to re-rate only the CDRs for destinations that have
705different rates. To do this, select a filter in the CDR search screen, if
706the selection is right re-run the query by selecting Re-normalize button.
707
708After renormalization, the monthly usage information used by the quota
709system will be out of date. At the next run of the quotaCheck script, a full
710table scan will be performed. See QuotaSystem.txt for more information about
711quota.
712
713Holidays must be added as individual days YYYY-MM-DD in table
714billing_holidays. The profile applied for holidays is the same as for
715week-ends. Holidays are global and cannot be specified per customer.
716
717Renormalization process does not affect the balance of prepaid users.
718Prepaid is a real time un-reversible process, it goes in one direction. The
719prepaid balance is changed only by placing a call or adding credit to it.
720There are several reasons for this:
721
722- The balance before and after each CDR is not known to be able to roll it
723  back at a later time
724- Re-rating correctly is mathematically not possible for prepaid users that
725  have calls in progress
726- If the prices are higher than previously debited and end up with a
727  negative balance, the software cannot force the user to pay more
728  retroactively
729
730Re-normalization for the purpose of re-rating is useful only for postpaid
731accounts where you send an invoice at the end of the month and your can
732change things back and forth. If you need to perform manual credit/debit
733operations to some prepaid users because of faulty pricing, you can edit in
734CDRTool in the prepaid table the balance by using + or -.
735
736
737Known limitations
738-----------------
739
740The rating engine does not calculate prices based on the outbound carriers
741or outbound gateways, the rating plan is is assigned by the calling party
742and not by called party.
743
744Price discounts (except those based on ENUM tld) must be applied outside
745CDRTool, in the billing system that prints the actual invoices. CDRTool has
746no possibility to rate only calls after X minutes per month for subscriber
747Y, all calls are rated uniformly.
748
749
750Performance
751-----------
752
753Rating is part of the normalization process that happens every time a query
754is executed in the web interface or when the rating engine is contacted by
755the SIP Proxy or by the User Agent that performs the prepaid application.
756
757The following tests have been performed between two machines with 3 GHz CPU
758and 1 GB memory located on the same LAN having a round trip time of 0.2 ms.
759
760The rating tables have been populated durring the tests with:
761
762Aug 11 11:25:43 sip03 CDRTool[4945]: Loaded 8135 destinations
763Aug 11 11:25:43 sip03 CDRTool[4945]: Loaded 6 profilesPSTN
764Aug 11 11:25:43 sip03 CDRTool[4945]: Loaded 4 holidays
765Aug 11 11:25:44 sip03 CDRTool[4945]: Loaded 7273 prepaid accounts
766
767Tests results for the postpaid application:
768
769Clients         Rating command                  Execution speed
770----------------------------------------------------------------
7711               ShowPrice                       390/s per client
7725               ShowPrice                       100/s per client
77310              ShowPrice                       60/s per client
774
775
776Tests results for the prepaid application
777
778Clients         Rating command                  Execution speed
779----------------------------------------------------------------
7801               MaxSessionTime/DebitBalance     250/s per client
7815               MaxSessionTime/DebitBalance     80/s per client
78210              MaxSessionTime/DebitBalance     40/s per client
783
784Client means either a SIP Proxy entity or a CDRTool server, which performs
785the normalization process.
786
787The rates are read directly from MySQL from version 6.1 instead of
788being cached as they are found based on a known index.
789
790To monitor the connections to the rating engin server telnet to
791the rating engine port and issue the ShowClients command. Example output:
792
793ShowClients
794
795Clients:
796
7971. 91.20.228.143:32837
7982. 85.1.86.71:57945
7993. 91.20.228.146:35098
8004. 91.20.228.150:34285
8015. 91.20.228.129:55090
8026. 91.20.228.164:34147
803
804Requests:
805
80612 requests from 91.20.228.129
80711 requests from 91.20.228.150
8088 requests from 85.11.86.71
8092 requests from 91.20.228.164
810
811Statistics:
812
813Total requests: 33
814Uptime: 169 seconds
815Load: 0.20/s
816
Note: See TracBrowser for help on using the browser.