[OpenSIPS-Users] sipcapture segfaults when capturing on raw	interface in all 2.x versions of opensips
    Michael Ulitskiy 
    mulitskiy at acedsl.com
       
    Mon May  7 18:22:52 EDT 2018
    
    
  
Hello,
I'm trying to use opensips with sipcature module to collect sip messaging on a 
mirror port and feed it to homer database. Unfortunately it segfaults. I've 
tried to use all latest 2.x versions with the same result. 1.11.11 seems to 
work fine, but is missing necessary features. Since homer provides sample 
configs for opensips 2.2.x all below is for opensips-2.2.6.
Here's excerpt from the log right before the crash:
May  7 18:05:43 [10752] DBG:core:_parse_to: display={}, 
ruri={sip:19179620875 at 66.114.x.y}
May  7 18:05:43 [10752] CRITICAL:sipcapture:ip_addr2a: unknown address family 
841889590   
May  7 18:05:43 [10752] CRITICAL:sipcapture:ip_addr2a: unknown address family 
825112118   
May  7 18:05:43 [10752] DBG:sipcapture:w_sip_capture: src_ip: [67.2]
May  7 18:05:43 [10752] DBG:sipcapture:w_sip_capture: dst_ip: [66.1]
May  7 18:05:43 [10752] DBG:sipcapture:w_sip_capture: dst_port: [5060]
May  7 18:05:43 [10752] DBG:sipcapture:w_sip_capture: src_port: [5060]
May  7 18:05:43 [10750] DBG:core:handle_sigs: status = 139
May  7 18:05:43 [10750] INFO:core:handle_sigs: child process 10752 exited by a 
signal 11
May  7 18:05:43 [10750] INFO:core:handle_sigs: core was generated
May  7 18:05:43 [10750] INFO:core:handle_sigs: terminating due to SIGCHLD
As you can see opensips was unable to parse address family and source and 
destination ip. The capture is done on vlan interface - bond0.9. Can it be the 
reason?
Here's is config:
memlog=0
debug_mode=1
listen=udp:127.0.0.1:5060
children=5
dns=no
mpath="/usr/local/opensips/lib/opensips/modules"  #path to modules
db_default_url="postgres://user:password@localhost:5432/sipcapture"
loadmodule "db_postgres.so"
modparam("db_postgres", "exec_query_threshold", 100000)
loadmodule "sipmsgops.so"
loadmodule "sipcapture.so"
modparam("sipcapture", "db_url", 
"postgres://user:password@localhost:5432/sipcapture")
modparam("sipcapture", "table_name", "sip_capture")
modparam("sipcapture", "hep_capture_on", 0)
modparam("sipcapture", "raw_moni_capture_on", 1)
modparam("sipcapture", "raw_interface", "bond0.990")
modparam("sipcapture", "promiscious_on", 1)
modparam("sipcapture", "raw_socket_listen", "10.0.0.1:5060-5160")
modparam("sipcapture", "raw_moni_bpf_on", 1)
modparam("sipcapture", "capture_on", 1)
route {
        if (!is_method("OPTIONS|REGISTER|NOTIFY|SUBSCRIBE")) {
                sip_capture();
        }
}
 
onreply_route {
        if (!is_method("OPTIONS|REGISTER|NOTIFY|SUBSCRIBE")) {
                sip_capture();
        }
}
I can provide core if somebody wants to look at it. Just not sure if this list 
would allow such a large attachment.
Please let me know if you have any idea how to fix it.
Thanks,
Michael
    
    
More information about the Users
mailing list