[OpenSIPS-Users] SIP Capture storing as expected, but logging errors

Jock McKechnie jock.mckechnie at gmail.com
Thu Apr 6 12:49:33 EDT 2017


Apologies for the half-sent eMail, I lost an argument with Opera and
it decided which one of us was smarter. I'll try again:

Hey all;

I've been working on trying to integrate Homer into our platform
(hurrah for SIP logging) and have run up against a problem I can't
quite figure out. It might be because we're mixing OpenSIPS versions,
however since the HEP protocol should be the same I'm not confident
that's the case.

The situation is as follows:
I have several (hundred) 1.8.8 OpenSIPS with the following headers
(the config has a sip_trace()/setflag() in it as well but I think it's
probably immaterial to this discussion):
---------------------
modparam("siptrace", "duplicate_uri", "sip:CaptureServer:9060")
modparam("siptrace", "duplicate_with_hep", 1)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1
modparam("siptrace", "db_url", "borked://abc:123@localhost/zzz")
modparam("siptrace", "hep_version", 2)
---------------------

(The bogus db_url allows SIP Trace to work w/o pushing to a local DB,
as trace_to_database only appears in later releases). As far as I can
tell this works handily - I'm seeing plenty of HEP being sent off to
the CaptureServer and I've not noticed any missing packets.

The Capture Server is running 2.2.2 and has the following config:
---------------------
listen=hep_udp:PublicIP:9060 use_children 100
listen=hep_udp:PrivateIP:9060 use_children 1

mpath="/usr/lib64/opensips/modules/"

loadmodule "db_mysql.so"
loadmodule "proto_hep.so"
loadmodule "sipcapture.so"

####### Module setup ##########
modparam("proto_hep", "hep_capture_id", 101)
modparam("sipcapture", "db_url",
"mysql://homer_user:PASSWORD@DatabaseServer/homer_data")
modparam("sipcapture", "capture_on", 1)
modparam("sipcapture", "table_name", "sip_capture_call_%Y%m%d")
modparam("sipcapture", "rtcp_table_name", "rtcp_capture")
modparam("sipcapture", "hep_capture_on", 1)

# Main SIP request routing logic
route {
        xlog("L_INFO", "MRECV: $rm,  $fu,  $ru ($HEPVERSION)\n");
        sip_capture();
        drop;
}

onreply_route {
        xlog("L_INFO", "RRECV: $rm,  $fu,  $ru ($HEPVERSION)\n");
        sip_capture();
        drop;
}
---------------------

On the Capture Server I'm getting logs like this:
RRECV: BYE,  sip:+15125551212 at SBCIP,  <null> (2)
ERROR:proto_hep:update_recv_info: unknown protocol [1]
RRECV: BYE,  sip:+15125551212 at SBCIP,  <null> (2)
ERROR:proto_hep:update_recv_info: unknown protocol [1]
ERROR:proto_hep:update_recv_info: unknown protocol [1]
MRECV: INVITE,  sip:+14695551212 at SBCIP,  sip:+12145551212 at CaptureAgent (2)
MRECV: INVITE,  sip:+14695551212 at SBCIP,  sip:+12145551212 at SBCIP:5060 (2)
ERROR:proto_hep:update_recv_info: unknown protocol [1]
RRECV: INVITE,  sip:+14695551212 at SBCIP,  <null> (2)
ERROR:proto_hep:update_recv_info: unknown protocol [1]

The Errored entries appear to align with
provisional/progression/numbered mesages - 100s, 18x, 200s, etc. The
Logs further seem to bear this out as there are no xlog()s showing
such a message - they're all INVITEs, ACKs, CANCELs or BYEs.

This being said - I can see them in the database! So OpenSIPS is
clearly storing them even though (apparently) it's throwing an unknown
protocol error.

What am I missing here?

My thanks;

 - Jock

On Thu, Apr 6, 2017 at 11:19 AM, Jock McKechnie
<jock.mckechnie at gmail.com> wrote:
> Hey all;
>
> I've been working on trying to integrate Homer into our platform
> (hurrah for SIP logging) and have run up against a problem I can't
> quite figure out. It might be because we're mixing OpenSIPS versions,
> however since the HEP protocol should be the same I'm not confident
> that's the case.
>
> The situation is as follows:
> I have several (hundred) 1.8.8 OpenSIPS with the following config:
> modparam("siptrace", "duplicate_uri", "sip:CaptureServer:9060")
> modparam("siptrace", "duplicate_with_hep", 1)
> modparam("siptrace", "trace_to_database", 0)
> modparam("siptrace", "trace_flag", 22)
> modparam("siptrace", "trace_on", 1
> modparam("siptrace", "db_url", "borked://abc:123@localhost/zzz")
> modparam("siptrace", "hep_version", 2)
>
> (The bogus db_url allows SIP Trace to work w/o pushing to a local DB,
> as trace_to_database only appears in later releases). As far as I can
> tell this works handily - I'm seeing plenty of HEP being sent off to
> the CaptureServer and I've not noticed any missing packets.
>
> The Capture Server is running 2.2.2 and has the following config:
> listen=hep_udp:PublicIP:9060 use_children 100
> listen=hep_udp:PrivateIP:9060 use_children 1
>
> mpath="/usr/lib64/opensips/modules/"
>
> loadmodule "db_mysql.so"
> loadmodule "proto_hep.so"
> loadmodule "sipcapture.so"
>
> ####### Module setup ##########
> modparam("proto_hep", "hep_capture_id", 101)
> modparam("sipcapture", "db_url",
> "mysql://homer_user:PASSWORD@DatabaseServer/homer_data")
> modparam("sipcapture", "capture_on", 1)
> modparam("sipcapture", "table_name", "sip_capture_call_%Y%m%d")
> modparam("sipcapture", "rtcp_table_name", "rtcp_capture")
> modparam("sipcapture", "hep_capture_on", 1)
>
> # Main SIP request routing logic
> route {
> xlog("L_INFO", "MRECV: $rm, $fu, $ru ($HEPVERSION)\n"); sip_capture();
> drop; } onreply_route { xlog("L_INFO", "RRECV: $rm, $fu, $ru
> ($HEPVERSION)\n"); sip_capture(); drop; }



More information about the Users mailing list