Stentofon AlphaCom E User manual

QUICK START GUIDE
STENTOFON SDK
API – APPLICATION PROGRAMMING INTERFACE
A100K10674 V.2.0

Page 2 A100K10674 V.2.0
API - STENTOFON SDK
Table of Contents
1. INTRODUCTION................................................................................3
1.1. About this document .................................................................3
1.2. Terms and acronyms.................................................................3
1.3. Related documents ...................................................................3
1.4. SDK...........................................................................................3
1.5. Publication log...........................................................................3
2. API DESCRIPTION............................................................................4
2.1. General Description ..................................................................4
2.2. DLL description .........................................................................5
2.2.1. Licensed features..........................................................5
2.3. Communication with the AlphaCom E exchange......................5
2.4. Remote connections .................................................................6
2.5. Connecting to the exchange .....................................................8
2.6. AlphaCom Data Protocol message classes..............................9
2.7. Event reports.............................................................................9
2.8. Application synchronization ......................................................9
2.9. Sending commands to AlphaCom E .......................................10
2.10. API custom events ..................................................................10
2.10.1. OnCustomParameter event ........................................ 11
2.10.2. OnCustomString event................................................ 11
2.10.3. Comparing the two OnCustom events ........................ 11
2.10.4. OnCustomParameter example ...................................12
2.11. Intercom station state..............................................................12
2.12. Mail messages ........................................................................14
2.13. Call request.............................................................................14
2.14. Connect call ............................................................................15
2.15. Call connected ........................................................................15
2.16. Cancel call command..............................................................15
2.17. Call disconnected....................................................................15
2.18. Method to send ACDP messages ...........................................15
2.19. Other available events and methods ......................................16
3. SDK APPLICATION.........................................................................17
3.1. General ...................................................................................17
3.2. Stentofon.AlphaCom.Example.Stations..................................17
3.2.1. Connection to the exchange .......................................17
3.2.2. Station selection and status ........................................17
3.2.3. Station commands ......................................................18
3.3. Stentofon.AlphaCom.Example.CallRequest ...........................19
3.3.1. Connection to the exchange .......................................19
3.3.2. Station selection and status ........................................19
3.3.3. Call Requests..............................................................19
Zenitel Norway AS and its subsidiaries assume no responsibilities for any errors that may appear in this
publication, or for damages arising from the information in it. No information in this publication should be
regarded as a warranty made by Zenitel Norway AS.
The information in this publication may be updated or changed without notice. Product names mentioned in
this publication may be trademarks, they are used only for identication.
Zenitel Norway AS, June 2010

Page 3
API - STENTOFON SDK
A100K10674 V.2.0
INTRODUCTION1.
About this document1.1.
This manual is a ‘Quick Start’ guide for using the Application
Programming Interface (API) for the STENTOFON AlphaCom
E exchange. Detailed information can be found under ‘Related
documents’.
This document is intended for system integrators.●
Terms and acronyms1.2.
API – Application Programming Interface●
A set of routines, data structures, object classes and/or protocols-
provided by libraries and/or operating system services in order to
support the building of applications.
SDK – Software Development Kit●
A collection of programming tools, utilities, documentation, and-
libraries of functions or classes. SDK is a term popularized by
Microsoft as in Windows SDK or Windows Media SDK.
Related documents1.3.
APIhelple: Stentofon.AlphaCom.AlphaNet.chm●
APIhelple: Stentofon.AlphaCom.Data.chm●
AlphaWiki: Theonlinetechnicaldocumentationcentreforthe●
AlphaCom E exchange
AlphaWikicanbeaccessedfromtheAPIhelple.Usersoutsidethe
STENTOFON network must have a user name and password to access
request a user name and password.
SDK1.4.
Zenitel provides an SDK to support application software developers.
TheSDKiscontainedinthele‘Stentofon.AlphaCom.SDK.msi’.The
followinglesarepartoftheSDK:
Thehelplesaslistedinsection1.3●
Thedlllesdescribedinsection2.2●
2 example applications which implement all concepts as described in●
the rest of this document plus the source code for those applications
AlphaCom Service Provider as described in section 2.4●
Chapter 3 describes the example applications in detail.
Publication log1.5.
Version Date Modications
1.0 2009.08.26 New document
1.1 2009.11.30 Added description of
SendAlphaExecuteCommand
1.2 2009.12.15 SendAlphaExecuteCommand replaced by
SendAlphaCommand
Product name change to STENTOFON SDK
2.0 2010.06.01 Remote API capability added

