SIPTrace not sending to duplicate_uri

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

SIPTrace not sending to duplicate_uri

Kneeoh
I need a little help figuring out why my implementation of the siptrace module isn't working as expected. I've placed:
# Trace this dialog
    trace_dialog();

In my main route block right after:
if ( !create_dialog("B") ) {
        xlog("L_INFO", "Unable to create dialog \n");
        send_reply("500","Internal Server Error");
        exit;

    }

When I place a call and tcpdump the destination host defined in:
modparam("siptrace", "duplicate_uri", "sip:192.168.2.142:9060")

I do not see any packets heading towards that host. I've run a debug 4 and am getting the following output. Which is confusing me, since I've established a dialog and have issued the trace_dialog command. There should be "something to trace here". Where am I going wrong? I'm on 1.11.5

DBG:siptrace:trace_dialog: Nothing to trace here
DBG:siptrace:trace_sl_onreply_out: trace slonreply out
DBG:siptrace:trace_sl_onreply_out: nothing to trace...
DBG:siptrace:trace_onreq_in: trace on req in
DBG:siptrace:trace_onreq_in: nothing to trace...
DBG:siptrace:trace_msg_out: trace off...


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SIPTrace not sending to duplicate_uri

Liviu Chircu
Hi Kneeoh,

Did you remember to set these important module parameters?

modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_flag", "TRACE_FLAG")

If I remember correctly, in 1.11 you should also set the "TRACE_FLAG" - seflag(TRACE_FLAG) - before calling trace_dialog().
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 28.03.2016 20:50, Kneeoh wrote:
I need a little help figuring out why my implementation of the siptrace module isn't working as expected. I've placed:
# Trace this dialog
    trace_dialog();

In my main route block right after:
if ( !create_dialog("B") ) {
        xlog("L_INFO", "Unable to create dialog \n");
        send_reply("500","Internal Server Error");
        exit;

    }

When I place a call and tcpdump the destination host defined in:
modparam("siptrace", "duplicate_uri", "sip:192.168.2.142:9060")

I do not see any packets heading towards that host. I've run a debug 4 and am getting the following output. Which is confusing me, since I've established a dialog and have issued the trace_dialog command. There should be "something to trace here". Where am I going wrong? I'm on 1.11.5

DBG:siptrace:trace_dialog: Nothing to trace here
DBG:siptrace:trace_sl_onreply_out: trace slonreply out
DBG:siptrace:trace_sl_onreply_out: nothing to trace...
DBG:siptrace:trace_onreq_in: trace on req in
DBG:siptrace:trace_onreq_in: nothing to trace...
DBG:siptrace:trace_msg_out: trace off...



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SIPTrace not sending to duplicate_uri

Kneeoh
In reply to this post by Kneeoh
Hi Liviu, Thanks for responding. I did not set the parameters you mention b/c the documentation said I didn't need to.

"1.4.2.  trace_dialog()
The function triggers the tracing of all messages belonging to a dialog. The function must be called for the initial request (that starts the dialog) and it will automatically take care of tracing evertyhing related to that dialog.
When using this function, you do not have to explicity set any tracing flag or to explicitly call anothe trace function.
This function can be used from REQUEST_ROUTE."


I'll re-test with the parameters and report back to you. trace_on makes sense...that's probably my problem.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SIPTrace not sending to duplicate_uri

Kneeoh
In reply to this post by Kneeoh
Hi Liviu, I did confirm that trace_on was already set to 1. I did define the trace flag as you suggested and tried it with both trace_dialog() and sip_trace() but am still not seeing any packets egress from the source host to the dest host. Here's what I have set up. I had to fill in a bogus DB (not using it anyway) because it wouldn't let me start opensips if it wasn't defined. My goal is to have this sip_trace node send captures to a sipcapture (homer) node.

#### SIP Trace module
loadmodule "siptrace.so"
modparam("siptrace", "db_url", "mysql://user:passwd@host/dbname")
modparam("siptrace", "duplicate_uri", "sip:192.168.2.142:9060")
modparam("siptrace", "duplicate_with_hep", 1)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_flag", "TRACE_FLAG")
modparam("siptrace", "hep_version", 2)

INSIDE MAIN ROUTE BLOCK:

    # create dialog with timeout and hide topology
    if ( !create_dialog("B") ) {
        xlog("L_INFO", "Unable to create dialog \n");
        send_reply("500","Internal Server Error");
        exit;

    } else {

        # We have a dialog, Lets hide the topology from where the call originated
        topology_hiding();
    }

    # Trace this dialog
    setflag(TRACE_FLAG);
    sip_trace();
    #trace_dialog();

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: SIPTrace not sending to duplicate_uri

Kneeoh
Apparently setting the trace flag is required before trace_dialog() contrary to the docs. I've set that and am seeing packets egress (although I don't think I'm seeing the full dialog trace. Only 3 packets on a call setup) It looks like i'm not getting the replys. Do I need to arm trace_dialog() again in the on_reply route? My understanding was that you only have to set it once.

Issue 2: SIP traffic goes across eth0, my public facing interface. I want the siptrace module to shoot trace data out of eth1, my private interface. The kernel has a static route that says to get to my duplicate_uri host, use eth1. Which works at the kernel level. I can issue a ping to the duplicate_uri host and I see requests going out the private and replys, etc.

However, when running tcpdump and placing a call via this opensips box, I see that eth0 is the egress interface that is being used to try to reach the duplicate_uri host. I've tried adding a separate listen statement for that private interface, but that didn't do anything. I thought perhaps the trace_local_ip parameter controlled, this but was informed by Liviu that this was not the case. Any idea on how to solve this problem or the problem with missing replys when using trace_dialog()?

Thanks in advance! (I'm on IRC if anyone has any more detailed questions...or just ask here.)


On Wednesday, March 30, 2016 11:49 AM, Kneeoh <[hidden email]> wrote:


Hi Liviu, I did confirm that trace_on was already set to 1. I did define the trace flag as you suggested and tried it with both trace_dialog() and sip_trace() but am still not seeing any packets egress from the source host to the dest host. Here's what I have set up. I had to fill in a bogus DB (not using it anyway) because it wouldn't let me start opensips if it wasn't defined. My goal is to have this sip_trace node send captures to a sipcapture (homer) node.

#### SIP Trace module
loadmodule "siptrace.so"
modparam("siptrace", "db_url", "mysql://user:passwd@host/dbname")
modparam("siptrace", "duplicate_uri", "sip:192.168.2.142:9060")
modparam("siptrace", "duplicate_with_hep", 1)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_flag", "TRACE_FLAG")
modparam("siptrace", "hep_version", 2)

INSIDE MAIN ROUTE BLOCK:

    # create dialog with timeout and hide topology
    if ( !create_dialog("B") ) {
        xlog("L_INFO", "Unable to create dialog \n");
        send_reply("500","Internal Server Error");
        exit;

    } else {

        # We have a dialog, Lets hide the topology from where the call originated
        topology_hiding();
    }

    # Trace this dialog
    setflag(TRACE_FLAG);
    sip_trace();
    #trace_dialog();



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users