mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-05 04:43:44 +00:00
There were several problems with the dynamic realtime peer/user lookup code. The lookup logic had become rather hard to read due to lots of incremental changes to the realtime_peer function. And, during the addition of the sipregs functionality, several possibilities for memory leaks had been introduced. The insecure=port matching has always been broken for anyone using the sipregs family. And, related, the broken implementation forced those using sipregs to *still* have an ipaddr column on their sippeers table. Thanks Terry Wilson for comprehensive testing and finding and fixing unexpected behaviour from the multientry realtime call which caused the realtime_peer to have a completely unused code path. This changeset fixes the leaks, the lookup inconsistenties and that you won't need an ipaddr column on your sippeers table anymore (when you're using sipregs). Beware that when you're using sipregs, peers with insecure=port will now start matching! (closes issue ASTERISK-17792) (closes issue ASTERISK-18356) Reported by: marcelloceschia, Walter Doekes Reviewed by: Terry Wilson Review: https://reviewboard.asterisk.org/r/1395 ........ Merged revisions 342927 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342929 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
89 lines
3.1 KiB
Plaintext
89 lines
3.1 KiB
Plaintext
;
|
|
; Static and realtime external configuration
|
|
; engine configuration
|
|
;
|
|
; See https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration
|
|
; for basic table formatting information.
|
|
;
|
|
[settings]
|
|
;
|
|
; Static configuration files:
|
|
;
|
|
; file.conf => driver,database[,table[,priority]]
|
|
;
|
|
; maps a particular configuration file to the given
|
|
; database driver, database and table (or uses the
|
|
; name of the file as the table if not specified)
|
|
;
|
|
;uncomment to load queues.conf via the odbc engine.
|
|
;
|
|
;queues.conf => odbc,asterisk,ast_config
|
|
;extensions.conf => sqlite,asterisk,ast_config
|
|
;
|
|
; The following files CANNOT be loaded from Realtime storage:
|
|
; asterisk.conf
|
|
; extconfig.conf (this file)
|
|
; logger.conf
|
|
;
|
|
; Additionally, the following files cannot be loaded from
|
|
; Realtime storage unless the storage driver is loaded
|
|
; early using 'preload' statements in modules.conf:
|
|
; manager.conf
|
|
; cdr.conf
|
|
; rtp.conf
|
|
;
|
|
;
|
|
; Realtime configuration engine
|
|
;
|
|
; maps a particular family of realtime
|
|
; configuration to a given database driver,
|
|
; database and table (or uses the name of
|
|
; the family if the table is not specified
|
|
;
|
|
;example => odbc,asterisk,alttable,1
|
|
;example => mysql,asterisk,alttable,2
|
|
;example2 => ldap,"dc=oxymium,dc=net",example2
|
|
;
|
|
; Additionally, priorities are now supported for use as failover methods
|
|
; for retrieving realtime data. If one connection fails to retrieve any
|
|
; information, the next sequential priority will be tried next. This
|
|
; especially works well with ODBC connections, since res_odbc now caches
|
|
; when connection failures occur and prevents immediately retrying those
|
|
; connections until after a specified timeout. Note: priorities must
|
|
; start at 1 and be sequential (i.e. if you have only priorities 1, 2,
|
|
; and 4, then 4 will be ignored, because there is no 3).
|
|
;
|
|
; "odbc" is shown in the examples below, but is not the only valid realtime
|
|
; engine. There is:
|
|
; odbc ... res_config_odbc
|
|
; sqlite ... res_config_sqlite
|
|
; pgsql ... res_config_pgsql
|
|
; curl ... res_config_curl
|
|
; ldap ... res_config_ldap
|
|
;
|
|
;iaxusers => odbc,asterisk
|
|
;iaxpeers => odbc,asterisk
|
|
;sippeers => odbc,asterisk
|
|
;sipregs => odbc,asterisk ; (avoid sipregs if possible, e.g. by using a view)
|
|
;voicemail => odbc,asterisk
|
|
;extensions => odbc,asterisk
|
|
;meetme => mysql,general
|
|
;queues => odbc,asterisk
|
|
;queue_members => odbc,asterisk
|
|
;musiconhold => mysql,general
|
|
;queue_log => mysql,general
|
|
;
|
|
;
|
|
; While most dynamic realtime engines are automatically used when defined in
|
|
; this file, 'extensions', distinctively, is not. To activate dynamic realtime
|
|
; extensions, you must turn them on in each respective context within
|
|
; extensions.conf with a switch statement. The syntax is:
|
|
; switch => Realtime/[[db_context@]tablename]/<opts>
|
|
; The only option available currently is the 'p' option, which disallows
|
|
; extension pattern queries to the database. If you have no patterns defined
|
|
; in a particular context, this will save quite a bit of CPU time. However,
|
|
; note that using dynamic realtime extensions is not recommended anymore as a
|
|
; best practice; instead, you should consider writing a static dialplan with
|
|
; proper data abstraction via a tool like func_odbc.
|
|
|