module siptrace

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

module siptrace

mmarzuola

Hi all.
Introducing in the script the siptrace module, I noticed that if I use the function sip_trace(), in the table of DB, are stored the requests and the replies (407, 100, 200, etc. ...), but using the trace_dialog(), there are only the requests (invite , ack and bye). This happens because something is wrong in the configuration script or other?

These are the parts of the interessed routes:

# ----- siptrace params -----
modparam("siptrace", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "traced_user_avp", "$avp(s:user)")
modparam("siptrace", "enable_ack_trace", 1)

1)sip_trace():

route {
       xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
       $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
       sip_trace();
......
......
......
}


2)trace_dialog():

route {
       xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
       $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
.....
.....

       if(is_method("INVITE")) {
                route(3);
       }
........
........
}

# Request route 'base-route-invite'
route[3] {
          if (!proxy_authorize("", "subscriber")) {
                xlog("L_INFO", "Proxy authentication failed - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
                proxy_challenge("", "0");
                exit;
          }
          if (!check_from()) {
                xlog("L_INFO", "Spoofed From-URI detected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
                sl_send_reply("403","Forbidden auth ID");
                exit;
          }
          consume_credentials();

          create_dialog();
          set_dlg_flag("4");
          trace_dialog();
         route(4);
}

Thanks in advance.

Matteo Marzuola




----------------------------------------------------------------------------
Vuoi essere presente online?
Vuoi dare voce alla tua attivita`?
Acquista un dominio su domini.interfree.it.
A partire da 18,59 euro
----------------------------------------------------------------------------


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

Re: module siptrace

Bogdan-Andrei Iancu
Hi Matteo,

There was a similar report on the IRC channel.

Question: I guess you do t_relay for the sequential requests also, right?

Anyhow, I will run some tests to see what about - in the mean while you
can open a bug report on the tracker just to be sure I do not forget
about it :)

Thanks and regards,
Bogdan

[hidden email] wrote:

> Hi all.
> Introducing in the script the siptrace module, I noticed that if I use the function sip_trace(), in the table of DB, are stored the requests and the replies (407, 100, 200, etc. ...), but using the trace_dialog(), there are only the requests (invite , ack and bye). This happens because something is wrong in the configuration script or other?
>
> These are the parts of the interessed routes:
>
> # ----- siptrace params -----
> modparam("siptrace", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
> modparam("siptrace", "trace_on", 1)
> modparam("siptrace", "traced_user_avp", "$avp(s:user)")
> modparam("siptrace", "enable_ack_trace", 1)
>
> 1)sip_trace():
>
> route {
>        xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>        $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
>        sip_trace();
> ......
> ......
> ......
> }
>
>
> 2)trace_dialog():
>
> route {
>        xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>        $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
> .....
> .....
>
>        if(is_method("INVITE")) {
>                 route(3);
>        }
> ........
> ........
> }
>
> # Request route 'base-route-invite'
> route[3] {
>           if (!proxy_authorize("", "subscriber")) {
>                 xlog("L_INFO", "Proxy authentication failed - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                 proxy_challenge("", "0");
>                 exit;
>           }
>           if (!check_from()) {
>                 xlog("L_INFO", "Spoofed From-URI detected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                 sl_send_reply("403","Forbidden auth ID");
>                 exit;
>           }
>           consume_credentials();
>
>           create_dialog();
>           set_dlg_flag("4");
>           trace_dialog();
>          route(4);
> }
>
> Thanks in advance.
>
> Matteo Marzuola
>
>
>
>
> ----------------------------------------------------------------------------
> Vuoi essere presente online?
> Vuoi dare voce alla tua attivita`?
> Acquista un dominio su domini.interfree.it.
> A partire da 18,59 euro
> ----------------------------------------------------------------------------
>
>
> _______________________________________________
> 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: module siptrace

mmarzuola
In reply to this post by mmarzuola

I attach the script.

Regards
Matteo

>Hi Matteo,

>There was a similar report on the IRC channel.

>Question: I guess you do t_relay for the sequential requests also, right?

>Anyhow, I will run some tests to see what about - in the mean while you
can open a bug report on the tracker just to be sure I do not forget
about it :)

>Thanks and regards,
>Bogdan

[hidden email] wrote:

> Hi all.
> Introducing in the script the siptrace module, I noticed that if I use the function sip_trace(), in the table of DB, are stored the requests and the replies (407, 100, 200, etc. ...), but using the trace_dialog(), there are only the requests (invite , ack and bye). This happens because something is wrong in the configuration script or other?
>
> These are the parts of the interessed routes:
>
> # ----- siptrace params -----
> modparam("siptrace", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
> modparam("siptrace", "trace_on", 1)
> modparam("siptrace", "traced_user_avp", "$avp(s:user)")
> modparam("siptrace", "enable_ack_trace", 1)
>
> 1)sip_trace():
>
> route {
>        xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>        $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
>        sip_trace();
> ......
> ......
> ......
> }
>
>
> 2)trace_dialog():
>
> route {
>        xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>        $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
> .....
> .....
>
>        if(is_method("INVITE")) {
>                 route(3);
>        }
> ........
> ........
> }
>
> # Request route 'base-route-invite'
> route[3] {
>           if (!proxy_authorize("", "subscriber")) {
>                 xlog("L_INFO", "Proxy authentication failed - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                 proxy_challenge("", "0");
>                 exit;
>           }
>           if (!check_from()) {
>                 xlog("L_INFO", "Spoofed From-URI detected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>                 sl_send_reply("403","Forbidden auth ID");
>                 exit;
>           }
>           consume_credentials();
>
>           create_dialog();
>           set_dlg_flag("4");
>           trace_dialog();
>          route(4);
> }
>
> Thanks in advance.
>
> Matteo Marzuola
>
>
>
>
> ----------------------------------------------------------------------------
> Vuoi essere presente online?
> Vuoi dare voce alla tua attivita`?
> Acquista un dominio su domini.interfree.it.
> A partire da 18,59 euro
> ----------------------------------------------------------------------------
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>  

           


----------------------------------------------------------------------------
Vuoi essere presente online?
Vuoi dare voce alla tua attivita`?
Acquista un dominio su domini.interfree.it.
A partire da 18,59 euro
----------------------------------------------------------------------------


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

opensips.cfg (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: module siptrace

Bogdan-Andrei Iancu
Hi Matteo,

You need to define the trace flag:

modparam("siptrace", "trace_flag", 11)

Otherwise the transaction tracing will not work.

Regards,
Bogdan

[hidden email] wrote:

> I attach the script.
>
> Regards
> Matteo
>
>  
>> Hi Matteo,
>>    
>
>  
>> There was a similar report on the IRC channel.
>>    
>
>  
>> Question: I guess you do t_relay for the sequential requests also, right?
>>    
>
>  
>> Anyhow, I will run some tests to see what about - in the mean while you
>>    
> can open a bug report on the tracker just to be sure I do not forget
> about it :)
>
>  
>> Thanks and regards,
>> Bogdan
>>    
>
> [hidden email] wrote:
>  
>> Hi all.
>> Introducing in the script the siptrace module, I noticed that if I use the function sip_trace(), in the table of DB, are stored the requests and the replies (407, 100, 200, etc. ...), but using the trace_dialog(), there are only the requests (invite , ack and bye). This happens because something is wrong in the configuration script or other?
>>
>> These are the parts of the interessed routes:
>>
>> # ----- siptrace params -----
>> modparam("siptrace", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
>> modparam("siptrace", "trace_on", 1)
>> modparam("siptrace", "traced_user_avp", "$avp(s:user)")
>> modparam("siptrace", "enable_ack_trace", 1)
>>
>> 1)sip_trace():
>>
>> route {
>>        xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>        $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
>>        sip_trace();
>> ......
>> ......
>> ......
>> }
>>
>>
>> 2)trace_dialog():
>>
>> route {
>>        xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>        $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
>> .....
>> .....
>>
>>        if(is_method("INVITE")) {
>>                 route(3);
>>        }
>> ........
>> ........
>> }
>>
>> # Request route 'base-route-invite'
>> route[3] {
>>           if (!proxy_authorize("", "subscriber")) {
>>                 xlog("L_INFO", "Proxy authentication failed - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>                 proxy_challenge("", "0");
>>                 exit;
>>           }
>>           if (!check_from()) {
>>                 xlog("L_INFO", "Spoofed From-URI detected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>                 sl_send_reply("403","Forbidden auth ID");
>>                 exit;
>>           }
>>           consume_credentials();
>>
>>           create_dialog();
>>           set_dlg_flag("4");
>>           trace_dialog();
>>          route(4);
>> }
>>
>> Thanks in advance.
>>
>> Matteo Marzuola
>>
>>
>>
>>
>> ----------------------------------------------------------------------------
>> Vuoi essere presente online?
>> Vuoi dare voce alla tua attivita`?
>> Acquista un dominio su domini.interfree.it.
>> A partire da 18,59 euro
>> ----------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>  
>>    
>
>
>  
>
>
> ----------------------------------------------------------------------------
> Vuoi essere presente online?
> Vuoi dare voce alla tua attivita`?
> Acquista un dominio su domini.interfree.it.
> A partire da 18,59 euro
> ----------------------------------------------------------------------------
>
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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: module siptrace

Bogdan-Andrei Iancu
In reply to this post by mmarzuola
HI Matteo,

Indeed, there was an issue with trace_dialog() when doing tracing based
on user AVP. It should be fixed now.

Please update from SVN and try again....and forget about the flag I
mentioned - do not define it and do not use it.

Thanks and regards,
Bogdan

[hidden email] wrote:

> Hi Bogdan.
> Do I have to use also setflag("11") in the script?
> The document of the module says that is sufficient to call the sip_trace() or trace_dialog() function...
>
> Thanks in advance
>
> Matteo.
>
>
>
>
>  
>> Hi Matteo,
>>    
>
>  
>> You need to define the trace flag:
>>    
>
>  
>> modparam("siptrace", "trace_flag", 11)
>>    
>
>  
>> Otherwise the transaction tracing will not work.
>>    
>
>  
>> Regards,
>> Bogdan
>>    
>
> [hidden email] wrote:
>  
>> I attach the script.
>>
>> Regards
>> Matteo
>>
>>  
>>    
>>> Hi Matteo,
>>>    
>>>      
>>  
>>    
>>> There was a similar report on the IRC channel.
>>>    
>>>      
>>  
>>    
>>> Question: I guess you do t_relay for the sequential requests also, right?
>>>    
>>>      
>>  
>>    
>>> Anyhow, I will run some tests to see what about - in the mean while you
>>>    
>>>      
>> can open a bug report on the tracker just to be sure I do not forget
>> about it :)
>>
>>  
>>    
>>> Thanks and regards,
>>> Bogdan
>>>    
>>>      
>> [hidden email] wrote:
>>  
>>    
>>> Hi all.
>>> Introducing in the script the siptrace module, I noticed that if I use the function sip_trace(), in the table of DB, are stored the requests and the replies (407, 100, 200, etc. ...), but using the trace_dialog(), there are only the requests (invite , ack and bye). This happens because something is wrong in the configuration script or other?
>>>
>>> These are the parts of the interessed routes:
>>>
>>> # ----- siptrace params -----
>>> modparam("siptrace", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
>>> modparam("siptrace", "trace_on", 1)
>>> modparam("siptrace", "traced_user_avp", "$avp(s:user)")
>>> modparam("siptrace", "enable_ack_trace", 1)
>>>
>>> 1)sip_trace():
>>>
>>> route {
>>>        xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>>        $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
>>>        sip_trace();
>>> ......
>>> ......
>>> ......
>>> }
>>>
>>>
>>> 2)trace_dialog():
>>>
>>> route {
>>>        xlog("L_INFO", "New request - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>>        $avp(s:user)="sip:" + $fU + "@" + $(fu{uri.domain});
>>> .....
>>> .....
>>>
>>>        if(is_method("INVITE")) {
>>>                 route(3);
>>>        }
>>> ........
>>> ........
>>> }
>>>
>>> # Request route 'base-route-invite'
>>> route[3] {
>>>           if (!proxy_authorize("", "subscriber")) {
>>>                 xlog("L_INFO", "Proxy authentication failed - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>>                 proxy_challenge("", "0");
>>>                 exit;
>>>           }
>>>           if (!check_from()) {
>>>                 xlog("L_INFO", "Spoofed From-URI detected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>>>                 sl_send_reply("403","Forbidden auth ID");
>>>                 exit;
>>>           }
>>>           consume_credentials();
>>>
>>>           create_dialog();
>>>           set_dlg_flag("4");
>>>           trace_dialog();
>>>          route(4);
>>> }
>>>
>>> Thanks in advance.
>>>
>>> Matteo Marzuola
>>>
>>>
>>>
>>>
>>> ----------------------------------------------------------------------------
>>> Vuoi essere presente online?
>>> Vuoi dare voce alla tua attivita`?
>>> Acquista un dominio su domini.interfree.it.
>>> A partire da 18,59 euro
>>> ----------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>>
>>>      


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

Re: module siptrace

mmarzuola
In reply to this post by mmarzuola

Hi Bogdan.
Now the function trace_dialog() traces also the replies, but I have noticed that for each call I have a trace for the REGISTER, INVITE and ACK?!

The last trace seems to be part of the INVITE trace.
I have the screenshots of the tool siptrace of Opensips-cp, but if I attach them, the mail is not posted to the mailing list because it is too big.
Where can I send the screenshots?

Thanks in advance.

Matteo Marzuola




----------------------------------------------------------------------------
Vuoi essere presente online?
Vuoi dare voce alla tua attivita`?
Acquista un dominio su domini.interfree.it.
A partire da 18,59 euro
----------------------------------------------------------------------------


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

Re: module siptrace

Bogdan-Andrei Iancu
Hi Matteo,

I got the screenshots you sent on the list. For the future, if you need
to sent large attachments, sent them off-list or post them somewhere for
download.

I see you are using the OpenSIPS-CP with the SIPTRACE tool. But
everything looks ok if you understand how this tool works in OpenSIPS
Control Panel.

All the records are grouped by Call-id, so all records belonging to the
dialog are grouped under a single entry (which can be later expended).
The label of the entry is the name of the first method found in that dialog.

Probably, the REGISTER entry contains all the REGISTER + re-REGISTER
from the client.

For the ACK labeled entries, there is a staring ACK in the call
....probably from authentication (ACK for 401) - if this bother you, try
to set snable_ack_trace to zero..
(http://www.opensips.org/html/docs/modules/devel/siptrace.html#id227297)

Regards,
Bogdan




[hidden email] wrote:

> Hi Bogdan.
> Now the function trace_dialog() traces also the replies, but I have noticed that for each call I have a trace for the REGISTER, INVITE and ACK?!
>
> The last trace seems to be part of the INVITE trace.
> I have the screenshots of the tool siptrace of Opensips-cp, but if I attach them, the mail is not posted to the mailing list because it is too big.
> Where can I send the screenshots?
>
> Thanks in advance.
>
> Matteo Marzuola
>
>
>
>
> ----------------------------------------------------------------------------
> Vuoi essere presente online?
> Vuoi dare voce alla tua attivita`?
> Acquista un dominio su domini.interfree.it.
> A partire da 18,59 euro
> ----------------------------------------------------------------------------
>
>
> _______________________________________________
> 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