• RSS
  • Twitter
  • FaceBook

Welcome to ISAserver.org

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Dynamic Web-Based Gatekeeper Regsitrations

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [ISA Server 2000 General] >> H.323 Gatekeeper >> Dynamic Web-Based Gatekeeper Regsitrations Page: [1]
Login
Message << Older Topic   Newer Topic >>
Dynamic Web-Based Gatekeeper Regsitrations - 5.Aug.2005 1:02:00 PM   
Number51

 

Posts: 35
Joined: 24.May2005
From: Canada
Status: offline
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:

code:
<% @ LANGUAGE="VBSCRIPT" %>

<html>

<%

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

recEndpoints.filter = "[EndpointType] = 2"
if(recEndpoints.recordcount)then
%> <p><font face="Arial">Gatekeeper is<font color="#008000"> <b>Online</b></font></p>
<% else %>
<p>Gatekeeper is<font color="#FF0000"> <b>OFFLINE!</b></font></p>
<%
end if
recEndpoints.filter = ""

%>

<p>Directory:</p>
<table border = "0">

<%

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
%>

</table>

</html>

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.
Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [ISA Server 2000 General] >> H.323 Gatekeeper >> Dynamic Web-Based Gatekeeper Regsitrations Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts