Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search

4. Using the Software

4.1. Direct Connection

You can use OpenH323's ohphone program to connect directly to a NetMeeting client. Specify the -n option to indicate that you're not using a gatekeeper, and either the DNS name or IP address of the NetMeeting client:

bash$ ohphone -n

You can also start ohphone to receive incoming calls from NetMeeting clients:

bash$ ohphone -n

See the ohphone documentation for more information on its additional features, including video conferencing, codec selection, and auto-answer.

4.2. Directory Operation

Make sure you have an LDAP server running the NetMeeting directory kit, as described above.

On the NetMeeting client, select the Tools -> Options menu item to display a configuration dialog. Under the "General" (NetMeeting 3) or "Calling" (NetMeeting 2) tab, there will be a section for "Directory Settings". Here you can enter the IP address or DNS name of the server. The client will then attach to the server and register itself either automatically, if the "Log on to directory server when NetMeeting starts" checkbox is selected. You can also log on to the directory server manually, by selecting Call -> Log on .

If the user selects Call -> Directory , a directory window will be displayed showing all users registered on the LDAP server. Double-clicking on one of the names will initiate a connection to that user.

Querying the NetMeeting LDAP server from Linux can be done, but is tricky because the client's IP address is stored in decimal, and I don't mean dotted decimal. For example, the IP address is stored as 3309688895. Here's some Perl code to convert back and forth from the NetMeeting IP address format:

# Convert $addr (IP address or DNS name) to a NetMeeting decimal IP address

use Socket;
$bytestring = inet_aton($addr);
if (defined $bytestring) {
    ($sipaddress) = unpack('V', $bytestring);
} else {
    die "Can't resolve $addr\n";

# Convert $sipaddress (from a NetMeeting LDAP server) into dotted decimal form

$packedipaddr = pack 'V', $sipaddress;
$ipaddress = join '.', unpack('C4',$packedipaddr);

Included with the NetMeeting directory kit is nmdirectory, a simple Perl/Tk script to query a NetMeeting LDAP server and display the clients registered with it. It's very primitive, and doesn't work well with large databases, but provides a rudimentary example of how to interpret search results from a NetMeeting LDAP server.

4.3. Linking From A Web Page

Microsoft Internet Explorer understands URLs with a "callto:" scheme that specify NetMeeting destinations in one of two forms. When a link with a "callto:" URL is selected, Internet Explorer runs NetMeeting and directs it to connect to the specified destination.

The first URL form, "callto:destination", where 'destination' is either an IP address or a DNS name, causes NetMeeting to open an H.323 connection to port 1720 on 'destination'. Use this form to connect directly to another NetMeeting or OpenH323 client.

The second URL form, "callto:server/alias", causes a directory lookup on LDAP server 'server', searching for a CN attribute of 'alias'. Assuming a match is found, a connection is made to the IP address specified in the entry's sipAddress attribute. NetMeeting clients, by default, register their user's E-mail addresses in the CN attribute. Use this form to perform a directory lookup based on E-mail address.

4.4. Permanent Directory Entries

NetMeeting clients aren't the only source of LDAP directory entries. In particular, permanent directory entries can be manually inserted into the LDAP server using the OpenLDAP client tools. Assuming the attributes are specified properly, these entries will then appear in NetMeeting directory listings and can be used as targets in "callto:" URLs. This is useful when working with OpenH323 clients that don't register themselves by default with the LDAP server.

To simply creating directory entries, the nmaddentry script is included in the NetMeeting directory kit. Run it without arguments for a usage message. For example, if you've started ohphone on "", you can register it with the LDAP server on "" using alias "" like this:

bash$ nmaddentry -h
Successfully added, objectclass=rtperson

This entry will now appear in NetMeeting directory listings and can be addressed as "". The entry will automatically timeout after 30 minutes. The -p switch creates a permanent directory listing that won't time out, but this only works on OpenLDAP servers using the NetMeeting directory kit. To remove a permanent entry, use the ldapdelete program included with the OpenLDAP distribution, specifying the LDAP Distinguished Name returned by nmaddentry:

bash$ ldapdelete -h ',objectclass=rtperson'

4.5. Serving Multiple Aliases

The attributes registered by a NetMeeting client include 'sport', the TCP port number it listens on for incoming H.323 requests, but since this attribute is never retrieved in search requests, it isn't as useful as it first appears. In fact, NetMeeting always opens H.323 connections to the default port (1720), which raises the question of how to serve multiple aliases from a single IP address.

The key to doing this is the forwarder program, included in the OpenH323 CVS archive. forwarder listens for connections on port 1720, and can be configured to redirect them based on the alias being called. This allows calls for each alias to be sent to a unique port number, where a program like ohphone or openam is listening.

To use aliases, an LDAP directory is required, with an entry for each alias. Each alias entry should specify a 'cn' attribute with the alias name, and a 'sipAddress' attribute with the IP address of the host where forwarder is listening.

I've successfully configured a single host to act as a combination LDAP server (on port 389), forwarder (on port 1720), and ohphone and openam clients on various private port numbers and remote systems.

4.6. Using the Answering Machine

The OpenH323 answering machine, openam, will listen for incoming H.323 connections, play a pre-recorded message, and then record any audio sent to it into a file. It can optionally be configured to run another program at the end of the call, to email the recorded audio, perhaps.

It's usefulness is currently (December 2000) limited by the lack of a gatekeeper program clever enough to redirect calls to it if there's no answer at the main address. Thus, it will only act as an answering machine if the ohphone program is running at the main address, and has been configured to redirect calls to another address, using the --forward-no-answer and --forward-busy options.

4.7. Conference Calls

The openmcu program, in the OpenH323 CVS archive, implements an H.323 Multipoint Control Unit (MCU). Multiple NetMeeting or ohphone clients can connect to the MCU and form a conference call. As of December 2000, the quality and reliability of the connection is problematic, but hopefully this will improve.

4.8. Routing Calls Through NAT

Special support is required on a NAT (IP Masquerade) router to allow H.323 traffic to pass through. If the NAT router is running Linux, two masquerading modules are available:


I have not tested either of these modules.

4.9. Custom Configurations

The server capabilities can be customized by modifying the 'netmeeting.perl' script. For example, calls for stale entries could be redirected to an "forwarder" configured to hand off to "openam" answering machines. Thus, calls to a unavailable user would be answered and recorded for later playback.

As OpenH323's development continues, it's expected that these techniques will become more sophisticated, for example by ringing the user first and only forwarding to an answering machine if there's no answer after a given time. Such functionality would most likely be placed in a gatekeeper.