http://www.loligo.com/asterisk/misc/rates				v.1.3 2009-04-24 jtodd@loligo.com

Telco Rate Transmission Guidelines

Introduction
   In the development of relationships with telephony route carriers, we have encountered different styles of rate table presentation, many of which have caused us to go back to the vendor on several occasions looking for additional information, or which have forced us to create extensive scripting and importation tools which introduce errors and delays into our rate examination process.  The huge variety of formats that we have encountered has made it difficult for us to manage rates appropriately without some standard format from which we can extract call routing tables.   This delay and correspondence causes distress to us, and to our vendors, and this document was authored in the hopes of removing those sources of inaccuracy and conflict.

   After reviewing the many dozens of possible fields that can be presented in a routing database, we have distilled our requirements down to a bare minimum of fields which we require from our vendors, and the format in which we require those fields.  From this table, we will almost directly import the routes into our system, eliminating any secondary or tertiary processing steps.  This direct import reduces error rates, eliminates miscommunications, and removes any ambiguity in dial plan costs during reconciliation, as the vendor will maintain complete responsibility over delivery of accurate data to our rating and routing engine.

  We hope that this format will not be overly burdensome to our vendors, and we also hope that we can extend this format in the future to become more widely used as an exchange mechanism for actual routing data.  If you have any comments on this document or the format we require, please send email to MYNAME@MYDOMAIN.COM for discussion.  This document is not copyrighted, nor does it fall under any non-disclosure agreements we may have with your firm.  We encourage its distribution, though we would appreciate changes being forwarded back to us if they make this document or format more useful to you, so that we may update our own methods if they warrant such changes.

Specifics
   We can make automated uploads of data possible via email or web if that is more convenient for a vendor who may update this information frequently.  Please speak with a technician about details.

   We expect that most vendors will provide merely the two mandatory fields (e.164 and peak price) and the text/nation city description field.  This is completely sufficient.   Some vendors will have peak/offpeak pricing, or effective dates, and we have included those methods in the input rows if they are useful to the purpose.  Fields that are not listed as “REQUIRED” do not need to be provided as long as the default values indicated below are acceptable and correct per the contract arranged with VOIP Inc..  Fields that are not required can be left blank, with commas put directly after one another to signify an empty field.  If there are no additional fields to be presented to the right of the last field which contains valid data, those empty fields and their separating commas may be left off entirely (see example section.)

Other items of note on this process:
-	Removal of a route from a pre-existing upload is accomplished by creating a row for that route with the effective date and end date 1 minute apart
-	All times are assumed to be GMT (+00:00) (exceptions can be made - see technician)
-	All prices are US Dollars (exceptions possible – see technician)
-	All routes are assumed to be delivered through the same gateway template.  If multiple gateways are used which have different prices or specific abilities, then each gateway needs it's own upload.  See technician.
-	E.164 addresses do not need to be in numeric order
-	Please make sure there are no commas in text field descriptions, as this will lead to those lines being excluded due to bad formatting.  We have chosen not to use escape sequences to eliminate complexity.

File Format:
  We will accept comma separated value files in ASCII text, with standard CR/LF at the end of each row.  No 8-bit characters should be included in the file; any row containing invalid characters will be excluded.  
  We will accept Microsoft Excel spreadsheets, with columns delimited where commas appear in the format below.  Please use Microsoft Excel with a version which is equal to or more modern than Microsoft Excel 2000.

   Please name the file with your company name, the date in YYYYMMDD format, and a very short description of the rate type.  Example: SUPERTELEZAP-20040719-AtoZ.xls

Transmission destination:
  Send all completed rate sheets to MYNAME@MYDOMAIN.COM as MIME attachments.  

Data Format:

[e.164],[text nation/city description],[first interval per-minute price],[first interval],\
[subsequent per-minute price],[subsequent interval],\
[off-peak first interval per-minute price],[off-peak first interval],\
[off-peak subsequent per-minute price],[off-peak subsequent interval],[effective date],\
[end date]

e.164 = Number in e.164 format (0-9, no other symbols or letters of any kind.)  This means including a "1" if the number is a NANP number (i.e.: 1212 for New York) and NOT including a "011" or other leading digits if it is a non-US number (i.e.: 44 for United Kingdom) (REQUIRED FIELD)

text/nation city descripton = A text description of no more than 60 characters describing the nation and city of the destination.   ASCII text only, no 8-bit characters, no commas or quotes.   (default=NOT APPLICABLE) (note: this field may be empty; we can assign text descriptions to rates, as we have a pre-existing table.  However, if you provide to us any destinations that we do not already have in our pre-built destination table and you do not provide a text description, we will discard your rate.  Therefore, if you have any number of specific cities or destinations which are not commonly used, we strongly suggest you include text descriptions of those destinations.) (default=we fill in)

first interval per-minute price = This is the price per minute of peak minutes, for the first measured interval.  Price in US dollars.  (i.e.: .009)  (REQUIRED FIELD)

first interval = the number of seconds in the first interval of billing (i.e.: 60 for one minute)  (default=1)

subsequent per-minute price = this is the price per minute of peak minutes for every interval after the first interval.  Price in US dollars. (i.e.: .003)  (default=<first interval per-minute price>)

subsequent interval = the number of seconds in the billing intervals following the first interval (i.e.: "1" for one second)  (default=1)

off-peak first interval per-minute price = This is the price per minute of off-peak minutes.  Price in US dollars.  (i.e.: .009) (default=<first interval per-minute price>)

off-peak first interval = for off-peak hours (if they apply,) the number of seconds in the first interval of billing (i.e.: 60 for one minute)  (default=1)

off-peak subsequent per-minute price = this is the price per minute of off-peak minutes for every interval after the first interval.  Price in US dollars. (i.e.: .003)  (default=<first interval per-minute price>)

off-peak subsequent interval = for off-peak hours (if they apply,) the number of seconds in the billing intervals following the first interval (i.e.: "1" for one second)  (default=1)

effective date = the date from which this row is effective, in yyyy-mm-dd hh:mi:ss format (i.e.: 2004-05-03 18:00:00) (default=moment of importation)

end date = the date after which this row is no longer used, in yyyy-mm-dd hh:mi:ss format (i.e.: 2004-12-31 23:59:00) (default=never)

Examples:

The simplest possible example:

44,,.009
213,,.012
21361,,.0135

The same example routes as above, but a bit more human-friendly:

44,United Kingdom,.009
213,Algeria,.012
21361,Algeria Mobile,.0135

Both of the above examples are acceptable, but the latter example with location names would be more appropriate, as it includes location descriptions.  In the examples, any calls to country code “213” that did NOT match “21361” would be billed at .012.  In other words:  unless a more specific cost is assigned, the next least specific cost will be used.

A more complex example row:

Calls to 672 are $3.75 for the first minute, and then $3.05 per minute billed in subsequent 15 second increments.  No off-peak hours.  This price is effective on August 1st, 2004.

672,Australian Terr. - Norfolk Island,3.75630,60,3.05,15,,,,2004-08-01 00:01:00

-- end