[SR-Users] Which mode to capture "written to network" traffic with homer and topos

Daniel-Constantin Mierla miconda at gmail.com
Fri Jun 12 15:29:36 CEST 2020


Hello,

On 11.06.20 16:15, Karsten Horsmann wrote:
> Hi Daniel,
>
> in that case it works (also with topos and then sipcapture). With your
> suggestion. 
>
> In my other case (as webrtc and tls registrar) I needed the function
> to see Kamailio self created traffic and so, imho.

I do not understand exactly what you mean for your other case and self
created traffic. All incoming/outgoing traffic should be captured there.

Cheers,
Daniel

>
> Thanks for the hints. 
>
> Cheers 
> Karsten 
>
> Daniel-Constantin Mierla <miconda at gmail.com
> <mailto:miconda at gmail.com>> schrieb am Do., 11. Juni 2020, 13:00:
>
>     Hello,
>
>     to get what is received from/sent to network, you have to use:
>
>     modparam("siptrace", "trace_mode", 1)
>
>     And no longer use siptrace flag or functions in configuration
>     file. In the configuration file the sip message is the one after
>     topos handled the incoming message and before topos handles the
>     outgoing message.
>
>     Cheers,
>     Daniel
>
>     On 11.06.20 11:35, Karsten Horsmann wrote:
>>     Hello Daniel,
>>
>>     thanks for the fast reply.
>>
>>     i changed the loadmodule order (siptrace.so before topos.so) and
>>     its the same behavior. With  sip_trace_mode("t"); 
>>
>>     For better understanding I attached the loading-part of my
>>     kamailio.cfg with siptrace and topos.
>>     The howl request route is not included, but didnt matter imho.
>>
>>     Cheers
>>     Karsten
>>
>>     [...]
>>     # vim: set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab:
>>
>>     Am Do., 11. Juni 2020 um 10:25 Uhr schrieb Daniel-Constantin
>>     Mierla <miconda at gmail.com <mailto:miconda at gmail.com>>:
>>
>>         Hello,
>>
>>         try to load siptrace module before the topos module, iirc
>>         they use the same event hooks. If doesn't work, then I will
>>         check the code.
>>
>>         Cheers,
>>         Daniel
>>
>>         On 11.06.20 10:05, Karsten Horsmann wrote:
>>>         Hi Mailinglist,
>>>
>>>         some of my kamailio-version is 5.3.4 with topos.
>>>
>>>         During the last discussion about sip_trace_mode("t") i found
>>>         new behaivor. With this tracingmode i see the "internal"
>>>         before topos writing.
>>>
>>>         Here my questions:
>>>
>>>         Can i change it to "whats on the wire" (topos rewritten
>>>         mode)? I didnt checked all modes.
>>>         And if so, can i switch that on-the-fly with $var for
>>>         example? For topos debugging its fine with
>>>         sip_trace_mode("t") - not for "hey carrier, you made some
>>>         mistakes".
>>>
>>>
>>>         #!ifdef WITH_HOMER
>>>         #Siptrace
>>>         modparam("siptrace", "force_send_sock", "MY_LOCAL_SENDSOCK")
>>>         # local interface from where to send the duplicated traffic
>>>         modparam("siptrace", "duplicate_uri", "MY_HOMER_CAPTURE")
>>>         modparam("siptrace", "hep_mode_on", 1) # enable/disable
>>>         Homer encapsulate mode
>>>         modparam("siptrace", "hep_version", 3) # HEPv3 the timestamp
>>>         and capture agent ID will be included in the HEP header
>>>         modparam("siptrace", "trace_to_database", 0) # trace to database
>>>         modparam("siptrace", "trace_on", 1) # enable/disable trace
>>>         modparam("siptrace", "trace_mode", 0) # default 0, if 1 then
>>>         you dont need call siptrace flag or sip_trace()
>>>         modparam("siptrace", "hep_capture_id", 8) # capture agent id
>>>         Limitation: 32-bit for HEPv3.
>>>         #!endif
>>>
>>>
>>>         #!ifdef WITH_HOMER
>>>         # Set the tracing mode: message, transaction or dialog. Need
>>>         5.3.x
>>>                 sip_trace_mode("t");
>>>         #!endif
>>>
>>>         *** captured on the topos kamailio:
>>>
>>>         2020-06-11 08:35:11 +0200 : 172.24.32.28:5060
>>>         <http://172.24.32.28:5060> -> 172.24.52.3:5060
>>>         <http://172.24.52.3:5060>
>>>         INVITE sip:+49XXXXXXXXXXXX at 172.24.52.3:5060
>>>         <http://sip:+49XXXXXXXXXXXX@172.24.52.3:5060> SIP/2.0
>>>         Record-Route:
>>>         <sip:172.24.32.28;r2=on;lr=on;ftag=1ea69f36;vsf=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO3VzZXI9cGhvbmU-;vst=AAAAAAAAAAAAAAAAAAAAAAAAAABLXVQATFVCVUheUUgcXAIBHnBvcnQ9dGNwO3VzZXI9cGhvbmU-;proxy_media=yes;nat=yes>
>>>         Record-Route:
>>>         <sip:100.80.0.20;transport=tcp;r2=on;lr=on;ftag=1ea69f36;vsf=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO3VzZXI9cGhvbmU-;vst=AAAAAAAAAAAAAAAAAAAAAAAAAABLXVQATFVCVUheUUgcXAIBHnBvcnQ9dGNwO3VzZXI9cGhvbmU-;proxy_media=yes;nat=yes>
>>>         Via: SIP/2.0/UDP
>>>         172.24.32.28;branch=z9hG4bK34b.1b6e5fbd9cf7af26bb168d1469096714.0;i=74
>>>         Via: SIP/2.0/TCP
>>>         AA.AAA.AAA.AAA:5060;rport=5060;branch=z9hG4bKeca7a7f789c9f647560353e3cf1cd592.ba7930dc
>>>         Max-Forwards: 52
>>>         To: <sip:+49XXXXXXXXXXXX at some.provider.example>
>>>         From: <sip:+49YYYYYYYYYYY at some.provider.example>;tag=1ea69f36
>>>         Call-ID: 3af87db089119841 at AA.AAA.AAA.AAA
>>>         <mailto:3af87db089119841 at AA.AAA.AAA.AAA>
>>>         Contact: <sip:TFFRA002 at AA.AAA.AAA.AAA:5060;transport=tcp>
>>>         Supported: histinfo,replaces
>>>         CSeq: 647169 INVITE
>>>         Allow: ACK, BYE, CANCEL, INVITE, OPTIONS, REFER, REGISTER,
>>>         UPDATE
>>>         P-Asserted-Identity:
>>>         <sip:+49BBBBBBBBBB at some.provider.example;user=phone>
>>>         Content-Type: application/sdp
>>>         Content-Disposition: session
>>>         Content-Length: 298
>>>         X-Group-SBC: 2006
>>>         X-Routing-SBC: un2tr-cgn-trunk
>>>
>>>         ---------------------------------------
>>>         *** captured on the kamailio behind 172.24.52.3
>>>
>>>         2020-06-11 08:35:11 +0200 : 172.24.32.28:5060
>>>         <http://172.24.32.28:5060> -> 172.24.52.3:5060
>>>         <http://172.24.52.3:5060>
>>>         INVITE sip:+49XXXXXXXXXXXX at 172.24.52.3:5060
>>>         <http://sip:+49XXXXXXXXXXXX@172.24.52.3:5060> SIP/2.0
>>>         Via: SIP/2.0/UDP
>>>         172.24.32.28;branch=z9hG4bK34b.1b6e5fbd9cf7af26bb168d1469096714.0;i=74
>>>         Max-Forwards: 52
>>>         To: <sip:+49XXXXXXXXXXXX at some.provider.example>
>>>         From: <sip:+49YYYYYYYYYYY at some.provider.example>;tag=1ea69f36
>>>         Call-ID: 3af87db089119841 at AA.AAA.AAA.AAA
>>>         <mailto:3af87db089119841 at AA.AAA.AAA.AAA>
>>>         Supported: histinfo,replaces
>>>         CSeq: 647169 INVITE
>>>         Allow: ACK, BYE, CANCEL, INVITE, OPTIONS, REFER, REGISTER,
>>>         UPDATE
>>>         P-Asserted-Identity:
>>>         <sip:+49BBBBBBBBBB at some.provider.example;user=phone>
>>>         Content-Type: application/sdp
>>>         Content-Disposition: session
>>>         Content-Length: 298
>>>         X-Group-SBC: 2006
>>>         X-Routing-SBC: un2tr-cgn-trunk
>>>         Contact: <sip:btpsh-5ee1105a-1903c-1 at 172.24.32.28
>>>         <mailto:sip%3Abtpsh-5ee1105a-1903c-1 at 172.24.32.28>>
>>>
>>>
>>>
>>>         -- 
>>>         Cheers
>>>         *Karsten Horsmann*
>>>
>>>         _______________________________________________
>>>         Kamailio (SER) - Users Mailing List
>>>         sr-users at lists.kamailio.org <mailto:sr-users at lists.kamailio.org>
>>>         https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>         -- 
>>         Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com>
>>         www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>>         Funding: https://www.paypal.me/dcmierla
>>
>>
>>
>>     -- 
>>     Mit freundlichen Grüßen
>>     *Karsten Horsmann*
>
>     -- 
>     Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com>
>     www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>     Funding: https://www.paypal.me/dcmierla
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200612/6f9eb31f/attachment.html>


More information about the sr-users mailing list