SipSak

Description

sipsak is a SIP stress and diagnostics utility. It sends SIP requests to the server within the sip-uri and examines received responses. sipsak is a small comand line tool for developers and administrators of SIP applications. It can be used for some simple tests on SIP applications and devices.

Usage

Syntax

 shoot  : sipsak [-f FILE] [-L] -s SIPURI
 trace  : sipsak -T -s SIPURI
 usrloc : sipsak -U [-I|M] [-b NUMBER] [-e NUMBER] [-x NUMBER] [-z NUMBER] -s SIPURI
 usrloc : sipsak -I|M [-b NUMBER] [-e NUMBER] -s SIPURI
 usrloc : sipsak -U [-C SIPURI] [-x NUMBER] -s SIPURI
 message: sipsak -M [-B STRING] [-O STRING] [-c SIPURI] -s SIPURI
 flood  : sipsak -F [-e NUMBER] -s SIPURI
 random : sipsak -R [-t NUMBER] -s SIPURI

Options

 additional parameter in every mode:
   [-a PASSWORD] [-d] [-i] [-H HOSTNAME] [-l PORT] [-m NUMBER] [-n] [-N]
   [-r PORT] [-v] [-V] [-w]

  -h                displays this help message
  -V                prints version string only
  -f FILE           the file which contains the SIP message to send
                      use - for standard input
  -L                de-activate CR (\r) insertion in files
  -s SIPURI         the destination server uri in form
                      sip:[user@]servername[:port]
  -T                activates the traceroute mode
  -U                activates the usrloc mode
  -I                simulates a successful calls with itself
  -M                sends messages to itself
  -C SIPURI         use the given uri as Contact in REGISTER
  -b NUMBER         the starting number appendix to the user name (default: 0)
  -e NUMBER         the ending numer of the appendix to the user name
  -o NUMBER         sleep number ms before sending next request
  -x NUMBER         the expires header field value (default: 15)
  -z NUMBER         activates randomly removing of user bindings
  -F                activates the flood mode
  -R                activates the random modues (dangerous)
  -t NUMBER         the maximum number of trashed character in random mode
                      (default: request length)
  -l PORT           the local port to use (default: any)
  -r PORT           the remote port to use (default: 5060)
  -p HOSTNAME       request target (outbound proxy)
  -H HOSTNAME       overwrites the local hostname in all headers
  -m NUMBER         the value for the max-forwards header field
  -n                use FQDN instead of IPs in the Via-Line
  -i                deactivate the insertion of a Via-Line
  -a PASSWORD       password for authentication
                      (if omitted password="")
  -u STRING         Authentication username
  -d                ignore redirects
  -v                each v produces more verbosity (max. 3)
  -w                extract IP from the warning in reply
  -g STRING         replacement for a special mark in the message
  -G                activates replacement of variables
  -N                returns exit codes Nagios compliant
  -q STRING         search for a RegExp in replies and return error
                    on failure
  -W NUMBER         return Nagios warning if retrans > number
  -B STRING         send a message with string as body
  -O STRING         Content-Disposition value
  -P NUMBER         Number of processes to start
  -A NUMBER         number of test runs and print just timings
  -S                use same port for receiving and sending
  -c SIPURI         use the given uri as From in MESSAGE
  -D NUMBER         timeout multiplier for INVITE transactions
                    and reliable transports (default: 64)
  -E STRING         specify transport to be used
  -j STRING         adds additional headers to the request

Example

cyborg@cyborg:~$ sudo sipsak -vv -s sip:345@... -m "hi"
No SRV record: _sip._tcp.tleilax
No SRV record: _sip._udp.tleilax
using A record: tleilax
Max-Forwards set to 0

message received:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
127.0.1.1:60506;branch=z9hG4bK.2702c76c;alias;received=192.168.1.3;rport=60506
From: sip:sipsak@...:60506;tag=70433c99
To: sip:345@...;tag=as6e76406d
Call-ID: 1883454617@...
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.8.29.0-vici
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, 
INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:192.168.1.2:5060>
Accept: application/sdp
Content-Length: 0



** reply received after 0.751 ms **
    SIP/2.0 200 OK
    final received
0 Comments

Leave a reply

CONTACT US

We're are building as a community and a team. Be a part of it.

Sending

©2017 Ztrela Knowledge Solutions Pvt. Ltd

Log in with your credentials

Forgot your details?