Forum Discussion
Amit_Grover_171
Nimbostratus
Sep 21, 2015Is it possible to print full SIP packet in logs using Irule
Hi,
I have a requirement wherein I have to print full SIP packet in human readable format using Irule. Please suggest how can i do that.
/Regards
Amit Grover
Vernon_97235
Sep 21, 2015Historic F5 Account
Firstly, I would strongly recommend against logging locally for this, and I would apply such an iRule only for debugging. If you really want the entire content of each SIP packet, you could simply log the contents of each TCP segment (since SIP metadata is text and the body is generally text), as in (untested!):
when CLIENT_ACCEPTED {
if { [catch { HSL::open -publisher some_log_publisher } hsl] } {
log local0.warn "Failed to open HSL to publisher (some_log_publisher): $hsl"
} else {
TCP::collect
}
}
when CLIENT_DATA {
set data [TCP::payload]
TCP::release
TCP::collect
HSL::send $hsl $data
}
Vernon_97235
Sep 21, 2015Historic F5 Account
Oh, and naturally, you'd need to define the Log Publisher "some_log_publisher" first :).
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects