
Upgrade instructions
====================


Version 5.3.0
-------------
  
Support for ENUM based discounts require the following changes:

1. Setup OpenSER to log a new Radius attribute ENUM-TLD:

   modparam("acc", "radius_extra",       "Sip-RPid=$avp(s:rpid); \
                                         ...
                                         ENUM-TLD=$avp(s:enum_tld)")


  if (enum_query("e164.arpa.")) {
        xlog("L_INFO", "Found E2U+sip address in e164.arpa: $ru");
        avp_delete("$avp(s:enum_tld)/g");
        avp_write("e164.arpa", "$avp(s:enum_tld)");
   }

2. update OpenSER radius dictionary with:

ATTRIBUTE       ENUM-TLD               232     string

3. reload the SQL stored procedures into the radius database from:

setup/radius/OpenSER/radius_accounting.proc

4. update Freeradius OpenSER dictionary with:

ATTRIBUTE       ENUM-TLD               232     string

5. update Freeradius configuration with the new configuration from:

    setup/radius/OpenSER/radius_accounting.conf

6. restart Feeradius server

7. rename the column FramedProtocol to ENUMtld in all radiusYYYYMMDD
tables. This operation can take a long time to complete depending on the
number of records in the table. During this modification no accounting
records can be written to the table. When using table auto-rotation with
SQL stored procedures, it is best to apply these changes in the first
day of the month imediately after the table rotation moment.

alter table radacctYYYMMDD change column FramedProtocol ENUMtld varchar(64) not NULL;

8. apply the changes from setup/mysql/alter_tables.mysql

