Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To place test H.323 calls, you can't beat ohphone:</p> <pre><code>(sleep 30; echo q) | ohphone -s Default -n -u from_user to_user@gateway &gt; /tmp/output.$$ </code></pre> <p>You can typically find ohphone as a package in your linux distribution:</p> <pre><code>apt-get install ohphone </code></pre> <p>The source can be found on <a href="http://www.voxgratia.org/downloads.html" rel="nofollow">voxgratia</a> While older, it still works splendidly.</p> <p>Processing the output is a tad tricky with ohphone, but you can use something like a perl script to process it into an errno value.</p> <p>Here's a quick and dirty example does just that:</p> <pre><code>#!/usr/bin/env perl $delay=$ARGV[0]; if(! $delay) { $delay = 10; } $from=$ARGV[1]; if(! $from) { $from = "default_from_user"; } $to=$ARGV[2]; if(! $to) { $to = "default_to_user"; } $gateway=$ARGV[3]; if(! $gateway) { $gateway = "127.0.0.1"; } print "Running: (sleep $delay; echo q ) | (ohphone -s Default -n -u $from $to\@$gateway)|\n"; open(IN,"(sleep $delay; echo q ) | (ohphone -s Default -n -u $from $to\@$gateway)|"); my $call_started=false; my $call_completed=false; my @results; my $skip=1; while($line=&lt;IN&gt;) { if($line=~/Listening interfaces/) { $skip=0; next; } if($skip) { next; } if($line=~/^Could not open sound device/) { next; } chomp($line); push(@results,$line); if($line=~/was busy$/) { print "$to: Called party busy\n"; exit 1; } if($line=~/^Call with .* completed, duration (.*)$/) { print "$to: Completed duration $1 call.\n"; exit 0; } if($line=~/has cleared the call, duration (.*)$/) { print "$to: Completed duration $1 call.\n"; exit 0; } if($line=~/^Call with .* completed$/) { print "$to: No call duration.\n"; exit 2; } } close(IN); $result=join("\n",@results); print "$ARGV[0]: Unknown results:\n$result\n"; exit 255; </code></pre> <p>This script is a quite a few years old, but it has worked well for us during that time.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload