sipcapture / homer

HOMER - 100% Open-Source SIP, VoIP, RTC Packet Capture & Monitoring
https://sipcapture.org
GNU Affero General Public License v3.0
1.58k stars 239 forks source link

No Data in hep_proto_1_call #590

Closed ciscospirit closed 1 year ago

ciscospirit commented 1 year ago

Hello,

i setup from vanilla new homer 7.10.24 i did it via install-script so fully automatically.

i did the troubleshooting guide but i can't solve the problem.

homer_data=# select count(*) from hep_proto_1_call;
 count
-------
     0
(1 row)

i see there 1 row but nothing counting and also no results in the webgui.

if i ngrep on the 9060 port i see a lot of data coming from the sipserver (sipwise mr9.5.x LTS) to the homer server from captagent, rtpengine and hepipe client

my configuration on the clientside is the following: any idea what i did wrong?

iptables is not enabled.

/usr/local/captagent/etc/captagent/protocol_sip.xml

<?xml version="1.0"?>
<document type="captagent_module/xml">
    <module name="protocol_sip" description="SIP Protocol" serial="2014010402">
        <profile name="proto_sip" description="PROTO SIP" enable="true" serial="2014010402">
            <settings>
                <param name="dialog-type" value="2"/>
                <param name="dialog-timeout" value="180"/>
            </settings>
        </profile>
    </module>
</document>

/usr/local/captagent/etc/captagent/transport_hep.xml

<?xml version="1.0"?>
<document type="captagent_module/xml">
    <module name="transport_hep" description="HEP Protocol" serial="2014010402">
        <profile name="hepsocket" description="Transport HEP" enable="true" serial="2014010402">
            <settings>
                <param name="version" value="3"/>
                <param name="capture-host" value="homer.xxxxx.xxxxx"/>
                <param name="capture-port" value="9060"/>
                <param name="capture-proto" value="udp"/>
                <param name="capture-id" value="2001"/>
                <param name="capture-password" value="myhep"/>
                <param name="payload-compression" value="false"/>
            </settings>
        </profile>
    </module>
</document>

/usr/local/captagent/etc/captagent/socket_pcap.xml

<?xml version="1.0"?>
<document type="captagent_module/xml">
    <module name="socket_pcap" description="HEP Socket" serial="2014010402">
    <profile name="socketspcap_sip" description="HEP Socket" enable="true" serial="2014010402">
        <settings>
        <param name="dev" value="any"/>
        <param name="promisc" value="true"/>
        <param name="reasm" value="false"/>
        <param name="websocket-detection" value="false"/>
        <param name="tcpdefrag" value="false"/>
            <!-- <param name="capture-filter" value="ip_to_ip"/> -->
        <param name="capture-plan" value="sip_capture_plan.cfg"/>
        <param name="filter">
            <value>port 5060</value>
        </param>
        </settings>
    </profile>
    <profile name="socketspcap_rtcp" description="RTCP Socket" enable="false" serial="2014010402">
            <settings>
                <param name="dev" value="any"/>
                <param name="promisc" value="true"/>
                <param name="reasm" value="false"/>
                <!-- size in MB -->
                <param name="ring-buffer" value="20"/>
                <!-- for rtp && rtcp < 250 -->
                <param name="snap-len" value="256"/>
                <param name="capture-filter" value="rtcp"/>
                <param name="capture-plan" value="rtcp_capture_plan.cfg"/>
                <param name="filter">
                    <value>portrange 10000-30000 and len >=50 </value>
                </param>
            </settings>
        </profile>
    <profile name="socketspcap_tls" description="TLS Socket" enable="false" serial="2014010402">
        <settings>
        <param name="dev" value="any"/>
        <param name="promisc" value="true"/>
        <param name="reasm" value="false"/>
        <param name="tcpdefrag" value="true"/>
        <param name="capture-plan" value="tls_capture_plan.cfg"/>
        <param name="filter">
            <value>tcp port 5061</value>
        </param>
        </settings>
    </profile>
    <profile name="socketspcap_sctp" description="SCTP Socket" enable="false" serial="2014010402">
            <settings>
                <param name="dev" value="any"/>
                <param name="promisc" value="true"/>
                <param name="reasm" value="true"/>
                <param name="ipv4fragments" value="true"/>
                <param name="ipv6fragments" value="true"/>
                <param name="proto-type" value="sip"/>
                <param name="capture-plan" value="isup_capture_plan.cfg"/>
                <param name="filter">
                    <value>proto 132</value>
                </param>
            </settings>
        </profile>
    <profile name="socketspcap_diameter" description="DIAMETER Socket" enable="false" serial="2014010402">
            <settings>
                <param name="dev" value="any"/>
                <param name="promisc" value="true"/>
                <param name="reasm" value="false"/>
                <param name="tcpdefrag" value="true"/>
                <param name="capture-plan" value="diameter_capture_plan.cfg"/>
                <param name="filter">
                    <value>port 3868</value>
                </param>
            </settings>
        </profile>
    </module>
</document>

/etc/ngcp-config/zzz/homer/hepipe.js/config.js

var config = {
 hep_config: {
   debug: false,
   HEP_SERVER: 'homer.xxx.xxx',
   HEP_PORT: 9060
 },
 logs_config: {
   debug: false,
   HEP_ID: 11,
   HEP_PASS: 'multipass',
   logs: [
     {
       tag : 'ngcp',
       host : 'sip.xxx.xxx',
       pattern: 'ID=([^&]\\S*)', // escape backslashes!
       path : '/var/log/ngcp/kamailio-proxy.log'
     }
   ]
 }
};

module.exports = config;

/etc/ngcp-config/config.yml

homer:
  capture_id: '999'
  capture_pass: myHep
  enabled: yes
  host: homer.xxx.xxx
  port: '9060'
github-actions[bot] commented 1 year ago

Please star this repository to motivate the developers and to get higher priority! :star:

ciscospirit commented 1 year ago

problem: captagent was restarting all the time. with heplify everything went smooth now.