Got inbound netmeeting support all tidied up (see here), and the last thing i wanted to accomplish was a dynamic web-page which displayed any users inside the LAN who where currently registered with the Gatekeeper, therefore available for taking support calls.
The solution was more simple than I originally expected. This exact solution will only work with the ISA Server 2000 H323 Gatekeeper.
The really nice thing here is that the ISA Server 2000 H323 Gatekeeper maintains it's registrations in an Access database file. In my scenario, I've got the H323 Gatekeeper running on the same computer that I use for web-publishing, but this will work even if these two services are housed on seperate pc's.
First thing I did was create a System DSN ODBC connection to the Gatekeeper database. - Data Source Name: H323Query - Description: H323 Gatekeeper Registration Query - Database: "C:\Program Files\Microsoft ISA Server\GKDB.MDB"
Note: The database location specified is the default install directory for ISA Server 2000. If this was altered during installation, you'd need to specify the install folder to find this database file.
For safety sakes, I also checked the "Read Only" option for the database. Wouldn't want this procedure to interrupt the normal operations of the Gatekeeper!
Then I made a quick .ASP page which uses this ODBC connection to output the registrations:
<% @ LANGUAGE="VBSCRIPT" %>
Dim objConn dim comEndpoints dim recEndpoints dim comAlias dim recAlias dim EntryRegDate dim EntryType dim EntryAccount dim EntryPhone dim EntryURL dim ShowURL
Set objConn = server.CreateObject("adodb.connection") objConn.connectionstring = "Provider=MSDASQL;Data Source=H323Query" objConn.open
Set comEndpoints = server.CreateObject("adodb.command") comEndpoints.commandtext="select * from endpoint" comEndpoints.commandtype = 1 comEndpoints.activeconnection = objConn
set recEndpoints=server.CreateObject("adodb.recordset") set recEndpoints.source=comEndpoints recEndpoints.open ,,3,2
Set comAlias = server.CreateObject("adodb.command") comAlias.commandtext="select * from Alias" comAlias.commandtype = 1 comAlias.activeconnection = objConn
set recAlias=server.CreateObject("adodb.recordset") set recAlias.source=comAlias recAlias.open ,,3,2
do while not recEndpoints.eof select case recEndpoints("EndpointType") case 1 EntryType="User" ShowURL=True case 2 EntryType="Gatekeeper" ShowURL=False case else EntryType="Unknown" ShowURL=False end select
EntryAccount="" EntryPhone="" recAlias.filter="[EndpointID] = "+Cstr(recEndpoints("EndpointID")) do while not recAlias.Eof Select case recAlias("Type") Case 0 EntryAccount=recAlias("Value") Case 1 EntryPhone=recAlias("Value") End Select recAlias.movenext loop recAlias.Filter=""
if(ShowURL) then EntryURL="callto:%22" + cstr(EntryPhone) + "+type=phone+Gateway=xxx.xxx.xxx.xxx+secure=false+av=false+h323=false%22"
response.write "<tr><td width=20></td><td><a href=" + chr(32) + EntryURL + chr(32) + ">"+EntryAccount+"</a></td></tr>" end if
recEndpoints.movenext loop %>
The one change needed to get this working on your server would be to replace the "Gateway=xxx.xxx.xxx.xxx" paramter of the EntryURL variable to reflect the external interface of the internet gateway.
Now my internal guys enter their "Advanced Calling" option in Netmeeting to connect to the Gatekeeper using the internal IP of the computer hosting that service. The Account Name is used to show in the web-page, and the Phone Number is used for location purposes. These pieces of information are used within the .ASP code to generate a custom CALLTO: URL, which people outside out network can click to open Netmeeting, connect to our Gatekeeper as a gateway and locate the required person.