Elevator alarm to external phone with voice identifcation
From Zenitel Wiki
This article describes how alarm calls can be routed to an external telephone, and the location of the alarm is presented to the operator as a spoken message.
The application is suitable not only for elevators, but also for other applications, such as:
- Elevators
- Parking
- Prison cells
- Gate entries
Contents
- 1 Introduction
- 2 Prerequisites
- 3 Elevator station configuration
- 4 About the Event Handler programming
- 5 Event 1: Sends Call Request to Dummy when call button is pressed
- 6 Event 2: Dummy receives the call request and triggers the "Call setup event"
- 7 Event 3: Call setup event. Sets up external phonecall if the line is free
- 8 Event 4: Dials next phone number
- 9 Event 5: Play voice message to phone operator when the call is answered
- 10 Event 6: Call acknowledement
Introduction
Elevator alarms can be routed to an external telephone. When the telephone operator answers the call, the location of the alarm will be played as a voice message. The operator must acknowledge the alarm by pressing a digit, and two-way voice communication is established between the operator and the elevator.
If there are multiple alarms at the same time, the system will put the calls in queue, and set up calls one by one to the telephone as soon as the line becomes free. When an elevator station is put in queue, a message "Your call is registered, please wait" will be played to the elevator. The actual phrasing of the message can be modified.
In the following configuration examples there is a possibility of defining up to 6 different telephone numbers. However, more can be defined if required. If the first dialed number is not acknowleding the call within a preset time, the second number will be called, and so on, until the call is acknowledged.
The call to the telephone will be activated only if there is a free telephone line. If all available lines are busy, the system will retry every few seconds until a line is free. If there are several Call Requests at the same time, they will be queued in the AlphaCom and handled one by one.
Prerequisites
Telephone gateway:
- The SIP Gateway must be AudioCodes MP114/118, as the "speech detection" functionality depends on this gateway. The SIP gateway should be configured as described in the relevant AlphaWiki article.
Parameters used in the configuration examples:
- Station 5152: A dummy station, receiving call requests from the elevators
- UDP group 1: Elevator stations must be included in UDP group 1
- Directory Number 9534: An event trigger number, dialled by the elevator stations to generate the call
- UDD 500: Flag saying if the call has been acknowledged. 1=acknowledged. 0=Not acknowledged
- UDD 501: A counter keeping track of which phone number to dial next
You can choose to use other parameters, but then you must study the configuration details below carefully, and adjust the configuration accordingly.
Prerecorded audio messages:
- The AlphaCom must be equipped with a Enhanced Audio Messaging license in order to store prerecorded voice messages.
- Each elevator should have it's own voice message, telling the location of the elevator. This will typically be "Elevator alarm from Building B4. Acknowledge by digit 6". The messages must be uploaded to the AMC-IP in Message Group 30, and the Group Index must be identical to the physical number of the elevator station.
- The reassurance message (e.g. "The call is received, please wait") played to the elevator stations can be recorded from a SuperUser station, dialing 8180 + 623 + M. Do the recording, then press 8 to save.
Software requirement:
- AMC 11.2.3.3 or newer.
Elevator station configuration
Include all elevator stations in UDP group 1. In AlphaPro, Users & Stations window, select the tab UDP, and tick UDP 1. Press the button UDP Text to change the text to an appropriate description, say "Lifts".
How to configure the call button of the elevator station, depends on if the call should go directly to the external phone, or first go to a local intercom station.
Direct call to External Phone
When the call button is pressed, a Call Request must be sent to the Dummy Station, which will trigger the external call.
In AlphaPro, Users & Stations window, select the elevator station from the list box, press the button DAK, and program the call button to send a Call Request to the Dummy Station.
Call Request to a local intercom station, then forward to External Phone
When the call button is pressed, the Call Request is sent to the intercom station.
The call request can either be forwarded manually by pressing a DAK key on the intercom, or it can be forwarded after a timeout if the intercom user doesn't answer the call.
Manual forwarding from Intercom Station to External Phone
The call request is forwarded manually by using the 7870 code.
- Call Forwarding On: Dial 7870 + Dummy Number (e.g. dial 7870 + 5152, or press a DAK key with the programming: I 7870 I 5152).
- Call Forwarding Off: Dial 70
Forwarding to External Phone after timeout
If a Call Request sent to the intercom station is not answer in due time, the call request can be forwarded to the external phone. The "Automatic Search" feature is used for this.
The first step is to enable the Automatic Search for the intercom station. In AlphaPro, Users & Stations window, select the Automatic Search tab, and enable Automatic Search on Call Request.
Secondly, enter the target for the Automatic Search. In Users & Stations window, select the intercom station, and press the DAK button. Select the Search Strings tab, and enter the Call Request code to the Dummy Station.
The timeout for the Call Request Forwarding is by default 20 seconds. This can be modified in Exchange & Systems window > System button > Timers tab: Call Request search string Timeout
About the Event Handler programming
A number of events must be added. In AlphaPro, Exchange & System -> Events, press Insert to add a new event.
In the events a number of LOG commands are included. They are not required for the functionality, but are usefull during test and debugging, as well as a documentation of the elevator alarm calls made in the system.
Event 1: Sends Call Request to Dummy when call button is pressed
The elevator station is configured to dial event trigger 9534 when the button is pressed. This will trigger the event below, which will send a Call Request ($SM) to a dummy station. The dummy number can be any station directory number in the exchange that is not in use. In this article station 5152 on physical 552 is used.
Event Owner: Stations w. UDP. ID: 1 (Elevator stations) Event Type: 15 - Event Trigger Feature Sub Event: 0 When Change To: ON When Related To: Directory Number. Id: 9534 Action: $SM L%1.dir L5152 LOG "Lift alarm triggered by %1.dir %1.nam"
Event 2: Dummy receives the call request and triggers the "Call setup event"
When the dummy receives the call request from the elevator, a 2.0 sec timer is started ($ST), using 9900 as a reference number or "label". This will allow the elevator to receive the message "Your call is registered" before the phone call is set up. When this timer times out, it will trigger "event 3", which actually sets up the telephone call. When the call request is deleted, which happens when the call is acknowledged by the operator in "event 6", the timer is stopped.
Event Owner: Station Id - 552 (Dummy station) Event Type: 10 - Received mail Sub Event: 0 When Change To: ON or OFF When Related To: All Action: $ST L%2.dir W%chg(20,0) L9900 IF %chg(1,0) LOG "Station %2.dir %2.nam is put in call queue" stop ENDIF LOG "Station %2.dir %2.nam is removed from call queue"
Event 3: Call setup event. Sets up external phonecall if the line is free
This is the event that sets up the telephone call. First, it check if the telephone line is free (%tin). If it is busy, the timer ($ST) is restarted (10.0 sec), and this same event will be triggered again in 10 seconds to check if the line now is free.
If the telephone line is free, the acknowledge flag (UDD 500) is set to "Not yet acknowledged" (0). A new "redial" timer (40.0 sec), using 9901 as "label" is started. If this timer is not stopped by operator acknowwledgement (event 6), it will trigger the "Call setup" event when it times out, causing redial of next phone number in line.
The counter that keeps track of which telephone number to dial (UDD 501) is incremented by 1. The elevator station is cancelled ($C) (in case the station is already active in a call), and after 0.6 second delay (pause) to make sure the station has returned to idle, the telephone number is dialed. ($PD). Which of the six phone numbers to dial depends on the value of the counter. A new call will start with phone number one, if not acknowledged it will try phone number 2 etc. If phone number 6 fails, it will start all over again.
Event Owner: Stations w. UDP. ID: 1 (Elevator stations) Event Type: 21 - Event Timeout Sub Event: 0 When Change To: ON When Related To: Directory Number, Id = 9900 Action: IF %op(%tin(100),=,1) LOG "The gateway is busy, %1.dir %1.nam will try again in 5 seconds" $ST L%1.dir W100 L9900 stop ENDIF LOG "The gateway is free" WUDD 500 0 $ST L%1.dir W400 L9901 WUDD 501 %op(%udd(501),+,1) $C L%1.dir pause pause pause pause pause pause IF %op(%udd(501),=,1) LOG "Station %1.dir %1.nam is dialing phone #1" $PD %1.ref "0W87654321" ENDIF IF %op(%udd(501),=,2) LOG "Station %1.dir %1.nam is dialing phone #2" $PD %1.ref "0W87654322" ENDIF IF %op(%udd(501),=,3) LOG "Station %1.dir %1.nam is dialing phone #3" $PD %1.ref "0W87654323" ENDIF IF %op(%udd(501),=,4) LOG "Station %1.dir %1.nam is dialing phone #4" $PD %1.ref "0W87654324" ENDIF IF %op(%udd(501),=,5) LOG "Station %1.dir %1.nam is dialing phone #5" $PD %1.ref "0W87654325" ENDIF IF %op(%udd(501),=,6) LOG "Station %1.dir %1.nam is dialing phone #6" $PD %1.ref "0W87654326" WUDD 501 0 ENDIF
About the expression "IF %op(%tin(100),>=,1)":
The macro %tin (Trunk In Use) is used to check if there are any free lines.
- 100 = the node number of the SIP Trunk used by the AudioCodes MP114/118. Change if required.
- 1 = There is one phone line connected to the SIP Gateway. If multiple lines are connected to the MP114/118 gateway, you need to change this number accordingly.
Telephone numbers to dial:
- The expression "$PD %1.ref "0W87654321"" means dial 0, then 1 second delay (W), then dial phone number 87654321. Substitute 87654321 with the actual phone number. Also if the prefix code to the gatway is different than "0", change it accordingly.
- If only one telephone number should be dialed, enter the same number on all six entries.
- If two different phone numbers should be dialed, enter the first number on entry #1, #3 and #5, and the second number on entry #2, #4 and #6.
- If three different phone numbers should be dialed, enter the first number on entry #1 and #4, the second number on entry #2 and #5, and the third number on entry #3 and #6
Event 4: Dials next phone number
If a telephone call was not acknowledged by an operator in due time, this event will be triggered. The current call is cancelled, and a timer (2.0 sec) that retriggers the "Call setup event" is started.
Event Owner: Stations w. UDP. ID: 1 (Elevator stations) Event Type: 21 - Event Timeout Sub Event: 0 When Change To: ON When Related To: Directory Number, Id = 9901 Action: $C L%1.dir $ST L%1.dir W20 L9900 LOG "The phonecall timed out. Trying again.."
Event 5: Play voice message to phone operator when the call is answered
When the operator picks up the call and starts to speak, the speech is detected by the SIP Gateway and the AlphaCom raises this event 36/20.
The event will play a prerecorded voice message ($SVP_ST) to the telephone line. This will typically be "Elevator alarm from lift B4. Acknowledge by digit 6".
Each elevator should have it's own message, telling the location of the elevator. The message must be uploaded to the AMC-IP in Message Group 30, and the Group Index must be identical to the physical number of the elevator station.
Event Owner: Stations w. UDP. ID: 1 (Elevator stations) Event Type: 36 - SIP Progress Event Sub Event: 20 When Change To: ON When Related To: All Action: IF %udd(500) stop ENDIF LOG "The call is answered, speech from the telephone is detected. Play voice message to the phone operator" $SVP_ST L%1.dir U30 U%1.phy U0 U1
Note that this event is retriggered every time speech is detected, and the voice message will be restarted. However, after the call is acknowledged (UDD 500 = 1), the message will not be restarted.
Event 6: Call acknowledement
The phone operator presses digit 6 to acknowledge the call. This will stop the timers which is used for call setup, the acnowledge flag is set (UDD 500 = 1), and the phone line counter is reset (UDD 501 = 0). Finally the elevator station is removed from the call queue of the dummy station ($CANM).
Event Owner: Stations w. UDP. ID: 1 (Elevator stations) Event Type: 15 - Event Trigger Feature Sub Event: 6 When Change To: ON When Related To: All Action: $ST L%1.dir W0 L9900 $ST L%1.dir W0 L9901 WUDD 500 1 WUDD 501 0 $CANM L%1.dir L5152 LOG "The call from %1.dir %1.nam is acknowledged"
Pay attention to the Sub Event, it must be identical to the digit used as acknowledge digit.