README.realtime 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. The Asterisk Realtime Architecture
  2. ----------------------------------
  3. The Asterisk Realtime Architecture is a new set of drivers and
  4. functions implemented in Asterisk 1.2. The benefits of this
  5. architecture are many, both from a code management
  6. standpoint and from an installation perspective.
  7. Additional information on the configuration of Realtime with Asterisk
  8. can be found in README.extconfig
  9. The ARA is designed to be independent of storage. Currently, most
  10. drivers are based on SQL, but the architecture should be able to handle
  11. other storage methods in the future, like LDAP.
  12. The main benefit comes in the database support. In Asterisk v1.0 some
  13. functions supported MySQL database, some PostgreSQL and other ODBC.
  14. With the ARA, we have a unified database interface internally in Asterisk,
  15. so if one function supports database integration, all databases that has a
  16. realtime driver will be supported in that function.
  17. Currently there are three realtime database drivers:
  18. * ODBC: Support for UnixODBC, integrated into Asterisk
  19. The UnixODBC subsystem supports many different databases,
  20. please check www.unixodbc.org for more information.
  21. * MySQL: Found in the asterisk-addons cvs archive on cvs.digium.com
  22. * Res_perl: Found in the asterisk-addons cvs archive on cvs.digium.com
  23. * Two modes: Static and Realtime
  24. --------------------------------
  25. The ARA realtime mode is used to dynamically load and update objects.
  26. This mode is used in the SIP and IAX2 channels, as well as in the voicemail
  27. system. For SIP and IAX2 this is similar to the v1.0 MYSQL_FRIENDS
  28. functionality. With the ARA, we now support many more databases for
  29. dynamic configuration of phones.
  30. The ARA static mode is used to load configuration files. For the Asterisk
  31. modules that read configurations, there's no difference between a static
  32. file in the file system, like extensions.conf, and a configuration loaded
  33. from a database.
  34. * Realtime SIP friends
  35. ----------------------
  36. The SIP realtime objects are users and peers that are loaded in memory
  37. when needed, then deleted. This means that Asterisk currently can't handle
  38. voicemail notification and NAT keepalives for these peers. Other than that,
  39. most of the functionality works the same way for realtime friends as for
  40. the ones in static configuration.
  41. There is some work to create a solution for Realtime SIP devices that
  42. loads from database and stays in memory for the duration of a call or
  43. a registration, but that work is not integrated into Asterisk yet.
  44. * New function in the dial plan: The Realtime Switch
  45. ----------------------------------------------------
  46. The realtime switch is more than a port of functionality in v1.0 to the
  47. new architecture, this is a new feature of Asterisk based on the
  48. ARA. The realtime switch lets your Asterisk server do database lookups
  49. of extensions in realtime from your dial plan. You can have many Asterisk
  50. servers sharing a dynamically updated dial plan in real time with this
  51. solution.
  52. Note that this switch does _NOT_ support Caller ID matching, only
  53. extension name/pattern matching.
  54. * So what can you do?
  55. ---------------------
  56. The realtime Architecture lets you store all of your configuration in
  57. databases and reload it whenever you want. You can force a reload over
  58. the AMI, Asterisk Manager Interface or by calling Asterisk from a
  59. shell script with
  60. asterisk -rx "reload"
  61. You may also dynamically add SIP and IAX devices and extensions
  62. and making them available without a reload, by using the realtime
  63. objects and the realtime switch.
  64. * Configuration in extconfig.conf
  65. ---------------------------------
  66. You configure the ARA in extconfig.conf (yes, it's a strange name, but
  67. is was defined in the early days of the realtime architecture and kind
  68. of stuck). Please see README.extconfig for database schemas.
  69. The part of Asterisk that connects to the ARA use a well defined family
  70. name to find the proper database driver. The syntax is easy:
  71. <family> => <realtime driver>,<db name>[,<table>]
  72. The options following the realtime driver identified depends on the
  73. driver.
  74. Defined well-known family names are:
  75. * sippeers, sipusers SIP peers and users
  76. * iaxfriends IAX2 peers
  77. * voicemail Voicemail accounts
  78. There is documentation of the SQL database in the file
  79. README.extconfig in your Asterisk source code tree, the /doc
  80. directory.
  81. For voicemail storage with the support of ODBC, there is a
  82. README.odbcstorage documentation file.
  83. * FreeTDS not supported
  84. -----------------------
  85. Due to architectural constraints in the FreeTDS libraries, FreeTDS is not
  86. supported for use with realtime at this time.