Jump to content

- Extended Call Routing

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

By Tom Wellige
September 2, 2019 in Extended Call Routing

## Recommended Posts

### Tom Wellige

Posted September 2, 2019

### Tom Wellige

- Root Moderator
- - 4.5k
  - 295

- #1

Posted September 2, 2019

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:

- Don't be shy, be chatty!

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.
3. Once you have the call id you can double click it and the picture changes already a little bit:
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)
5. You will now get all trace lines containing the call id listed in the lower part of the Notepad++ window:
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"
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
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":
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:
    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!

#### Archived

This topic is now archived and is closed to further replies.

Go to topic listing

## 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.