POE Paste with lovely alien head...

No paste!

from "JasonB" at 64.57.241.14
SIP check script for ldirectord

format options below
#!/usr/bin/expect -f

set timeout 7
set host [lindex $argv 2]
set port [lindex $argv 3]

spawn -noecho telnet $host $port

expect "'^]'."
send "9300CN{{ sip_test.username }}|CO{{ sip_test.password }}|\r"
expect {
        "941"   { puts "SIP OK\n" ; exit 0 }
        "940"   { puts "SIP Login Error\n" ; exit 1 }
}

puts "SIP Timeout\n"
exit 1




Use above with 'checkcommand=/path/to/check_sip' in ldirectord.cf





perl stuff: (might be helpful for others but not perfect)



Valid HTML 4.01!

Pastebot is powered by POE.