Thanks to a guy called TomP over at https://www.tomp.uk/2019/02/freeswitch-sip-capture-over-tls-with-sngrep-and-hep/ for this solution.
Change the line from:
To:
Flush the cache and restart Freeswitch.
When you want to use SNGREP to capture your TLS and other traffic:
To start Freeswitch capturing the traffic:
Start SNGREP with:
To stop Freeswitch capturing the traffic:
@markjcrane likes the look of this so very soon, hopefully you won't need to edit the lua file, it should already be set. Regardless, this will allow you to do it on existing systems.
Code:
nano -w /usr/share/freeswitch/scripts/app/xml_handler/resources/scripts/configuration/sofia.conf.lua
Code:
--table.insert(xml, [[ <param name="capture-server" value="udp:homer.domain.com:5060"/>]]);
Code:
table.insert(xml, [[ <param name="capture-server" value="udp:127.0.0.1:9060"/>]]);
Flush the cache and restart Freeswitch.
When you want to use SNGREP to capture your TLS and other traffic:
To start Freeswitch capturing the traffic:
Code:
fs_cli -x 'sofia global capture on'
Start SNGREP with:
Code:
sngrep -L udp:127.0.0.1:9060 -d lo
To stop Freeswitch capturing the traffic:
Code:
fs_cli -x 'sofia global capture off'
@markjcrane likes the look of this so very soon, hopefully you won't need to edit the lua file, it should already be set. Regardless, this will allow you to do it on existing systems.