User Registration
 Conferencing in H.323
 Technical Info
Ελληνικά  Αγγλικά       
Grnet Web Site
    Search RTS
Nagios VoIP Check with Ohphone

The GRNET Real-time Services Team has developed a Nagios plugin that checks VoIP reachability at the application layer, by utilizing a popular CLI voip application: the OpenH323 OhPhone.

The plugin uses OhPhone H.323 calls to check a series of functions:

  1. local gatekeeper endpoint registration
  2. dialplan resolution of target number
  3. reachability of target endpoint or gateway
Usage at GRNET
At GRNET, we utilize this plugin to check reachability of all our VoIP connected institutions (about 15) and each one of their supported prefixes. The check calls are carried out 4 times a day and targeted towards fax machines located at the institutional PBXs, behind the institutional VoIP gateways. So this check truly reflects the VoIP reachability from the centrally situated Nagios server (NREN) towards all the edges (institutions). However, it gives no assurance of inter-institutional reachability, which is implicitly checked. Here is a sample screenshot of our Nagios page.

Nagios Plugin Logic
The Nagios plugin merely initiates an OhPhone command to start the call, specifying gatekeeper to register to, username to register with and target number:
e.g. ohphone --listenport 1730 --gatekeeper --user ohphone 0030123456
After the command is triggered, the plugin waits for the text output of OhPhone, looking for strings to confirm the various stages of the call, e.g. Here is the OhPhone reply for a successful call:
Listening interfaces : ALL:1750
Gatekeeper set: gnugk@grnet.gr
ohphone is calling host 0030298231
Command ? Ringing phone for "0030298231" ...
Call with "Cisco IPVC-3510-MCU: Conference '0030298231'" established.
Here is the OhPhone reply for a call to an unreachable number:
Listening interfaces : ALL:1750
Gatekeeper set: gnugk@grnet.gr
ohphone is calling host 2860000
Command ? Call with "2860000" completed
Here is the OhPhone reply for a call to an unreachable number:
Listening interfaces : ALL:1750
Error registering with gatekeeper at ""
OhPhone ended.

A list of the important OhPhone replies follows:
  1. "Gatekeeper set: gnugk@grnet.gr" to confirm gatekeeper registration,
  2. "Ringing phone for 0030123456 ..." to confirm dialplan reachability
  3. "0030123456 is busy" again, confirms dialplan reachability
  4. "Call with 0030123456 established." to confirm actual call establishment
Note that the message "ohphone is calling host 0030123456" is merely informing us that OhPhone is ready to start the call, and does not indicate that gatekeeper LRQs have returned a known and reachable prefix.

If a "Ringing ..." or "Call with..." or "was busy" message is reached, the call is considered successful. In any case, when the message "Call with "0030123456" completed" is reached, the call attempt has ended. and the plugin terminates the ohphone command by sending an X command for exit.

OhPhone sample calls
Here is a complete sample OhPhone call that successfully completes:
$ ohphone --listenport 1730 --gatekeeper --user ohphone 0030123456
OhPhone Version 1.4.3 by Open H323 Project on Unix Linux (2.6.9-42.0.2.ELsmp-i686)

Incoming channel port ranges 5000 to 5999
Local username: ohphone
TerminateOnHangup is 1
Auto answer is 0
DialAfterHangup is 0
FastStart is 0
H245Tunnelling is 1
SilenceSupression is 1
H245InSetup is 1
Jitter buffer: 50-250 ms
Connect port: 1720

Video receive disabled
Video transmit disabled

Sound output device: ""
Sound  input device: ""
User Input Send Mode: as H.245 string
Codecs (in preference order):
   G.711-ALaw-64k <1>
   G.711-uLaw-64k <2>
       G.711-ALaw-64k <1>
       G.711-uLaw-64k <2>
       UserInput/hookflash <32>
       UserInput/basicString <33>
       UserInput/dtmf <34>
       UserInput/RFC2833 <35>

Listening interfaces : ALL:1730
Gatekeeper set: gnugk@grnet.gr
ohphone is calling host 0030123456
Command ? Ringing phone for "0030123456" ...
Call with "0030123456" established.

Command ? H
Hanging up call.
Command ? Call with "0030123456" completed, duration  0:59

Command ? X
OhPhone ended.
Download Plugin
You may download the two versions of our Nagios VoIP check plugin: