Unlock station by PIN code (Node-RED)
From Zenitel Wiki
Functional description
This article explains how a range of stations in a Zenitel Connect Pro system can be prevented from dialing any user or feature numbers until they are explicitly unlocked using a (secret) PIN code.
The PIN code is implemented as an Event Trigger number. When a user dials this PIN code, the system unlocks the station for a configurable period of time. Once this period expires, the station automatically returns to its locked state.
Example:
A user dials 8951 + 106 to unlock the station and immediately place a call to directory number 106.
Configuration
This application is based on a premade Node-RED flow.
Preparations
- Node-RED must be installed and the communication between Node-RED and Zenitel Connect Pro must be established.
- Download the flow "PIN_Code_Lock_Station" from the Downloads section
- Import the flow in to your Node-RED application
Node configuration
The imported flow contains two groups, one for Call Handling and one for Event Trigger handling.
Call Handling group:
| Call Handling flow |
With reference to the above imported flow:
- Node 1 (Zenitel Call State Event): This node receives information about all calls in the system. The only configuration required is to assign the "ZCP Link".
- Node 2 (Dirnos requiring PIN): Stations in the defined ranges (e.g. 200 - 220, 245 to 299) require the use of PIN code. You can modify the range in this node.
- Node 3 (Exclude PIN): Enter the directory number of the PIN code. This is to prevent the PIN code itself from being locked out.
- Node 4 (Check if station is unlocked): Checks if the global station variable is "true" (= station locked) or "false" (= station unlocked). If the station is locked, the message is sent to the next node.
- Node 5 (Zenitel Call End): When the call is not authorized this node will send a command to ZCP to cancel the call immediately after initialization. The only configuration required is to assign the "ZCP Link".
Event Trigger group:
| Set "Unlock" state by dialing an Event Trigger |
With reference to the above imported flow:
- Node 1 (Zenitel Event Trigger Event): In the Eventno field enter the Event trigger number to be used as PIN code (e.g. 8951). Assign the "ZCP Link".
- Node 2 (Unlock station): When the PIN code is dialed, this node will set a global station variable = "true". No configuration required.
- Node 3 (Delay 10s): The station will be unlocked for this period of time. You can change to a shorter or longer time.
- Node 4 (Lock station): The global station variable is reset to "false", locking the station. No configuration required.
Test and confirm operation
Verify that..
- ..stations have to dial the PIN Code before they are allowed to place a call.
- ..the station is automatically locked 10 seconds (Delay time) after the PIN code has been dialed.
- ..stations that are excluded from using PIN code can freely make calls without having to enter the PIN code.
