Giter Site home page Giter Site logo

Comments (29)

lmangani avatar lmangani commented on August 17, 2024

Hello @ciscospirit

You can comment those debug messages out from the capture plan - they are just telling you the agent sees streams for which it has no SDP association/correlation match

https://github.com/sipcapture/captagent/blob/master/conf/captureplans/rtcp_capture_plan.cfg#L25

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

Hello!
thanks for your fast reply.
after doing this, i got now this error:

Dec 3 16:07:13 spce captagent[3338526]: WARNING: run_actions: null action list (rec_level=5)
Dec 3 16:07:13 spce captagent[3338526]: WARNING: run_actions: null action list (rec_level=5)
Dec 3 16:07:13 spce captagent[3338526]: WARNING: run_actions: null action list (rec_level=5)
Dec 3 16:07:13 spce captagent[3338526]: WARNING: run_actions: null action list (rec_level=5)
Dec 3 16:07:13 spce captagent[3338526]: WARNING: run_actions: null action list (rec_level=5)
Dec 3 16:07:13 spce captagent[3338526]: WARNING: run_actions: null action list (rec_level=5)
Dec 3 16:07:13 spce captagent[3338526]: WARNING: run_actions: null action list (rec_level=5)

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

can you show your rtcp_captrue_plan ?

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024
capture[pcap] {

	# here we can check source/destination IP/port, message size
	if(msg_check("size", "30")) {

        	#Check for correct version
		if(is_rtcp()) {
			#Only for redis!

			if(is_rtcp_exist()) {

				#Convert to JSON if needed.
				if(parse_rtcp_to_json()) {

					#Can be defined many profiles in transport_hep.xml
					if(!send_hep("hepsocket")) {
						clog("ERROR", "Error sending HEP!!!!");
					}

				} else {
					clog("ERROR", "couldn't parse RTCP to json");
				}

			}
			else {
#				clog("ERROR", "Couldnot find this call");
			}
		} else {
			clog("ERROR", "This is not RTCP");
		}
        }
	drop;
}

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024
Dec  3 16:10:54 spce systemd[1]: Started Captagent - monitoring system.
Dec  3 16:10:54 spce captagent[3341066]: ERROR: bad config file (1 errors)
Dec  3 16:11:05 spce captagent[3341066]: parse error (17,26-27): unknown command, missing loadmodule?
Dec  3 16:11:05 spce captagent[3341066]: WARNING: run_actions: null action list (rec_level=5)
Dec  3 16:11:05 spce captagent[3341066]: WARNING: run_actions: null action list (rec_level=5)

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024
<?xml version="1.0"?>
<document type="captagent/xml">
        <configuration name="core.conf" description="CORE Settings" serial="2014024212">
            <settings>
                <param name="debug" value="0"/>
                <param name="version" value="2"/>
                <param name="serial" value="2014056501"/>
                <param name="uuid" value="00781a4a-5b69-11e4-9522-bb79a8fcf0f3"/>
                <param name="daemon" value="false"/>
                <param name="syslog" value="false"/>
                <param name="pid_file" value="/run/captagent.pid"/>
                <param name="module_path" value="/usr/local/captagent/lib/captagent/modules"/>
                <param name="config_path" value="/usr/local/captagent/etc/captagent"/>
                <param name="capture_plans_path" value="/usr/local/captagent/etc/captagent/captureplans"/>
                <param name="backup" value="/usr/local/captagent/etc/captagent/backup"/>
                <param name="chroot" value="/usr/local/captagent"/>
            </settings>
        </configuration>
        <configuration name="modules.conf" description="Modules">
            <modules>
                <load module="transport_hep" register="local"/>
                <load module="protocol_sip" register="local"/>
                <load module="protocol_tls" register="local"/>
                <load module="socket_pcap" register="local"/>
                <load module="database_hash" register="local"/>
                <load module="protocol_rtcp" register="local"/>
        <!--

                <load module="socket_rtcpxr" register="local"/>
                <load module="socket_raw" register="local"/>
                <load module="transport_json" register="local"/>

                <load module="protocol_rtcp" register="local"/>
                <load module="interface_http" register="local"/>
                <load module="database_redis" register="local"/>
                <load module="socket_pfring" register="local"/>
            -->
            </modules>
        </configuration>
</document>

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

take it

