Jump to content

How to filter SwyxWare traces for call routing output of single call


Tom Wellige
 Share


Recommended Posts

By using PBXScript.OutputTrace (VBScript based Call Routing) or PBXScript.OutputTrace() (Lua based Call Routing) you can write what ever you want/need directly into the SwyxWare trace file.

 

This blog article describes in detail how to create meaningful trace output from your own call routing script code:

 

So how to find it the trace output back afterwards?

 

As the SwyxWare call routing is executed by the SwyxServer, the related traces are written into the server trace file. You can find this file depending of the type of SwyxWare you are using:

  • At customer premises (CPE):
    C:\ProgramData\Swyx\Traces\IpPbxSrv-xxx-yyy.log
     
  • SwyxON (cloud)
    1. In the SwyxON Portal select the UC Tenant in the menu.
    2. In the row of the corresponding UC tenant, click on Select.
    3. Select in the menu UC Tenant | Maintenance.
    4. Click on Trace files.
    5. Use the search field to filter the list of trace files.
    6. Click on Show file list to display the entire list of trace files.
    7. In the line of the appropriate trace file, i.e. IpPbxSrv-xxx-yyy.log, click on the download icon to download the file.

 

All you need to do is to filter all the stuff away you are not interested in and a proper text editor (with search/filter capabilities) and then follow these steps:

  • filter the call in question from the trace file
  • filter the call routing trace output from the single call traces

 

In the past I suggested to use UltraEdit, but as this is payware and another free and quite strong editor became available I suggest using Notepad++.

 

 

Just follow these steps:

 

  1. Open the server trace file in Notepad++.
     
  2. Identify the call in question in the trace.
    This is done by the unique call id every call gets within tracing.
    Do not mistake this call id with the call id showing up in the Call Detail Records (CDR). The trace call id will be reset to 0 when restarting the server service, the CDR call id will not be reset.
    You will find the call id in column 7 of the trace. By having a timestamp of the call in question and e.g. the caller number you should be able to identify a trace line of the call and get its call id.

    np1.png
     
  3. Once you have the call id you can double click it and the picture changes already a little bit:

    np2.png
     
  4. To search for all occurrences of the call id in the trace file press Ctrl-F (Search - Find...), check that the call id is displayed in the "Find what" field (1) and click on "Find All in Current Document" (2)

    np3.png
     
  5. You will now get all trace lines containing the call id listed in the lower part of the Notepad++ window:

    np4.png
     
  6. Select any line in the lower part of the window and press Ctrl-A and Ctrl-C. This will copy all trace lines into the Windows clipboard.
     
  7. Right click the first line in the lower window and select "Clear All"

    np5.png
     
  8. Press Ctrl-N (File - New) to open a new and empty editor window.
     
  9. Press Ctrl-V to paste the content of the Windows clipboard into it, i.e. all trace lines of the call in question

    np6.png
     
  10. The next step is to filter for all call routing trace output. The server consists of lots of different modules, and each module generates trace output. The responsible module name is stated 2 columns left to the call id. The module which is responsible for call routing is called "SrvScript":

    np7.png
     
  11. You can now repeat Step 4 to Step 9 to filter for call routing trace output. As the first columns of the trace are not of too much interest anymore, I suggest to scroll the editor window to the right to just the the trace comments. Here you can follow the call through the call routing script relatively easy:

    np8.png

    BTW: the output you see here is solely from own custom code within a GSE action, following the trace suggestions from the blog article Don't be shy, be chatty!

 

 

 

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.