Page 4 A100K10674 V.2.0
API - STENTOFON SDK
API DESCRIPTION2.
General Description2.1.
STENTOFON AlphaCom E is a powerful communications exchange
with many features directly applicable to the security industry such as
direct calling, call requests and call queue handling, call transfers and
escalation, PA functionality through All Call and Group Calls, priority
calls and much more.
The STENTOFON Application Programming Interface (API) is a set of
routines, data structures, object classes and protocols. The API provides
a high level interface for Windows applications and Web services to
access STENTOFON AlphaCom E communication services.
The STENTOFON Software Development Kit (SDK) API for the
AlphaCom E exchange allows for a very close integration between
the AlphaCom E exchange and security management systems.
Internal exchange status information is reported by raising events, and
commands can be sent into the exchange by calling the appropriate
method.
Some of the exchange features which are of particular interest for
integration into security systems are described in this document. For
more information about the functions supported by the underlying
AlphaCom Data Protocol, please refer to AlphaWiki.
The STENTOFON SDK API for AlphaCom E consists of a number of
assemblies (DLLs) which can easily be integrated with software written
in C# or VB.NET.
CRM station
PA
Radio
Intercom
Remote
I/O
Public telephone
and PBX
IP telephones
and DECT
AlphaCom E network
(AlphaNet)
Security management
integration

Page 5
API - STENTOFON SDK
A100K10674 V.2.0
DLL description2.2.
TheAPIconsistsoftwoDLLles:
Stentofon.AlphaCom.AlphaNet.dll
The Stentofon.AlphaCom.AlphaNet.dll implements the AlphaCom
Data Protocol and handles the communication with the AlphaCom E
exchanges. It raises events and exposes methods to be able to receive
data from, and send commands to the exchange.
The .dll supports auto-discovery of the complete AlphaCom E network
conguration.Thismakesthesystemveryeasytocongureandset
up. In addition, the .dll will track and report all state changes in the
AlphaCom E network which the 3rd program subscribes to.
The .dll supports the STENTOFON AlphaNet. This means that all
AlphaCom E exchanges and stations in a network can be addressed by
having an IP connection to just one of the AlphaCom E exchanges.
The .dll requires Microsoft .NET 2.0.
TheDLLcontainsthreenamespaces:
.Messages●
.Client●
.Cong●
Stentofon.AlphaCom.Data.dll
The Stentofon.AlphaCom.Data.dll is not strictly required, but it provides
a standardized way of storing and retrieving AlphaCom E network,
exchange and station information and states.
Storage can be in an MSSQL database or in memory
’AlphaComStateStorages.MSSQL’ or ‘AlphaComStateStorages.IN_
MEMORY’.
The .dll requires Microsoft .NET 3.5.
TheDLLcontainsonenamespace:
.State●
Licensed features2.2.1.
The possibility to retrieve intercom station state information from the
exchange is a licensed feature, and requires the presence of an ‘OPC
interface’ license in the AlphaCom E exchange for at least as many
stations as that of the status to be retrieved.
If the application does not need station state information, then the OPC
interface license is not required.
Station state is further explained in section 2.10.
Communication with the AlphaCom E exchange2.3.
TheAPIlescommunicatewiththeAlphaComEexchangeviaTCPport
61112. As an alternative, port 61113 is also available as from AMC-IP
software version 10.54; this can, for instance, be used for redundancy
purposes or if two independent management systems are connected to
the AlphaCom E exchange.
Stentofon.AlphaCom.AlphaNet.dll
AlphaCom Application
AlphaCom Web Service
Stentofon.AlphaCom.Data.dll
Stentofon.AlphaCom.Data.dll
AlphaCom State
DataBase

