cdr_adaptive_odbc.conf 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ; The point of this module is to allow you log whatever you like in terms of
  2. ; the CDR variables. Do you want to log uniqueid? Then simply ensure that
  3. ; your table has that column. If you don't want the column, ensure that it
  4. ; does not exist in the table structure. If you'd like to call uniqueid
  5. ; something else in your table, simply provide an alias in the configuration
  6. ; file that maps the standard CDR field name (uniqueid) to whatever column
  7. ; name you like. Perhaps you'd like some extra CDR values logged that aren't
  8. ; in the standard repertoire of CDR variables (some that come to mind are
  9. ; certain values used for LCR: route, per_minute_cost, and per_minute_price).
  10. ; Simply set those CDR variables in your dialplan, i.e. Set(CDR(route)=27),
  11. ; ensure that a corresponding column exists in your table, and cdr_adaptive_odbc
  12. ; will do the rest.
  13. ;
  14. ; This configuration defines the connections and tables for which CDRs may
  15. ; be populated. Each context specifies a different CDR table to be used.
  16. ;
  17. ; The columns in the tables should match up word-for-word (case-insensitive)
  18. ; to the CDR variables set in the dialplan. The natural advantage to this
  19. ; system is that beyond setting up the configuration file to tell you what
  20. ; tables to look at, there isn't anything more to do beyond creating the
  21. ; columns for the fields that you want, and populating the corresponding
  22. ; CDR variables in the dialplan. For the builtin variables only, you may
  23. ; create aliases for the real column name.
  24. ;
  25. ; Please note that after adding columns to the database, it is necessary to
  26. ; reload this module to get the new column names and types read.
  27. ;
  28. ; Warning: if you specify two contexts with exactly the same connection and
  29. ; table names, you will get duplicate records in that table. So be careful.
  30. ;
  31. ;[first]
  32. ;connection=mysql1
  33. ;table=cdr
  34. ;[second]
  35. ;connection=mysql1
  36. ;table=extracdr
  37. ;[third]
  38. ;connection=sqlserver
  39. ;table=AsteriskCDR
  40. ;schema=public ; for databases which support schemas
  41. ;usegmtime=yes ; defaults to no
  42. ;alias src => source
  43. ;alias channel => source_channel
  44. ;alias dst => dest
  45. ;alias dstchannel => dest_channel
  46. ;
  47. ; Any filter specified MUST match exactly or the CDR will be discarded
  48. ;filter accountcode => somename
  49. ;filter src => 123
  50. ; Negative filters are also now available
  51. ;filter src != 456
  52. ;
  53. ; Additionally, we now support setting static values per column. The reason
  54. ; for this is to allow different sections to specify different values for
  55. ; a certain named column, presumably separated by filters.
  56. ;static "Some Special Value" => identifier_code