|
Xorcom / Documentation / White Papers / Asterisk to Open Doors |
|
Left menu
- Manuals
-
White Papers
- Land line calls from cellular phones
- Astribank-32 for hotels
- Astribank Vs. Channel Banks
- XR1000 Firmware Upgrade
- Asterisk to Open Doors
- USB2 Interface
- Incoming Call Latency
- Astribank for Burglar Alarms
- Secured Astribank Relays Output
- Treating Echo
- Color Coding for TCO
- Fax & Modem
- Astribank Vs. PCI Cards
- Synchronizing Astribanks
- Articles
- XorCommunique Newsletter
- Brochures
- News Archive
Using Asterisk Caller ID to Open Doors
Tuesday July 17 2007
Every member of Xorcom’s Astribank™ line of products includes two auxiliary output ports and four auxiliary input ports. These features open up a whole world of exciting applications for the Asterisk IP-PBX.
This white paper will demonstrate how to control access of pre-approved personnel to restricted areas by using the output ports in Xorcom’s Astribank, a channel bank specifically designed for Asterisk, and modifying the Asterisk dialing plan.
By using internally isolated relay, each one of the two output ports can switch up to 220 volts, 2 amperes.
A relay can be activated by dialing in to its extension. The default relay extension numbers are the two numbers that follow the last line (line 8) in the Astribank-8. For larger Astribanks (Astribank-16, Astribank-24 or Astribank-32), the default numbers of the relays are the two numbers that follow the 8th extension on the first (left-most) block of extensions.
Following is a step-by-step explanation of how to wire and set up your Astribank to control doors (or any other equipment of your choice).
- Dial in to the relay and listen to it: if your Astribank is configured to support extensions 401 to 408, dial extension 409 with your ear close to the Astribank. You'll hear a "click" from the Astribank unit. Hang up your phone; you'll soon hear another "click". The first "click" is the sound that the relay makes when it is activated. This works exactly like a light switch, or pressing a push-button to activate a doorbell. Dialing to the second relay (410, in our example) will give the same results (with the second relay).
-
Prepare a cable: you can use a simple CAT-5 network cable. Cut it on one end, and strip off the housing to expose the 8 internal wires (see Figure 1).
Figure 1: Illustration of CAT-5 cable with 8 internal wires exposed.
-
Figure 2 shows the wiring diagram of the output RJ-45 connector. If you are not sure how the wires in your cable are connected, you can use a simple Ohm meter or conductivity meter to find the right pair of wires. You'll measure "no conductivity" until you dial the relay's number (and then you’ll get "short circuit").
Figure 2: Wiring diagram of the output RJ-45 connector.
-
Connect the wiring to activate the door lock (or any other appliance or equipment).
- Warning! The output relays are not fused. Driving more than 2 amperes may damage the relay and void your warranty!
- Warning! If you are switching voltages that are more than 24 volts, use licensed electrician services to wire the system. In addition, use the Ground Tab (supplied with the Astribank unit) to ground the Astribank box.
- Test the installation: Dial to the relay (409 or 410 in our example) and check that the door or the appliance is activated.
- Update the dialing table to include all the active phone numbers in the list. Paragraph 7 (below) shows how to do this by editing the dialing plan.
- To edit the dialing plan:
; Define an extension you will call in order to activate the relay
; For this example, extension number => 456
; Goto virtual extension "ActivateRelay / valid-[CallerIdValue]"
exten => 456,1,Goto(ActivateRelay,valid-${CALLERIDNUM},1)
; Define the context of the virtual extensions
[ActivateRelay]
; Define an extension for each legitimate CallerId
exten => valid-100,1,Noop
exten => valid-101,1,Noop
exten => valid-102,1,Noop
exten => valid-103,1,Noop
; The following items will execute for all legitimate Callers
; Open the relay using a dial command to the hardware
exten => _valid-.,2,Dial(ZAP/10/10/tr)
; Wait for 1 second
exten => _valid-.,3,Wait(1)
; Play a confirmation message
exten => _valid-.,4,Playsound(goodbye)
; End the call
exten => _valid-.,5,Hangup()
; If the Caller ID is not recognized
; the caller will hear an error message
; and the call will terminate
exten => i,1,Playsound(invalid-callerId)
exten => i,2,Hangup()
8. Tips and tricks:
- To activate the relay with a Caller ID that comes from the PSTN (external line) use a specific incoming line. As per its default settings, Asterisk waits for the second ring before the operator's phone starts to ring. The Caller ID is transferred to the Asterisk from the PSTN between the first and the second ring. You can program the dialing plan so that the call will not be forwarded to the operator or any other extension (for a specific number of rings, or forever), so that the caller will not be charged for the call.
- You can program the dialing plan to stop ringing after the second ring. Keep in mind that the relay will be activated as long the extension associated with it rings.
- You can allow internal extensions to activate the relay, or to block them from doing so, so that the receptionist, for example, will be able to open the door from her extension, while other extensions will not be able to perform that action.
Please send your comments or suggested applications to info@xorcom.com
Top menu |
