freeswtich+homer+sngrep 搭建sip监控系统

# 一、freeswtich 1.10.6 安装
## 1、环境准备
- centos7.6 64 操作系统
- freeswtich 1.10.6 安装包
## 2、安装freeswtich


1.1   首先安装两个依赖库: Sofia-sip 和 spandsp,
     说明国内的网络环境访问github不太稳定,可以经过海外主机下载  sofia-sip 和 spandsp 之后,打包拷贝到本地。
```
yum -y install autoconf automake git libtool openssl* libtiff* libjpeg*
git clone https://github.com/freeswitch/sofia-sip
cd sofia-sip
./bootstrap.sh
./configure
make
make install
git clone https://github.com/freeswitch/spandsp
cd spandsp
./bootstrap.sh
./configure
make
make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
```


1.2 安装 epel扩展和文件传输工具lrzsz及vim、安装相关依赖库
```
yum install -y epel-release lrzsz vim
yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm
yum-builddep -y freeswitch   --skip-broken 
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils 
```
注意:
a.        在使用yum install的时候,偶尔会碰见这样的错误:Couldn’t open file /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
这是因为在  /etc/yum.repos.d 目录下有关于yumrepository的配置文件中列有如下的GPG key:
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
而YUM在路径 /etc/pki/rpm-gpg 下找不到这个GPG key的时候,就会报如上的错误了。

解决方案:
```
cd /etc/pki/rpm-gpg
wget https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
```
然后再次运行 yum install 命令就可以成功了。
 b.        执行  yum-builddep -y freeswitch 时候, 如果出现以下错误,说明 epel 源 访问有问题,请检查网络;
 ```
 Error: No Package found for ldns-devel
Error: No Package found for libedit-devel
Error: No Package found for libmemcached-devel
Error: No Package found for libmpg123-devel >= 1.20.1
Error: No Package found for libogg-devel
Error: No Package found for libshout-devel >= 2.2.2
Error: No Package found for libtheora-devel
Error: No Package found for libvorbis-devel
Error: No Package found for lua-devel
Error: No Package found for speex-devel
```
3. 下载 freeswitch-1.10.6.-release.zip ,存放到 /home/fs/ 目录

4.  解压缩  freeswitch-1.10.6.-release.zip 并开始以下编译安装步骤:
```
cd  /home/fs/unzip -d . freeswitch-1.10.6.-release.zip 
cd freeswitch-1.10.6.-release
vim  modules.conf  #注释掉不需要的视频模块 mod_av 和 mod_signalwire export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
./rebootstrap.sh -j
./configure 
autoreconf -fiv
make
make install
```
5.  启动Freeswitch:  /usr/local/freeswitch/bin/freeswitch  -nonat -nosql 
参考文档https://www.cnblogs.com/semaphore/p/15371450.html
# 二、安装homer

进入官方网站查找installinstall
```
https://github.com/sipcapture/homer/wiki/Quick-Install
yum install redhat-lsb-core wget curl git
wget https://github.com/sipcapture/homer-installer/raw/master/homer_installer.sh
chmod +x homer_installer.sh
./homer_installer.sh
注意 安装过程中有个文件遗漏了,注意下载下
telegraf.conf
https://github.com/sipcapture/homer-installer
```
# 三、安装 sngrep
安装sngrep
项目github地址:https://github.com/irontec/sngrep

