asterisk/configs/sla.conf.sample
Russell Bryant 0bfe2d4cc4 astobj2-ify the SLA code
The SLA code within app_meetme was written before asotbj2 had been
merged into Asterisk.  Worse, support for reloads did not exist at first
and was added later as a bolt-on feature.  I knew at the time that
reloading was not safe at all while SLA was in use, so the reload would
be queued up to execute when the system was idle.  Unfortunately, this
approach was still prone to errors beyond the fact that this was the
only place in Asterisk where configuration was not reloaded
instantly when requested.

This patch converts various SLA objects to be reference counted objects
using astobj2.  This allows reloads to be processed while the system is
in use.  The code ensures that the objects will not disappear while one
of the other threads is using them.  However, they will be immediately
removed from the global trunk and station containers so no new calls
will use them if removed from configuration.

Review: https://reviewboard.asterisk.org/r/2581/
........

Merged revisions 393928 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 393929 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-10 01:56:15 +00:00

152 lines
6.9 KiB
Text

;
; Configuration for Shared Line Appearances (SLA).
;
; See http://wiki.asterisk.org or doc/AST.pdf for more information.
;
; ---- General Options ----------------
[general]
;attemptcallerid=no ; Attempt CallerID handling. The default value for this
; is "no" because CallerID handling with an SLA setup is
; known to not work properly in some situations. However,
; feel free to enable it if you would like. If you do, and
; you find problems, please do not report them.
; -------------------------------------
; ********************************
; **** Configuration Ordering ****
; ********************************
; Note that SLA configuration processing assumes that *all* trunk declarations are
; listed in the configuration file before any stations.
; ********************************
; ********************************
; ---- Trunk Declarations -------------
;
;[line1] ; Provide a name for this trunk.
;type=trunk ; This line is what marks this entry as a trunk.
;device=DAHDI/3 ; Map this trunk declaration to a specific device.
; NOTE: You can not just put any type of channel here.
; DAHDI channels can be directly used. IP trunks
; require some indirect configuration which is
; described in
; https://wiki.asterisk.org/wiki/display/AST/SLA+Trunk+Configuration
;autocontext=line1 ; This supports automatic generation of the dialplan entries
; if the autocontext option is used. Each trunk should have
; a unique context name. Then, in chan_dahdi.conf, this device
; should be configured to have incoming calls go to this context.
;ringtimeout=30 ; Set how long to allow this trunk to ring on an inbound call before hanging
; it up as an unanswered call. The value is in seconds.
;barge=no ; If this option is set to "no", then no station will be
; allowed to join a call that is in progress. The default
; value is "yes".
;hold=private ; This option configure hold permissions for this trunk.
; "open" - This means that any station can put this trunk
; on hold, and any station can retrieve it from
; hold. This is the default.
; "private" - This means that once a station puts the
; trunk on hold, no other station will be
; allowed to retrieve the call from hold.
;[line2]
;type=trunk
;device=DAHDI/4
;autocontext=line2
;[line3]
;type=trunk
;device=DAHDI/3
;autocontext=line3
;[line4]
;type=trunk
;device=Local/disa@line4_outbound ; A Local channel in combination with the Disa
; application can be used to support IP trunks.
; See https://wiki.asterisk.org/wiki/display/AST/SLA+Trunk+Configuration
;autocontext=line4
; --------------------------------------
; ---- Station Declarations ------------
;[station1] ; Define a name for this station.
;type=station ; This line indicates that this entry is a station.
;device=SIP/station1 ; Each station must be mapped to a device.
;autocontext=sla_stations ; This supports automatic generation of the dialplan entries if
; the autocontext option is used. All stations can use the same
; context without conflict. The device for this station should
; have its context configured to the same one listed here.
;ringtimeout=10 ; Set a timeout for how long to allow the station to ring for an
; incoming call, in seconds.
;ringdelay=10 ; Set a time for how long to wait before beginning to ring this station
; once there is an incoming call, in seconds.
;hold=private ; This option configure hold permissions for this station. Note
; that if private hold is set in the trunk entry, that will override
; anything here. However, if a trunk has open hold access, but this
; station is set to private hold, then the private hold will be in
; effect.
; "open" - This means that once this station puts a call
; on hold, any other station is allowed to retrieve
; it. This is the default.
; "private" - This means that once this station puts a
; call on hold, no other station will be
; allowed to retrieve the call from hold.
;trunk=line1 ; Individually list all of the trunks that will appear on this station. This
; order is significant. It should be the same order as they appear on the
; phone. The order here defines the order of preference that the trunks will
; be used.
;trunk=line2
;trunk=line3,ringdelay=5 ; A ring delay for the station can also be specified for a specific trunk.
; If a ring delay is specified both for the whole station and for a specific
; trunk on a station, the setting for the specific trunk will take priority.
; This value is in seconds.
;trunk=line4,ringtimeout=5 ; A ring timeout for the station can also be specified for a specific trunk.
; If a ring timeout is specified both for the whole station and for a specific
; trunk on a station, the setting for the specific trunk will take priority.
; This value is in seconds.
;[station](!) ; When there are a lot of stations that are configured the same way,
; it is convenient to use a configuration template like this so that
; the common settings stay in one place.
;type=station
;autocontext=sla_stations
;trunk=line1
;trunk=line2
;trunk=line3
;trunk=line4
;[station2](station) ; Define a station that uses the configuration from the template "station".
;device=SIP/station2
;
;[station3](station)
;device=SIP/station3
;
;[station4](station)
;device=SIP/station4
;
;[station5](station)
;device=SIP/station5
; --------------------------------------