Page 6 A100K10674 V.2.0
API - STENTOFON SDK
To be able to communicate with either of these ports, the port must
be enabled in the exchange using AlphaWeb, the web server which is
integrated in the AlphaCom E.
LogintoAlphaWebandselect‘SystemConguration/Filters’andenable
the required port number for the physical Ethernet port the API will
connect to.
_client = new AlphaNetClient(“169.254.1.5”, 61112);
This statement gives the IP address and port number of the AlphaCom
E exchange where the API will be connected to. When there are a
number of AlphaCom E exchanges networked together in an AlphaNet,
the API only needs the IP address or port number of one of the
exchanges in the network. By default, the API will automatically discover
all other exchanges in the AlphaNet and connect to them using the
AlphaNet data links and data routing (including alternative routing if
implemented) between the exchanges.
Remote connections2.4.
Undercertaincircumstancesthe2availableTCPportsprovidedbythe
AlphaCom exchange may not be enough as more clients may need to
communicate with the exchange. For this purpose, the SDK contains a
service provider.
The service provider can connect to one of the available TCP ports
on the exchange and will make another TCP port available to which
multipleclientscanconnect.WhichTCP-portthisiscanbecongured.
The service provider, ‘Stentofon.AlphaCom.AlphaNetServiceProvider.
exe’ runs as a Windows service and needs to be installed using the
InstallUtil.exetool.WhenMicrosoft.NET2.0isinstalled,thistoolcan
befoundinthedirectoryC:\WINDOWS\Microsoft.NET\Framework\
v2.0.50727\
To install the service provider, start the ‘Command Prompt’ and navigate
tothedirectorycontainingInstallUtil.exe.Enterthefollowingcommand:
InstallUtil$INSTDIR\Stentofon.AlphaCom.AlphaNetServiceProvider.●
exe
where$INSTDIRisthedirectorywhereStentofon.AlphaCom.
AlphaNetServiceProvider.exe is located. You can verify a successful
installation has occurred by viewing the command prompt window
displayorbyviewingtheInstallUtil.InstallLoglelocatedinthesame
directoryastheInstallUtil.exeislocated.
This procedure only needs to be done once, as from now the service
provider will start automatically every time the PC on which it is installed
is started up.

Page 7
API - STENTOFON SDK
A100K10674 V.2.0
It is possible to remove the service provider by using the /u switch as
partoftheInstallUtil.exeutility.
NotethatthepersonwhorunstheInstallUtil.exeutilityneedsto
havesufcientrightstobeabletodotheinstallation.Ingeneralthis
installation can only be done with Administrator rights.
The service provider only needs to run on one PC. This can be a
dedicated server, but can also be a client PC. All other client PC’s which
need to communicate with the AlphaCom exchange can do so via the
PC running the service provider.
Theserviceproviderneedstobecongured.Thiscanbedoneinoneof
3ways:
UsingStentofon.AlphaCom.AlphaNetServiceMonitor.exe●
UsingStentofon.AlphaCom.AlphaNetServiceCongurator.exe●
An advanced way is to enter the parameters in the properties dialog●
of the AlphaNetServiceProvider service
Thisservicemonitorsoftwarehas3inputeldstoentertheIPaddress
and TCP port number of the AlphaCom XE exchange to connect to,
and the TCP port number which should be made available for clients
to connect to. Click on ‘Start’ to start the service provider with the
congurationdata.Ifthecongurationoftheserviceproviderneedsto
bechanged,theserviceproviderneedstobestoppedrstbyclicking
‘Stop’ontheservicemonitor.Newcongurationdatacannowbe
entered and the service provider can be started again.
The service monitor is also a monitoring tool. It shows information
about the connection status towards the AlphaCom, how many nodes
and intercom stations have been discovered and the number of to the
service provider connected clients. Further it provides a logging facility.
Note that status information will also be shown by hovering over the
System Tray icon. This icon will also be displayed with a red X over the
icon if connection is lost.
For proper operation of the service provider it is not a requirement
for the service monitor tool to be running. This means that after initial
congurationoftheserviceprovidertheservicemonitorcanbeclosed
again.
TheAlphaNetServiceProviderConguratoralsohas3elds.Achange
incongurationoftheserviceprovideriseffectuatedafterclickingthe
‘Congure’button.
When using the 3rd method, the parameters
AlphaCom IP-address●
AlphaCom TCP/IP port nr●
Local TCP/IP port nr●
Canbeenteredintheeld‘Startparameter’.Theparametersmustbe
separated by a ‘space’. The service must be stopped and started again
for the new parameters to take effect.

