<div dir="auto">Just use heplify or captagent for this:<div dir="auto"><a href="https://github.com/sipcapture/heplify">https://github.com/sipcapture/heplify</a><br></div><div dir="auto"><br></div><div dir="auto"><a href="https://github.com/sipcapture/captagent">https://github.com/sipcapture/captagent</a><br></div><div dir="auto">You can run them on the same machines where you're running your sip services and send the captured traffic to a homer instance. </div><div dir="auto"><br></div><div dir="auto">Cheers, </div><div dir="auto"><br></div><div dir="auto">Federico </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 26 Oct 2019, 20:40 Igor Olhovskiy, <<a href="mailto:igorolhovskiy@gmail.com">igorolhovskiy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I'm trying to avoid SIP packet touching at all. Plus, I can't move third-party soft to other port/interface or so.</div><br><div>Idea is I don't want for Kamailio to be a proxy, but a sip packet analyzer for mirrored port, but on same machine.</div><br><div>On Oct 26 2019, at 6:40 pm, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank" rel="noreferrer">david.villasmil.work@gmail.com</a>> wrote:</div><blockquote><div><div><div>Why not just receiving with kamailio and transparently proxying to the pbx after capturing? I.e.: kamailio in the middle</div></div><div><br><div class="gmail_quote"><div class="gmail_attr"><div>On Sat, 26 Oct 2019 at 14:46, Igor Olhovskiy <<a href="mailto:igorolhovskiy@gmail.com" title="mailto:igorolhovskiy@gmail.com" target="_blank" rel="noreferrer">igorolhovskiy@gmail.com</a>> wrote:</div></div><blockquote><div>Hi!</div><br><div>I'm trying to get Kamailio working as a traffic capture on a same machine with other PBX software installed.</div><br><div>Actually, traffic is mirrored with</div><br><div><div>iptables -A PREROUTING -t mangle -i eth0 -p udp --dport 5060 -j TEE --gateway <a href="https://link.getmailspring.com/link/AB5F9D36-533D-4A52-ADE3-FB76B813163C@getmailspring.com/0?redirect=127.0.0.2&recipient=c3ItdXNlcnNAbGlzdHMua2FtYWlsaW8ub3Jn" title="https://link.getmailspring.com/link/AB5F9D36-533D-4A52-ADE3-FB76B813163C@getmailspring.com/0?redirect=127.0.0.2&recipient=c3ItdXNlcnNAbGlzdHMua2FtYWlsaW8ub3Jn" target="_blank" rel="noreferrer">127.0.0.2</a></div><div>iptables -t nat -A PREROUTING -d 127.0.0.2 -p udp --dport 5060 -j DNAT --to <a href="https://link.getmailspring.com/link/AB5F9D36-533D-4A52-ADE3-FB76B813163C@getmailspring.com/1?redirect=127.0.0.1%3A5062&recipient=c3ItdXNlcnNAbGlzdHMua2FtYWlsaW8ub3Jn" title="https://link.getmailspring.com/link/AB5F9D36-533D-4A52-ADE3-FB76B813163C@getmailspring.com/1?redirect=127.0.0.1%3A5062&recipient=c3ItdXNlcnNAbGlzdHMua2FtYWlsaW8ub3Jn" target="_blank" rel="noreferrer">127.0.0.1:5062</a></div></div><br><div>Kamailio request route is super simple</div><div>request_route {</div><div>    xlog("L_ALERT", "[SIP-PACKET] Got packet [F=$fu R=$ru D=$du M=$rm IP=($si:$sp $Ri:$Rp) ID=$ci]\n");</div><div>    drop;</div><div>}</div><br><div>I was trying to get Kamailio just listen on interface <a href="http://127.0.0.1:5062" target="_blank" rel="noreferrer">127.0.0.1:5062</a>, but no luck</div><br><div>listen=udp:<a href="http://127.0.0.1:5062" title="http://127.0.0.1:5062" target="_blank" rel="noreferrer">127.0.0.1:5062</a></div><br><div>Next was to use sipcapture module with following parameters</div><br><div>loadmodule "sipcapture.so"</div><div>modparam("sipcapture", "db_url", "text:///tmp/")</div><div>modparam("sipcapture", "raw_socket_listen", "127.0.0.1:5060-5062")</div><div>modparam("sipcapture", "raw_interface", "lo")</div><div>modparam("sipcapture", "promiscious_on", 1)</div><br><div>Also no luck. Means Kamailio can't see packets, but I see em with wireshark on lo interface.</div><br><div>What is best way to get it working? Or I'm missing something?</div><br><div>Thanks!</div><div>_______________________________________________</div><div>Kamailio (SER) - Users Mailing List</div><div><a href="mailto:sr-users@lists.kamailio.org" title="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a></div><div><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" title="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" rel="noreferrer">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></div></blockquote></div></div><div>--</div><div><div><div>Regards,</div><div><br></div><div>David Villasmil</div><div>email: <a href="https://link.getmailspring.com/link/440604DA-8F73-4D71-9038-78658920F906@getmailspring.com/0?redirect=mailto%3Adavid.villasmil.work%40gmail.com&recipient=c3ItdXNlcnNAbGlzdHMua2FtYWlsaW8ub3Jn" title="mailto:david.villasmil.work@gmail.com" target="_blank" rel="noreferrer">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div><div>_______________________________________________</div><div>Kamailio (SER) - Users Mailing List</div><div><a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a></div><div><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" rel="noreferrer">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></div></div></blockquote>_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>