安装
```
Debain
cat >>  /etc/apt/sources.list <<-'EOF'
deb http://packages.irontec.com/debian squeeze main
deb http://packages.irontec.com/debian wheezy main
deb http://packages.irontec.com/debian jessie main
deb http://packages.irontec.com/debian stretch main
EOF
wget http://packages.irontec.com/public.key -q -O - | apt-key add -
apt-get update
apt-get install sngrep
```
ubuntu
```
cat >> /etc/apt/sources.list <<-'EOF'
deb http://packages.irontec.com/ubuntu trusty main
deb http://packages.irontec.com/ubuntu precise main
deb http://packages.irontec.com/ubuntu vivid main
deb http://packages.irontec.com/ubuntu xenial main
deb http://packages.irontec.com/ubuntu zesty main
deb http://packages.irontec.com/ubuntu artful main
EOF
wget http://packages.irontec.com/public.key -q -O - | apt-key add -
apt-get update
apt-get install sngrep
```
CentOS/RHEL
```
cat >>  /etc/yum.repos.d/irontec.repo <<-'EOF'
[irontec]
name=Irontec RPMs repository
baseurl=http://packages.irontec.com/centos/$releasever/$basearch/
EOF
rpm --import http://packages.irontec.com/public.key
yum install -y sngrep
```
REHL
```
cat >>  /etc/yum.repos.d/irontec.repo <<-'EOF'
[irontec]
name=Irontec RPMs repository
baseurl=http://packages.irontec.com/rhel/$releasever/$basearch/
EOF
rpm --import http://packages.irontec.com/public.key
```
yum install sngrep
# 四、启动检查
freeswtich
```
[root@localhost vagrant]# ps -ef |grep freeswitch
root     25722     1  4 17:19 ?        00:02:17 /usr/local/freeswitch/bin/freeswitch -nonat -nc
root     25763 25009  1 17:19 pts/2    00:00:34 /usr/local/freeswitch/bin/fs_cli
root     25910 25823  0 18:10 pts/4    00:00:00 grep --color=auto freeswitch
```
homer
```
[root@localhost ~]# ps -ef |grep homer
root     15643     1  0 15:01 ?        00:00:09 /usr/local/bin/homer-app
postgres 15695 15409  0 15:01 ?        00:00:02 postgres: homer_user homer_data ::1(53246) idle
postgres 16700 15409  0 18:05 ?        00:00:00 postgres: homer_user homer_config ::1(55702) idle
postgres 16710 15409  0 18:08 ?        00:00:00 postgres: homer_user homer_data 127.0.0.1(59042) idle
root     16719  4731  0 18:10 pts/1    00:00:00 grep --color=auto homer
[root@localhost ~]# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      7384/rpcbind        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      7079/sshd           
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      15409/postmaster    
tcp        0      0 127.0.0.1:8088          0.0.0.0:*               LISTEN      14893/influxd       
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      7198/master         
tcp6       0      0 :::9096                 :::*                    LISTEN      15680/heplify-serve 
tcp6       0      0 :::111                  :::*                    LISTEN      7384/rpcbind        
tcp6       0      0 :::8086                 :::*                    LISTEN      14893/influxd       
tcp6       0      0 :::22                   :::*                    LISTEN      7079/sshd           
tcp6       0      0 :::9080                 :::*                    LISTEN      15643/homer-app     
tcp6       0      0 :::3000                 :::*                    LISTEN      15680/heplify-serve 
tcp6       0      0 ::1:5432                :::*                    LISTEN      15409/postmaster    
tcp6       0      0 :::8888                 :::*                    LISTEN      14942/chronograf    
tcp6       0      0 ::1:25                  :::*                    LISTEN      7198/master         
tcp6       0      0 :::9060                 :::*                    LISTEN      15680/heplify-serve 
tcp6       0      0 :::9092                 :::*                    LISTEN      14933/kapacitord 
```
http://172.0.2.11:9080/dashboard/registration
账号/密码: admin/sipcapture

sngrep
在freeswtich机器上面执行下面命令启动sngrep
```
sngrep portrange  5060-5080 -H udp:172.0.2.11:9060 --no-interface -q
```
# 五、拨打测试
eyebean 注册freeswitch 打入会议室3000,从homer页面观察接收到的信令情况

 

Vivado2023是一款集成开发环境软件,用于设计和验证FPGA(现场可编程门阵列)和可编程逻辑器件。对于使用Vivado2023的用户来说,license是必不可少的。 Vivado2023的license是一种许可证,用于授权用户合法使用该软件。许可证分为多种类型,包括评估许可证、开发许可证和节点许可证等。每种许可证都有不同的使用条件和功能。 评估许可证是免费提供的,让用户可以在一段时间内试用Vivado2023的全部功能。用户可以使用这个许可证来了解软件的性能和特点,对于初学者和小规模项目来说是一个很好的选择。但是,使用评估许可证的用户在使用期限过后需要购买正式的许可证才能继续使用软件。 开发许可证是付费的,可以永久使用Vivado2023的全部功能。这种许可证适用于需要长期使用Vivado2023进行开发的用户,通常是专业的FPGA设计师或工程师。购买开发许可证可以享受Vivado2023的技术支持和更新服务,确保软件始终保持最新的版本和功能。 节点许可证是用于多设备或分布式设计的许可证,可以在多个计算机上安装Vivado2023,并共享使用。节点许可证适用于大规模项目或需要多个处理节点进行设计的用户,可以提高工作效率和资源利用率。 总之,Vivado2023 license是用户在使用Vivado2023时必须考虑的问题。用户可以根据自己的需求选择合适的许可证类型,以便获取最佳的软件使用体验。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值