System information

extension (or station2, station3, etc., as appropriate). If the line1 key on the phone is
pressed, a call should be sent to the station1_line1 extension (or station2_line1, etc.).
Any time that a phone goes off-hook or a line key is pressed, the call that is made will
immediately connect it to one of the analog lines. For a line that is not already in use,
the analog line will be providing a dialtone, and the user will be able to send digits to
make a call. If a user presses a line key for a line that is already in use, that user will be
bridged into the existing call on that line. The sla_stations context looks like this:
[sla_stations]
exten => station1,1,SLAStation(station1)
exten => station1_line1,hint,SLA:station1_line1
exten => station1_line1,1,SLAStation(station1_line1)
exten => station1_line2,hint,SLA:station1_line2
exten => station1_line2,1,SLAStation(station1_line2)
exten => station2,1,SLAStation(station2)
exten => station2_line1,hint,SLA:station2_line1
exten => station2_line1,1,SLAStation(station2_line1)
exten => station2_line2,hint,SLA:station2_line2
exten => station2_line2,1,SLAStation(station2_line2)
exten => station3,1,SLAStation(station3)
exten => station3_line1,hint,SLA:station3_line1
exten => station3_line1,1,SLAStation(station3_line1)
exten => station3_line2,hint,SLA:station3_line2
exten => station3_line2,1,SLAStation(station3_line2)
exten => station4,1,SLAStation(station4)
exten => station4_line1,hint,SLA:station4_line1
exten => station4_line1,1,SLAStation(station4_line1)
exten => station4_line2,hint,SLA:station4_line2
exten => station4_line2,1,SLAStation(station4_line2)
Additional phone configuration tasks
The previous section covered the dialplan for trunks and stations. There are some spe-
cific things to keep in mind when setting up phones for use with this setup. First, each
phone should be configured to send a call as soon as it is taken off-hook.
The other important item is the configuration of the line keys. Asterisk uses extension
state subscriptions to control the LEDs next to the line buttons. Beyond that, each line
key should be configured as a speed-dial. Use the following checklist for your line key
configuration (how you accomplish these tasks will depend on the specific phones you
are using):
Set the label of the key to be Line 1 (etc.), or whatever you deem appropriate.
Set up the keys such that the Line 1 key on station1 subscribes to the state of
station1_line1, and so on. This is required so Asterisk can make the LEDs reflect
the state of the lines.
322 | Chapter 14:Device States