Add an additional column in the routing table, containing the maximal
value of "i_rate" for the targeted destination and vendor (future
included). "i_rate" is the index of the table "Rates" from which you already retrieve the billing routing preference. It is auto incremented, so if it changes you are sure that the rate was modified. If you store the rates last modification date, remove it from the table. Of course, you must not lose any past data when updating the table structure. |