How to stop traces via Dialplan

The Articles explains how to stop traces started from console or WMS interface via Dialplan.

Created: March 2020


Starting traces (specially long traces) is very frequent when trying to diagnose or troubleshoot a system. However,  traces need to be stopped once the event we are looking for occur, the closer the trace is stopped from the moment the event happened the better. Nonetheless this is difficult sometimes, specially if the system is very busy (files are overrode with new events if the system has much activity).

With the proposed Dialplan, users are able to stop traces themselves. Once a user experiences the event/ issue, the user can dial a number from a phone to stop the trace:

The previous entries were created in “users” Dialplan, although this can be created anywhere as long as end users are able to dial it:

  • Custom application -> Set(trace=${SHELL(sudo killall tcpdump)}) 
  • Play Sound -> Call trace stopped, please inform technical support
  • Hangup

Once the trace is stopped, it is available in the system for support team to download it.

In case traces are started from WMS interface (Settings -> Tools & Utilities -> Generate trace), an error notification "Trace generation failed" may be displayed. It doesn't have effect on downloading the traces file.