sipcapture module
Listens to traffic and saves incoming messages to the database kamailio Homer’s sipcapture module allows native support for HEPv1/v2, IPIP Encapsulation protocols and switch mirroring/monitoring port traffic.
Kamailio can be configured either as
- Capture Agent (siptrace module) sampling and forwarding packets
- Capture Node (sipcapture module) collecting, indexing and storing SIP packets as received from the available Capture Agents (HEP), SBCs (IPIP) or directly from the ethernet wire.
A stand-alone capture agent (captagent) is provided enabling HEP encapsulation for unsupported systems and soft-switches.
sipcapture vs siptrace
Sender or server with sip trace module - lets you capture sip tarffic to database. Using HEP protocol messages can be send form one server to another server over the network.
Receiver or server with sip capture module - can listens to traffic and saves incoming messages to the database. can filter which messages you want to save in a normal Kamailio routing script
homer
open source software selfcontained SIP Analysis and Troubleshooting environment capture SIP messages from a running Kamailio production server or from a mirrored port in a switch in your network
###features of homer can generate searchable database of your SIP traffic visual diagrams of individual SIP sessions centralized access to present and past signaling & stats Full SIP/SDP payload with precise timestamping Automatic correlation of sessions and reports Visual representation of multi session call-flows Fast detection of usage and system anomalies
sender captures traffic and forwards to a receiver. For homer we need a database and a web server with PHP support.
HOMER server installation
using bash script approach on debian 9 or centos 7
cd /usr/src
wget https://cdn.rawgit.com/sipcapture/homer-installer/master/homer_installer.sh
chmod +x homer_installer.sh
./homer_installer.sh
end of installation should look like
************************************************************
,;;;;,
;;;;;;;;. Congratulations! HOMER has been installed!
;;;;;;;;;;;;
;;;; ;; ;;;; <--------------- INVITE ---------------
;;;; ;; ;;;; --------------- 200 OK --------------->
;;;; .. ;;;;
;;;; ;;;; Your system should be now ready to rock!
;;;; ;; ;;;; Please verify/complete the configuration
,;;; ;; ;;;; files generated by the installer below.
;;;;;;;;;;;;
:;;;;;;;;; THIS SCRIPT IS PROVIDED AS-IS, USE AT
;;;;;;;; YOUR *OWN* RISK, REVIEW LICENSE & DOCS
*************************************************************
* Verify configuration for HOMER-API:
'/api/configuration.php'
'/api/preferences.php'
* Start/stop Homer SIP Capture:
'systemtcl start|stop heplify'
* Access HOMER UI:
http://10.130.74.199
[default: admin/sipcapture]
* Send HEP/EEP Encapsulated Packets:
hep://10.130.74.199:9060
Install kamailio with sip capture
Depedencies bison , flex
apt-get install bison flex
for mysql server and client to get mysql.h file , if libmysqlclient-dev is not working like it wsnt for me on debian 9 on AWS (Package ‘libmysqlclient-dev’ has no installation candidate) , then Look into apt-cache
>apt-cache search libmysqlclient
from the list choose choose any candidate such as default-libmysqlclient-dev
Then get kamaikio source code , build and install
git clone --depth 1 https://github.com/kamailio/kamailio kamailio
cd kamailio;
make FLAVOUR=kamailio include_modules="db_mysql sipcapture pv textops rtimer xlog sqlops htable sl siputils" cfg
make all && make install
Ref : HOMER - https://www.kamailio.org/w/2013/02/tips-homer/ homer bash installer - https://github.com/sipcapture/homer-installer#page_with_curl-bash-installer sip capture homer - https://github.com/sipcapture/homer/wiki/Examples%3A-Kamailio sipcapture sorce code - https://github.com/sipcapture/