Giter Club home page Giter Club logo

siptest's Introduction

siptest

Performs a SIP registration and then optionally places a call into an echo test, plays audio, and verifies that the audio is echoed back clearly. The result is returned using shell exit codes.

detectsipalg

Can be used to detect SIP-ALG packet manipulation, common in many consumer routers, and often implemented incorrectly.

siptest documentation

Dependencies:

- sox for audio analysis
- pjsip for SIP registration and dialing

To build pjsip python libraries:

debian/ubuntu:
    apt-get install build-essential python-dev
    wget http://www.pjsip.org/release/2.0.1/pjproject-2.0.1.tar.bz2
    tar xjf pjproject-2.0.1.tar.bz2
    cd pjproject-2.0.1
    ./configure
    make dep; CFLAGS=-fPIC make 
    cd pjsip-apps/src/python
    python setup.py install

Sample usage:

siptest --username=simon --password=secret --server=sip.example.com
echo $?
0

siptest --username=simon --password=secret --server=sip.example.com \
    --number=8888 --wav=8000hz.wav
echo $?
0

Exit codes:

0 - SUCCESS
1 - REG_FAILURE
2 - UNKNOWN_USER
3 - BAD_PASSWORD
4 - CONNECT_FAILURE_HOST_BAD
5 - CONNECT_FAILURE_HOST_GOOD
6 - AUTH_FAILURE
7 - FREQUENCY_MISMATCH_FAILURE
8 - SILENCE_RECORDED

Sample Asterisk dialplan:

[echotest] 
exten => 8888,1,NoOp(Echo in Jail)
exten => 8888,n,Answer()
exten => 8888,n,Set(TIMEOUT(absolute)=10)
exten => 8888,n,Echo()
exten => 8888,n,Hangup()

detectsipalg documentation

Dependencies:

- A remote SIP ALG test server (see http://dev.sipdoc.net/wiki/sip-stuff/SIP-ALG-Detector)

Example:

detectsipalg --address=sipalg.example.com
echo $?
11

Exit codes:

10 - DETECTED
11 - NOT_DETECTED
12 - TEST_FAILED_SOCKET_TIMEOUT
13 - TEST_FAILED_CONN_REFUSED
14 - TEST_FAILED_SOCKET_ERRORS
15 - TEST_FAILED_BAD_RESPONSES
16 - TEST_FAILED_UNKNOWN

siptest's People

Contributors

spditner avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.