--- check_sip.orig	Fri Nov 13 15:21:23 2009
+++ check_sip	Fri Nov 13 15:22:11 2009
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
 
 ##
 # check_sip - (c) 2005-2006 O'Shaughnessy Evans <shaug+nagios at aloha.net>
@@ -33,7 +33,7 @@ BEGIN {
   $ME = 'check_sip';
 
   # command to get connection state; 1st %s is for extra args, second is SIP URI
-  @Sipsak_Cmd = qw(sipsak --nagios-code -v);
+  @Sipsak_Cmd = qw(${LOCALBASE}/bin/sipsak --nagios-code -v);
   $User = '';
   $Password = '';
   $Port = 5060;
@@ -151,7 +151,10 @@ if ($Proxy) {
     push @Sipsak_Cmd, '--outbound-proxy', $Proxy;
 }
 
-push @Sipsak_Cmd, '--sip-uri', $URI;
+# add --numeric since on OpenBSD /etc/hosts lookup typically
+# gives 127.0.0.1 which results in broken SIP headers.
+
+push @Sipsak_Cmd, '--numeric --sip-uri', $URI;
 print "executing:  ". join(' ', @Sipsak_Cmd). "\n" if $Verbose;
 my $cmd = join(' ', @Sipsak_Cmd);
 my @out = `$cmd 2>&1`;
