Browse Source

handle sip trace from one place

update-rsyslog-config
lazedo 7 years ago
parent
commit
f97b5b7907
4 changed files with 23 additions and 12 deletions
  1. +10
    -3
      kamailio/default.cfg
  2. +0
    -4
      kamailio/presence-notify.cfg
  3. +0
    -4
      kamailio/presence-role.cfg
  4. +13
    -1
      kamailio/sip_trace-role.cfg

+ 10
- 3
kamailio/default.cfg View File

@ -12,6 +12,7 @@
#!trydef FLT_AOR 9 #!trydef FLT_AOR 9
#!trydef FLT_T38 10 #!trydef FLT_T38 10
#!trydef FLT_NATS 11 #!trydef FLT_NATS 11
#!trydef FLAG_LOCAL_REQUEST 12
####### Global Parameters ######### ####### Global Parameters #########
fork = yes fork = yes
@ -345,6 +346,10 @@ route
route(HANDLE_OPTIONS); route(HANDLE_OPTIONS);
#!ifdef SIP_TRACE_ROLE
route(SIP_TRACE);
#!endif
route(HANDLE_NOTIFY); route(HANDLE_NOTIFY);
#!ifdef AUTHORIZATION_ROLE #!ifdef AUTHORIZATION_ROLE
@ -654,9 +659,6 @@ branch_route[MANAGE_BRANCH] {
route[RELAY] route[RELAY]
{ {
#!ifdef SIP_TRACE_ROLE
route(SEND_SIP_TRACE);
#!endif
if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) { if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH"); if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
@ -952,11 +954,16 @@ route[ADD_AUTHORIZATION_HEADERS]
event_route[tm:local-request] event_route[tm:local-request]
{ {
setflag(FLAG_LOCAL_REQUEST);
xlog("L_DEBUG", "$ci|local|start $pr request $rm $ou\n"); xlog("L_DEBUG", "$ci|local|start $pr request $rm $ou\n");
xlog("L_DEBUG", "$ci|local|source $si:$sp -> $dd:$dp\n"); xlog("L_DEBUG", "$ci|local|source $si:$sp -> $dd:$dp\n");
xlog("L_DEBUG", "$ci|local|from $fu\n"); xlog("L_DEBUG", "$ci|local|from $fu\n");
xlog("L_DEBUG", "$ci|local|to $tu\n"); xlog("L_DEBUG", "$ci|local|to $tu\n");
#!ifdef SIP_TRACE_ROLE
route(SIP_TRACE);
#!endif
#!ifdef PRESENCE_ROLE #!ifdef PRESENCE_ROLE
route(PRESENCE_LOCAL_NOTIFY); route(PRESENCE_LOCAL_NOTIFY);
#!endif #!endif


+ 0
- 4
kamailio/presence-notify.cfg View File

@ -38,10 +38,6 @@ route[PRESENCE_LOCAL_NOTIFY]
} }
#!endif #!endif
#!ifdef SIP_TRACE_ROLE
route(SEND_SIP_TRACE);
#!endif
} }
modparam("mqueue","mqueue", "name=presence_last_notity") modparam("mqueue","mqueue", "name=presence_last_notity")


+ 0
- 4
kamailio/presence-role.cfg View File

@ -109,10 +109,6 @@ route[HANDLE_SUBSCRIBE]
exit; exit;
} }
#!ifdef SIP_TRACE_ROLE
route(SEND_SIP_TRACE);
#!endif
#!ifdef NAT_TRAVERSAL_ROLE #!ifdef NAT_TRAVERSAL_ROLE
route(PRESENCE_NAT); route(PRESENCE_NAT);
#!endif #!endif


+ 13
- 1
kamailio/sip_trace-role.cfg View File

@ -4,6 +4,7 @@
#!trydef KZ_TRACE 0 #!trydef KZ_TRACE 0
#!trydef KZ_TRACE_INTERNAL 1 #!trydef KZ_TRACE_INTERNAL 1
#!trydef KZ_TRACE_EXTERNAL 1 #!trydef KZ_TRACE_EXTERNAL 1
#!trydef KZ_TRACE_LOCAL 1
#!trydef KZ_TRACE_INTERNAL_INCOMING 1 #!trydef KZ_TRACE_INTERNAL_INCOMING 1
#!trydef KZ_TRACE_INTERNAL_OUTGOING 1 #!trydef KZ_TRACE_INTERNAL_OUTGOING 1
#!trydef KZ_TRACE_EXTERNAL_INCOMING 1 #!trydef KZ_TRACE_EXTERNAL_INCOMING 1
@ -19,6 +20,7 @@
kazoo.trace_external = KZ_TRACE_EXTERNAL descr "activates tracing from external sources" 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_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_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_internal_outgoing = KZ_TRACE_INTERNAL_OUTGOING descr "traces the outgoing request to external sources after possible modification"
@ -63,10 +65,20 @@ route[SIP_TRACE_EXTERNAL]
} }
} }
route[SEND_SIP_TRACE]
route[SIP_TRACE_LOCAL]
{
if($sel(cfg_get.kazoo.trace_local) == 0) {
return;
}
sip_trace();
}
route[SIP_TRACE]
{ {
if (isflagset(FLAG_INTERNALLY_SOURCED)) { if (isflagset(FLAG_INTERNALLY_SOURCED)) {
route(SIP_TRACE_INTERNAL); route(SIP_TRACE_INTERNAL);
} else if (isflagset(FLAG_LOCAL_REQUEST)) {
route(SIP_TRACE_LOCAL);
} else { } else {
route(SIP_TRACE_EXTERNAL); route(SIP_TRACE_EXTERNAL);
} }


Loading…
Cancel
Save