Page 8 A100K10674 V.2.0
API - STENTOFON SDK
Theserviceprovider,servicemonitorandserviceconguratorsoftware
can be freely distributed to users of products which are developed using
this SDK.
Connecting to the exchange2.5.
The following is a code example of how to connect to a single
AlphaCom E exchange or all exchanges in an AlphaNet network using
a direct connection. This program will register with all exchanges in the
AlphaNet and maintain the connections.
For an example on how to connect the client via the service provider,
please refer to the with the SDK bundled source code of the ‘Stations’-
example.
using System;
using System.Collections.Generic;
using System.Text;
using Stentofon.AlphaCom.AlphaNet.Client;
namespace AlphaNetConnectApp
{
class Program
{
static void Main(string[] args)
{
#region Private Members
AlphaNetClient _client;
#endregion
#region Initialize the Client
try
{
_client = new AlphaNetClient(“169.254.1.5”, 61112);
}
catch (Exception e)
{
Console.WriteLine(“\r\nError connecting to AlphaCom, details:\r\n\r\n{0}”, e.Message);
return; // Quit the App
}
#endregion
#region Do the Action
// Connect to the AlphaCom
try
{
// Start listening on the AlphaCom socket
_client.StartListening();
// The Monitor Thread will monitor the TCP connection, and connections with all discovered nodes
// By default all nodes will be AutoDiscovered (can be turned of with the AutoDiscoverAllNodes Flag)
// The monitor process will Register to all discovered nodes
// If the AutoDiscoverAllNodes is not used, the AlphaNetClient method RegisterToAlphaComNode(node)
// has to be used for each node, in order to receive broadcast messages
_client.StartMonitorThread();
}
catch (Exception e)
{
Console.WriteLine(“\r\nError Listening to AlphaCom socket, details:\r\n\r\n{0}”, e.Message);
return; // Quit the App
}
// Wait for key pressed
Console.Read();
try
{
_client.Dispose();
}
catch (Exception e)
{
Console.WriteLine(“App quiting... {0}”, e.Message);
}
#endregion
}
}
}

Page 9
API - STENTOFON SDK
A100K10674 V.2.0
AlphaCom Data Protocol message classes2.6.
The API communicates with AlphaCom E via the AlphaCom Data
Protocol. The ‘.Messages’-namespace provides classes for AlphaCom
Data Protocol Messages.
using Stentofon.AlphaCom.AlphaNet.Messages;
Event reports2.7.
Activity inside the exchange can raise events. The following is an
example.
Registerforsomeevents:
// Register for some events
_client.OnStationConnect += HandleStationConnect;
_client.OnStationDisconnect += HandleStationDisconnect;
_client.OnQueueElementAdded += HandleQueueElementAdded;
Theeventhandlers:
#region The AlphaNet Handlers
private static void HandleStationConnect(StationConnect sc)
{
// Use the objects internal ToString() method:
Console.WriteLine(sc);
}
private static void HandleStationDisconnect(StationDisconnect sd)
{
Console.WriteLine(sd);
}
private static void HandleQueueElementAdded(QElementAdded cea)
{
Console.WriteLine(cea);
}
#endregion
If only part of the information contained in an object is of interest,
then there are a multitude of methods available to retrieve just that
information,asforexample:
private static void HandleStationConnect(StationConnect sc)
{
Console.WriteLine(“ A: {0}”, sc.StationA.GetDirNo());
}
Information of an object such as ‘sc’ can be passed in different formats
(OneLine, Detailed, XML, XMLPretty, Short, and Custom). The format
canbeselectedby:
_client.SetMessagePrinformat(MessagePrintFormat.XMLPretty);
Application synchronization2.8.
When the API connects to the exchange, the exchange (-network)
may already be operational with pending call requests and established
calls. The AlphaNetClient object has three properties which will make
synchronization of the application software to the state of the exchange
network easy.
AutoDiscoverAllNodes – default value True
The API will discover all exchanges which are connected in the
AlphaNet network and raise events when the connection is lost or re-
established.

Page 10 A100K10674 V.2.0
API - STENTOFON SDK
_client.OnNodeConnectionUp += HandleNodeUp;
_client.OnNodeConnectionDown += HandleNodeDown;
AutoGetStationState – default value False
Refer to section 2.10 for a complete description of the StationState
object.
When all stations are discovered, the event OnAllStationsAdded is
raised.
AutoSyncCallRequests – default value False
For each station which has a call request in its queue, an
OnCallRequest event will be raised. Refer to section 2.12 for a complete
description of the call request queue.
When all Call Requests have been synchronized, the
OnCallRequestsSynchronized event is raised.
_client = new AlphaNetClient(_formCong.ClientCong)
{
AutoDiscoverAllNodes = true,
AutoGetStationState = true,
AutoSyncCallRequests = true
};
Sending commands to AlphaCom E2.9.
Commands to the AlphaCom E exchange are normally related to a
station. When a guard clicks on an area on his PC screen to make a
call or cancel an established call, it is just as if he presses keys on his
intercom station.
All information related to an intercom station is part of an object of type
StationState. The StationState class also has the methods implemented
to format commands to be sent to the AlphaCom E on behalf of an
intercom station. Methods where the name starts with ‘MakeCommand’,
will format and store the command.
The AlphaNetClient class method ‘SendAlphaCommand’ sends the
stored command to the exchange.
private StationState _selectedStation;
_selectedStation.MakeCommandCKey();
_client.SendAlphaCommand(_selectedStation);
API custom events2.10.
TCP ports 61112 and 61113 are handled by the AlphaCom E exchange
as devices with device number 199 (0xc7) for port 61112 and 196 (0xc4)
for port 61113. All AlphaNet broadcast messages will always be sent out
from both these ports.
All important activity in the exchange is reported as a broadcast
message and is therefore able to raise an event in the API. But there
maybeaspecicinterfacerequirementwhichdependsonanaction
inside the exchange for which there is no API event available, as there is

Page 11
API - STENTOFON SDK
A100K10674 V.2.0
no related broadcast message. To be able to support such requirements
therearetwocustomeventswhichcanberaised:
OnCustomParameter event●
OnCustomString event●
The AlphaCom E exchange features an internal event handler
with trigger points on any possible action inside the exchange. By
programming a custom message inside the exchange event handler
relatedtotherelevantactionofthespecicinterface,itispossibleto
raise the above listed API events.
OnCustomParameter event2.10.1.
To raise the API OnCustomParameter event, the exchange must send
amessagewithMessageID0x7f01followedby7parameters.Therst
two parameters are of type NET_OBJ_REF, the other 5 parameters are
oftypeUINT2;foradescriptionoftheseparametertypes,pleaserefer
to AlphaWiki.
Mostofthetime,thersttwoparameterswillbethe‘owner’andthe
‘related to’ directory numbers of the event which was triggered inside the
AlphaComE.Anexampleofanactionintheeventhandleractioneld
is:
@nnff M7F01 %1.ref %2.ref Wpar1 Wpar2 Wpar3 Wpar4 Wpar5
Where:
nn is the node number of the AlphaCom E exchange to which the-
API connects. It can be any value from 0x01 to 0xfe, represented
by 01 to FE
par1, par2, par3, par4 and par5 can be any value from 0 to 65535-
IfoneofthetwoNET_OBJ_REFparametersisnotrelevant,theNULL
valueshouldbeused,whichis:
U0–NULLvalueforparametertypeNET_OBJ_REF-
If, for any reason, the message should only be sent to either port 61112
or61113,@nnffcanbereplacedby:
@nnC7–forport61112-
@nnC4–forport61113-
Note that all parameters must be passed. NET_OBJ_REF parameters
which are not relevant to the interfacing application must be set to
NULL;UINT2parameterswhicharenotrelevantcanbesettoany
arbitrary value.
OnCustomString event2.10.2.
With the 7 parameters which can be passed as part of the
OnCustomParameter event described in section 2.9.1, most interface
requirements can be met. For those requirements which are not covered
by those 7 parameters, it is possible to use the OnCustomString event.
Any number of parameters of any type will be passed as a single string.
To raise the API OnCustomString event, the exchange must send a
message with MessageID 0x7f00
Comparing the two OnCustom events2.10.3.
Assumethattheactioneldintheexchangeeventhandleris
programmedwithtwomessages,oneforeachOnCustomevent:
@01C7 M7F00 %1.ref %2.ref W1 W2 W3 W4 W5
@01C7 M7F01 %1.ref %2.ref W1 W2 W3 W4 W5
MySQL

