You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

97 lines
3.0 KiB

#################################
## SIP_TRACE_ROLE Defs
#!trydef KZ_TRACE 0
#!trydef KZ_TRACE_INTERNAL 1
#!trydef KZ_TRACE_EXTERNAL 1
#!trydef KZ_TRACE_LOCAL 1
#!trydef KZ_TRACE_INTERNAL_INCOMING 1
#!trydef KZ_TRACE_INTERNAL_OUTGOING 1
#!trydef KZ_TRACE_EXTERNAL_INCOMING 1
#!trydef KZ_TRACE_EXTERNAL_OUTGOING 1
#!trydef SIP_TRACE_URI "sip:127.0.0.1:9060"
#!trydef HEP_CAPTURE_ID 1
##############################################################
## Kamailio siptrace settings configuration examples at runtime
## kamcmd siptrace.status on
## kamcmd cfg.seti kazoo trace_external 0
## kamcmd cfg.seti kazoo trace_internal 0
kazoo.trace_external = KZ_TRACE_EXTERNAL descr "activates tracing from external sources"
kazoo.trace_internal = KZ_TRACE_INTERNAL descr "activates tracing from internal sources"
kazoo.trace_local = KZ_TRACE_LOCAL descr "activates tracing for local requests"
kazoo.trace_internal_incoming = KZ_TRACE_INTERNAL_INCOMING descr "traces the original request as received from internal sources"
kazoo.trace_internal_outgoing = KZ_TRACE_INTERNAL_OUTGOING descr "traces the outgoing request to external sources after possible modification"
kazoo.trace_external_incoming = KZ_TRACE_EXTERNAL_INCOMING descr "traces the original request as received from external sources"
kazoo.trace_external_outgoing = KZ_TRACE_EXTERNAL_OUTGOING descr "traces the outgoing request to internal sources after possible modification"
####### Siptrace module ##########
loadmodule "siptrace.so"
modparam("siptrace", "duplicate_uri", SIP_TRACE_URI)
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "hep_version", 3)
modparam("siptrace", "hep_capture_id", HEP_CAPTURE_ID)
modparam("siptrace", "trace_to_database", 0)
## `trace_flag` value must be equal to FLAG_SIP_TRACE value at head of "default.cfg" file
modparam("siptrace", "trace_flag", 8)
modparam("siptrace", "trace_on", KZ_TRACE)
route[SIP_TRACE_INTERNAL]
{
if($sel(cfg_get.kazoo.trace_internal) == 0) {
return;
}
if($sel(cfg_get.kazoo.trace_internal_incoming) == 1) {
sip_trace();
}
if($sel(cfg_get.kazoo.trace_internal_outgoing) == 1) {
setflag(FLAG_SIP_TRACE);
}
}
route[SIP_TRACE_EXTERNAL]
{
if($sel(cfg_get.kazoo.trace_external) == 0) {
return;
}
if($sel(cfg_get.kazoo.trace_external_incoming) == 1) {
sip_trace();
}
if($sel(cfg_get.kazoo.trace_external_outgoing) == 1) {
setflag(FLAG_SIP_TRACE);
}
}
route[SIP_TRACE_LOCAL]
{
if($sel(cfg_get.kazoo.trace_local) == 0) {
return;
}
if($hdr(X-TM-Local) != $null) {
return;
}
sip_trace();
}
route[SIP_TRACE_LOCAL_ROUTE]
{
setflag(FLAG_SIP_TRACE);
}
route[SIP_TRACE]
{
if (isflagset(FLAG_LOCAL_ROUTE)) {
route(SIP_TRACE_LOCAL_ROUTE);
} else if (isflagset(FLAG_LOCAL_REQUEST)) {
route(SIP_TRACE_LOCAL);
} else if (isflagset(FLAG_INTERNALLY_SOURCED)) {
route(SIP_TRACE_INTERNAL);
} else {
route(SIP_TRACE_EXTERNAL);
}
}