-
Notifications
You must be signed in to change notification settings - Fork 187
Send HEP traffic from Kamailio to local sngrep
Nikolay Shopik edited this page Jun 20, 2017
·
2 revisions
At the time writing 1.2.0 has not been released. This will only work with compiled sngrep from master branch
This mini tutorial will allow sngrep to receive kamailio packets and can be used to debug received TLS, HEP or SIP packets. HEPv2 support in sngrep is still under testing and this compatibility may or may not work.
- Enable siptrace module in
kamailio.cfg
loadmodule "siptrace.so"
### siptrace ###
modparam("siptrace", "duplicate_uri", "sip:127.0.0.1:9061")
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "hep_version", 2)
- Mark dialogs to be sent with the configured flag
route {
sip_trace();
setflag(22);
}
- On Kamailio working as sipcature collector, It should be required to also trace responses. Also, in this kind of Kamailio that doesn't works as proxy, order of messages may not be received in the same order they were originally sent.
onreply_route {
sip_trace();
}
- Reload your kamailio to apply new configuration
Previous Kamailio configuration uses HEPv2 to send packets, which is only supported in sngrep since 1.2.0
- Enable HEPv2 en
~/.sngreprc
file
set eep.listen on
set eep.listen.version 2
set eep.listen.address 127.0.0.1
set eep.listen.port 9061
If your capagent send CorrelationID enable this option
set eep.listen.uuid on
- Run sngrep and you'll see received packets from kamailio