Page 12 A100K10674 V.2.0
API - STENTOFON SDK
where the event owner is directory number 101 and the related directory
number is 6901.
TherstmessagewillraisetheOnCustomStringevent.Theevent
handler for this event will pass the string parameter (in this example
giveninXMLPrettyformat):
<ALPHAMSG TYPE=Custom String>
<STRING>3203101F3203690100010002000300040005</STRING>
</ALPHAMSG>
The second message will raise the OnCustomParameter event. The
event handler for this event will pass the following parameter (in this
examplegiveninXMLPrettyformat):
<ALPHAMSG TYPE=Custom Parameter>
<DIRECTORY_NUMBER_A>Node 3, DirNo 101</DIRECTORY_NUMBER_A>
<DIRECTORY_NUMBER_B>Node 3, DirNo 6901</DIRECTORY_NUMBER_B>
<PARAMETER_1>1</PARAMETER_1>
<PARAMETER_2>2</PARAMETER_2>
<PARAMETER_3>3</PARAMETER_3>
<PARAMETER_4>4</PARAMETER_4>
<PARAMETER_5>5</PARAMETER_5>
</ALPHAMSG>
In this example, the information passed by both events is the same but
the interfacing application software will need to untangle OnCustomString
as a single parameter passed string.
OnCustomParameter example2.10.4.
An example of the use of the OnCustomParameter event is an interface
application between the AlphaCom E exchange and a CCTV system.
The rest of this section assumes knowledge of the AlphaCom E and its
programming tool, AlphaPro.
A number of guard intercom stations are associated with monitors. A
number of door intercom stations are associated with cameras. When a
guard sets up a call to a door, the signal of the camera at that door shall
be switched to the guard’s monitor.
ProgramallguardintercomstationsasUDP1●
ProgramalldoorintercomstationsasUDP2●
ProgramtheUserDenedParameterforeachguardstationwiththe●
associated monitor number
ProgramtheUserDenedParameterforeachdoorstationwiththe●
associated camera number
Programanevent:●
Owner: StationswithUDP:1-
Eventtype: 8–Conversation–Outgoing-
WhenChangeto: ON-
WhenRelatedTo: StationswithUDP:ID2-
Action:-
@01FFM7F01U0U0W%1.EXPW%2.EXPW0W0W0
The OnCustomParameter event will be raised passing the monitor and
camera number.
Intercom station state2.11.
Bysettingtheag‘AutoGetStationState’theAPIwilldiscoverall
intercom stations in all discovered exchanges. For each discovered
station, the API will raise the ‘OnStationStateReceived’ event. This

Page 13
API - STENTOFON SDK
A100K10674 V.2.0
can therefore be used to get an accurate overview of the connected
intercom stations and their status at the time of the connection of the
API to the exchange.
Most applications need to be able to retrieve StationState at any
moment and most applications will implement structures to store this
information. The Stentofon.AlphaCom.Data.dll provides a standardized
method to store and retrieve StationState objects either in a MySQL
database or in memory.
using Stentofon.AlphaCom.Data;
private AlphaComState _stateStorage;
_stateStorage = new AlphaComState(AlphaComStateStorages.IN_MEMORY);
private void HandleStationState(StationState st)
{
if (_stateStorage.UpdateStation(st) > 0)
{
// Id added
}
}
The intercom exchange is a dynamic environment where station states
change continuously. To limit the load on the internal AlphaNet links, not
all state changes will result in an OnStationStateReceived event.
TheOnStationStateReceivedeventwillberaisedwhen:
A station is discovered●
On a change in value of StationState.IsStationOK●
On a change in value of StationState.HasMailQueue●
On a change in value of StationState.RciBitmap●
On a change in value of StationState.RcoBitmap●
The events listed below shall therefore be monitored to be able to
updatethestoredStationStateobject:
OnStationFreeReceived
private void HandleStationFree(StationFree sf)
{
var station = _stateStorage.GetStationState(sf.Station);
if (station != null)
{
station.SetBusyState(false); // Update the state storage object
}
}
OnStationBusyReceived
private void HandleStationBusy(StationBusy sb)
{
var station = _stateStorage.GetStationState(sb.Station);
if (station != null)
{
station.SetBusyState(true); // Update the state storage object
}
}
OnStationConnect