capture[pcap] {

	# here we can check source/destination IP/port, message size
	if(msg_check("size", "30")) {

        	#Check for correct version
		if(is_rtcp()) {
			if(is_rtcp_exist()) {
				#Convert to JSON if needed.
				if(parse_rtcp_to_json()) {

					#Can be defined many profiles in transport_hep.xml
					if(!send_hep("hepsocket")) {
						clog("ERROR", "Error sending HEP!!!!");
					}
				} else {
					clog("ERROR", "couldn't parse RTCP to json");
				}

			}
		} else {
			clog("ERROR", "This is not RTCP");
		}
        }
	drop;
}

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

doesn't help... Same Problem... :/

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

btw. why i need RTCP?
i use rtpengine to send RTCP statistics.. so i could also deactivate the protocol_rtcp fully or not?

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

@ciscospirit you can deactivate in this case and send only SIP

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

yah but also if i remove it from modules i got same errors..

Dec  3 16:16:31 spce systemd[1]: Started Captagent - monitoring system.
Dec  3 16:16:31 spce captagent[3344060]: ERROR: bad config file (1 errors)
Dec  3 16:16:50 spce captagent[3344060]: parse error (17,26-27): unknown command, missing loadmodule?
Dec  3 16:16:50 spce captagent[3344060]: WARNING: run_actions: null action list (rec_level=5)
Dec  3 16:16:50 spce captagent[3344060]: WARNING: run_actions: null action list (rec_level=5)

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

i load now this modules

                <load module="transport_hep" register="local"/>
                <load module="protocol_sip" register="local"/>
                <load module="protocol_tls" register="local"/>
                <load module="socket_pcap" register="local"/>
                <load module="database_hash" register="local"/>

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

one of these configs has xml issue inside
just start captagent in debug mode to stdout and you will see

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

can you tell me how to start captagent in debug mode?

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

https://github.com/sipcapture/captagent/blob/master/conf/captagent.xml.in#L5

set to 10

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024
Dec  3 16:25:40 spce systemd[1]: Starting Captagent - monitoring system...
Dec  3 16:25:40 spce captagent[3348953]: [NOTICE] Loaded core config
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] modules.c:53 Loading module: [transport_hep]
Dec  3 16:25:40 spce captagent[3348954]: [NOTICE] Loaded transport_hep
Dec  3 16:25:40 spce systemd[1]: Started Captagent - monitoring system.
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] modules.c:53 Loading module: [protocol_sip]
Dec  3 16:25:40 spce captagent[3348954]: [NOTICE] Loaded protocol_sip
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] modules.c:53 Loading module: [protocol_tls]
Dec  3 16:25:40 spce captagent[3348954]: [NOTICE] Loaded protocol_tls
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] modules.c:53 Loading module: [socket_pcap]
Dec  3 16:25:40 spce captagent[3348954]: [NOTICE] Loaded socket_pcap
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] socket_pcap.c:979 Setting device: any
Dec  3 16:25:40 spce captagent[3348954]: #015
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] socket_pcap.c:1013 Activated device [any] at index [0]
Dec  3 16:25:40 spce captagent[3348954]: #015
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] socket_pcap.c:1066 BPF Filter => Index: [0], Expression: [(port 5060)], Reasm: [0]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:456 find_export_record: found <msg_check> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:456 find_export_record: found <parse_sip> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:456 find_export_record: found <send_hep> in module transport_hep [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:456 find_export_record: found <clog> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:456 find_export_record: found <sip_has_sdp> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:25:40 spce captagent[3348954]: [ERR] conf_function.c:461 find_export_record: <check_rtcp_ipport> not found
Dec  3 16:25:40 spce captagent[3348954]: #015
Dec  3 16:25:40 spce captagent[3348954]: parse error (17,26-27): unknown command, missing loadmodule?
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:456 find_export_record: found <clog> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:25:40 spce captagent[3348954]: ERROR: bad config file (1 errors)
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] modules.c:53 Loading module: [database_hash]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] socket_pcap.c:1131 Index in proto_collect(): index: [0]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] socket_pcap.c:1183 Link offset interface type [113] [16]
Dec  3 16:25:40 spce captagent[3348954]: [NOTICE] Loaded database_hash
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] captagent.c:352 The Captagent is ready
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:217 RUN: [0]->[0]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:164 EVAL_EXPR: [1]->[0]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] conf_function.c:217 RUN: [1]->[1]
Dec  3 16:25:40 spce captagent[3348954]: [DEBUG] socket_pcap.c:221 Port match!
Dec  3 16:25:40 spce captagent[3348954]: #015

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

