#! /bin/bash # sngrep is a tool for displaying SIP calls message flows from terminal. # https://github.com/irontec/sngrep/wiki . /usr/src/m2/framework/bash_functions.sh . /usr/src/m2/framework/settings.sh yum -y install ncurses-devel make libpcap-devel pcre-devel openssl-devel git gcc autoconf automake cd /usr/src _centos_version if (( centos_version == 7 )); then git clone https://github.com/irontec/sngrep cd sngrep ./bootstrap.sh ./configure make make install elif (( centos_version == 6 )); then k_download_packet sngrep-1.4.5-1.el6.x86_64.rpm yum -y localinstall sngrep-1.4.5-1.el6.x86_64.rpm else report "Unsupported Centos version" 1 fi