Page 14 A100K10674 V.2.0
API - STENTOFON SDK
private void HandleStationConnect(StationConnect sc)
{
var stationA = _stateStorage.GetStationState(sc.StationA);
var stationB = _stateStorage.GetStationState(sc.StationB);
// Update the state storage object
if (stationA != null)
{
stationA.RelatedStation = sc.StationB;
}
if (stationB != null)
{
stationB.RelatedStation = sc.StationA;
}
}
OnStationDisconnect
private void HandleStationDisconnect(StationDisconnect sd)
{
var stationA = _stateStorage.GetStationState(sd.StationA);
var stationB = _stateStorage.GetStationState(sd.StationB);
// Update the state storage object
if (stationA != null)
{
stationA.RelatedStation = null;
}
if (stationB != null)
{
stationB.RelatedStation = null;
}
}
Mail messages2.12.
Intercom stations are able to receive text messages. These may be
messages from someone who wants the user to call back, but also
system messages which are sent to a station, or group of stations,
about the condition of the intercom system.
Messages are sent to the message queue of a station, where by using
the display of the station it is possible to scroll through these messages.
The user can then react to the message after which it is deleted from
the queue.
QueuerelatedmessagesarealsoreportedbytheAPIbyraisingevents:
OnQueueElementAdded●
OnQueueElementRemoved●
Call request2.13.
AverypowerfulfeatureoftheAlphaComEisthecallrequest.Using
this feature, a remote intercom station puts itself into the call queue of
one or several guard stations. This happens when the call button on the
remote intercom is pressed. The call queue handling is all done by the
exchange; for instance if one guard answers, the request is removed
from all call queues from other guard stations where the call was placed.
Also in case of call request transfers or escalation, the internal queue
andtheresultingeventsalwaysreectthecorrectsituation.This
means that management system software only needs to monitor the
appropriatequeueeventsandusethisinformationto,forinstance,ash
an assigned icon to the remote intercom station.
A call request is a sub-type of the mail message. This means that when
a call request event is raised, the ‘OnQueueElement’ event is also
raised. Depending on the kind of application, these events are used for
information that is important. It is recommended to either monitor all mail
events or only the call request events.
Supportedeventsare:

Page 15
API - STENTOFON SDK
A100K10674 V.2.0
OnCallRequest●
OnCallRequestRemoved●
Connect call2.14.
Often when there is a call request, the guard wants to be able to
clickontheashingicontoacceptthecall.Thecallingmethodisto
send a connect message with the directory number of the guard as a
parameter. The icon associated with the intercom station will set up the
call.
Supportedmethod:
MakeCommandCallSetup●
Call connected2.15.
When the call is set up, the exchange API will generate the call request
removed events described in section 2.12, and an event stating that the
guard intercom station and the remote intercom are in conversation.
These messages can directly be used to change the appearance of the
remote intercom icon.
Thesupportedevent:
OnStationConnect●
Cancel call command2.16.
When the guard terminates the call, the software shall call a method to
cancel the call.
Thesupportedmethod:
MakeCommandCKey●
Call disconnected2.17.
When the call is disconnected, an event stating that the call between the
two intercom stations has been disconnected is raised. The icon can be
put in the ‘idle’ status.
Thesupportedevent:
OnStationDisconnect●
Method to send ACDP messages2.18.
The underlying protocol of the API is the AlphaCom Data Protocol. To
sendcommandstotheAlphaComE,specicmethods(someofwhich
are described in the sections above) have been implemented. These
methods result in the API sending the appropriate ACDP command to
the exchange.
Sometimes it can be an advantage to send an ACDP command directly
to the exchange. For this purpose, a method has been implemented
which takes the ACDP command as a parameter in Simple Link Layer
format.
Public bool SendAlphaCommand(String cmd)●
The statement below will set up a call between stations with directory
numbers101and102:
SendAlphaExecuteCommand(“$CALLL101L102”)●

Page 16 A100K10674 V.2.0
API - STENTOFON SDK
Other available events and methods2.19.
The AlphaCom Data Protocol provides complete control over the
exchange. Examples of the functionalities that can be implemented with
thederivedAPImethodsandeventsare:
Force a pre-recorded alarm message to an intercom station, group of●
intercomstationsorPAampliers
Force an audio program to an intercom station, group of intercom●
stationsorPAampliers
MakeaPAannouncementtopre-denedzones●
Open doors or operate other equipment through relays under the●
control of the AlphaCom E exchange
Read door open/closed status or other status signals through logical●
inputs under the control of the AlphaCom E exchange
The API will be extended in the future when new features become
availableintheAlphaComE.Suggestionsforimplementationofspecic

Page 17
API - STENTOFON SDK
A100K10674 V.2.0
SDK APPLICATION3.
General3.1.
The SDK contains two example applications which use all the concepts
described in the previous sections and more. The source code for
the applications is well documented. Studying this code will provide
additional information.
Stentofon.AlphaCom.Example.Stations.exe●
Stentofon.AlphaCom.Example.CallRequest.exe●
Stentofon.AlphaCom.Example.Stations3.2.
Connection to the exchange3.2.1.
To connect to the exchange(network), click on the ‘Connect’-button.
The dialogue which now will be shown gives the possibility to either
connect to the exchange via the service provider or directly, depending
on whether the checkbox ‘Remote Connection’ is enabled or not. In both
cases the IP address and TCP port nr to connect to have to be entered.
OncetheCongurationdialogueisclosed,clickonthe‘Connect’-button.
Station selection and status3.2.2.
Once the application has discovered stations it is possible to select one
of those stations, show its status and perform commands on behalf of
that station.

