[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Feature request: UDP generic protocol testing

From: Alex Black
Subject: RE: Feature request: UDP generic protocol testing
Date: Fri, 4 Nov 2005 23:23:31 -0500

> > There are a number of things I'd like to test for using Monit that 
> > answer on UDP, for example SIP and IAX (voip protocols).  Could 
> > functionality be added so send/expect can be used with UDP 
> sockets as 
> > well as TCP stream sockets?
> I have studied this and have one question. Are you sure that 
> send/ expect does not work over UDP?

It doesn't seem to be working for me using monit 4.6.  Does monit have
any debug mode that can send extra info when a test fails? In this case,
send the result of the send/expect? E.g. if it sent me what it got, it
would help :)

I have done the test using netcat:

nc -vvu host 5060 < siptest

Where siptest is a file with this:

OPTIONS sip:address@hidden SIP/2.0
Via: SIP/2.0/UDP
From: <sip:address@hidden>;tag=55a66b
To: sip:somehost
Call-ID: address@hidden

The values don't seem to be too important, but it is important to have a
valid SIP message otherwise you will get no response.

The response I get with nc is:

SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
From: <sip:address@hidden>;tag=55a66b
To: sip:somehost;tag=as34da63cb
Call-ID: address@hidden
User-Agent: Asterisk PBX
Contact: <sip:>
Accept: application/sdp
Content-Length: 0

So my monit test is:

        if failed port 5060 type udp
                send "OPTIONS sip:address@hidden SIP/2.0\r\nVia:
SIP/2.0/UDP\r\nFrom: <sip:address@hidden>;tag=55a66b\r\nTo:
sip:somehost\r\nCall-ID: address@hidden: 1 OPTIONS"
                expect "SIP/2.0 404 Not Found*"
                with timeout 2 seconds
                then alert

I have also tried:

                expect "SIP/2.0 404 Not Found"

I am a beginner with unix (debian), so it is probably beyond me at the
moment to get the latest code from cvs and build it etc.

- Alex

reply via email to

[Prev in Thread] Current Thread [Next in Thread]