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 paper will demonstrate advanced ways to use the Astribank relay outputs feature. Basic information about using the Astribank relay feature and wiring information can be found in Xorcom White Paper ".
Let's assume that you want to power off a server, and then power it on remotely. You want this operation to be secure, and to eliminate the possibility of human error. Once you have programmed the Astribank unit, the scenario will transpire as follows:Using Asterisk Caller ID to Open Doors"
Note: The following example uses internal extensions rather than an external PSTN line. The same method can be used with external PSTN lines.
; For Caller ID 100 the PIN number is 123 exten => valid-100,1,Authenticate(123) ; For Caller ID 101 the PIN number is 456 exten => valid-101,1,Authenticate(456) ; For Caller ID 102 the PIN number is 789 exten => valid-102,1,Authenticate(789) ; For Caller ID 103 the PIN number is 012 exten => valid-103,1,Authenticate(012) ; If the call passes the authentication stage ; go to the action context [restart-service] exten => _valid-.,2,goto(restart-service,s,1) ; If Caller ID is not recognized, dial the FAX machine exten => i,1,Dial(FAX_EXTEN) exten => i,2,Hangup() [restart-service] ; Play the menu message: 1 for mail server restart ; 2 for alarm system restart exten => s,1,Background(menu-message) ; The user chose to open the first relay ; Dial the first relay, wait 5 seconds and hangup exten => 1,1,Dial(ZAP/9,5) exten => 1,2,Hangup() ; The user chose to open the second relay ; Dial the second relay, wait 5 seconds and hang-up exten => 2,1,Dial(ZAP/10,5) exten => 2,2,Hangup() ; The user pressed an invalid number ; Send user back to menu for another try exten => i,1,Playback(error-number) exten => i,2,goto(s,1) ; In the event of a time out the channel terminates exten => t,1,Hangup()
Please send your comments or suggested applications to info@xorcom.com