Page 18 A100K10674 V.2.0
API - STENTOFON SDK
Enter a directory number or a Display Text in the textbox under ‘Station
Selector and Status’ or select a station from the dropdown menu. The
text after ‘Selected Station’, ‘Station Status’ and ‘Call Connection’ will
show the relevant information for that station.
When a station has been selected, it is possible to deselect it by double
clickingtheinformationintheeldfor‘SelectedStation’.
When a station has been selected, the station selector dropdown menu
becomes yellow. Choosing a station from this dropdown menu will set
up a connection to this chosen station.
var stB = (StationState) comboBoxStationPicker.SelectedItem;
if (_selectedStation.MakeCommandCallSetup(stB))
_client.SendAlphaCommand(_selectedStation);
Station commands3.2.3.
Under‘StationCommands’thereareseveralotheractioncontrolsfor
the selected station.
IP station output
‘IPstationOutput’willsendoutputOn/Offcommandstooneoftherst
three logical outputs on an IP station.
if (state == “ON”)
_selectedStation.MakeCommandSetIpStationOutput(outNo, 1);
else
_selectedStation.MakeCommandSetIpStationOutput(outNo, 0);
_client.SendAlphaCommand(_selectedStation);
Station control
‘Station Control’ gives the possibility to dial digits and operate the M and
Ckeys:
Entering a digit in the text box ‘Dial Digit’ will simulate pressing a digit on
thestationkeyboard:
_selectedStation.MakeCommandDialDigits(Digit);
_client.SendAlphaCommand(_selectedStation);
M-keydown:
_selectedStation.MakeCommandMKey(KeyPressState.Press);
_client.SendAlphaCommand(_selectedStation);
M-keyup:
_selectedStation.MakeCommandMKey(KeyPressState.Release);
_client.SendAlphaCommand(_selectedStation);
ClickingtheC-key:
_selectedStation.MakeCommandCKey();
_client.SendAlphaCommand(_selectedStation);
DAK keys
Clicking one of the DAK buttons will simulate pressing a DAK key on an
intercom station.
_selectedStation.MakeCommandDialDak(dak);
_client.SendAlphaCommand(_selectedStation);

Page 19
API - STENTOFON SDK
A100K10674 V.2.0
Stentofon.AlphaCom.Example.CallRequest3.3.
Connection to the exchange3.3.1.
To connect to the exchange(network), click on the ‘Connect’-button. In
the dialogue which now will be shown enter the IP address and TCP
port nr of the exchange to connect to.
OncetheCongurationdialogueisclosed,clickonthe‘Connect’-button.
Station selection and status3.3.2.
By default, the textbox under ‘Station Selector and Status’ works as
described in section 3.2.2. Double clicking this text box will change the
search mode to only stations with a pending Call Request. Double click
again to return to the default search mode.
Call Requests3.3.3.
If the selected station in section 3.4.1 has pending Call Requests,
they will be shown in the dropdown menu ‘Selected Station Queue’.
Selecting a station in this dropdown menu will set up a conversation with
that selected station.
_selectedStation.MakeCommandCallSetup(cr.SendingStation);
_client.SendAlphaCommand(_selectedStation);
The call can be cancelled by double clicking the listed connection after
‘Call Connection’.
_selectedStation.MakeCommandCKey();
_client.SendAlphaCommand(_selectedStation);

www.stentofon.com
Zenitel Norway AS
P.O. Box 4498 Nydalen
NO-0403 OSLO
Norway
STENTOFON and VINGTOR products are developed and marketed by Zenitel Norway AS. The company’s Quality Assurance System is certified to meet the requirements in NS-EN ISO 9001:2008. Zenitel Norway AS reserves the right
to modify designs and alter specifications without prior notice, in pursuance of a policy of continuous improvement. © 2010 Zenitel Norway AS.
DOC NO.
A100K10674
Table of contents
Other Stentofon Conference System manuals
Popular Conference System manuals by other brands

AddPac
AddPac AP-VP280 Features

StarLeaf
StarLeaf GTm 5250 installation guide

SURF Communication Solutions
SURF Communication Solutions Orion-MCU user manual

Polycom
Polycom RealPresence Group Series user guide

Aeta Audio Systems
Aeta Audio Systems Scoop5 S-IP user manual

GAI-Tronics
GAI-Tronics 400-003 manual