We have just purchased some software that provides an API into our phone system allowing us to dial, hangup etc.. The API was designed to be used client side (internet explorer / activex). We want to use this server side and execute the dial commands via an ajax call to a classic ASP script.
The basic VBScript for initialising the component is as follows:
<%
set objPhone = server.createobject("XariosPhoneManager.PhoneManager")
objPhone.RemoteHost = "192.168.0.17"
objPhone.RemotePort = "2001"
objPhone.OAIPassword = ""
objPhone.Extension = "1000"
objPhone.Initialise()
set objPhone = nothing
%>
but I can’t call the dial command
objPhone.MakeCall("1001")
until the “initialised” event has happened. Is there a way in classic ASP to wait for an event to fire before executing some code?
turns out it simply isn’t possible in ASP. There’s no property exposed that says the component is initialised, just the initialised event that fires. Unfortunately ASP cannot detect events. The developer has suggested wrapping their component in a new DLL that takes care of the event management, but I don’t have the resources to do that. They have promised true serverside capability in a future version of the software