please show your socket_pcap.xml

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024
<?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>


from captagent.

adubovikov avatar adubovikov commented on August 17, 2024
<?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>		
    </module>
</document>


from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

Same...

Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] socket_pcap.c:1013 Activated device [any] at index [0]
Dec  3 16:47:06 spce captagent[3360343]: #015
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] socket_pcap.c:1066 BPF Filter => Index: [0], Expression: [(port 5060)], Reasm: [0]
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] conf_function.c:456 find_export_record: found <msg_check> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] conf_function.c:456 find_export_record: found <parse_sip> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] conf_function.c:456 find_export_record: found <send_hep> in module transport_hep [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] conf_function.c:456 find_export_record: found <clog> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] conf_function.c:456 find_export_record: found <sip_has_sdp> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:47:06 spce captagent[3360343]: [ERR] conf_function.c:461 find_export_record: <check_rtcp_ipport> not found
Dec  3 16:47:06 spce captagent[3360343]: #015
Dec  3 16:47:06 spce captagent[3360343]: parse error (17,26-27): unknown command, missing loadmodule?
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] conf_function.c:456 find_export_record: found <clog> in module protocol_sip [/usr/local/captagent/lib/captagent/modules]
Dec  3 16:47:06 spce captagent[3360343]: ERROR: bad config file (1 errors)
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] modules.c:53 Loading module: [database_hash]
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] socket_pcap.c:1131 Index in proto_collect(): index: [0]
Dec  3 16:47:06 spce captagent[3360343]: [DEBUG] socket_pcap.c:1183 Link offset interface type [113] [16]
Dec  3 16:47:06 spce captagent[3360343]: [NOTICE] Loaded database_hash

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

do you see the bad command ?

check_rtcp_ipport

just do:

grep -R "check_rtcp_ipport" /usr/local/captagent/etc

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024
root@spce:~# grep -R "check_rtcp_ipport" /usr/local/captagent/etc
/usr/local/captagent/etc/captagent/captureplans/tls_capture_plan.cfg:                   if(!check_rtcp_ipport())
/usr/local/captagent/etc/captagent/captureplans/sip_capture_plan.cfg:                   if(!check_rtcp_ipport())

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

it looks like he want this value, but can't find it anywhere... but i have a standard installation newly done from git.. so don't know where they lost this.

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

show me sip_capture_plan.cfg

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

here.. but i never touched this.

capture[pcap] {

	# here we can check source/destination IP/port, message size
	if(msg_check("size", "100")) {

	    #Do parsing
	    if(parse_sip()) {
		#Can be defined many profiles in transport_hep.xml
		
		if(!send_hep("hepsocket")) {
		    clog("ERROR", "Error sending HEP!!!!");
		}
		
		if(sip_has_sdp())
		{
			#Activate it for RTCP checks
			if(!check_rtcp_ipport())
			{
				clog("ERROR", "ALREADY EXIST");
			}
		}

		#Duplicate all INVITEs to JSON transport
		# if(sip_is_method() && sip_check("method","INVITE")) {
		#    #Can be defined many profiles in transport_json.xml
		#    if(!send_json("jsonsocket")) {
		#	clog("ERROR", "Error sending JSON!!!");
		#    }
		# }
	    }
	}
	drop;
}

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024
capture[pcap] {

	# here we can check source/destination IP/port, message size
	if(msg_check("size", "100")) {

	    #Do parsing
	    if(parse_sip()) {
		#Can be defined many profiles in transport_hep.xml
		
		if(!send_hep("hepsocket")) {
		    clog("ERROR", "Error sending HEP!!!!");
		}
	    }
	}
	drop;
}

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

@ciscospirit works ?

from captagent.

ciscospirit avatar ciscospirit commented on August 17, 2024

yes :)
looks better now :))

from captagent.

adubovikov avatar adubovikov commented on August 17, 2024

@ciscospirit perfect - please give us a star here :-)

https://github.com/sipcapture/homer/stargazers

from captagent.

Related Issues (20)

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.